@nexus-aethra/dshell-commands 0.1.0
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/LICENSE +21 -0
- package/lib/host-locales.js +28 -0
- package/lib/host-locales.js.map +1 -0
- package/lib/index.js +281 -0
- package/lib/index.js.map +1 -0
- package/lib/types/host-locales.d.ts +31 -0
- package/lib/types/host-locales.d.ts.map +1 -0
- package/lib/types/index.d.ts +25 -0
- package/lib/types/index.d.ts.map +1 -0
- package/package.json +52 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Nexus Aethra
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `dshell-commands`'s HOST dictionaries — the copy this package's `/new`
|
|
3
|
+
* command composes that a reader sees.
|
|
4
|
+
*
|
|
5
|
+
* A command result renders in dsh's command-result surface, so its language has
|
|
6
|
+
* to match the screen even though the host writes it. `ctx.dshellHostCopy`
|
|
7
|
+
* answers which language that is (see the std contract); these dictionaries are
|
|
8
|
+
* what it binds. The model-facing half of this package — every tool
|
|
9
|
+
* description, parameter description and `execute` return line — is deliberately
|
|
10
|
+
* absent: the model reads those, not the user, and they stay in their source
|
|
11
|
+
* language.
|
|
12
|
+
*
|
|
13
|
+
* The browser face keeps its own dictionaries elsewhere: the two sets are
|
|
14
|
+
* disjoint by construction, and only this file is reachable from the host half.
|
|
15
|
+
*/
|
|
16
|
+
/** Simplified Chinese dictionary and key-set source of truth. */
|
|
17
|
+
export const zh = {
|
|
18
|
+
'command.new.created': '新会话已创建:{id}',
|
|
19
|
+
'command.new.failed': '创建会话失败:{message}',
|
|
20
|
+
};
|
|
21
|
+
/** English dictionary, checked complete against the Chinese key set. */
|
|
22
|
+
export const en = {
|
|
23
|
+
'command.new.created': 'New session created: {id}',
|
|
24
|
+
'command.new.failed': 'Failed to create a session: {message}',
|
|
25
|
+
};
|
|
26
|
+
/** The pair `ctx.dshellHostCopy.bind()` takes. */
|
|
27
|
+
export const hostCopy = { zh, en };
|
|
28
|
+
//# sourceMappingURL=host-locales.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host-locales.js","sourceRoot":"","sources":["../src/host-locales.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,iEAAiE;AACjE,MAAM,CAAC,MAAM,EAAE,GAAG;IAChB,qBAAqB,EAAE,aAAa;IACpC,oBAAoB,EAAE,kBAAkB;CACR,CAAA;AAKlC,wEAAwE;AACxE,MAAM,CAAC,MAAM,EAAE,GAAG;IAChB,qBAAqB,EAAE,2BAA2B;IAClD,oBAAoB,EAAE,uCAAuC;CACd,CAAA;AAEjD,kDAAkD;AAClD,MAAM,CAAC,MAAM,QAAQ,GAAgD,EAAE,EAAE,EAAE,EAAE,EAAE,CAAA"}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* dshell-commands host face — Phases 6/8.
|
|
3
|
+
*
|
|
4
|
+
* `/new` creates a fresh session with the invoking session's cwd (the dock
|
|
5
|
+
* additionally intercepts `/new` client-side, because the "current session"
|
|
6
|
+
* selection is client-only state no host command can switch). `/compact` is
|
|
7
|
+
* dsh's own `command-compact` — dshell must not re-register it; the dock
|
|
8
|
+
* routes it to the stock executor.
|
|
9
|
+
* `dshell_get_agent_terminal` hands the agent the addressable
|
|
10
|
+
* `TerminalSessionId` of its OWN shell — the PTY the bridge spawns for it,
|
|
11
|
+
* separate from the one the user types into.
|
|
12
|
+
* `dshell_terminal_read` reads the USER's shell (read-only) at command
|
|
13
|
+
* granularity — incremental since an opaque cursor, or the latest commands.
|
|
14
|
+
*/
|
|
15
|
+
import { defineTool } from '@deepseek-ai/dsh-tools';
|
|
16
|
+
import { hostCopy } from './host-locales.js';
|
|
17
|
+
export const name = '@nexus-aethra/dshell-commands';
|
|
18
|
+
// `dshellHostCopy` is what the `/new` command's result lines are localized
|
|
19
|
+
// through, and `sessionController` is what creates the session the command
|
|
20
|
+
// reports on — both are accessors this module reads, so both have to be
|
|
21
|
+
// declared here or the handler throws "cannot get property … without inject".
|
|
22
|
+
export const inject = [
|
|
23
|
+
'commands', 'tools', 'dshellTerminalBridge', 'dshellHostCopy', 'sessionController',
|
|
24
|
+
];
|
|
25
|
+
/** Bytes one `dshell_terminal_output` call returns by default. */
|
|
26
|
+
const DEFAULT_OUTPUT_SLICE_BYTES = 2 * 1024;
|
|
27
|
+
/**
|
|
28
|
+
* Ceiling on one slice.
|
|
29
|
+
*
|
|
30
|
+
* The point of the tool is that reading is bounded: a caller must not be able to
|
|
31
|
+
* pull a command's output in one gulp and blow up the context the tool exists to
|
|
32
|
+
* protect.
|
|
33
|
+
*/
|
|
34
|
+
const MAX_OUTPUT_SLICE_BYTES = 8 * 1024;
|
|
35
|
+
/**
|
|
36
|
+
* UTF-8 byte length of a string.
|
|
37
|
+
*
|
|
38
|
+
* The offsets this tool speaks are bytes, while `String.length` counts UTF-16
|
|
39
|
+
* units. Counted here rather than with `Buffer` so this host-only package stays
|
|
40
|
+
* free of Node types for one arithmetic call.
|
|
41
|
+
*/
|
|
42
|
+
function utf8Bytes(text) {
|
|
43
|
+
let bytes = 0;
|
|
44
|
+
for (const character of text) {
|
|
45
|
+
const code = character.codePointAt(0) ?? 0;
|
|
46
|
+
bytes += code < 0x80 ? 1 : code < 0x800 ? 2 : code < 0x1_0000 ? 3 : 4;
|
|
47
|
+
}
|
|
48
|
+
return bytes;
|
|
49
|
+
}
|
|
50
|
+
/** Render one command record for the model. */
|
|
51
|
+
function formatCommand(record, includeOutput) {
|
|
52
|
+
const name = record.command.length > 0 ? record.command : '(未跟踪的命令)';
|
|
53
|
+
const exit = record.exitCode === null ? '' : ` exit ${String(record.exitCode)}`;
|
|
54
|
+
// The seq travels with the line: it is the key dshell_terminal_output takes to
|
|
55
|
+
// read more of this command's output.
|
|
56
|
+
const head = `$ ${name}${exit} · seq=${String(record.seq)}`;
|
|
57
|
+
const output = record.output.trim();
|
|
58
|
+
if (!includeOutput || output.length === 0)
|
|
59
|
+
return head;
|
|
60
|
+
return `${head}\n${output}`;
|
|
61
|
+
}
|
|
62
|
+
export function apply(ctx) {
|
|
63
|
+
const bridge = ctx.dshellTerminalBridge;
|
|
64
|
+
// Structural read, as this repo reads dshell services whose accessor
|
|
65
|
+
// declaration lives with the PROVIDER (dshell-terminal-bridge): a consumer's tsc program
|
|
66
|
+
// does not include that package's source, and the `inject` list above is what
|
|
67
|
+
// guarantees the service is there. Bound once, read at call time, so a
|
|
68
|
+
// language switch reaches the next `/new` result without re-binding.
|
|
69
|
+
const copy = ctx.get('dshellHostCopy');
|
|
70
|
+
const t = copy.bind(hostCopy);
|
|
71
|
+
ctx.commands.register({
|
|
72
|
+
name: 'new',
|
|
73
|
+
description: 'Create a new dshell session inheriting the current working directory.',
|
|
74
|
+
handler: async (invocation) => {
|
|
75
|
+
try {
|
|
76
|
+
const cwd = invocation.agent.session?.header?.cwd;
|
|
77
|
+
const created = await ctx.sessionController.create(cwd === undefined ? {} : { cwd });
|
|
78
|
+
return { kind: 'success', text: t('command.new.created', { id: String(created.sessionId) }) };
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
return {
|
|
82
|
+
kind: 'error',
|
|
83
|
+
text: t('command.new.failed', {
|
|
84
|
+
message: error instanceof Error ? error.message : String(error),
|
|
85
|
+
}),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
ctx.tools.register(defineTool({
|
|
91
|
+
name: 'dshell_get_agent_terminal',
|
|
92
|
+
description: 'Return the terminal session id of YOUR OWN shell — a PTY spawned for you, '
|
|
93
|
+
+ 'starting in the directory the user\'s shell is in. Pass it to terminal_send / '
|
|
94
|
+
+ 'terminal_read / terminal_signal to run commands. It is a separate shell from the one '
|
|
95
|
+
+ 'the user types into, so your commands and theirs never block each other, and the user '
|
|
96
|
+
+ 'can watch yours live in the task card. The user\'s own shell is only readable, via '
|
|
97
|
+
+ 'dshell_terminal_read.',
|
|
98
|
+
parameters: {},
|
|
99
|
+
output: {
|
|
100
|
+
schema: {
|
|
101
|
+
type: 'object',
|
|
102
|
+
additionalProperties: false,
|
|
103
|
+
properties: { sessionId: { type: 'string', required: true } },
|
|
104
|
+
},
|
|
105
|
+
render: (_args, value) => [{ type: 'text', text: value.sessionId }],
|
|
106
|
+
},
|
|
107
|
+
async execute(_args, exec) {
|
|
108
|
+
const agent = exec.agent;
|
|
109
|
+
if (agent === undefined)
|
|
110
|
+
throw new Error('dshell_get_agent_terminal requires an agent context');
|
|
111
|
+
return { sessionId: String(await bridge.agentTerminalId(String(agent.id))) };
|
|
112
|
+
},
|
|
113
|
+
presentCall: () => ({ card: 'generic', title: '获取 AI 终端', kind: 'read' }),
|
|
114
|
+
}));
|
|
115
|
+
ctx.tools.register(defineTool({
|
|
116
|
+
name: 'dshell_terminal_read',
|
|
117
|
+
description: 'Read the USER\'s terminal — the shell they are typing into — at command '
|
|
118
|
+
+ 'granularity, read-only. Without a cursor it lists the most recent commands; with the '
|
|
119
|
+
+ 'cursor a previous call returned, it reports only what happened since — the way to catch '
|
|
120
|
+
+ 'up on what the user has been doing without asking them. Output is stripped of terminal '
|
|
121
|
+
+ 'control codes. Run your own commands in the shell from '
|
|
122
|
+
+ 'dshell_get_agent_terminal instead: typing into the user\'s terminal takes the foreground '
|
|
123
|
+
+ 'away from them.',
|
|
124
|
+
parameters: {
|
|
125
|
+
cursor: {
|
|
126
|
+
type: 'string',
|
|
127
|
+
description: 'Opaque cursor from a previous call. Omit to list the most recent commands.',
|
|
128
|
+
},
|
|
129
|
+
limit: {
|
|
130
|
+
type: 'integer',
|
|
131
|
+
description: 'Without a cursor: how many recent commands to list (default 20).',
|
|
132
|
+
},
|
|
133
|
+
includeOutput: {
|
|
134
|
+
type: 'boolean',
|
|
135
|
+
description: 'Without a cursor: include each command\'s output (default true).',
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
output: {
|
|
139
|
+
schema: {
|
|
140
|
+
type: 'object',
|
|
141
|
+
additionalProperties: false,
|
|
142
|
+
properties: {
|
|
143
|
+
text: { type: 'string', required: true },
|
|
144
|
+
cursor: { type: 'string', required: true },
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
render: (_args, value) => [{
|
|
148
|
+
type: 'text',
|
|
149
|
+
text: value.cursor.length > 0 ? `${value.text}\n\ncursor: ${value.cursor}` : value.text,
|
|
150
|
+
}],
|
|
151
|
+
},
|
|
152
|
+
async execute(args, exec) {
|
|
153
|
+
const agent = exec.agent;
|
|
154
|
+
if (agent === undefined)
|
|
155
|
+
throw new Error('dshell_terminal_read requires an agent context');
|
|
156
|
+
const sessionId = String(agent.id);
|
|
157
|
+
const NO_SHELL = '主终端尚未打开:用户还没有打开这个会话的终端。';
|
|
158
|
+
if (args.cursor !== undefined && args.cursor.length > 0) {
|
|
159
|
+
const delta = bridge.since(sessionId, args.cursor);
|
|
160
|
+
if (delta === undefined)
|
|
161
|
+
return { text: NO_SHELL, cursor: '' };
|
|
162
|
+
const lines = [];
|
|
163
|
+
if (delta.cleared) {
|
|
164
|
+
lines.push('终端已重启,游标已失效;下面是新终端的状态。');
|
|
165
|
+
}
|
|
166
|
+
if (delta.newCommandCount > 0) {
|
|
167
|
+
lines.push(`完成 ${String(delta.newCommandCount)} 条命令:`);
|
|
168
|
+
for (const command of delta.commands)
|
|
169
|
+
lines.push(formatCommand(command, true));
|
|
170
|
+
}
|
|
171
|
+
const text = delta.text.trim();
|
|
172
|
+
if (text.length > 0)
|
|
173
|
+
lines.push('输出:', text);
|
|
174
|
+
if (delta.dropped)
|
|
175
|
+
lines.push('…(更早的输出已滚出终端缓冲区)');
|
|
176
|
+
if (lines.length === 0)
|
|
177
|
+
lines.push('自游标以来没有新的终端活动。');
|
|
178
|
+
return { text: lines.join('\n'), cursor: delta.cursor };
|
|
179
|
+
}
|
|
180
|
+
const history = bridge.history(sessionId, args.limit ?? 20);
|
|
181
|
+
if (history === undefined)
|
|
182
|
+
return { text: NO_SHELL, cursor: '' };
|
|
183
|
+
const lines = history.commands.length === 0
|
|
184
|
+
? ['主终端还没有执行过可识别的命令。']
|
|
185
|
+
: history.commands.map(command => formatCommand(command, args.includeOutput !== false));
|
|
186
|
+
return { text: lines.join('\n'), cursor: history.cursor };
|
|
187
|
+
},
|
|
188
|
+
presentCall: args => ({
|
|
189
|
+
card: 'generic',
|
|
190
|
+
title: args.cursor === undefined ? '读取主终端历史' : '读取主终端增量',
|
|
191
|
+
kind: 'read',
|
|
192
|
+
}),
|
|
193
|
+
}));
|
|
194
|
+
ctx.tools.register(defineTool({
|
|
195
|
+
name: 'dshell_terminal_output',
|
|
196
|
+
description: 'Read one command\'s output from the USER\'s terminal in slices — the way to look '
|
|
197
|
+
+ 'at a command whose output was too long to be injected whole. Pass the `cursor` from the '
|
|
198
|
+
+ 'terminal block that was injected into your context (or from a previous call) and the '
|
|
199
|
+
+ 'command\'s `seq`; `offset` and `limit` are bytes into the retained output. Output is kept '
|
|
200
|
+
+ 'for the newest commands of the session, at most 64 KiB each, and the *tail* is what '
|
|
201
|
+
+ 'survives: when `dropped` is larger than zero that many bytes are missing from the front, so '
|
|
202
|
+
+ 'offset 0 is not the beginning of the output. List commands with dshell_terminal_read, then '
|
|
203
|
+
+ 'come here for the parts you actually need.',
|
|
204
|
+
parameters: {
|
|
205
|
+
cursor: {
|
|
206
|
+
type: 'string',
|
|
207
|
+
description: 'Session cursor from the injected terminal block or a previous call. Required: '
|
|
208
|
+
+ 'it pins the shell generation, so a respawned shell is reported as stale rather than '
|
|
209
|
+
+ 'read at the wrong seq.',
|
|
210
|
+
required: true,
|
|
211
|
+
},
|
|
212
|
+
seq: {
|
|
213
|
+
type: 'integer',
|
|
214
|
+
description: 'The command whose output to read, as listed by dshell_terminal_read.',
|
|
215
|
+
required: true,
|
|
216
|
+
},
|
|
217
|
+
offset: {
|
|
218
|
+
type: 'integer',
|
|
219
|
+
description: `Byte offset into the retained output (default 0).`,
|
|
220
|
+
},
|
|
221
|
+
limit: {
|
|
222
|
+
type: 'integer',
|
|
223
|
+
description: `Bytes to return (default ${String(DEFAULT_OUTPUT_SLICE_BYTES)}, at most ${String(MAX_OUTPUT_SLICE_BYTES)}).`,
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
output: {
|
|
227
|
+
schema: {
|
|
228
|
+
type: 'object',
|
|
229
|
+
additionalProperties: false,
|
|
230
|
+
properties: {
|
|
231
|
+
text: { type: 'string', required: true },
|
|
232
|
+
cursor: { type: 'string', required: true },
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
render: (_args, value) => [{ type: 'text', text: value.text }],
|
|
236
|
+
},
|
|
237
|
+
async execute(args, exec) {
|
|
238
|
+
const agent = exec.agent;
|
|
239
|
+
if (agent === undefined)
|
|
240
|
+
throw new Error('dshell_terminal_output requires an agent context');
|
|
241
|
+
const offset = Math.max(0, Math.trunc(args.offset ?? 0));
|
|
242
|
+
const limit = Math.max(1, Math.min(Math.trunc(args.limit ?? DEFAULT_OUTPUT_SLICE_BYTES), MAX_OUTPUT_SLICE_BYTES));
|
|
243
|
+
const answer = bridge.commandOutput(String(agent.id), args.cursor, Math.trunc(args.seq), offset, limit);
|
|
244
|
+
if (answer === undefined) {
|
|
245
|
+
return { text: '主终端尚未打开:用户还没有打开这个会话的终端。', cursor: '' };
|
|
246
|
+
}
|
|
247
|
+
if (answer.stale) {
|
|
248
|
+
return {
|
|
249
|
+
text: `游标来自已被替换的 shell,seq ${String(args.seq)} 可能指向别的命令。`
|
|
250
|
+
+ '请重新读取终端历史(dshell_terminal_read),用新的游标和 seq 再试。',
|
|
251
|
+
cursor: answer.cursor,
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
if (!answer.retained || answer.output === null) {
|
|
255
|
+
return {
|
|
256
|
+
text: `seq ${String(args.seq)} 的输出未保留(已被保留期裁掉,或写入早于输出持久化)。`,
|
|
257
|
+
cursor: answer.cursor,
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
const slice = answer.output;
|
|
261
|
+
const sliceBytes = utf8Bytes(slice.text);
|
|
262
|
+
const head = `$ ${answer.command ?? '(未跟踪的命令)'}`
|
|
263
|
+
+ (answer.exitCode === null ? '' : ` exit ${String(answer.exitCode)}`);
|
|
264
|
+
const meta = `[保留 ${String(slice.total)} 字节, 原输出 ${String(slice.bytes)} 字节`
|
|
265
|
+
+ (slice.dropped > 0 ? `, 前 ${String(slice.dropped)} 字节已丢弃` : '')
|
|
266
|
+
+ `; 本次 offset ${String(slice.offset)}`
|
|
267
|
+
+ (slice.truncated ? ` -> ${String(slice.offset + sliceBytes)}` : ' -> 末尾')
|
|
268
|
+
+ ']';
|
|
269
|
+
const next = slice.truncated
|
|
270
|
+
? `\n\n(next offset: ${String(slice.offset + sliceBytes)})`
|
|
271
|
+
: '';
|
|
272
|
+
return {
|
|
273
|
+
text: `${head}\n${meta}\n${slice.text}${next}\n\ncursor: ${answer.cursor}`,
|
|
274
|
+
cursor: answer.cursor,
|
|
275
|
+
};
|
|
276
|
+
},
|
|
277
|
+
presentCall: () => ({ card: 'generic', title: '读取命令输出', kind: 'read' }),
|
|
278
|
+
}));
|
|
279
|
+
}
|
|
280
|
+
export default { name, inject, apply };
|
|
281
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAQH,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAInD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,MAAM,CAAC,MAAM,IAAI,GAAG,+BAA+B,CAAA;AAEnD,2EAA2E;AAC3E,2EAA2E;AAC3E,wEAAwE;AACxE,8EAA8E;AAC9E,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,UAAU,EAAE,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,mBAAmB;CAC1E,CAAA;AAEV,kEAAkE;AAClE,MAAM,0BAA0B,GAAG,CAAC,GAAG,IAAI,CAAA;AAE3C;;;;;;GAMG;AACH,MAAM,sBAAsB,GAAG,CAAC,GAAG,IAAI,CAAA;AAEvC;;;;;;GAMG;AACH,SAAS,SAAS,CAAC,IAAY;IAC7B,IAAI,KAAK,GAAG,CAAC,CAAA;IACb,KAAK,MAAM,SAAS,IAAI,IAAI,EAAE,CAAC;QAC7B,MAAM,IAAI,GAAG,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,IAA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AI,eAAe,MAAM,CAAC,MAAM,EAAE;gBAC1E,MAAM,EAAE,MAAM,CAAC,MAAM;aACtB,CAAA;QACH,CAAC;QACD,WAAW,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;KACxE,CAAC,CAAC,CAAA;AACL,CAAC;AAED,eAAe,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `dshell-commands`'s HOST dictionaries — the copy this package's `/new`
|
|
3
|
+
* command composes that a reader sees.
|
|
4
|
+
*
|
|
5
|
+
* A command result renders in dsh's command-result surface, so its language has
|
|
6
|
+
* to match the screen even though the host writes it. `ctx.dshellHostCopy`
|
|
7
|
+
* answers which language that is (see the std contract); these dictionaries are
|
|
8
|
+
* what it binds. The model-facing half of this package — every tool
|
|
9
|
+
* description, parameter description and `execute` return line — is deliberately
|
|
10
|
+
* absent: the model reads those, not the user, and they stay in their source
|
|
11
|
+
* language.
|
|
12
|
+
*
|
|
13
|
+
* The browser face keeps its own dictionaries elsewhere: the two sets are
|
|
14
|
+
* disjoint by construction, and only this file is reachable from the host half.
|
|
15
|
+
*/
|
|
16
|
+
import type { HostCopyDictionaries } from '@nexus-aethra/dshell-std';
|
|
17
|
+
/** Simplified Chinese dictionary and key-set source of truth. */
|
|
18
|
+
export declare const zh: {
|
|
19
|
+
'command.new.created': string;
|
|
20
|
+
'command.new.failed': string;
|
|
21
|
+
};
|
|
22
|
+
/** Host dictionary key union. */
|
|
23
|
+
export type DshellCommandsHostKey = keyof typeof zh;
|
|
24
|
+
/** English dictionary, checked complete against the Chinese key set. */
|
|
25
|
+
export declare const en: {
|
|
26
|
+
'command.new.created': string;
|
|
27
|
+
'command.new.failed': string;
|
|
28
|
+
};
|
|
29
|
+
/** The pair `ctx.dshellHostCopy.bind()` takes. */
|
|
30
|
+
export declare const hostCopy: HostCopyDictionaries<DshellCommandsHostKey>;
|
|
31
|
+
//# sourceMappingURL=host-locales.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host-locales.d.ts","sourceRoot":"","sources":["../../src/host-locales.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAEpE,iEAAiE;AACjE,eAAO,MAAM,EAAE;;;CAGmB,CAAA;AAElC,iCAAiC;AACjC,MAAM,MAAM,qBAAqB,GAAG,MAAM,OAAO,EAAE,CAAA;AAEnD,wEAAwE;AACxE,eAAO,MAAM,EAAE;;;CAGkC,CAAA;AAEjD,kDAAkD;AAClD,eAAO,MAAM,QAAQ,EAAE,oBAAoB,CAAC,qBAAqB,CAAc,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* dshell-commands host face — Phases 6/8.
|
|
3
|
+
*
|
|
4
|
+
* `/new` creates a fresh session with the invoking session's cwd (the dock
|
|
5
|
+
* additionally intercepts `/new` client-side, because the "current session"
|
|
6
|
+
* selection is client-only state no host command can switch). `/compact` is
|
|
7
|
+
* dsh's own `command-compact` — dshell must not re-register it; the dock
|
|
8
|
+
* routes it to the stock executor.
|
|
9
|
+
* `dshell_get_agent_terminal` hands the agent the addressable
|
|
10
|
+
* `TerminalSessionId` of its OWN shell — the PTY the bridge spawns for it,
|
|
11
|
+
* separate from the one the user types into.
|
|
12
|
+
* `dshell_terminal_read` reads the USER's shell (read-only) at command
|
|
13
|
+
* granularity — incremental since an opaque cursor, or the latest commands.
|
|
14
|
+
*/
|
|
15
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
16
|
+
export declare const name = "@nexus-aethra/dshell-commands";
|
|
17
|
+
export declare const inject: readonly ["commands", "tools", "dshellTerminalBridge", "dshellHostCopy", "sessionController"];
|
|
18
|
+
export declare function apply(ctx: Context): void;
|
|
19
|
+
declare const _default: {
|
|
20
|
+
name: string;
|
|
21
|
+
inject: readonly ["commands", "tools", "dshellTerminalBridge", "dshellHostCopy", "sessionController"];
|
|
22
|
+
apply: typeof apply;
|
|
23
|
+
};
|
|
24
|
+
export default _default;
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAYlD,eAAO,MAAM,IAAI,kCAAkC,CAAA;AAMnD,eAAO,MAAM,MAAM,+FAET,CAAA;AA0CV,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAsNxC;;;;;;AAED,wBAAsC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nexus-aethra/dshell-commands",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "dshell commands and tools: /new on ctx.commands, plus the model-facing dshell_get_agent_terminal tool that hands the agent its own shell, and dshell_terminal_read / dshell_terminal_output for reading the user's shell (read-only).",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/Nexus-Aethra/Nexus-Terminal.git",
|
|
9
|
+
"directory": "packages/dshell/commands"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"main": "lib/index.js",
|
|
13
|
+
"types": "lib/types/index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./lib/index.d.ts",
|
|
17
|
+
"default": "./lib/index.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"lib"
|
|
22
|
+
],
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@nexus-aethra/dshell-std": "^0.1.0",
|
|
28
|
+
"@nexus-aethra/dshell-terminal-bridge": "^0.1.0"
|
|
29
|
+
},
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"@deepseek-ai/cordis": "^4.0.2",
|
|
32
|
+
"@deepseek-ai/dsh-api-session-controller": "0.1.5-rc.2",
|
|
33
|
+
"@deepseek-ai/dsh-commands": "0.1.5-rc.2",
|
|
34
|
+
"@deepseek-ai/dsh-llm": "0.1.5-rc.2",
|
|
35
|
+
"@deepseek-ai/dsh-session": "0.1.5-rc.2",
|
|
36
|
+
"@deepseek-ai/dsh-tools": "0.1.5-rc.2"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@deepseek-ai/cordis": "^4.0.2",
|
|
40
|
+
"@deepseek-ai/dsh-api-session-controller": "0.1.5-rc.2",
|
|
41
|
+
"@deepseek-ai/dsh-commands": "0.1.5-rc.2",
|
|
42
|
+
"@deepseek-ai/dsh-llm": "0.1.5-rc.2",
|
|
43
|
+
"@deepseek-ai/dsh-session": "0.1.5-rc.2",
|
|
44
|
+
"@deepseek-ai/dsh-tools": "0.1.5-rc.2",
|
|
45
|
+
"tsdown": "^0.22.14",
|
|
46
|
+
"typescript": "^6.0.3"
|
|
47
|
+
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"build": "tsc -p tsconfig.json --emitDeclarationOnly false",
|
|
50
|
+
"build:host": "tsc -p tsconfig.json --emitDeclarationOnly false"
|
|
51
|
+
}
|
|
52
|
+
}
|