dsh-deep-ptc-mode 1.6.1 → 1.7.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.
@@ -0,0 +1,72 @@
1
+ import z from '@deepseek-ai/schemastery';
2
+ import { installToolCompatibility, officialToolSource } from './tool-policy.mjs';
3
+ import { importHost } from './host.mjs';
4
+ import { DIRECTORY_TOOL, RESET_COMMAND, STATE_EVENT, STATE_KEY, blankState, parseState, foldToolState, searchCatalog, toolSchema } from './tool-catalog.mjs';
5
+
6
+ export const name = 'deep-ptc-tool-compatibility';
7
+ export const inject = ['tools', 'systemPrompt', 'commands', 'sessionProjections'];
8
+ export const Config = z.object({ enabled: z.boolean().default(true), preferences: z.any().default([]),
9
+ compact: z.boolean().default(true), sdkProvider: z.string().default('@deepseek-ai/dsh-tool-executor-ptc'),
10
+ skillProvider: z.string().default('@deepseek-ai/dsh-tool-skill') });
11
+
12
+ export async function apply(ctx, config) {
13
+ if (!config.enabled) return;
14
+ const { appendPluginRecord } = await importHost('@deepseek-ai/dsh-session');
15
+ const schema = { parse: parseState };
16
+ const projection = await ctx.sessionProjections.register({ key: STATE_KEY, stateVersion: 1,
17
+ stateSchema: schema, init: blankState, apply: foldToolState,
18
+ wire: { viewSchema: schema, view: state => state, summary: false } });
19
+ ctx.effect(() => () => projection.dispose());
20
+ const state = installToolCompatibility(ctx, { preferences: config.preferences, storage: {
21
+ read: session => projection.stateOf(session),
22
+ write: (session, value) => appendPluginRecord(session, STATE_EVENT, value),
23
+ } });
24
+ ctx.commands.register({ name: RESET_COMMAND, description: '重载所有工具状态 / Reload all tool states',
25
+ handler: ({ agent }) => {
26
+ const count = state.reset(agent);
27
+ return { kind: 'success', text: `已重载本对话全部工具状态,清除 ${count} 个故障标记。正在运行的任务继续执行。 / All tool states reloaded for this conversation; ${count} quarantine marks cleared. Running jobs continue.` };
28
+ } });
29
+ ctx.tools.register({ name: DIRECTORY_TOOL,
30
+ description: 'Find tools or skills by function without loading all schemas. search returns compact tool summaries; load reveals complete schemas for selected tool names; skills returns summaries to load with the official skill tool. Never executes task tools or reads skill bodies.',
31
+ parameters: { type: 'object', additionalProperties: false, properties: {
32
+ action: { type: 'string', enum: ['search', 'load', 'skills'] }, query: { type: 'string' },
33
+ names: { type: 'array', items: { type: 'string' } }, offset: { type: 'integer' }, limit: { type: 'integer' },
34
+ }, required: ['action'] },
35
+ output: { schema: {}, render: (_args, value) => [{ type: 'text', text: JSON.stringify(value) }] },
36
+ async execute(args, exec) {
37
+ if (args.action === 'load') return state.load(exec.agent, args.names, exec.toolSet);
38
+ if (args.action === 'search') return state.search(exec.agent, args, exec.toolSet);
39
+ if (args.action !== 'skills') throw new Error('Unknown directory action');
40
+ const skills = ctx.get('skills');
41
+ const loader = ctx.tools.definitions(exec.agent, exec.toolSet).find(def => officialToolSource(def) === config.skillProvider);
42
+ if (typeof skills?.list !== 'function' || !loader) return { available: false, results: [], note: 'The official skill loader is unavailable.' };
43
+ const { isModelInvocable } = await importHost('@deepseek-ai/dsh-skill');
44
+ const directory = ctx.get('workingDirectory');
45
+ const lookup = { scope: exec.agent, signal: exec.signal, cwd: directory ? await directory.ensure(exec.agent, exec.signal) : undefined };
46
+ const entries = (await skills.list(lookup)).filter(isModelInvocable).map(row => ({ name: row.name, description: row.description ?? '' }));
47
+ return { available: true, ...searchCatalog(entries, args.query, args.offset, args.limit), loadWith: loader.name,
48
+ note: 'Load the exact selected name through the official skill tool, then follow its instructions. Reuse instructions already in context.' };
49
+ },
50
+ });
51
+ // Only reduce the installed official renderer's untouched generated SDK section.
52
+ let renderer;
53
+ const sdkCache = new WeakMap();
54
+ const same = (left, right) => left?.length === right.length && left.every((def, index) => def === right[index]);
55
+ try { renderer = await importHost(config.sdkProvider); } catch { ctx.logger.warn('Deep PTC: SDK renderer unavailable; retaining the complete host SDK.'); }
56
+ if (renderer?.renderToolsSdk) ctx.on('system-prompt/assemble', async (_assembly, context, next) => {
57
+ const assembly = await next();
58
+ const runtime = ctx.get('ptcRuntime');
59
+ const render = runtime?.language === 'python' ? renderer.renderToolsSdkPy : runtime?.language === 'typescript' || runtime?.language === 'javascript' ? renderer.renderToolsSdk : undefined;
60
+ if (!render || !context.scope) return assembly;
61
+ const all = ctx.tools.definitions(context.scope, context.toolSet);
62
+ let cached = sdkCache.get(context.scope);
63
+ if (!cached || cached.render !== render || cached.format !== runtime.programFormat || !same(cached.all, all)) {
64
+ cached = { all, render, format: runtime.programFormat, original: render(all.map(toolSchema), runtime.programFormat) };
65
+ sdkCache.set(context.scope, cached);
66
+ }
67
+ const selected = state.sdkDefinitions(context.scope, context.toolSet, config.compact);
68
+ if (selected.length === all.length) return assembly;
69
+ if (!same(cached.selected, selected)) { cached.selected = selected; cached.text = render(selected.map(toolSchema), runtime.programFormat); }
70
+ return { ...assembly, sections: assembly.sections.map(section => section.name === 'tools:sdk' && section.text === cached.original ? { ...section, text: cached.text } : section) };
71
+ });
72
+ }
@@ -0,0 +1,184 @@
1
+ import { DIRECTORY_TOOL, blankState, toolSchema, searchCatalog } from './tool-catalog.mjs';
2
+ const officialDefinitions = new WeakMap();
3
+ const validName = name => typeof name === 'string' && name.length > 0 && name.length <= 256 && !/[\u0000-\u001f]/u.test(name);
4
+ const object = value => value !== null && typeof value === 'object' && !Array.isArray(value);
5
+ export function markOfficialTool(definition, provider = 'official PTC') { officialDefinitions.set(definition, provider); return definition; }
6
+ export function isOfficialTool(definition) { return officialDefinitions.has(definition); }
7
+ export function officialToolSource(definition) { return officialDefinitions.get(definition); }
8
+ export const compatibilityPolicy = `## Efficient tool cooperation
9
+ - Search available external capabilities by function using deep_ptc_tools. Load only matching definitions; then use their actual schemas. If none fit, use an admitted official PTC tool. Provider discovery/loaders remain authoritative for provider-specific SDKs.
10
+ - An external capability that fails is quarantined for this conversation. Do not retry, probe, diagnose or repair it; promptly use a working equivalent or the official fallback and focus on finishing the task. Only the user's Reload all tool states button resets quarantine.
11
+ - At task completion, briefly list the failed tool names and their declared plugins (or unknown source) and say there may be a compatibility problem. Do not claim a root cause. Mention completed work first.
12
+ - Preserve authorization, cancellation, the selected shell and managed jobs. Empty results and running/background jobs are not failures. Before replacing a partially completed write or command, read only the task state needed to avoid duplicate effects; this is task recovery, not plugin diagnosis.
13
+ - Search skills through deep_ptc_tools(action=skills), then use the official loader named by loadWith and follow its full instructions. Reuse already-loaded instructions in the current context; discovery summaries are not skill instructions.
14
+ - Never bypass hidden tools, policy denials, cancelled work or an unavailable whole executor. Deep PTC's existing foreground/steering wrappers continue to govern official execution.`;
15
+ export function classifyToolOutcome(exec, result) {
16
+ if (exec.signal?.aborted) return { kind: 'cancelled', effect: 'unknown' };
17
+ const value = object(result?.value) ? result.value : undefined;
18
+ if (value?.cancelled === true || ['cancelled', 'aborted'].includes(value?.status)) return { kind: 'cancelled', effect: 'unknown' };
19
+ if (value?.sandbox?.denied === true) return { kind: 'denied', effect: 'unknown' };
20
+ // Host job promotion is success even when the command has not finished yet.
21
+ if (!result?.isError && ['background', 'promoted'].includes(value?.kind)) return undefined;
22
+ if (!result?.isError && value?.kind === 'foreground' && typeof value.exitCode === 'number' && value.exitCode !== 0)
23
+ return { kind: 'command', effect: 'unknown' };
24
+ const status = typeof value?.status === 'string' ? value.status.toLowerCase() : '';
25
+ const failure = object(value?.failure) ? value.failure : undefined;
26
+ // A bounded read/page may be partial by design. Quarantine only a reported partial failure,
27
+ // not an ordinary continuation result with no failure indication.
28
+ if (!result?.isError && status === 'partial' && !failure) return undefined;
29
+ const failed = result?.isError === true || ['failed', 'error', 'unavailable', 'partial'].includes(status);
30
+ if (!failed) return undefined;
31
+ const rawCode = result?.error?.code ?? failure?.code;
32
+ const code = typeof rawCode === 'string' && /^[A-Z0-9_:-]{1,96}$/u.test(rawCode) ? rawCode : '';
33
+ const effect = ['none', 'unknown', 'partial', 'completed'].includes(failure?.effectState)
34
+ ? failure.effectState : 'unknown';
35
+ if (/ABORT|CANCEL/u.test(code) || status === 'cancelled') return { kind: 'cancelled', effect };
36
+ if (/DENIED|FORBIDDEN|POLICY|APPROVAL|PERMISSION|EACCES|EPERM|READ_ONLY/u.test(code))
37
+ return { kind: 'denied', effect };
38
+ if (/ARGUMENT|INVALID_ARGS|VALIDATION|ENOENT|NOT_FOUND/u.test(code) && code !== 'UNKNOWN_TOOL')
39
+ return { kind: 'input', effect };
40
+ if (status === 'partial') return { kind: 'partial', effect };
41
+ if (/UNKNOWN_TOOL|UNAVAILABLE|WORKER_MISSING|RUNTIME_MISSING/u.test(code) || status === 'unavailable')
42
+ return { kind: 'unavailable', effect };
43
+ return { kind: 'failure', effect };
44
+ }
45
+
46
+ export function normalizePreferences(preferences = []) {
47
+ if (!Array.isArray(preferences) || preferences.length > 32) throw new Error('toolPreferences must be an array with at most 32 entries');
48
+ const seen = new Set();
49
+ return preferences.map(row => {
50
+ if (!object(row) || !validName(row.preferred) || row.preferred === 'run_code'
51
+ || !Array.isArray(row.fallback) || row.fallback.length === 0 || row.fallback.length > 12
52
+ || row.fallback.some(name => !validName(name) || name === 'run_code' || name === row.preferred)
53
+ || seen.has(row.preferred)) throw new Error('Each tool preference needs a unique preferred tool and 1–12 distinct fallback names (not run_code)');
54
+ if (new Set(row.fallback).size !== row.fallback.length) throw new Error('Duplicate fallback names in toolPreferences');
55
+ seen.add(row.preferred);
56
+ return { preferred: row.preferred, fallback: [...row.fallback] };
57
+ });
58
+ }
59
+
60
+ export function createCompatibilityState(tools, preferences = [], storage = {}) {
61
+ const routes = normalizePreferences(preferences);
62
+ let sessions = new WeakMap();
63
+ let calls = new WeakMap();
64
+ const sessionOf = agent => object(agent?.session) ? agent.session : agent;
65
+ function entry(agent) {
66
+ if (storage.read && !object(agent?.session)) return undefined;
67
+ const session = sessionOf(agent);
68
+ if (!object(session)) return undefined;
69
+ let row = sessions.get(session);
70
+ if (!row) { row = { state: storage.read?.(session) ?? blankState(), selected: new Set() }; sessions.set(session, row); }
71
+ const current = storage.read?.(session);
72
+ if (current && current !== row.state) { if (current.epoch !== row.state.epoch) row.selected.clear(); row.state = current; }
73
+ return row;
74
+ }
75
+ function save(agent, row, state) {
76
+ storage.write?.(sessionOf(agent), state); // Persist first: an unsuccessful reset never clears quarantine.
77
+ row.state = state;
78
+ }
79
+ function definitions(agent, toolSet) { return tools.definitions(agent, toolSet).filter(def => validName(def.name)); }
80
+ const blocked = (agent, name) => entry(agent)?.state.blocked.some(row => row.name === name) ?? false;
81
+ const providerOf = def => officialDefinitions.get(def) ?? (typeof def?.deepPtc?.provider === 'string' ? def.deepPtc.provider.slice(0, 160) : 'unknown plugin');
82
+ const api = {
83
+ dispatched(exec) {
84
+ const row = entry(exec.agent);
85
+ if (!row || calls.has(exec)) return;
86
+ const definition = tools.get(exec.name, exec.agent, exec.toolSet);
87
+ calls.set(exec, { epoch: row.state.epoch, definition, official: !!definition && isOfficialTool(definition), provider: providerOf(definition) });
88
+ },
89
+ guard(exec) { return blocked(exec.agent, exec.name) ? `Deep PTC: ${JSON.stringify(exec.name)} is quarantined in this conversation. Do not retry or diagnose it. Continue with another admitted equivalent or official tool. Only the user can reload all tool states.` : undefined; },
90
+ observe(exec, result) {
91
+ const call = calls.get(exec);
92
+ if (!call || call.official || exec.name === DIRECTORY_TOOL || exec.name === 'run_code') return;
93
+ const row = entry(exec.agent);
94
+ if (!row || call.epoch !== row.state.epoch || blocked(exec.agent, exec.name)) return;
95
+ const outcome = classifyToolOutcome(exec, result);
96
+ // Authorization and cancelled actions must never be converted to provider failover.
97
+ if (!outcome || ['denied', 'cancelled', 'command', 'input'].includes(outcome.kind)) return;
98
+ const failure = { name: exec.name, provider: call.provider, kind: outcome.kind };
99
+ save(exec.agent, row, { ...row.state, blocked: [...row.state.blocked, failure] });
100
+ row.selected.delete(exec.name);
101
+ },
102
+ reset(agent) {
103
+ const row = entry(agent);
104
+ if (!row) throw new Error('No conversation is active');
105
+ const count = row.state.blocked.length;
106
+ save(agent, row, { ...blankState(), epoch: row.state.epoch + 1 });
107
+ row.selected.clear();
108
+ return count;
109
+ },
110
+ status(agent) { return entry(agent)?.state ?? blankState(); },
111
+ sdkDefinitions(agent, toolSet, compact = true) {
112
+ const row = entry(agent);
113
+ const excluded = new Set(row?.state.blocked.map(item => item.name));
114
+ return definitions(agent, toolSet).filter(def => !excluded.has(def.name)
115
+ && (!compact || isOfficialTool(def) || def.name === DIRECTORY_TOOL || row?.selected.has(def.name)));
116
+ },
117
+ search(agent, args, toolSet) {
118
+ const excluded = new Set(entry(agent)?.state.blocked.map(item => item.name));
119
+ const visible = definitions(agent, toolSet).filter(def => def.name !== DIRECTORY_TOOL && !excluded.has(def.name));
120
+ const external = visible.filter(def => !isOfficialTool(def));
121
+ const result = searchCatalog(external, args.query, args.offset, args.limit);
122
+ if (result.total) return { layer: 'external', ...result };
123
+ return { layer: 'official', ...searchCatalog(visible.filter(isOfficialTool), args.query, args.offset, args.limit) };
124
+ },
125
+ load(agent, names, toolSet) {
126
+ if (!Array.isArray(names) || names.length < 1 || names.length > 6 || names.some(name => !validName(name))) throw new Error('Load 1–6 exact tool names');
127
+ const live = new Map(definitions(agent, toolSet).map(def => [def.name, def]));
128
+ const row = entry(agent);
129
+ if (!row) throw new Error('No conversation is active');
130
+ let budget = 16000;
131
+ const loaded = [], unavailable = [];
132
+ for (const name of new Set(names)) {
133
+ const def = live.get(name);
134
+ if (!def || blocked(agent, name) || name === DIRECTORY_TOOL) { unavailable.push(name); continue; }
135
+ const schema = toolSchema(def);
136
+ const size = Buffer.byteLength(JSON.stringify(schema), 'utf8');
137
+ if (size > budget) { unavailable.push(name); continue; }
138
+ budget -= size;
139
+ row.selected.delete(name);
140
+ row.selected.add(name);
141
+ if (row.selected.size > 12) row.selected.delete(row.selected.values().next().value);
142
+ loaded.push(schema);
143
+ }
144
+ return { loaded, unavailable, nextStep: true, note: 'Unavailable names are hidden, quarantined, or exceed the complete-schema budget. No tool was executed. Use an equivalent or load fewer definitions.' };
145
+ },
146
+ text({ scope: agent, toolSet } = {}) {
147
+ if (!object(agent)) return '';
148
+ const row = entry(agent);
149
+ if (!row) return '';
150
+ const state = row.state;
151
+ const lines = [];
152
+ if (state.blocked.length) {
153
+ lines.push('Quarantined for this conversation; no retries or diagnosis. Finish the task using working equivalents. At completion briefly report these tool/plugin names and a possible compatibility problem:');
154
+ lines.push(JSON.stringify(state.blocked.slice(0, 8).map(({name,provider}) => ({name,provider}))));
155
+ if (state.blocked.length > 8) lines.push(`${state.blocked.length} tools total; the user interface retains the full list.`);
156
+ lines.push('Check only necessary task state before replacing a possibly partial mutation. Reset is a user action.');
157
+ }
158
+ const available = routes.length ? new Set(definitions(agent, toolSet).map(def => def.name)) : new Set();
159
+ for (const route of routes) {
160
+ if (available.has(route.preferred) && !blocked(agent, route.preferred)) lines.push(`Prefer ${JSON.stringify(route.preferred)} when applicable; visible equivalents: ${JSON.stringify(route.fallback.filter(name => available.has(name) && !blocked(agent, name)))}. Read live schemas.`);
161
+ }
162
+ return lines.join('\n');
163
+ },
164
+ dispose() { sessions = new WeakMap(); calls = new WeakMap(); },
165
+ };
166
+ return api;
167
+ }
168
+
169
+ export function installToolCompatibility(ctx, { enabled = true, preferences = [], storage } = {}) {
170
+ if (!enabled) return;
171
+ const state = createCompatibilityState(ctx.tools, preferences, storage);
172
+ ctx.systemPrompt.section({ name: 'deep-ptc:tool-compatibility', order: 10194, text: compatibilityPolicy });
173
+ ctx.systemPrompt.context({ name: 'deep-ptc:tool-recovery', order: 122, text: context => state.text(context) });
174
+ ctx.tools.guard(exec => state.guard(exec));
175
+ ctx.on('tools/execute', (exec, next) => {
176
+ const reason = state.guard(exec);
177
+ if (reason) return Promise.resolve({ isError: true, error: { message: reason }, content: [{ type: 'text', text: reason }] });
178
+ state.dispatched(exec);
179
+ return next();
180
+ });
181
+ ctx.on('tools/result', (exec, result) => state.observe(exec, result));
182
+ ctx.effect(() => () => state.dispose());
183
+ return state;
184
+ }
package/lib/upstream.mjs CHANGED
File without changes
package/package.json CHANGED
@@ -1,115 +1,125 @@
1
- {
2
- "name": "dsh-deep-ptc-mode",
3
- "version": "1.6.1",
4
- "description": "Deep PTC mode for DeepSeek Harness: no token rationing, code-enforced no-sleep (long commands move to the background and user messages interrupt waits), plans by task size (approval only for long tasks), asks instead of guessing intent, and runs commands in WSL, PowerShell, Zsh or Bash.",
5
- "type": "module",
6
- "keywords": [
7
- "dsh-plugin",
8
- "deepseek-harness",
9
- "agent-preset",
10
- "ptc",
11
- "agent-team",
12
- "subagent",
13
- "clarification",
14
- "background-jobs"
15
- ],
16
- "license": "MIT",
17
- "author": {
18
- "name": "lishize20040802-rgb",
19
- "email": "lishize20040802@gmail.com",
20
- "url": "https://github.com/lishize20040802-rgb"
21
- },
22
- "repository": {
23
- "type": "git",
24
- "url": "git+https://github.com/lishize20040802-rgb/dsh-deep-ptc-mode.git"
25
- },
26
- "homepage": "https://github.com/lishize20040802-rgb/dsh-deep-ptc-mode#readme",
27
- "bugs": {
28
- "url": "https://github.com/lishize20040802-rgb/dsh-deep-ptc-mode/issues"
29
- },
30
- "files": [
31
- "cordis.patch.yml",
32
- "lib",
33
- "compatibility.json",
34
- "README.md",
35
- "README.zh.md",
36
- "CHANGELOG.md",
37
- "assets/icon.png"
38
- ],
39
- "engines": {
40
- "node": ">=24",
41
- "dsh": ">=0.2.1-rc.5"
42
- },
43
- "dsh": {
44
- "manifestVersion": 1,
45
- "bundle": {
46
- "patch": "./cordis.patch.yml"
47
- },
48
- "client": {
49
- "platform": "web",
50
- "inject": [
51
- "@deepseek-ai/dsh-client-locale",
52
- "@deepseek-ai/dsh-client-ui-settings",
53
- "@deepseek-ai/dsh-client-ui-plugin-manager"
54
- ]
55
- }
56
- },
57
- "main": "lib/index.mjs",
58
- "exports": {
59
- ".": "./lib/index.mjs",
60
- "./executor": "./lib/executor.mjs",
61
- "./terminal": "./lib/terminal.mjs",
62
- "./jobs-tool": "./lib/jobs-tool.mjs",
63
- "./ask-user": "./lib/ask-user.mjs",
64
- "./guard": "./lib/guard.mjs",
65
- "./environment": "./lib/environment.mjs",
66
- "./client": "./lib/client.js",
67
- "./package.json": "./package.json"
68
- },
69
- "scripts": {
70
- "test": "node --test",
71
- "check": "node scripts/check.mjs",
72
- "check:upstream": "node scripts/check.mjs --upstream",
73
- "prepack": "npm run check && npm test",
74
- "sync:snapshot": "node scripts/sync-snapshot.mjs"
75
- },
76
- "peerDependencies": {
77
- "@deepseek-ai/schemastery": "^3.18.4",
78
- "@deepseek-ai/dsh-client-ui-renderer": ">=0.2.1-rc.5",
79
- "@deepseek-ai/dsh-client-ui-settings": ">=0.2.1-rc.5",
80
- "@deepseek-ai/dsh-client-ui-slots": ">=0.2.1-rc.5",
81
- "@deepseek-ai/dsh-client-locale": ">=0.2.1-rc.5",
82
- "@deepseek-ai/dsh-web-app": ">=0.2.1-rc.5",
83
- "@deepseek-ai/dsh-base": ">=0.2.1-rc.5"
84
- },
85
- "peerDependenciesMeta": {
86
- "@deepseek-ai/schemastery": {
87
- "optional": true
88
- },
89
- "@deepseek-ai/dsh-client-ui-renderer": {
90
- "optional": true
91
- },
92
- "@deepseek-ai/dsh-client-ui-settings": {
93
- "optional": true
94
- },
95
- "@deepseek-ai/dsh-client-ui-slots": {
96
- "optional": true
97
- },
98
- "@deepseek-ai/dsh-client-locale": {
99
- "optional": true
100
- },
101
- "@deepseek-ai/dsh-web-app": {
102
- "optional": true
103
- },
104
- "@deepseek-ai/dsh-base": {
105
- "optional": true
106
- }
107
- },
108
- "dependencies": {
109
- "js-yaml": "4.3.2"
110
- },
111
- "devDependencies": {
112
- "react": "18.3.1",
113
- "react-test-renderer": "18.3.1"
114
- }
115
- }
1
+ {
2
+ "name": "dsh-deep-ptc-mode",
3
+ "version": "1.7.2",
4
+ "description": "Lightweight Deep PTC: tool/skill discovery, multi-plugin cooperation, official fallback and interruptible jobs. / 轻量深度 PTC:工具与技能按需发现、多插件协作、官方兜底、后台可插话。",
5
+ "type": "module",
6
+ "keywords": [
7
+ "dsh-plugin",
8
+ "deepseek-harness",
9
+ "agent-preset",
10
+ "ptc",
11
+ "agent-team",
12
+ "subagent",
13
+ "clarification",
14
+ "background-jobs",
15
+ "plugin-compatibility",
16
+ "tool-cooperation",
17
+ "official-ptc-fallback"
18
+ ],
19
+ "license": "MIT",
20
+ "author": {
21
+ "name": "lishize20040802-rgb",
22
+ "email": "lishize20040802@gmail.com",
23
+ "url": "https://github.com/lishize20040802-rgb"
24
+ },
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/lishize20040802-rgb/dsh-deep-ptc-mode.git"
28
+ },
29
+ "homepage": "https://github.com/lishize20040802-rgb/dsh-deep-ptc-mode#readme",
30
+ "bugs": {
31
+ "url": "https://github.com/lishize20040802-rgb/dsh-deep-ptc-mode/issues"
32
+ },
33
+ "files": [
34
+ "cordis.patch.yml",
35
+ "lib",
36
+ "compatibility.json",
37
+ "README.md",
38
+ "README.zh.md",
39
+ "CHANGELOG.md",
40
+ "assets/icon.png"
41
+ ],
42
+ "engines": {
43
+ "node": ">=24",
44
+ "dsh": ">=0.2.2-rc.1"
45
+ },
46
+ "dsh": {
47
+ "manifestVersion": 1,
48
+ "bundle": {
49
+ "patch": "./cordis.patch.yml"
50
+ },
51
+ "client": {
52
+ "platform": "web",
53
+ "inject": [
54
+ "@deepseek-ai/dsh-client-locale",
55
+ "@deepseek-ai/dsh-client-ui-settings",
56
+ "@deepseek-ai/dsh-client-ui-plugin-manager",
57
+ "@deepseek-ai/dsh-client-ui-commands"
58
+ ]
59
+ }
60
+ },
61
+ "main": "lib/index.mjs",
62
+ "exports": {
63
+ ".": "./lib/index.mjs",
64
+ "./executor": "./lib/executor.mjs",
65
+ "./terminal": "./lib/terminal.mjs",
66
+ "./jobs-tool": "./lib/jobs-tool.mjs",
67
+ "./ask-user": "./lib/ask-user.mjs",
68
+ "./guard": "./lib/guard.mjs",
69
+ "./official-tools": "./lib/official-tools.mjs",
70
+ "./tool-compatibility": "./lib/tool-compatibility.mjs",
71
+ "./environment": "./lib/environment.mjs",
72
+ "./client": "./lib/client.js",
73
+ "./package.json": "./package.json"
74
+ },
75
+ "scripts": {
76
+ "test": "node --test",
77
+ "check": "node scripts/check.mjs",
78
+ "check:upstream": "node scripts/check.mjs --upstream",
79
+ "prepack": "npm run check && npm test",
80
+ "sync:snapshot": "node scripts/sync-snapshot.mjs"
81
+ },
82
+ "peerDependencies": {
83
+ "@deepseek-ai/schemastery": "^3.18.4",
84
+ "@deepseek-ai/dsh-client-ui-renderer": ">=0.2.2-rc.1",
85
+ "@deepseek-ai/dsh-client-ui-settings": ">=0.2.2-rc.1",
86
+ "@deepseek-ai/dsh-client-ui-slots": ">=0.2.2-rc.1",
87
+ "@deepseek-ai/dsh-client-locale": ">=0.2.2-rc.1",
88
+ "@deepseek-ai/dsh-web-app": ">=0.2.2-rc.1",
89
+ "@deepseek-ai/dsh-base": ">=0.2.2-rc.1",
90
+ "@deepseek-ai/dsh-client-ui-commands": ">=0.2.2-rc.1"
91
+ },
92
+ "peerDependenciesMeta": {
93
+ "@deepseek-ai/schemastery": {
94
+ "optional": true
95
+ },
96
+ "@deepseek-ai/dsh-client-ui-renderer": {
97
+ "optional": true
98
+ },
99
+ "@deepseek-ai/dsh-client-ui-settings": {
100
+ "optional": true
101
+ },
102
+ "@deepseek-ai/dsh-client-ui-slots": {
103
+ "optional": true
104
+ },
105
+ "@deepseek-ai/dsh-client-locale": {
106
+ "optional": true
107
+ },
108
+ "@deepseek-ai/dsh-web-app": {
109
+ "optional": true
110
+ },
111
+ "@deepseek-ai/dsh-base": {
112
+ "optional": true
113
+ },
114
+ "@deepseek-ai/dsh-client-ui-commands": {
115
+ "optional": true
116
+ }
117
+ },
118
+ "dependencies": {
119
+ "js-yaml": "4.3.2"
120
+ },
121
+ "devDependencies": {
122
+ "react": "18.3.1",
123
+ "react-test-renderer": "18.3.1"
124
+ }
125
+ }