dsh-over-ssh 0.1.0 → 0.1.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/README.md +10 -10
- package/agents/agent-manifest.json +1 -1
- package/lib/client.js +363 -314
- package/lib/file-references.js +80 -35
- package/lib/fs.js +158 -75
- package/lib/index.js +4103 -3397
- package/lib/terminal-wrapper.js +9 -4
- package/lib/types/src/config.d.ts +80 -9
- package/lib/types/src/file-references.d.ts +0 -1
- package/lib/types/src/host/app/backend.d.ts +9 -1
- package/lib/types/src/host/app/recycle-bin/recycle-bin-contract.d.ts +0 -1
- package/lib/types/src/host/app/recycle-bin/recycle-bin-service.d.ts +0 -1
- package/lib/types/src/host/app/session-admin/session-admin-contract.d.ts +12 -1
- package/lib/types/src/host/app/session-admin/session-admin-service.d.ts +0 -1
- package/lib/types/src/host/app/transport/transport-selector.d.ts +0 -1
- package/lib/types/src/host/app/transport/transport-service.d.ts +0 -1
- package/lib/types/src/host/domain/capability.d.ts +0 -1
- package/lib/types/src/host/domain/errors.d.ts +0 -1
- package/lib/types/src/host/domain/roots/connection.d.ts +0 -1
- package/lib/types/src/host/domain/roots/root.d.ts +24 -9
- package/lib/types/src/host/domain/roots/session-roots.d.ts +0 -1
- package/lib/types/src/host/domain/roots/ssh-config.d.ts +0 -1
- package/lib/types/src/host/domain/session/session-admin.d.ts +0 -1
- package/lib/types/src/host/domain/transfer/recycle-bin.d.ts +0 -1
- package/lib/types/src/host/domain/transfer/transfer.d.ts +0 -1
- package/lib/types/src/host/infra/transport/agent/agent-installer.d.ts +0 -1
- package/lib/types/src/host/infra/transport/ssh/ssh2-transport.d.ts +0 -1
- package/lib/types/src/host/infra/transport/transport-base.d.ts +0 -1
- package/lib/types/src/host/infra/transport/transport.d.ts +16 -2
- package/lib/types/src/host/integration/agent/agent-preflight.d.ts +0 -1
- package/lib/types/src/host/integration/fs/file-reference-provider.d.ts +0 -1
- package/lib/types/src/host/integration/fs/fs-provider.d.ts +0 -2
- package/lib/types/src/host/integration/transfer/transfer-service.d.ts +0 -1
- package/lib/types/src/index.d.ts +23 -1
- package/lib/types/src/local-bridge-refs.d.ts +0 -1
- package/lib/types/src/local-bridge.d.ts +0 -1
- package/lib/types/src/shared/root-keys.d.ts +120 -0
- package/lib/types/src/wiring/helpers.d.ts +0 -1
- package/package.json +5 -3
- package/lib/types/src/client/controls.d.ts +0 -131
- package/lib/types/src/client/core/card-focus-trap.d.ts +0 -45
- package/lib/types/src/client/core/controls.d.ts +0 -164
- package/lib/types/src/client/core/latest.d.ts +0 -48
- package/lib/types/src/client/core/locale.d.ts +0 -38
- package/lib/types/src/client/core/message.d.ts +0 -37
- package/lib/types/src/client/core/panel-model.d.ts +0 -134
- package/lib/types/src/client/core/portal.d.ts +0 -266
- package/lib/types/src/client/core/remote.d.ts +0 -84
- package/lib/types/src/client/core/styles.d.ts +0 -458
- package/lib/types/src/client/file-tree-io.d.ts +0 -19
- package/lib/types/src/client/file-tree.d.ts +0 -271
- package/lib/types/src/client/flows/directory-browser.d.ts +0 -587
- package/lib/types/src/client/flows/session-directory.d.ts +0 -415
- package/lib/types/src/client/flows/workspace-directory-flow.d.ts +0 -480
- package/lib/types/src/client/locale.d.ts +0 -31
- package/lib/types/src/client/panel-model.d.ts +0 -37
- package/lib/types/src/client/panel.d.ts +0 -77
- package/lib/types/src/client/roots/connection-test.d.ts +0 -69
- package/lib/types/src/client/roots/roots-panel-state.d.ts +0 -307
- package/lib/types/src/client/roots/roots-panel-view.d.ts +0 -280
- package/lib/types/src/client/roots/roots-panel.d.ts +0 -364
- package/lib/types/src/client/roots/transfer-panel-view.d.ts +0 -35
- package/lib/types/src/client/roots/transfer-panel.d.ts +0 -241
- package/lib/types/src/client/roots/transfer-progress.d.ts +0 -67
- package/lib/types/src/client/roots-panel-view.d.ts +0 -236
- package/lib/types/src/client/roots-panel.d.ts +0 -347
- package/lib/types/src/client/session/session-panel-view.d.ts +0 -336
- package/lib/types/src/client/session/session-panel.d.ts +0 -322
- package/lib/types/src/client/session/session-remote-mark.d.ts +0 -110
- package/lib/types/src/client/session/session-row-actions.d.ts +0 -398
- package/lib/types/src/client/session-panel.d.ts +0 -152
- package/lib/types/src/client/styles.d.ts +0 -252
- package/lib/types/src/client/workspace-directory-flow.d.ts +0 -342
- package/lib/types/src/fs.d.ts +0 -46
- package/lib/types/src/host/app/recycle-bin/recycle-bin-move.d.ts +0 -18
- package/lib/types/src/host/app/recycle-bin/recycle-bin-world.d.ts +0 -38
- package/lib/types/src/host/app/recycle-bin-contract.d.ts +0 -215
- package/lib/types/src/host/app/recycle-bin-move.d.ts +0 -18
- package/lib/types/src/host/app/recycle-bin-service.d.ts +0 -45
- package/lib/types/src/host/app/recycle-bin-world.d.ts +0 -35
- package/lib/types/src/host/app/roots/roots-api-connections.d.ts +0 -49
- package/lib/types/src/host/app/roots/roots-api-contract.d.ts +0 -369
- package/lib/types/src/host/app/roots/roots-api-directories.d.ts +0 -13
- package/lib/types/src/host/app/roots/roots-api-http.d.ts +0 -77
- package/lib/types/src/host/app/roots/roots-api-long-poll.d.ts +0 -130
- package/lib/types/src/host/app/roots/roots-api-projections.d.ts +0 -102
- package/lib/types/src/host/app/roots/roots-api-roots.d.ts +0 -13
- package/lib/types/src/host/app/roots/roots-api-state.d.ts +0 -22
- package/lib/types/src/host/app/roots/roots-api-transfers.d.ts +0 -26
- package/lib/types/src/host/app/roots/roots-api.d.ts +0 -55
- package/lib/types/src/host/app/roots/user-roots.d.ts +0 -552
- package/lib/types/src/host/app/roots-api-connections.d.ts +0 -49
- package/lib/types/src/host/app/roots-api-contract.d.ts +0 -339
- package/lib/types/src/host/app/roots-api-directories.d.ts +0 -13
- package/lib/types/src/host/app/roots-api-http.d.ts +0 -77
- package/lib/types/src/host/app/roots-api-projections.d.ts +0 -102
- package/lib/types/src/host/app/roots-api-roots.d.ts +0 -13
- package/lib/types/src/host/app/roots-api-state.d.ts +0 -22
- package/lib/types/src/host/app/roots-api-support.d.ts +0 -182
- package/lib/types/src/host/app/roots-api-transfers.d.ts +0 -13
- package/lib/types/src/host/app/roots-api.d.ts +0 -55
- package/lib/types/src/host/app/routed-fs.d.ts +0 -239
- package/lib/types/src/host/app/serialize.d.ts +0 -37
- package/lib/types/src/host/app/session-admin/session-admin-context.d.ts +0 -36
- package/lib/types/src/host/app/session-admin/session-admin-delete.d.ts +0 -34
- package/lib/types/src/host/app/session-admin-context.d.ts +0 -36
- package/lib/types/src/host/app/session-admin-contract.d.ts +0 -214
- package/lib/types/src/host/app/session-admin-delete.d.ts +0 -34
- package/lib/types/src/host/app/session-admin-service.d.ts +0 -38
- package/lib/types/src/host/app/takeover/takeover-plan.d.ts +0 -227
- package/lib/types/src/host/app/takeover/takeover-rows.d.ts +0 -55
- package/lib/types/src/host/app/transport-selector.d.ts +0 -98
- package/lib/types/src/host/app/transport-service.d.ts +0 -75
- package/lib/types/src/host/app/user-roots.d.ts +0 -461
- package/lib/types/src/host/domain/bin-location.d.ts +0 -79
- package/lib/types/src/host/domain/connection.d.ts +0 -95
- package/lib/types/src/host/domain/glob-pattern.d.ts +0 -62
- package/lib/types/src/host/domain/literal-text.d.ts +0 -63
- package/lib/types/src/host/domain/path-grammar.d.ts +0 -84
- package/lib/types/src/host/domain/recycle-bin.d.ts +0 -337
- package/lib/types/src/host/domain/root.d.ts +0 -74
- package/lib/types/src/host/domain/roots/bin-location.d.ts +0 -91
- package/lib/types/src/host/domain/roots/route-table.d.ts +0 -102
- package/lib/types/src/host/domain/route-table.d.ts +0 -80
- package/lib/types/src/host/domain/session/terminal-target.d.ts +0 -136
- package/lib/types/src/host/domain/session-admin.d.ts +0 -330
- package/lib/types/src/host/domain/shell.d.ts +0 -47
- package/lib/types/src/host/domain/ssh-config.d.ts +0 -73
- package/lib/types/src/host/domain/terminal-target.d.ts +0 -132
- package/lib/types/src/host/domain/tool-requests.d.ts +0 -369
- package/lib/types/src/host/domain/transfer.d.ts +0 -260
- package/lib/types/src/host/infra/backend/local-backend.d.ts +0 -84
- package/lib/types/src/host/infra/backend/local-version.d.ts +0 -43
- package/lib/types/src/host/infra/backend/platform-local-backend.d.ts +0 -89
- package/lib/types/src/host/infra/backend/remote-backend.d.ts +0 -239
- package/lib/types/src/host/infra/cache/lru.d.ts +0 -52
- package/lib/types/src/host/infra/cache/versioned.d.ts +0 -77
- package/lib/types/src/host/infra/temp-name.d.ts +0 -19
- package/lib/types/src/host/infra/transport/agent/agent-protocol-client.d.ts +0 -132
- package/lib/types/src/host/infra/transport/agent/agent-protocol-codec.d.ts +0 -140
- package/lib/types/src/host/infra/transport/agent/agent-protocol-errors.d.ts +0 -41
- package/lib/types/src/host/infra/transport/agent/agent-protocol-frames.d.ts +0 -197
- package/lib/types/src/host/infra/transport/agent/agent-protocol-types.d.ts +0 -564
- package/lib/types/src/host/infra/transport/agent/agent-transport.d.ts +0 -418
- package/lib/types/src/host/infra/transport/agent-installer.d.ts +0 -121
- package/lib/types/src/host/infra/transport/agent-protocol-client.d.ts +0 -123
- package/lib/types/src/host/infra/transport/agent-protocol-codec.d.ts +0 -131
- package/lib/types/src/host/infra/transport/agent-protocol-errors.d.ts +0 -41
- package/lib/types/src/host/infra/transport/agent-protocol-frames.d.ts +0 -197
- package/lib/types/src/host/infra/transport/agent-protocol-types.d.ts +0 -509
- package/lib/types/src/host/infra/transport/agent-transport.d.ts +0 -353
- package/lib/types/src/host/infra/transport/alias-transport.d.ts +0 -206
- package/lib/types/src/host/infra/transport/askpass-fs.d.ts +0 -20
- package/lib/types/src/host/infra/transport/askpass.d.ts +0 -133
- package/lib/types/src/host/infra/transport/command-pool.d.ts +0 -61
- package/lib/types/src/host/infra/transport/fs-commands.d.ts +0 -140
- package/lib/types/src/host/infra/transport/git-status-route.d.ts +0 -63
- package/lib/types/src/host/infra/transport/git-status.d.ts +0 -101
- package/lib/types/src/host/infra/transport/node-spawn.d.ts +0 -26
- package/lib/types/src/host/infra/transport/session-window.d.ts +0 -51
- package/lib/types/src/host/infra/transport/shell-quote.d.ts +0 -59
- package/lib/types/src/host/infra/transport/ssh/alias-transport.d.ts +0 -206
- package/lib/types/src/host/infra/transport/ssh/askpass-fs.d.ts +0 -20
- package/lib/types/src/host/infra/transport/ssh/askpass.d.ts +0 -133
- package/lib/types/src/host/infra/transport/ssh/shell-quote.d.ts +0 -62
- package/lib/types/src/host/infra/transport/ssh/ssh-argv.d.ts +0 -43
- package/lib/types/src/host/infra/transport/ssh-argv.d.ts +0 -43
- package/lib/types/src/host/infra/transport/ssh2-transport.d.ts +0 -302
- package/lib/types/src/host/integration/agent/agent-install-io.d.ts +0 -33
- package/lib/types/src/host/integration/agent/askpass-registry.d.ts +0 -66
- package/lib/types/src/host/integration/agent-install-io.d.ts +0 -33
- package/lib/types/src/host/integration/agent-preflight.d.ts +0 -56
- package/lib/types/src/host/integration/anchor-directory.d.ts +0 -56
- package/lib/types/src/host/integration/askpass-registry.d.ts +0 -59
- package/lib/types/src/host/integration/bin-root-resolver.d.ts +0 -81
- package/lib/types/src/host/integration/connection-test.d.ts +0 -73
- package/lib/types/src/host/integration/file-reference-provider.d.ts +0 -115
- package/lib/types/src/host/integration/fs/git-status-wiring.d.ts +0 -21
- package/lib/types/src/host/integration/fs/platform-errors.d.ts +0 -94
- package/lib/types/src/host/integration/fs/remote-file-tools.d.ts +0 -369
- package/lib/types/src/host/integration/fs/remote-index.d.ts +0 -177
- package/lib/types/src/host/integration/fs-provider.d.ts +0 -226
- package/lib/types/src/host/integration/lsp/lsp-framing.d.ts +0 -38
- package/lib/types/src/host/integration/lsp/lsp-registry.d.ts +0 -67
- package/lib/types/src/host/integration/lsp/lsp-session.d.ts +0 -130
- package/lib/types/src/host/integration/management-tools.d.ts +0 -64
- package/lib/types/src/host/integration/recycle-bin-service.d.ts +0 -247
- package/lib/types/src/host/integration/remote/connection-test.d.ts +0 -73
- package/lib/types/src/host/integration/remote/remote-face.d.ts +0 -127
- package/lib/types/src/host/integration/remote/remote-tool-backend.d.ts +0 -108
- package/lib/types/src/host/integration/remote-face.d.ts +0 -127
- package/lib/types/src/host/integration/remote-file-tools.d.ts +0 -241
- package/lib/types/src/host/integration/remote-home.d.ts +0 -69
- package/lib/types/src/host/integration/remote-index.d.ts +0 -165
- package/lib/types/src/host/integration/remote-job-tools.d.ts +0 -295
- package/lib/types/src/host/integration/remote-tool-backend.d.ts +0 -97
- package/lib/types/src/host/integration/remote-tools.d.ts +0 -206
- package/lib/types/src/host/integration/root-registry.d.ts +0 -115
- package/lib/types/src/host/integration/roots/anchor-directory.d.ts +0 -56
- package/lib/types/src/host/integration/roots/bin-root-resolver.d.ts +0 -81
- package/lib/types/src/host/integration/roots/remote-home.d.ts +0 -69
- package/lib/types/src/host/integration/roots/root-registry.d.ts +0 -144
- package/lib/types/src/host/integration/roots/roots-wiring.d.ts +0 -219
- package/lib/types/src/host/integration/roots/session-root-index.d.ts +0 -52
- package/lib/types/src/host/integration/roots-api.d.ts +0 -407
- package/lib/types/src/host/integration/roots-wiring.d.ts +0 -211
- package/lib/types/src/host/integration/session/session-api.d.ts +0 -88
- package/lib/types/src/host/integration/session/session-bin-lock.d.ts +0 -80
- package/lib/types/src/host/integration/session/session-header.d.ts +0 -151
- package/lib/types/src/host/integration/session/session-labels.d.ts +0 -56
- package/lib/types/src/host/integration/session/session-route-wiring.d.ts +0 -50
- package/lib/types/src/host/integration/session-admin-service.d.ts +0 -236
- package/lib/types/src/host/integration/session-api.d.ts +0 -81
- package/lib/types/src/host/integration/session-bin-lock.d.ts +0 -80
- package/lib/types/src/host/integration/session-header.d.ts +0 -118
- package/lib/types/src/host/integration/session-labels.d.ts +0 -56
- package/lib/types/src/host/integration/session-route-wiring.d.ts +0 -50
- package/lib/types/src/host/integration/session-scope.d.ts +0 -113
- package/lib/types/src/host/integration/session-tools.d.ts +0 -44
- package/lib/types/src/host/integration/strict-arguments.d.ts +0 -79
- package/lib/types/src/host/integration/takeover/takeover-api.d.ts +0 -62
- package/lib/types/src/host/integration/takeover/takeover-route-wiring.d.ts +0 -60
- package/lib/types/src/host/integration/takeover/takeover-service.d.ts +0 -167
- package/lib/types/src/host/integration/terminal-manifest.d.ts +0 -94
- package/lib/types/src/host/integration/tools/management-tools.d.ts +0 -245
- package/lib/types/src/host/integration/tools/remote-job-tools.d.ts +0 -316
- package/lib/types/src/host/integration/tools/remote-lsp-tools.d.ts +0 -43
- package/lib/types/src/host/integration/tools/remote-tools.d.ts +0 -236
- package/lib/types/src/host/integration/tools/session-target.d.ts +0 -52
- package/lib/types/src/host/integration/tools/session-tools.d.ts +0 -46
- package/lib/types/src/host/integration/tools/strict-arguments.d.ts +0 -79
- package/lib/types/src/host/integration/tools/terminal-manifest.d.ts +0 -94
- package/lib/types/src/host/integration/transfer/remote-copy.d.ts +0 -66
- package/lib/types/src/host/integration/transfer/transfer-adapters.d.ts +0 -48
- package/lib/types/src/host/integration/transfer/transfer-tracker.d.ts +0 -106
- package/lib/types/src/host/integration/transfer-adapters.d.ts +0 -44
- package/lib/types/src/host/integration/transfer-service.d.ts +0 -164
- package/lib/types/src/host/integration/transfer-tracker.d.ts +0 -106
- package/lib/types/src/host/integration/user-roots.d.ts +0 -461
- package/lib/types/src/wiring/connections.d.ts +0 -189
- package/lib/types/src/wiring/fs.d.ts +0 -13
- package/lib/types/src/wiring/install-memo.d.ts +0 -32
- package/lib/types/src/wiring/legacy-dirs.d.ts +0 -62
- package/lib/types/src/wiring/package-paths.d.ts +0 -35
- package/lib/types/src/wiring/roots.d.ts +0 -21
- package/lib/types/src/wiring/state-dir.d.ts +0 -29
- package/lib/types/src/wiring/tools.d.ts +0 -35
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* connections
|
|
3
|
-
*
|
|
4
|
-
* 建立连接配置、传输服务、根注册表与按连接的索引。
|
|
5
|
-
*
|
|
6
|
-
* 从 `src/index.ts` 的 `apply()` 抽出(审计 0074 §2.6):函数体是**逐字搬移**,
|
|
7
|
-
* 依赖通过"从 env 解构 + 返回后续要用的量"显式化,行为不变。
|
|
8
|
-
*
|
|
9
|
-
* @module dsh-over-ssh/wiring/connections
|
|
10
|
-
*/
|
|
11
|
-
import { TransportSelector } from '../host/app/transport/transport-selector.ts';
|
|
12
|
-
import { TransportService } from '../host/app/transport/transport-service.ts';
|
|
13
|
-
import { type ConnectionProfile } from '../host/domain/roots/connection.ts';
|
|
14
|
-
import { type AgentInstallation } from '../host/infra/transport/agent/agent-installer.ts';
|
|
15
|
-
/**
|
|
16
|
-
* 降级/失败结果缓存多久之后重试一次安装。
|
|
17
|
-
*
|
|
18
|
-
* 用 `let` 而不是 `const`:测试要把它压到毫秒级才能验证「一次瞬时故障之后会重新尝试」。
|
|
19
|
-
* 生产值是 30 秒——重试一次的代价是几条 ssh 命令,而永久降级的代价是整个会话没有 Tier 2。
|
|
20
|
-
*/
|
|
21
|
-
export declare let degradedRetryMs: number;
|
|
22
|
-
/** 仅供测试:改回默认值,避免测试之间互相影响。 */
|
|
23
|
-
export declare function setDegradedRetryMs(value: number): number;
|
|
24
|
-
import { RemoteBackend } from '../host/infra/backend/remote-backend.ts';
|
|
25
|
-
import { RemoteIndex } from '../host/integration/fs/remote-index.ts';
|
|
26
|
-
import { RootRegistry } from '../host/integration/roots/root-registry.ts';
|
|
27
|
-
import type { Context } from '@deepseek-ai/cordis';
|
|
28
|
-
import { type ResolvedConfig, type ConnectionDirectory } from './helpers.ts';
|
|
29
|
-
import type { BackendRangeReader } from '../host/integration/fs/fs-provider.ts';
|
|
30
|
-
import type { FileReferenceIndex } from '../host/integration/fs/file-reference-provider.ts';
|
|
31
|
-
export declare function wireConnections(ctx: Context, config: ResolvedConfig): {
|
|
32
|
-
ctx: Context;
|
|
33
|
-
config: Schemastery.ObjectT<NoInfer<{
|
|
34
|
-
connections: import("@deepseek-ai/schemastery").default<({
|
|
35
|
-
id?: string | null;
|
|
36
|
-
name?: string | null;
|
|
37
|
-
host?: string | null;
|
|
38
|
-
port?: number | null;
|
|
39
|
-
user?: string | null;
|
|
40
|
-
transport?: "agent" | "alias" | "ssh2" | null;
|
|
41
|
-
alias?: string | null;
|
|
42
|
-
authKind?: "agent" | "key" | "password" | null;
|
|
43
|
-
keyPath?: string | null;
|
|
44
|
-
credentialKey?: string | null;
|
|
45
|
-
proxyJump?: string[] | null;
|
|
46
|
-
hostKeyPolicy?: "accept-new" | "strict" | null;
|
|
47
|
-
remoteDefaultRoot?: string | null;
|
|
48
|
-
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<NoInfer<{
|
|
49
|
-
id: import("@deepseek-ai/schemastery").default<string, string, "defined">;
|
|
50
|
-
name: import("@deepseek-ai/schemastery").default<string, string, "plain">;
|
|
51
|
-
host: import("@deepseek-ai/schemastery").default<string, string, "defined">;
|
|
52
|
-
port: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
53
|
-
user: import("@deepseek-ai/schemastery").default<string, string, "defined">;
|
|
54
|
-
transport: import("@deepseek-ai/schemastery").default<"agent" | "alias" | "ssh2", "agent" | "alias" | "ssh2", "defined">;
|
|
55
|
-
alias: import("@deepseek-ai/schemastery").default<string, string, "plain">;
|
|
56
|
-
authKind: import("@deepseek-ai/schemastery").default<"agent" | "key" | "password", "agent" | "key" | "password", "defined">;
|
|
57
|
-
keyPath: import("@deepseek-ai/schemastery").default<string, string, "plain">;
|
|
58
|
-
credentialKey: import("@deepseek-ai/schemastery").default<string, string, "plain">;
|
|
59
|
-
proxyJump: import("@deepseek-ai/schemastery").default<string[], string[], "defined">;
|
|
60
|
-
hostKeyPolicy: import("@deepseek-ai/schemastery").default<"accept-new" | "strict", "accept-new" | "strict", "defined">;
|
|
61
|
-
remoteDefaultRoot: import("@deepseek-ai/schemastery").default<string, string, "plain">;
|
|
62
|
-
}>>[], "defined">;
|
|
63
|
-
roots: import("@deepseek-ai/schemastery").default<({
|
|
64
|
-
location?: "remote" | "local" | null;
|
|
65
|
-
path?: string | null;
|
|
66
|
-
connectionId?: string | null;
|
|
67
|
-
label?: string | null;
|
|
68
|
-
writable?: boolean | null;
|
|
69
|
-
anchorPath?: string | null;
|
|
70
|
-
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<NoInfer<{
|
|
71
|
-
location: import("@deepseek-ai/schemastery").default<"remote" | "local", "remote" | "local", "defined">;
|
|
72
|
-
path: import("@deepseek-ai/schemastery").default<string, string, "defined">;
|
|
73
|
-
connectionId: import("@deepseek-ai/schemastery").default<string, string, "plain">;
|
|
74
|
-
label: import("@deepseek-ai/schemastery").default<string, string, "plain">;
|
|
75
|
-
writable: import("@deepseek-ai/schemastery").default<boolean, boolean, "defined">;
|
|
76
|
-
anchorPath: import("@deepseek-ai/schemastery").default<string, string, "plain">;
|
|
77
|
-
}>>[], "defined">;
|
|
78
|
-
limits: import("@deepseek-ai/schemastery").default<Schemastery.ObjectS<NoInfer<{
|
|
79
|
-
maxReadBytes: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
80
|
-
connectTimeoutMs: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
81
|
-
commandTimeoutMs: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
82
|
-
keepAliveSeconds: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
83
|
-
controlDir: import("@deepseek-ai/schemastery").default<string, string, "plain">;
|
|
84
|
-
knownHostsFile: import("@deepseek-ai/schemastery").default<string, string, "plain">;
|
|
85
|
-
agentManifestPath: import("@deepseek-ai/schemastery").default<string, string, "plain">;
|
|
86
|
-
agentRemoteDir: import("@deepseek-ai/schemastery").default<string, string, "defined">;
|
|
87
|
-
indexTtlMs: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
88
|
-
indexMaxEntries: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
89
|
-
readCacheTtlMs: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
90
|
-
readCacheMaxEntries: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
91
|
-
readCacheMaxBytes: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
92
|
-
terminalStateDir: import("@deepseek-ai/schemastery").default<string, string, "plain">;
|
|
93
|
-
transferChunkBytes: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
94
|
-
transferConcurrency: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
95
|
-
transferHistoryEntries: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
96
|
-
binDir: import("@deepseek-ai/schemastery").default<string, string, "defined">;
|
|
97
|
-
binMaxEntries: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
98
|
-
binMaxBytes: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
99
|
-
binMaxAgeMs: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
100
|
-
undoDepth: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
101
|
-
rangeChunkBytes: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
102
|
-
sessionsRoot: import("@deepseek-ai/schemastery").default<string, string, "plain">;
|
|
103
|
-
sessionBinRoot: import("@deepseek-ai/schemastery").default<string, string, "plain">;
|
|
104
|
-
sessionBinMaxEntries: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
105
|
-
sessionBinMaxBytes: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
106
|
-
sessionBinMaxAgeMs: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
107
|
-
sessionPurgeProjection: import("@deepseek-ai/schemastery").default<boolean, boolean, "defined">;
|
|
108
|
-
}>>, Schemastery.ObjectT<NoInfer<{
|
|
109
|
-
maxReadBytes: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
110
|
-
connectTimeoutMs: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
111
|
-
commandTimeoutMs: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
112
|
-
keepAliveSeconds: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
113
|
-
controlDir: import("@deepseek-ai/schemastery").default<string, string, "plain">;
|
|
114
|
-
knownHostsFile: import("@deepseek-ai/schemastery").default<string, string, "plain">;
|
|
115
|
-
agentManifestPath: import("@deepseek-ai/schemastery").default<string, string, "plain">;
|
|
116
|
-
agentRemoteDir: import("@deepseek-ai/schemastery").default<string, string, "defined">;
|
|
117
|
-
indexTtlMs: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
118
|
-
indexMaxEntries: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
119
|
-
readCacheTtlMs: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
120
|
-
readCacheMaxEntries: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
121
|
-
readCacheMaxBytes: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
122
|
-
terminalStateDir: import("@deepseek-ai/schemastery").default<string, string, "plain">;
|
|
123
|
-
transferChunkBytes: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
124
|
-
transferConcurrency: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
125
|
-
transferHistoryEntries: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
126
|
-
binDir: import("@deepseek-ai/schemastery").default<string, string, "defined">;
|
|
127
|
-
binMaxEntries: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
128
|
-
binMaxBytes: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
129
|
-
binMaxAgeMs: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
130
|
-
undoDepth: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
131
|
-
rangeChunkBytes: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
132
|
-
sessionsRoot: import("@deepseek-ai/schemastery").default<string, string, "plain">;
|
|
133
|
-
sessionBinRoot: import("@deepseek-ai/schemastery").default<string, string, "plain">;
|
|
134
|
-
sessionBinMaxEntries: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
135
|
-
sessionBinMaxBytes: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
136
|
-
sessionBinMaxAgeMs: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
137
|
-
sessionPurgeProjection: import("@deepseek-ai/schemastery").default<boolean, boolean, "defined">;
|
|
138
|
-
}>>, "defined">;
|
|
139
|
-
}>>;
|
|
140
|
-
limits: Schemastery.ObjectT<NoInfer<{
|
|
141
|
-
maxReadBytes: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
142
|
-
connectTimeoutMs: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
143
|
-
commandTimeoutMs: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
144
|
-
keepAliveSeconds: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
145
|
-
controlDir: import("@deepseek-ai/schemastery").default<string, string, "plain">;
|
|
146
|
-
knownHostsFile: import("@deepseek-ai/schemastery").default<string, string, "plain">;
|
|
147
|
-
agentManifestPath: import("@deepseek-ai/schemastery").default<string, string, "plain">;
|
|
148
|
-
agentRemoteDir: import("@deepseek-ai/schemastery").default<string, string, "defined">;
|
|
149
|
-
indexTtlMs: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
150
|
-
indexMaxEntries: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
151
|
-
readCacheTtlMs: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
152
|
-
readCacheMaxEntries: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
153
|
-
readCacheMaxBytes: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
154
|
-
terminalStateDir: import("@deepseek-ai/schemastery").default<string, string, "plain">;
|
|
155
|
-
transferChunkBytes: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
156
|
-
transferConcurrency: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
157
|
-
transferHistoryEntries: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
158
|
-
binDir: import("@deepseek-ai/schemastery").default<string, string, "defined">;
|
|
159
|
-
binMaxEntries: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
160
|
-
binMaxBytes: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
161
|
-
binMaxAgeMs: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
162
|
-
undoDepth: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
163
|
-
rangeChunkBytes: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
164
|
-
sessionsRoot: import("@deepseek-ai/schemastery").default<string, string, "plain">;
|
|
165
|
-
sessionBinRoot: import("@deepseek-ai/schemastery").default<string, string, "plain">;
|
|
166
|
-
sessionBinMaxEntries: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
167
|
-
sessionBinMaxBytes: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
168
|
-
sessionBinMaxAgeMs: import("@deepseek-ai/schemastery").default<number, number, "defined">;
|
|
169
|
-
sessionPurgeProjection: import("@deepseek-ai/schemastery").default<boolean, boolean, "defined">;
|
|
170
|
-
}>>;
|
|
171
|
-
anchorRootDir: string;
|
|
172
|
-
profiles: Map<string, ConnectionProfile>;
|
|
173
|
-
selector: TransportSelector;
|
|
174
|
-
askpass: import("../host/integration/agent/askpass-registry.ts").AskpassRegistry;
|
|
175
|
-
installations: import("./install-memo.ts").InstallMemo<AgentInstallation>;
|
|
176
|
-
agentBridge: import("../host/integration/agent/agent-preflight.ts").AgentPreflight;
|
|
177
|
-
transports: TransportService;
|
|
178
|
-
remoteHome: import("../host/integration/roots/remote-home.ts").RemoteHomeResolver;
|
|
179
|
-
forgetBackendsOf: (connectionId: string) => void;
|
|
180
|
-
browseBackends: Map<string, RemoteBackend>;
|
|
181
|
-
readBytesRange: BackendRangeReader;
|
|
182
|
-
registry: RootRegistry;
|
|
183
|
-
directory: ConnectionDirectory;
|
|
184
|
-
indexes: Map<string, RemoteIndex>;
|
|
185
|
-
indexFor: (connectionId: string) => RemoteIndex;
|
|
186
|
-
index: FileReferenceIndex;
|
|
187
|
-
};
|
|
188
|
-
export type Connections = ReturnType<typeof wireConnections>;
|
|
189
|
-
//# sourceMappingURL=connections.d.ts.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Tools } from './tools.ts';
|
|
2
|
-
/**
|
|
3
|
-
* The private-realm self-check, kept after the setting-page panel (and its HTTP route) was removed.
|
|
4
|
-
*
|
|
5
|
-
* The panel was the only surface that could show this fact, and its service reported it as
|
|
6
|
-
* `localWorld: 'missing'`. Without it, "the private-realm bridge did not install" has **no** observable
|
|
7
|
-
* signal: the router falls back to this plugin's own local backend, every feature still works, and only the
|
|
8
|
-
* executor behind the write fence changed. That is the failure `http-404` cannot explain, so it is reported
|
|
9
|
-
* once at startup instead of being lost with the panel (audit 0100 unverified item).
|
|
10
|
-
*/
|
|
11
|
-
export declare const LOCAL_WORLD_MISSING_WARNING = "dsh-over-ssh: \u79C1\u6709\u57DF\u7684 bridge \u672A\u5C31\u4F4D\uFF08ctx.get(\"localFs\") === undefined\uFF09\uFF1A\u672C\u5730\u8DEF\u5F84\u7684\u5199\u5165\u56F4\u680F\u9000\u56DE\u672C\u63D2\u4EF6\u81EA\u5DF1\u7684 LocalBackend\u2014\u2014\u529F\u80FD\u770B\u8D77\u6765\u6B63\u5E38\uFF0C\u4F46\u56F4\u680F\u6362\u4E86\u6267\u884C\u8005\u3002\u8BF7\u68C0\u67E5 cordis.patch.yml \u91CC \u8FDC\u7A0B\u5DE5\u4F5C\u533A-\u79C1\u6709\u57DF \u7EC4\uFF08fs/fileReferences \u7684 isolate \u4E0E\u4E24\u4E2A bridge \u884C\uFF09\u662F\u5426\u88AB\u7981\u7528\u6216\u52A0\u8F7D\u5931\u8D25\u3002";
|
|
12
|
-
export declare function wireFs(env: Tools): void;
|
|
13
|
-
//# sourceMappingURL=fs.d.ts.map
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 安装阶梯结果的记忆化。
|
|
3
|
-
*
|
|
4
|
-
* 单独的模块不是为了好看,是因为这段逻辑有两个容易写错、又很难从外部观察的点:
|
|
5
|
-
*
|
|
6
|
-
* - **成功的安装永久缓存。** 重新上传一次代理要几条 ssh 命令加一次传输,而结果不会自己变。
|
|
7
|
-
* - **降级/失败只缓存一小段时间。** 一次瞬时故障(连接被拒、磁盘满、超时、用户取消)如果被
|
|
8
|
-
* 记一辈子,这条连接在整个进程生命周期里都只能跑零安装模式——没有 LSP、没有后台作业、
|
|
9
|
-
* 没有原子写——而唯一的线索是一行 info 日志。这类故障自己不会恢复,但下次尝试通常会成功。
|
|
10
|
-
*
|
|
11
|
-
* 组合根(`wireConnections`)不适合承载这种需要断言时序的逻辑:它连一个测试文件都没有。
|
|
12
|
-
*/
|
|
13
|
-
/** 一次安装尝试的结局:真正装上(installed/reused)或降级到 Tier 1。 */
|
|
14
|
-
export interface InstallOutcome {
|
|
15
|
-
readonly kind: string;
|
|
16
|
-
}
|
|
17
|
-
export interface InstallMemo<T extends InstallOutcome> {
|
|
18
|
-
/** 命中缓存时返回那次尝试的 promise;降级条目过期则返回 `undefined` 并清掉它。 */
|
|
19
|
-
get(id: string): Promise<T> | undefined;
|
|
20
|
-
/** 记下一次尝试;结算时按结局决定它是不是「降级」。 */
|
|
21
|
-
set(id: string, attempt: Promise<T>): void;
|
|
22
|
-
/** 连接被编辑/删除时调用。 */
|
|
23
|
-
forget(id: string): void;
|
|
24
|
-
/** 当前缓存条数(诊断用)。 */
|
|
25
|
-
readonly size: number;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* @param retryMs 降级条目缓存多久;传 `() => 0` 表示立刻重试(测试用)。
|
|
29
|
-
* @param now 时钟,默认 `Date.now`。
|
|
30
|
-
*/
|
|
31
|
-
export declare function createInstallMemo<T extends InstallOutcome>(retryMs: () => number, now?: () => number): InstallMemo<T>;
|
|
32
|
-
//# sourceMappingURL=install-memo.d.ts.map
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 把**改名前的目录**搬到现在的名字下。
|
|
3
|
-
*
|
|
4
|
-
* 这个插件改过两次名(`ssh-dev` → `remote-workspace` → `over-ssh`),而磁盘上留下了三类带旧名的
|
|
5
|
-
* 目录:状态目录、会话回收站、根回收站。它们的共同点是**索引就是唯一账本**——目录里记着"哪些东西
|
|
6
|
-
* 还能还原",每条又按绝对路径记着自己的字节。所以改名不能只改默认值:旧目录不搬,用户已经删掉的
|
|
7
|
-
* 东西就留在磁盘上、却再也找不回来。
|
|
8
|
-
*
|
|
9
|
-
* 两种搬运语义在这里分开写,因为它们的失败代价不同:
|
|
10
|
-
*
|
|
11
|
-
* - {@link carryMissingState}:**按文件复制**,目标已存在的不覆盖。状态目录里有多个彼此独立的文件,
|
|
12
|
-
* 部分搬运是安全的(缺的补上,已有的更新)。socket 与 pid 不搬——见 `state-dir.ts`。
|
|
13
|
-
* - {@link carryDirectory}:**整个目录 rename**,只在目标不存在时动手。回收站的索引与字节是一份整体,
|
|
14
|
-
* 拆开搬会让索引指向不存在的条目。
|
|
15
|
-
*
|
|
16
|
-
* 两者都不抛错、都幂等,因此都可以在每次启动时无条件调用:搬家失败不该让插件加载不了,也不该让
|
|
17
|
-
* 删除这条路不通,但失败必须能被调用方看见(返回失败清单,由 wiring 记日志)。
|
|
18
|
-
*
|
|
19
|
-
* **复制是原子的**:先写 `<目标>.migrating-<pid>-<n>` 再 `rename`。直接写目标会在崩溃窗口里留下
|
|
20
|
-
* 截断的 `user-roots.json`,而"目标已存在就不搬"会让它永远不被重试——用户看到的就是根列表消失。
|
|
21
|
-
*
|
|
22
|
-
* @module dsh-over-ssh/wiring/legacy-dirs
|
|
23
|
-
*/
|
|
24
|
-
/**
|
|
25
|
-
* 把一个旧目录里**尚不存在**的文件与子树复制到新目录。
|
|
26
|
-
*
|
|
27
|
-
* 目标已存在就不覆盖:新目录里的状态更新,旧目录只是残留。多个旧目录按从新到旧的顺序调用,于是
|
|
28
|
-
* 「更新的那个赢」不需要额外记账。
|
|
29
|
-
*
|
|
30
|
-
* 单个文件失败**不影响其余文件**,也不会抛出去:返回的失败清单交给调用方记日志。搬家失败最坏的结果
|
|
31
|
-
* 是"旧数据这次没搬过来",而不是"插件加载不了"。
|
|
32
|
-
*
|
|
33
|
-
* @param legacy - 旧目录的绝对路径;不存在时什么都不做。
|
|
34
|
-
* @param current - 新目录的绝对路径(调用方已确保存在)。
|
|
35
|
-
* @param files - 需要按文件搬走的名字。
|
|
36
|
-
* @param dirs - 需要整棵搬走的名字。
|
|
37
|
-
* @returns 失败清单(每条一句人话);空数组表示全部成功或没有要搬的。
|
|
38
|
-
*/
|
|
39
|
-
export declare function carryMissingState(legacy: string, current: string, files: readonly string[], dirs: readonly string[]): string[];
|
|
40
|
-
/** {@link carryDirectory} 的结果。调用方据此决定是否要写日志。 */
|
|
41
|
-
export type CarryOutcome = 'moved' | 'target-exists' | 'no-legacy' | 'failed';
|
|
42
|
-
/**
|
|
43
|
-
* 把整个旧目录 rename 成新名字,只做一次。
|
|
44
|
-
*
|
|
45
|
-
* 新目录已存在就什么都不做:那说明上一轮搬过,或者新目录已经写过内容,再搬一次会覆盖更新的数据。
|
|
46
|
-
* 旧目录不存在同样什么都不做——这是升级后最常见的正常路径。
|
|
47
|
-
*
|
|
48
|
-
* 新目录的父目录会被建出来:`rename` 要求目标父目录存在,而升级后第一次跑时它通常不存在。
|
|
49
|
-
*
|
|
50
|
-
* 失败**不抛**:搬家失败不该让删除这条路不通(旧目录留着仍然可以人工恢复),但失败也不该静默,
|
|
51
|
-
* 所以把错误交回给调用方去记日志。
|
|
52
|
-
*
|
|
53
|
-
* @param legacy - 旧目录的绝对路径。
|
|
54
|
-
* @param current - 新目录的绝对路径。
|
|
55
|
-
* @param rename - 实际的搬运动作,默认 `renameSync`;注入是为了让"跨设备"这类失败可测。
|
|
56
|
-
* @returns 搬了什么、为什么没搬;失败时带上错误。
|
|
57
|
-
*/
|
|
58
|
-
export declare function carryDirectory(legacy: string, current: string, rename?: (from: string, to: string) => void): {
|
|
59
|
-
outcome: CarryOutcome;
|
|
60
|
-
error?: unknown;
|
|
61
|
-
};
|
|
62
|
-
//# sourceMappingURL=legacy-dirs.d.ts.map
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 包内固定位置的解析(审计 0081)。
|
|
3
|
-
*
|
|
4
|
-
* 随包代理清单住在 `<包根>/agents/agent-manifest.json`,而需要它的模块在两个不同的深度上运行:
|
|
5
|
-
* 源码里是 `<仓库>/src/wiring/connections.ts`,打包产物里是 `<仓库>/lib/index.js`。
|
|
6
|
-
* 任何写死的 `../` 层数都至少对其中一个不成立——修复前它写的是 `../../../../`,
|
|
7
|
-
* **对两个都不成立**:产物里解析成 `D:\agents\agent-manifest.json`(不存在),
|
|
8
|
-
* 于是部署后的插件**永远**装不上 Tier 2 代理,只能静默回退 Tier 1(2026-10-19 在运行中的
|
|
9
|
-
* desktop 实例上用 `test-connection` 实测到 `degradation: "agent-unavailable"`)。
|
|
10
|
-
*
|
|
11
|
-
* 所以这里改成"找包根":从模块 URL 所在目录向上找 `package.json`,取 `name` 匹配本包的那个目录。
|
|
12
|
-
* 包根与模块深度无关,源码与产物走同一条路径;目录布局以后再搬也不会重演。
|
|
13
|
-
*
|
|
14
|
-
* @module dsh-over-ssh/wiring/package-paths
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
* 从任意模块 URL 找到本包的根目录。
|
|
18
|
-
*
|
|
19
|
-
* @param moduleUrl - `import.meta.url` 的取值(源码或产物都行)。
|
|
20
|
-
* @returns 包含本包 `package.json` 的目录(绝对路径)。
|
|
21
|
-
* @throws 向上走到盘符根都没有 `name === 'dsh-over-ssh'` 的 `package.json` 时抛出——
|
|
22
|
-
* 这是打包/安装布局坏了,不是运行期条件,不能猜一个路径继续。
|
|
23
|
-
*/
|
|
24
|
-
export declare function packageRootFrom(moduleUrl: string): string;
|
|
25
|
-
/**
|
|
26
|
-
* 随包代理清单的默认路径:`<包根>/agents/agent-manifest.json`。
|
|
27
|
-
*
|
|
28
|
-
* 调用方必须把 `import.meta.url` 传进来(而不是由本模块自己取):本模块在测试里被直接 import,
|
|
29
|
-
* 那时 `import.meta.url` 是测试文件的地址,用它算出来的包根虽然也对,却测不到**调用方**的深度。
|
|
30
|
-
*
|
|
31
|
-
* @param moduleUrl - 调用方的 `import.meta.url`。
|
|
32
|
-
* @returns 清单的绝对路径;文件是否存在不在这里判断(安装阶梯会报出可操作的失败)。
|
|
33
|
-
*/
|
|
34
|
-
export declare function defaultAgentManifestPath(moduleUrl: string): string;
|
|
35
|
-
//# sourceMappingURL=package-paths.d.ts.map
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* roots
|
|
3
|
-
*
|
|
4
|
-
* 根目录相关服务:回收站根解析、传输服务、会话 bin。
|
|
5
|
-
*
|
|
6
|
-
* 从 `src/index.ts` 的 `apply()` 抽出(审计 0074 §2.6):函数体是**逐字搬移**,
|
|
7
|
-
* 依赖通过"从 env 解构 + 返回后续要用的量"显式化,行为不变。
|
|
8
|
-
*
|
|
9
|
-
* @module dsh-over-ssh/wiring/roots
|
|
10
|
-
*/
|
|
11
|
-
import { type RootRef } from '../host/domain/roots/root.ts';
|
|
12
|
-
import type { Connections } from './connections.ts';
|
|
13
|
-
export declare function wireRoots(env: Connections): {
|
|
14
|
-
binRootResolver: import("../host/integration/roots/bin-root-resolver.ts").BinRootResolver;
|
|
15
|
-
prepareBinRoots: (roots: readonly RootRef[]) => Promise<void>;
|
|
16
|
-
transferService: import("../host/integration/transfer/transfer-service.ts").TransferService;
|
|
17
|
-
transferTracker: import("../host/integration/transfer/transfer-tracker.ts").TransferTracker;
|
|
18
|
-
binService: import("../host/app/recycle-bin/recycle-bin-contract.ts").RecycleBinService;
|
|
19
|
-
};
|
|
20
|
-
export type Roots = Connections & ReturnType<typeof wireRoots>;
|
|
21
|
-
//# sourceMappingURL=roots.d.ts.map
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 本插件的状态目录:`~/.dsh/over-ssh`,必要时把旧目录的状态搬过来。
|
|
3
|
-
*
|
|
4
|
-
* 这里放的是 `roots.json`、`user-roots.json`、`roots/` 与代理的 socket/pid。目录名换过两次:
|
|
5
|
-
* 最早叫 `~/.dsh/ssh-dev`(会让人以为这里是 SSH 认证相关的东西——认证代理的 socket、密钥之
|
|
6
|
-
* 类——而这个插件一行密钥代码都没有),后来叫 `~/.dsh/remote-workspace`,现在与包名对齐。
|
|
7
|
-
*
|
|
8
|
-
* **只搬状态文件,不搬 socket 与 pid。** socket 是内核对象,`rename` 之后原路径就没人监听了,
|
|
9
|
-
* 搬过去只会留下一个「看起来存在、连不上」的文件;pid 指向的进程也还绑在旧路径上。两者都由
|
|
10
|
-
* daemon 下次启动时在新目录里重建。
|
|
11
|
-
*
|
|
12
|
-
* 旧目录本身**留着不动**:里面还有那个 socket 文件,删不删由用户决定。迁移是幂等的——目标已
|
|
13
|
-
* 存在就不覆盖,所以重复调用(以及多个 wiring 各自调用)都是安全的。
|
|
14
|
-
*
|
|
15
|
-
* @returns 状态目录的绝对路径(已确保存在)。
|
|
16
|
-
*/
|
|
17
|
-
export declare function resolveStateDir(): string;
|
|
18
|
-
/**
|
|
19
|
-
* 取走本进程累积的状态迁移失败清单,并清空。
|
|
20
|
-
*
|
|
21
|
-
* 迁移在 `resolveStateDir()` 里做,而那个函数没有 logger(它被多个 wiring 在拿到 ctx 之前调用)。所以
|
|
22
|
-
* 失败先攒在这里,由第一个拿得到 logger 的 wiring 取走记一次——既不静默,也不必把 logger 塞进签名。
|
|
23
|
-
*
|
|
24
|
-
* @returns 失败清单,每条一句人话;空数组表示没有失败。
|
|
25
|
-
*/
|
|
26
|
-
export declare function takeStateDirWarnings(): string[];
|
|
27
|
-
/** 清掉记忆化结果。测试用:同一个进程里换一个 home 再解析,不该拿到上一轮的路径。 */
|
|
28
|
-
export declare function resetStateDirCache(): void;
|
|
29
|
-
//# sourceMappingURL=state-dir.d.ts.map
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* tools
|
|
3
|
-
*
|
|
4
|
-
* 面向 agent 的工具面:grep/glob/exec、后台作业、单文件读写、会话管理与严格参数门。
|
|
5
|
-
*
|
|
6
|
-
* 从 `src/index.ts` 的 `apply()` 抽出(审计 0074 §2.6):函数体是**逐字搬移**,
|
|
7
|
-
* 依赖通过"从 env 解构 + 返回后续要用的量"显式化,行为不变。
|
|
8
|
-
*
|
|
9
|
-
* @module dsh-over-ssh/wiring/tools
|
|
10
|
-
*/
|
|
11
|
-
import type { Roots } from './roots.ts';
|
|
12
|
-
/**
|
|
13
|
-
* Where the **tool-side** session-root index reads `user-roots.json`.
|
|
14
|
-
*
|
|
15
|
-
* It is the panel store's file, so the answer is `resolveStateDir()` — the same directory `wiring/fs.ts`
|
|
16
|
-
* hands to `createUserRootsStore`. It deliberately does **not** consult `limits.terminalStateDir`: that knob
|
|
17
|
-
* locates the terminal manifest, and reusing it here (the pre-fix behaviour) silently pointed the
|
|
18
|
-
* 「添加目录」 fallback at a file nobody writes whenever an operator configured it
|
|
19
|
-
* (audit 2026-11-01b flows P2-3).
|
|
20
|
-
*
|
|
21
|
-
* @returns absolute path of `user-roots.json`.
|
|
22
|
-
*/
|
|
23
|
-
export declare function sessionRootsFilePath(): string;
|
|
24
|
-
export declare function wireTools(env: Roots): {
|
|
25
|
-
sessionRoots: import("../host/integration/roots/session-root-index.ts").SessionRootIndex;
|
|
26
|
-
disposeTools: () => void;
|
|
27
|
-
disposeJobTools: () => void;
|
|
28
|
-
disposeFileTools: () => void;
|
|
29
|
-
sessionAdmin: import("../host/app/session-admin/session-admin-contract.ts").SessionAdminService;
|
|
30
|
-
disposeManagement: () => void;
|
|
31
|
-
disposeStrictArguments: () => void;
|
|
32
|
-
disposeLsp: () => Promise<void>;
|
|
33
|
-
};
|
|
34
|
-
export type Tools = Roots & ReturnType<typeof wireTools>;
|
|
35
|
-
//# sourceMappingURL=tools.d.ts.map
|