better-dsh 0.3.2-d → 0.3.2-e
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/docs/remote-tools.md +1 -1
- package/lib/remote/plugin.d.ts +6 -4
- package/lib/remote/plugin.js +35 -35
- package/lib/url-schemes/index.d.ts +11 -11
- package/lib/web-password.d.ts +7 -7
- package/lib/web-trust.d.ts +1 -0
- package/lib/web-trust2.d.ts +11 -11
- package/lib/welcome-notice.d.ts +3 -3
- package/package.json +1 -1
package/docs/remote-tools.md
CHANGED
|
@@ -40,7 +40,7 @@ There is no `mode` field: append `:pty` to a transport target to create, address
|
|
|
40
40
|
|
|
41
41
|
PTY state is durable and readable: every dispatch returns exit, cwd and `envDelta` (variable names and change markers only — values never leave the endpoint; fetch them yourself if needed). `close` is idempotent (`closed:false, reason:"not-found"|"already-closed-or-reaped"`); a session with a running job refuses close unless `force:true`, which first interrupts the running command — its job settles in the killed family (`interrupted: exit 130`, or `session closed` when the frame cannot arrive) — and then kills the group. A busy session rejects new commands instead of queueing (`[E_SESSION_BUSY]` names the running id and the ways out: `input` more stdin, `job_output`, `job_kill`, or another session/oneshot); open another PTY or use a oneshot for parallel work. Idle PTYs are reaped after 15 minutes; an Agent holds at most 10 live sessions across connections, and dead sessions do not count. `hub:<m4>:pty[:label]` opens the same session shape over the Hub WebSocket lane — identity, labels, input, parallelism and background work exactly like ssh/docker/incus/BYO.
|
|
42
42
|
|
|
43
|
-
Native/PTY
|
|
43
|
+
Output returns IN FULL up to retention (0.3.2-e: the self-made 30K returned-tail window is removed — model-context sizing is the native agent runtime's job, e.g. the DSH spill policy or a foreign runtime's own guard). Native/PTY retains at most 4,000,000 UTF-16 units per stream; Hub oneshot 4 MiB bytes. Beyond retention the returned text is the retained tail, headed by a one-line disclosure banner, with `outputStats` giving total/retained/dropped/returned and `truncated` set to the original total. Read `outputStats` units and dropped/returned counters rather than treating character counts as bytes. Discarded output is not recoverable after restart.
|
|
44
44
|
|
|
45
45
|
## File operations: native CLI semantics
|
|
46
46
|
|
package/lib/remote/plugin.d.ts
CHANGED
|
@@ -162,7 +162,11 @@ declare function startBinaryProcess(argv: string[], options?: Pick<ProcessOption
|
|
|
162
162
|
declare function startOneShot(argv: string[], options?: ProcessOptions): RemoteProcess;
|
|
163
163
|
//#endregion
|
|
164
164
|
//#region src/remote/nonce-framing.d.ts
|
|
165
|
-
|
|
165
|
+
/** 0.3.2-e:自有 30K 返回窗口已删(原生 agent runtime 的 spill/输出保护接管模型上下文
|
|
166
|
+
* 尺寸)。本 helper 只做 retention 披露:ring 留存(4M UTF-16 / 4MiB bytes)未驱逐时
|
|
167
|
+
* 全量透传(returned=retained,无 banner);驱逐(dropped>0,仅 >4M 输出发生)时打一行
|
|
168
|
+
* banner 且 truncated=原始总量。text 已是 ring 尾部,不再二次裁剪。 */
|
|
169
|
+
declare function disclose(text: string, stats?: OutputStats): {
|
|
166
170
|
text: string;
|
|
167
171
|
truncated?: number;
|
|
168
172
|
stats?: OutputStats;
|
|
@@ -596,7 +600,6 @@ interface RemoteDriverOptions {
|
|
|
596
600
|
getHub?: () => HubRemoteTransport | undefined;
|
|
597
601
|
execTimeoutSec?: number;
|
|
598
602
|
idleTtlSec?: number;
|
|
599
|
-
maxOutputChars?: number;
|
|
600
603
|
onAudit?: (r: RemoteAuditRecord) => void;
|
|
601
604
|
oneshotArgvFor?: (plan: TargetPlan, cmd: string, options: {
|
|
602
605
|
cleanupTag?: string;
|
|
@@ -784,7 +787,6 @@ declare const inject: string[];
|
|
|
784
787
|
interface RemoteRowConfig {
|
|
785
788
|
execTimeoutSec: number;
|
|
786
789
|
idleTtlSec: number;
|
|
787
|
-
maxOutputChars: number;
|
|
788
790
|
}
|
|
789
791
|
type RemoteConfigValidator = ((value?: unknown) => RemoteRowConfig) & StandardSchemaV1<unknown, RemoteRowConfig> & NativeConfigSchema;
|
|
790
792
|
declare const Config: RemoteConfigValidator;
|
|
@@ -797,4 +799,4 @@ declare const _default: {
|
|
|
797
799
|
apply: (ctx: Context, config: RemoteRowConfig) => (() => void);
|
|
798
800
|
};
|
|
799
801
|
//#endregion
|
|
800
|
-
export { type BinaryFileEndpoint, ByteTailRing, Config, FILE_FRAME_BYTES, FILE_MAX_ENTRIES, FILE_MAX_METADATA, type HubPtyEndpoint, type HubRemoteTransport, type HubTarget, type OutputStats, PROCESS_CLEANUP_BOUND_MS, type PreparedRemoteInput, type PtyDispatchResult, PtySession, RemoteConfigValidator, type RemoteInput, type RemoteProcess, RemoteRowConfig, type RsyncEndpoint, type RsyncReceipt, type RsyncRequest, type SshConnection, type StreamOutputStats, Utf16TailRing, apply, buildHubPtyArgv, checkAbsolute, checkSelection, _default as default, hubPtyAssets, inject, localFileEndpoint, name, readUtf8Tail, runFileWorker, runRsync, sshArgv, startBinaryProcess, startOneShot, startRemoteJob
|
|
802
|
+
export { type BinaryFileEndpoint, ByteTailRing, Config, FILE_FRAME_BYTES, FILE_MAX_ENTRIES, FILE_MAX_METADATA, type HubPtyEndpoint, type HubRemoteTransport, type HubTarget, type OutputStats, PROCESS_CLEANUP_BOUND_MS, type PreparedRemoteInput, type PtyDispatchResult, PtySession, RemoteConfigValidator, type RemoteInput, type RemoteProcess, RemoteRowConfig, type RsyncEndpoint, type RsyncReceipt, type RsyncRequest, type SshConnection, type StreamOutputStats, Utf16TailRing, apply, buildHubPtyArgv, checkAbsolute, checkSelection, _default as default, disclose, hubPtyAssets, inject, localFileEndpoint, name, readUtf8Tail, runFileWorker, runRsync, sshArgv, startBinaryProcess, startOneShot, startRemoteJob };
|
package/lib/remote/plugin.js
CHANGED
|
@@ -1974,22 +1974,25 @@ function stripAnsi(s) {
|
|
|
1974
1974
|
function normalizePtyText(s) {
|
|
1975
1975
|
return stripAnsi(s).replace(/\r\n/g, "\n").replace(/\r/g, "");
|
|
1976
1976
|
}
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1977
|
+
/** 0.3.2-e:自有 30K 返回窗口已删(原生 agent runtime 的 spill/输出保护接管模型上下文
|
|
1978
|
+
* 尺寸)。本 helper 只做 retention 披露:ring 留存(4M UTF-16 / 4MiB bytes)未驱逐时
|
|
1979
|
+
* 全量透传(returned=retained,无 banner);驱逐(dropped>0,仅 >4M 输出发生)时打一行
|
|
1980
|
+
* banner 且 truncated=原始总量。text 已是 ring 尾部,不再二次裁剪。 */
|
|
1981
|
+
function disclose(text, stats) {
|
|
1982
|
+
if (stats === void 0) return { text };
|
|
1983
|
+
const returned = stats.retained;
|
|
1984
|
+
const updated = { stats: {
|
|
1983
1985
|
...stats,
|
|
1984
1986
|
returned
|
|
1985
1987
|
} };
|
|
1986
|
-
if (
|
|
1987
|
-
text
|
|
1988
|
+
if (stats.dropped <= 0) return {
|
|
1989
|
+
text,
|
|
1988
1990
|
...updated
|
|
1989
1991
|
};
|
|
1992
|
+
const unit = stats.unit === "bytes" ? "bytes" : "chars";
|
|
1990
1993
|
return {
|
|
1991
|
-
text: `[
|
|
1992
|
-
truncated: total,
|
|
1994
|
+
text: `[retention tail: showing last ${stats.retained} of ${stats.total} ${unit}; dropped head ${stats.dropped}, retention limit ${stats.retentionLimit} ${stats.unit === "bytes" ? "bytes" : "UTF-16 code units"}]\n${text}`,
|
|
1995
|
+
truncated: stats.total,
|
|
1993
1996
|
...updated
|
|
1994
1997
|
};
|
|
1995
1998
|
}
|
|
@@ -3257,7 +3260,6 @@ var RemoteDriver = class {
|
|
|
3257
3260
|
}
|
|
3258
3261
|
async execute(params, form, callCtx) {
|
|
3259
3262
|
const timeoutSec = params.timeout ?? this.opts.execTimeoutSec ?? 120;
|
|
3260
|
-
const cap = this.opts.maxOutputChars ?? 3e4;
|
|
3261
3263
|
const sessionKey = callCtx.sessionKey ?? "no-session";
|
|
3262
3264
|
const hasCmd = params.cmd !== void 0 && params.cmd.length > 0;
|
|
3263
3265
|
params.spawn !== void 0 && params.spawn.length;
|
|
@@ -3273,8 +3275,8 @@ var RemoteDriver = class {
|
|
|
3273
3275
|
if (this.disposed) process$1.cancel("owner disposed");
|
|
3274
3276
|
const result = await process$1.done;
|
|
3275
3277
|
const stdout = process$1.read("stdout", 0), stderr = process$1.read("stderr", 0);
|
|
3276
|
-
const out =
|
|
3277
|
-
const err =
|
|
3278
|
+
const out = disclose(stdout.text, stdout.stats);
|
|
3279
|
+
const err = disclose(stderr.text, stderr.stats);
|
|
3278
3280
|
return {
|
|
3279
3281
|
...result,
|
|
3280
3282
|
mode: "oneshot",
|
|
@@ -3299,7 +3301,7 @@ var RemoteDriver = class {
|
|
|
3299
3301
|
await session.warm();
|
|
3300
3302
|
return this.warmReceipt(session);
|
|
3301
3303
|
}
|
|
3302
|
-
return await this.dispatchPty(session, params, callCtx, timeoutSec
|
|
3304
|
+
return await this.dispatchPty(session, params, callCtx, timeoutSec);
|
|
3303
3305
|
}
|
|
3304
3306
|
if (params.ssh !== void 0) {
|
|
3305
3307
|
const label = form.form === "direct" || form.form === "bare" ? form.name : void 0;
|
|
@@ -3320,28 +3322,28 @@ var RemoteDriver = class {
|
|
|
3320
3322
|
kind: "ssh",
|
|
3321
3323
|
host: normalizeSshConnection(params.ssh).host,
|
|
3322
3324
|
connection: normalizeSshConnection(params.ssh)
|
|
3323
|
-
}, `ssh:${name$1}`, params, timeoutSec
|
|
3325
|
+
}, `ssh:${name$1}`, params, timeoutSec);
|
|
3324
3326
|
}
|
|
3325
3327
|
if (form.form === "pty-selector" && form.idOrLabel === void 0) throw new Error("[E_PARAMS] remote: \"pty\" alone selects nothing — append an id/label (pty:pty-1a2b, pty:build) or pass spawn to create one");
|
|
3326
3328
|
if (form.form === "pty-selector") {
|
|
3327
3329
|
const session = this.resolvePty(form.idOrLabel, sessionKey);
|
|
3328
3330
|
if (!hasCmd) return this.cardReceipt(session);
|
|
3329
|
-
return await this.dispatchPty(session, params, callCtx, timeoutSec
|
|
3331
|
+
return await this.dispatchPty(session, params, callCtx, timeoutSec);
|
|
3330
3332
|
}
|
|
3331
3333
|
if (form.form === "direct") {
|
|
3332
3334
|
const plan$1 = form.transport === "ssh" ? this.sshPlanFor(form.name, sessionKey) : resolveTarget(`${form.transport}:${form.name}`);
|
|
3333
|
-
return await this.oneshot(plan$1, `${form.transport}:${form.name}`, params, timeoutSec
|
|
3335
|
+
return await this.oneshot(plan$1, `${form.transport}:${form.name}`, params, timeoutSec);
|
|
3334
3336
|
}
|
|
3335
3337
|
if (form.form !== "bare") throw new Error("[E_INTERNAL] remote: unreachable target form after routing");
|
|
3336
3338
|
const entry = await this.resolvePoolEntry(form.name, sessionKey);
|
|
3337
3339
|
if (entry.kind === "pty") {
|
|
3338
3340
|
const session = this.resolvePty(form.name, sessionKey);
|
|
3339
3341
|
if (!hasCmd) return this.cardReceipt(session);
|
|
3340
|
-
return await this.dispatchPty(session, params, callCtx, timeoutSec
|
|
3342
|
+
return await this.dispatchPty(session, params, callCtx, timeoutSec);
|
|
3341
3343
|
}
|
|
3342
|
-
if (entry.kind === "hub") return await this.hubOneshot(entry.machine, `hub:${entry.machine}`, params, timeoutSec
|
|
3344
|
+
if (entry.kind === "hub") return await this.hubOneshot(entry.machine, `hub:${entry.machine}`, params, timeoutSec);
|
|
3343
3345
|
const plan = this.planOf(entry);
|
|
3344
|
-
return await this.oneshot(plan, form.name, params, timeoutSec
|
|
3346
|
+
return await this.oneshot(plan, form.name, params, timeoutSec);
|
|
3345
3347
|
}
|
|
3346
3348
|
/** Native-first copy routing (spec: remote-native-shortcut) — unchanged by the workbench round. */
|
|
3347
3349
|
copy(request, signal, callCtx = {}) {
|
|
@@ -3910,7 +3912,7 @@ var RemoteDriver = class {
|
|
|
3910
3912
|
...id.label !== void 0 ? { label: id.label } : {}
|
|
3911
3913
|
};
|
|
3912
3914
|
}
|
|
3913
|
-
async dispatchPty(session, params, callCtx, timeoutSec
|
|
3915
|
+
async dispatchPty(session, params, callCtx, timeoutSec) {
|
|
3914
3916
|
const hubConn = session.identity.connection;
|
|
3915
3917
|
if (hubConn.startsWith("hub:")) {
|
|
3916
3918
|
const hub = this.requireHub();
|
|
@@ -3927,7 +3929,7 @@ var RemoteDriver = class {
|
|
|
3927
3929
|
jobId: commandId
|
|
3928
3930
|
} : {}
|
|
3929
3931
|
});
|
|
3930
|
-
const out =
|
|
3932
|
+
const out = disclose(r.output, r.outputStats?.stdout);
|
|
3931
3933
|
const id = session.identity;
|
|
3932
3934
|
return {
|
|
3933
3935
|
mode: "pty",
|
|
@@ -3995,7 +3997,7 @@ var RemoteDriver = class {
|
|
|
3995
3997
|
...this.ptyTtl(session.key)
|
|
3996
3998
|
};
|
|
3997
3999
|
}
|
|
3998
|
-
async oneshot(plan, display, params, timeoutSec
|
|
4000
|
+
async oneshot(plan, display, params, timeoutSec) {
|
|
3999
4001
|
this.assertOpen();
|
|
4000
4002
|
const process$1 = this.own(await this.nativeProcess(plan, params, timeoutSec));
|
|
4001
4003
|
if (this.disposed) process$1.cancel("owner disposed");
|
|
@@ -4010,8 +4012,8 @@ var RemoteDriver = class {
|
|
|
4010
4012
|
stderr: stderr.stats
|
|
4011
4013
|
}
|
|
4012
4014
|
};
|
|
4013
|
-
const out =
|
|
4014
|
-
const err = r.stderr.length > 0 ?
|
|
4015
|
+
const out = disclose(r.stdout, r.outputStats?.stdout);
|
|
4016
|
+
const err = r.stderr.length > 0 ? disclose(r.stderr, r.outputStats?.stderr) : void 0;
|
|
4015
4017
|
return {
|
|
4016
4018
|
mode: "oneshot",
|
|
4017
4019
|
target: display,
|
|
@@ -4030,13 +4032,13 @@ var RemoteDriver = class {
|
|
|
4030
4032
|
...this.runnerOf.get(process$1) === void 0 ? {} : { runner: this.runnerOf.get(process$1) }
|
|
4031
4033
|
};
|
|
4032
4034
|
}
|
|
4033
|
-
async hubOneshot(machine, display, params, timeoutSec
|
|
4035
|
+
async hubOneshot(machine, display, params, timeoutSec) {
|
|
4034
4036
|
const process$1 = this.own(await this.hubOneshotProcess(machine, params));
|
|
4035
4037
|
if (this.disposed) process$1.cancel("owner disposed");
|
|
4036
4038
|
const result = await process$1.done;
|
|
4037
4039
|
const stdout = process$1.read("stdout", 0), stderr = process$1.read("stderr", 0);
|
|
4038
|
-
const out =
|
|
4039
|
-
const err =
|
|
4040
|
+
const out = disclose(stdout.text, stdout.stats);
|
|
4041
|
+
const err = disclose(stderr.text, stderr.stats);
|
|
4040
4042
|
return {
|
|
4041
4043
|
...result,
|
|
4042
4044
|
mode: "oneshot",
|
|
@@ -4378,7 +4380,7 @@ PTY:
|
|
|
4378
4380
|
- input is verbatim: "\\n" submits; "\\u0003" Ctrl-C; "\\u0004" Ctrl-D; "" writes nothing. Ctrl-D follows terminal EOF rules.
|
|
4379
4381
|
- commandId, if supplied, must match running command.
|
|
4380
4382
|
- Input receipt confirms write only; read result via SAME job.
|
|
4381
|
-
- Output
|
|
4383
|
+
- Output returns in full up to retention (4M chars per stream; Hub oneshot 4MiB bytes) — beyond it the retained tail plus outputStats. Redirect bulk output to files.
|
|
4382
4384
|
- Idle expiry: 15 min; running commands exempt.
|
|
4383
4385
|
|
|
4384
4386
|
Oneshot:
|
|
@@ -4843,7 +4845,7 @@ function renderValue(v) {
|
|
|
4843
4845
|
markers.push(`${secs}s`);
|
|
4844
4846
|
if (v.running === true) markers.push(`still running — poll job_output${v.jobId !== void 0 ? ` ${v.jobId}` : ""}`);
|
|
4845
4847
|
if (v.truncated !== void 0) markers.push(`truncated, ${v.outputStatsUnavailable ? "returned peer tail" : "original"} ${v.truncated} ${v.outputStats?.stdout.unit === "bytes" ? "bytes" : "chars"}`);
|
|
4846
|
-
if (v.outputStatsUnavailable) markers.push("peer output totals/retention unavailable
|
|
4848
|
+
if (v.outputStatsUnavailable) markers.push("peer output totals/retention unavailable");
|
|
4847
4849
|
parts.push(`[${markers.join(" · ")}]`);
|
|
4848
4850
|
if (v.runner === "posix-shim" && (v.exit !== null && v.exit !== 0 || v.timedOut === true)) parts.push("note: this oneshot ran through the POSIX fallback on this target; PTY lanes use an independent lane and may still work here");
|
|
4849
4851
|
if (v.stderr !== void 0 && v.stderr.length > 0) parts.push("[stderr]", v.stderr);
|
|
@@ -5109,12 +5111,10 @@ const name = "dashr-remote";
|
|
|
5109
5111
|
const inject = [];
|
|
5110
5112
|
const Config = Schema.object({
|
|
5111
5113
|
execTimeoutSec: Schema.natural().min(1).default(120),
|
|
5112
|
-
idleTtlSec: Schema.natural().min(1).default(REMOTE_PTY_IDLE_TTL_SEC)
|
|
5113
|
-
maxOutputChars: Schema.natural().min(1).default(3e4)
|
|
5114
|
+
idleTtlSec: Schema.natural().min(1).default(REMOTE_PTY_IDLE_TTL_SEC)
|
|
5114
5115
|
}).default({
|
|
5115
5116
|
execTimeoutSec: 120,
|
|
5116
|
-
idleTtlSec: REMOTE_PTY_IDLE_TTL_SEC
|
|
5117
|
-
maxOutputChars: 3e4
|
|
5117
|
+
idleTtlSec: REMOTE_PTY_IDLE_TTL_SEC
|
|
5118
5118
|
});
|
|
5119
5119
|
/** MUST stay an arrow(RM0 plugin.ts 同注:function 声明会被 cordis 当构造器 new 掉,返回的 disposer 丢失)。 */
|
|
5120
5120
|
const apply = (ctx, config) => {
|
|
@@ -5128,4 +5128,4 @@ var plugin_default = {
|
|
|
5128
5128
|
};
|
|
5129
5129
|
|
|
5130
5130
|
//#endregion
|
|
5131
|
-
export { ByteTailRing, Config, FILE_FRAME_BYTES, FILE_MAX_ENTRIES, FILE_MAX_METADATA, PROCESS_CLEANUP_BOUND_MS, PtySession, Utf16TailRing, apply, buildHubPtyArgv, checkAbsolute, checkSelection, plugin_default as default, hubPtyAssets, inject, localFileEndpoint, name, readUtf8Tail, runFileWorker, runRsync, sshArgv, startBinaryProcess, startOneShot, startRemoteJob
|
|
5131
|
+
export { ByteTailRing, Config, FILE_FRAME_BYTES, FILE_MAX_ENTRIES, FILE_MAX_METADATA, PROCESS_CLEANUP_BOUND_MS, PtySession, Utf16TailRing, apply, buildHubPtyArgv, checkAbsolute, checkSelection, plugin_default as default, disclose, hubPtyAssets, inject, localFileEndpoint, name, readUtf8Tail, runFileWorker, runRsync, sshArgv, startBinaryProcess, startOneShot, startRemoteJob };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { t as Schema } from "../index2.js";
|
|
1
2
|
import { Context } from "@deepseek-ai/cordis";
|
|
2
3
|
import { ToolDefinition } from "@deepseek-ai/dsh-tools";
|
|
3
|
-
import * as _deepseek_ai_schemastery17 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: Schema<Schemastery.ObjectS<NoInfer<{
|
|
54
|
+
urlSchemes: Schema<boolean, boolean, "defined">;
|
|
55
|
+
hashline: Schema<boolean, boolean, "defined">;
|
|
56
56
|
}>>, Schemastery.ObjectT<NoInfer<{
|
|
57
|
-
urlSchemes:
|
|
58
|
-
hashline:
|
|
57
|
+
urlSchemes: Schema<boolean, boolean, "defined">;
|
|
58
|
+
hashline: Schema<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: Schema<Schemastery.ObjectS<NoInfer<{
|
|
79
|
+
urlSchemes: Schema<boolean, boolean, "defined">;
|
|
80
|
+
hashline: Schema<boolean, boolean, "defined">;
|
|
81
81
|
}>>, Schemastery.ObjectT<NoInfer<{
|
|
82
|
-
urlSchemes:
|
|
83
|
-
hashline:
|
|
82
|
+
urlSchemes: Schema<boolean, boolean, "defined">;
|
|
83
|
+
hashline: Schema<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
|
+
import { t as Schema } from "./index2.js";
|
|
1
2
|
import { Context } from "@deepseek-ai/cordis";
|
|
2
3
|
import { IncomingMessage } from "node:http";
|
|
3
4
|
import { CredentialRecord } from "@deepseek-ai/dsh-credentials";
|
|
4
|
-
import * as _deepseek_ai_schemastery11 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: Schema<Schemastery.ObjectS<NoInfer<{
|
|
127
|
+
cookieMaxAgeDays: Schema<number, number, "defined">;
|
|
128
128
|
}>>, Schemastery.ObjectT<NoInfer<{
|
|
129
|
-
cookieMaxAgeDays:
|
|
129
|
+
cookieMaxAgeDays: Schema<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: Schema<Schemastery.ObjectS<NoInfer<{
|
|
149
|
+
cookieMaxAgeDays: Schema<number, number, "defined">;
|
|
150
150
|
}>>, Schemastery.ObjectT<NoInfer<{
|
|
151
|
-
cookieMaxAgeDays:
|
|
151
|
+
cookieMaxAgeDays: Schema<number, number, "defined">;
|
|
152
152
|
}>>, "plain">;
|
|
153
153
|
apply: typeof apply;
|
|
154
154
|
};
|
package/lib/web-trust.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import "./index2.js";
|
|
1
2
|
import { a as _default, c as buildTrustScript, d as name, i as TrustConfig, l as deriveDefaultPageAuthorities, n as Config, o as apply, r as MobileConfig, s as buildMobileScript, t as BootScriptRow, u as inject } from "./web-trust2.js";
|
|
2
3
|
export { BootScriptRow, Config, MobileConfig, TrustConfig, apply, buildMobileScript, buildTrustScript, _default as default, deriveDefaultPageAuthorities, inject, name };
|
package/lib/web-trust2.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { t as Schema } from "./index2.js";
|
|
1
2
|
import { Context } from "@deepseek-ai/cordis";
|
|
2
|
-
import * as _deepseek_ai_schemastery0 from "@deepseek-ai/schemastery";
|
|
3
3
|
|
|
4
4
|
//#region src/web-trust.d.ts
|
|
5
5
|
|
|
@@ -76,12 +76,12 @@ interface TrustConfig {
|
|
|
76
76
|
trustedPageAuthorities?: readonly string[];
|
|
77
77
|
}
|
|
78
78
|
/** Row config schema (schema-level default derives from `DSH_TRUSTED_HOSTS`). */
|
|
79
|
-
declare const Config:
|
|
80
|
-
trustAllHosts:
|
|
81
|
-
trustedPageAuthorities:
|
|
79
|
+
declare const Config: Schema<Schemastery.ObjectS<NoInfer<{
|
|
80
|
+
trustAllHosts: Schema<boolean, boolean, "defined">;
|
|
81
|
+
trustedPageAuthorities: Schema<string[], string[], "defined">;
|
|
82
82
|
}>>, Schemastery.ObjectT<NoInfer<{
|
|
83
|
-
trustAllHosts:
|
|
84
|
-
trustedPageAuthorities:
|
|
83
|
+
trustAllHosts: Schema<boolean, boolean, "defined">;
|
|
84
|
+
trustedPageAuthorities: Schema<string[], string[], "defined">;
|
|
85
85
|
}>>, "plain">;
|
|
86
86
|
/** Cordis plugin name. */
|
|
87
87
|
declare const name = "dashr-web-trust";
|
|
@@ -100,12 +100,12 @@ declare function apply(ctx: Context, config: TrustConfig | undefined): void;
|
|
|
100
100
|
declare const _default: {
|
|
101
101
|
name: string;
|
|
102
102
|
inject: string[];
|
|
103
|
-
Config:
|
|
104
|
-
trustAllHosts:
|
|
105
|
-
trustedPageAuthorities:
|
|
103
|
+
Config: Schema<Schemastery.ObjectS<NoInfer<{
|
|
104
|
+
trustAllHosts: Schema<boolean, boolean, "defined">;
|
|
105
|
+
trustedPageAuthorities: Schema<string[], string[], "defined">;
|
|
106
106
|
}>>, Schemastery.ObjectT<NoInfer<{
|
|
107
|
-
trustAllHosts:
|
|
108
|
-
trustedPageAuthorities:
|
|
107
|
+
trustAllHosts: Schema<boolean, boolean, "defined">;
|
|
108
|
+
trustedPageAuthorities: Schema<string[], string[], "defined">;
|
|
109
109
|
}>>, "plain">;
|
|
110
110
|
apply: typeof apply;
|
|
111
111
|
};
|
package/lib/welcome-notice.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
+
import { t as Schema } from "./index2.js";
|
|
1
2
|
import { Context } from "@deepseek-ai/cordis";
|
|
2
|
-
import * as _deepseek_ai_schemastery9 from "@deepseek-ai/schemastery";
|
|
3
3
|
|
|
4
4
|
//#region src/welcome-notice.d.ts
|
|
5
5
|
declare const name = "dashr-welcome-notice";
|
|
6
6
|
declare const inject: string[];
|
|
7
|
-
declare const Config:
|
|
7
|
+
declare const Config: Schema<NoInfer<Schemastery.ObjectS<{}>>, NoInfer<Schemastery.ObjectT<{}>>, "volatile">;
|
|
8
8
|
declare function apply(ctx: Context): void;
|
|
9
9
|
declare const _default: {
|
|
10
10
|
name: string;
|
|
11
11
|
inject: string[];
|
|
12
|
-
Config:
|
|
12
|
+
Config: Schema<NoInfer<Schemastery.ObjectS<{}>>, NoInfer<Schemastery.ObjectT<{}>>, "volatile">;
|
|
13
13
|
apply: typeof apply;
|
|
14
14
|
};
|
|
15
15
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "better-dsh",
|
|
3
|
-
"version": "0.3.2-
|
|
3
|
+
"version": "0.3.2-e",
|
|
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",
|