better-dsh 0.3.4-c → 0.3.4-d
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/remote/plugin.js +17 -2
- package/lib/url-schemes/index.d.ts +11 -11
- package/lib/web-password.d.ts +7 -7
- package/package.json +1 -1
package/lib/remote/plugin.js
CHANGED
|
@@ -4851,7 +4851,7 @@ const NO_SESSION_KEY$1 = "remote:no-session";
|
|
|
4851
4851
|
* interact-able stdin / managed output / persistent env——回执形状与 oneshot 相同、只增状态,
|
|
4852
4852
|
* 运行中的命令可分步观察后再补输(input 动作);多步与交互任务默认进 PTY。
|
|
4853
4853
|
*/
|
|
4854
|
-
const REMOTE_TOOL_DESCRIPTION = `Remote shell (SSH, Docker, Incus, Hub):
|
|
4854
|
+
const REMOTE_TOOL_DESCRIPTION = `Remote shell (SSH, Docker, Incus, Hub): Default PTY, stateful one-shot, persistent cwd/env, interactive stdin, managed bounded terminal output, exact exit/cwd/env-delta receipts, both stdout/stderr in output. \`mode:"oneshot"\` = isolated, stateless.
|
|
4855
4855
|
|
|
4856
4856
|
Actions:
|
|
4857
4857
|
- exec {target, cmd? | scriptPath?, stdin?, mode?:"pty"|"oneshot"="pty", timeout?, run_in_background?:boolean, commandId?:string}: run command / script / raw stdin write. Machine target = default PTY. PTY \`stdin\` alone = raw write into running command (optional \`commandId\` guard). \`run_in_background:true\` = async job, returns handle instantly, PTY handed off automatically.
|
|
@@ -4868,11 +4868,26 @@ Targets & Semantics:
|
|
|
4868
4868
|
- Stdin: oneshot = \`fd0 → pipe\`; PTY = \`fd0 → pty slave\`, line disciplines. Literal bytes (\`\\n\`, \`\\u0003\` = Ctrl-C, \`\\u0004\` = Ctrl-D). Retention: 4M chars/stream (Hub oneshot 4MiB).
|
|
4869
4869
|
|
|
4870
4870
|
Examples:
|
|
4871
|
-
|
|
4871
|
+
Examples:
|
|
4872
|
+
|
|
4873
|
+
# Repeated exploratory work: PTY.
|
|
4874
|
+
remote {"action":"exec","target":"ssh:dev4","cmd":"cd /srv/app && export STAGE=dev && pwd"}
|
|
4875
|
+
/srv/app
|
|
4876
|
+
[pty:pty-irsq · conn ssh:dev4 · cmd remote-a1 · cwd /srv/app · env +STAGE · idle-left ~15m · exit 0 · 0.1s]
|
|
4877
|
+
|
|
4878
|
+
# cwd/env survive; PTY presents stdout and stderr together, followed by the exact exit receipt.
|
|
4879
|
+
remote {"action":"exec","target":"ssh:dev4","cmd":"printf 'stage=%s\\\\n' \\"$STAGE\\"; printf 'bad config\\\\n' >&2; exit 23"}
|
|
4880
|
+
stage=dev
|
|
4881
|
+
bad config
|
|
4882
|
+
[pty:pty-irsq · conn ssh:dev4 · cmd remote-a2 · cwd /srv/app · idle-left ~15m · exit 23 · 0.1s]
|
|
4883
|
+
|
|
4872
4884
|
remote {"action":"exec","target":"ssh:dev4","cmd":"make test","run_in_background":true}
|
|
4873
4885
|
remote {"action":"handoff","target":"ssh:dev4"}
|
|
4874
4886
|
remote {"action":"exec","target":"pty:pty-irsq","stdin":"yes\\n","commandId":"remote-47676dff2c6443e8"}
|
|
4887
|
+
|
|
4888
|
+
# Use oneshot only when isolation is intentional.
|
|
4875
4889
|
remote {"action":"exec","target":"ssh:dev4","mode":"oneshot","cmd":"uname -a"}
|
|
4890
|
+
|
|
4876
4891
|
remote {"action":"add","spawn":"ssh -t pc ssh -t dev4","target":"pty:dev4via"}
|
|
4877
4892
|
remote {"action":"exec","target":"pty:dev4via","cmd":"hostname"}
|
|
4878
4893
|
remote {"action":"add","ssh":{"host":"10.0.0.8","user":"u1","port":22,"key":"~/.ssh/id_key4"},"target":"ssh:lab"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Context } from "@deepseek-ai/cordis";
|
|
2
2
|
import { ToolDefinition } from "@deepseek-ai/dsh-tools";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _deepseek_ai_schemastery11 from "@deepseek-ai/schemastery";
|
|
4
4
|
|
|
5
5
|
//#region src/url-schemes/tools/write.d.ts
|
|
6
6
|
|
|
@@ -50,12 +50,12 @@ declare const inject: string[];
|
|
|
50
50
|
* real patch-line config. Schema-level defaults (both ON — the service is
|
|
51
51
|
* opt-out) survive every overlay layer, per the v0.2.2a ruling.
|
|
52
52
|
*/
|
|
53
|
-
declare const Config:
|
|
54
|
-
urlSchemes:
|
|
55
|
-
hashline:
|
|
53
|
+
declare const Config: _deepseek_ai_schemastery11.default<Schemastery.ObjectS<NoInfer<{
|
|
54
|
+
urlSchemes: _deepseek_ai_schemastery11.default<boolean, boolean, "defined">;
|
|
55
|
+
hashline: _deepseek_ai_schemastery11.default<boolean, boolean, "defined">;
|
|
56
56
|
}>>, Schemastery.ObjectT<NoInfer<{
|
|
57
|
-
urlSchemes:
|
|
58
|
-
hashline:
|
|
57
|
+
urlSchemes: _deepseek_ai_schemastery11.default<boolean, boolean, "defined">;
|
|
58
|
+
hashline: _deepseek_ai_schemastery11.default<boolean, boolean, "defined">;
|
|
59
59
|
}>>, "plain">;
|
|
60
60
|
/** Register the four URL-aware tools on one agent's own scope layer. */
|
|
61
61
|
/**
|
|
@@ -75,12 +75,12 @@ declare function apply(ctx: Context, config: UrlSchemesConfig | undefined): void
|
|
|
75
75
|
declare const _default: {
|
|
76
76
|
name: string;
|
|
77
77
|
inject: string[];
|
|
78
|
-
Config:
|
|
79
|
-
urlSchemes:
|
|
80
|
-
hashline:
|
|
78
|
+
Config: _deepseek_ai_schemastery11.default<Schemastery.ObjectS<NoInfer<{
|
|
79
|
+
urlSchemes: _deepseek_ai_schemastery11.default<boolean, boolean, "defined">;
|
|
80
|
+
hashline: _deepseek_ai_schemastery11.default<boolean, boolean, "defined">;
|
|
81
81
|
}>>, Schemastery.ObjectT<NoInfer<{
|
|
82
|
-
urlSchemes:
|
|
83
|
-
hashline:
|
|
82
|
+
urlSchemes: _deepseek_ai_schemastery11.default<boolean, boolean, "defined">;
|
|
83
|
+
hashline: _deepseek_ai_schemastery11.default<boolean, boolean, "defined">;
|
|
84
84
|
}>>, "plain">;
|
|
85
85
|
apply: typeof apply;
|
|
86
86
|
};
|
package/lib/web-password.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Context } from "@deepseek-ai/cordis";
|
|
2
2
|
import { IncomingMessage } from "node:http";
|
|
3
3
|
import { CredentialRecord } from "@deepseek-ai/dsh-credentials";
|
|
4
|
-
import * as
|
|
4
|
+
import * as _deepseek_ai_schemastery21 from "@deepseek-ai/schemastery";
|
|
5
5
|
|
|
6
6
|
//#region src/web-password.d.ts
|
|
7
7
|
|
|
@@ -123,10 +123,10 @@ interface WebPasswordConfig {
|
|
|
123
123
|
/** Absolute browser-session lifetime in days. Default: 30 (the native default). */
|
|
124
124
|
cookieMaxAgeDays?: number;
|
|
125
125
|
}
|
|
126
|
-
declare const Config:
|
|
127
|
-
cookieMaxAgeDays:
|
|
126
|
+
declare const Config: _deepseek_ai_schemastery21.default<Schemastery.ObjectS<NoInfer<{
|
|
127
|
+
cookieMaxAgeDays: _deepseek_ai_schemastery21.default<number, number, "defined">;
|
|
128
128
|
}>>, Schemastery.ObjectT<NoInfer<{
|
|
129
|
-
cookieMaxAgeDays:
|
|
129
|
+
cookieMaxAgeDays: _deepseek_ai_schemastery21.default<number, number, "defined">;
|
|
130
130
|
}>>, "plain">;
|
|
131
131
|
/** Cordis plugin name; also the scope of this row's credential record. */
|
|
132
132
|
declare const name = "dashr-web-password";
|
|
@@ -145,10 +145,10 @@ declare function apply(ctx: Context, config?: WebPasswordConfig): void;
|
|
|
145
145
|
declare const _default: {
|
|
146
146
|
name: string;
|
|
147
147
|
inject: string[];
|
|
148
|
-
Config:
|
|
149
|
-
cookieMaxAgeDays:
|
|
148
|
+
Config: _deepseek_ai_schemastery21.default<Schemastery.ObjectS<NoInfer<{
|
|
149
|
+
cookieMaxAgeDays: _deepseek_ai_schemastery21.default<number, number, "defined">;
|
|
150
150
|
}>>, Schemastery.ObjectT<NoInfer<{
|
|
151
|
-
cookieMaxAgeDays:
|
|
151
|
+
cookieMaxAgeDays: _deepseek_ai_schemastery21.default<number, number, "defined">;
|
|
152
152
|
}>>, "plain">;
|
|
153
153
|
apply: typeof apply;
|
|
154
154
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "better-dsh",
|
|
3
|
-
"version": "0.3.4-
|
|
3
|
+
"version": "0.3.4-d",
|
|
4
4
|
"description": "Make your dsh ready for serious coding tasks. (Tools x Schemas)^REPL. `skill://`, `ctx://`, `agent://`, `dvc://`, `dsh://`, Python REPL, Context as Variables, cross compactions recallable, full context revive. `hash-edit`, `dvc://browser`, subagent as function, workflow as function.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|