dsh-mobile 0.8.1 → 0.8.3
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/CHANGELOG.md +33 -0
- package/CONTRIBUTORS.md +30 -2
- package/README.en.md +7 -5
- package/README.md +7 -5
- package/SECURITY.md +1 -1
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/apps/mobile/README.md +8 -4
- package/apps/mobile/README.zh-CN.md +8 -4
- package/apps/mobile/release.json +3 -3
- package/docs/ATTACH_EXISTING_FRPS.en.md +2 -0
- package/docs/ATTACH_EXISTING_FRPS.md +2 -0
- package/docs/CLIENT_MODULES.en.md +6 -2
- package/docs/CLIENT_MODULES.md +6 -2
- package/docs/CONNECTION_DIAGNOSTICS.en.md +56 -0
- package/docs/CONNECTION_DIAGNOSTICS.md +56 -0
- package/docs/IROH.en.md +7 -1
- package/docs/IROH.md +7 -1
- package/docs/MOBILE_PLUGIN_ADAPTATION.en.md +1 -1
- package/docs/MOBILE_PLUGIN_ADAPTATION.md +1 -1
- package/docs/README.md +1 -0
- package/docs/SKIN_COMPATIBILITY.en.md +1 -1
- package/docs/SKIN_COMPATIBILITY.md +1 -1
- package/docs/SLOW_CONNECTIONS.en.md +6 -2
- package/docs/SLOW_CONNECTIONS.md +6 -2
- package/lib/cli.js +6 -12
- package/lib/cli.js.map +1 -1
- package/lib/client.js +772 -248
- package/lib/client.js.map +1 -1
- package/lib/extension-worker-runtime.mjs +4 -8
- package/lib/extension-worker-runtime.mjs.map +1 -1
- package/lib/index.d.mts +19 -89
- package/lib/index.mjs +397 -273
- package/lib/index.mjs.map +1 -1
- package/lib/mobile-compat.js +2 -2
- package/lib/mobile-compat.js.map +1 -1
- package/lib/mobile-layout.js +116 -33
- package/lib/mobile-layout.js.map +1 -1
- package/package.json +9 -7
- package/packages/question-fixes/lib/client.js +1 -2
- package/packages/question-fixes/lib/index.mjs +1 -2
- package/packages/question-fixes/package.json +1 -1
package/lib/index.d.mts
CHANGED
|
@@ -6,7 +6,6 @@ import { Readable } from "node:stream";
|
|
|
6
6
|
import { Context, Service } from "@deepseek-ai/cordis";
|
|
7
7
|
import "zod";
|
|
8
8
|
import { WebRoute } from "@deepseek-ai/dsh-host-webserver";
|
|
9
|
-
//#region src/storage.d.ts
|
|
10
9
|
/** Persistent record containing only a digest of the long-lived device credential. */
|
|
11
10
|
interface StoredDevice {
|
|
12
11
|
readonly id: string;
|
|
@@ -51,8 +50,6 @@ export declare class MemoryDeviceStore implements DeviceStore {
|
|
|
51
50
|
/** Return a defensive copy for assertions or administrative export. */
|
|
52
51
|
inspect(): DeviceSnapshot;
|
|
53
52
|
}
|
|
54
|
-
//#endregion
|
|
55
|
-
//#region src/access.d.ts
|
|
56
53
|
/** Stable error categories converted to deliberately terse HTTP responses. */
|
|
57
54
|
export declare class AccessError extends Error {
|
|
58
55
|
readonly status: number;
|
|
@@ -216,8 +213,6 @@ export declare class AccessController {
|
|
|
216
213
|
rateLimitKeys: number;
|
|
217
214
|
};
|
|
218
215
|
}
|
|
219
|
-
//#endregion
|
|
220
|
-
//#region src/network.d.ts
|
|
221
216
|
/** A parsed IP network used to authorize directly connected clients. */
|
|
222
217
|
interface ParsedCidr {
|
|
223
218
|
readonly bits: 32 | 128;
|
|
@@ -262,8 +257,6 @@ export declare class RequestTrustPolicy {
|
|
|
262
257
|
/** Return the canonical accepted Origin, otherwise undefined. */
|
|
263
258
|
canonicalOrigin(header: string | undefined): string | undefined;
|
|
264
259
|
}
|
|
265
|
-
//#endregion
|
|
266
|
-
//#region src/extension-worker-config.d.ts
|
|
267
260
|
/** Operator-owned limits for opt-in local extension worker execution. */
|
|
268
261
|
interface HostExecutionConfig {
|
|
269
262
|
readonly mode?: 'in-process' | 'worker';
|
|
@@ -293,8 +286,6 @@ interface ResolvedHostExecutionConfig extends Required<Omit<HostExecutionConfig,
|
|
|
293
286
|
}
|
|
294
287
|
/** Resolve configuration once; reject malformed modes, ids and incoherent stream windows. */
|
|
295
288
|
export declare function resolveHostExecution(raw: unknown): ResolvedHostExecutionConfig;
|
|
296
|
-
//#endregion
|
|
297
|
-
//#region src/config.d.ts
|
|
298
289
|
/** Optional compression for exact, already authorized WebSocket paths. */
|
|
299
290
|
interface WebSocketCompressionConfig {
|
|
300
291
|
paths?: string[];
|
|
@@ -445,8 +436,6 @@ export declare const Config: z<PluginConfig>;
|
|
|
445
436
|
export declare function parseControlFile(value: unknown): string;
|
|
446
437
|
/** Parse configuration and reject unsafe topology, credential, and resource combinations. */
|
|
447
438
|
export declare function parseGatewayConfig(raw: unknown): ResolvedGatewayConfig;
|
|
448
|
-
//#endregion
|
|
449
|
-
//#region src/client-module-preferences.d.ts
|
|
450
439
|
/** Installed client module metadata, without upstream URLs or host paths. */
|
|
451
440
|
interface ClientModuleEntry {
|
|
452
441
|
readonly id: string;
|
|
@@ -462,6 +451,8 @@ interface ClientModuleEntry {
|
|
|
462
451
|
/** Selection returned to the computer administrator or the authenticated device. */
|
|
463
452
|
interface ClientModulePreferenceView {
|
|
464
453
|
readonly entries: readonly ClientModuleEntry[];
|
|
454
|
+
/** Canonical fingerprint of this catalog. A write that carries a different one is stale. */
|
|
455
|
+
readonly revision: string;
|
|
465
456
|
readonly excludedClientModules: readonly string[];
|
|
466
457
|
readonly defaultExcludedClientModules: readonly string[];
|
|
467
458
|
readonly source: 'device' | 'computer' | 'plugin';
|
|
@@ -498,8 +489,6 @@ export declare class ClientModulePreferenceStore {
|
|
|
498
489
|
removeDevices(deviceIds: readonly string[]): Promise<void>;
|
|
499
490
|
private save;
|
|
500
491
|
}
|
|
501
|
-
//#endregion
|
|
502
|
-
//#region src/control.d.ts
|
|
503
492
|
/** Versioned durable preference for the resident mobile-access runtime. */
|
|
504
493
|
interface MobileAccessControlState {
|
|
505
494
|
readonly version: 1;
|
|
@@ -553,8 +542,6 @@ export declare class MobileAccessGatewayController {
|
|
|
553
542
|
private disable;
|
|
554
543
|
private enqueue;
|
|
555
544
|
}
|
|
556
|
-
//#endregion
|
|
557
|
-
//#region src/auth-failure-log.d.ts
|
|
558
545
|
/** One rejected HTTP request, with presence/count fields instead of credential values. */
|
|
559
546
|
interface AuthFailureEntry {
|
|
560
547
|
readonly kind: 'authorize' | 'csrf';
|
|
@@ -572,21 +559,24 @@ interface AuthFailureEntry {
|
|
|
572
559
|
/** Earlier failures of this kind suppressed since its preceding recorded request. */
|
|
573
560
|
readonly suppressed?: number;
|
|
574
561
|
}
|
|
575
|
-
//#endregion
|
|
576
|
-
//#region src/http-failure-log.d.ts
|
|
577
562
|
/** Fixed parser details safe to record without Node's raw packet, message or request headers. */
|
|
578
|
-
type HttpParserCode = 'ERR_HTTP_REQUEST_TIMEOUT' | 'HPE_HEADER_OVERFLOW' | 'HPE_INVALID_CHUNK_SIZE' | 'HPE_INVALID_CONTENT_LENGTH' | 'HPE_INVALID_EOF_STATE' | 'HPE_INVALID_HEADER_TOKEN' | 'HPE_INVALID_TRANSFER_ENCODING' | 'HPE_UNEXPECTED_CONTENT_LENGTH' | 'other';
|
|
563
|
+
type HttpParserCode = 'ERR_HTTP_REQUEST_TIMEOUT' | 'HPE_HEADER_OVERFLOW' | 'HPE_INVALID_METHOD' | 'HPE_INVALID_CONSTANT' | 'HPE_INVALID_URL' | 'HPE_INVALID_VERSION' | 'HPE_LF_EXPECTED' | 'HPE_PAUSED_H2_UPGRADE' | 'HPE_INVALID_CHUNK_SIZE' | 'HPE_INVALID_CONTENT_LENGTH' | 'HPE_INVALID_EOF_STATE' | 'HPE_INVALID_HEADER_TOKEN' | 'HPE_INVALID_TRANSFER_ENCODING' | 'HPE_UNEXPECTED_CONTENT_LENGTH' | 'other';
|
|
579
564
|
/** A rejected inbound HTTP message's public response and bounded diagnostic category. */
|
|
580
565
|
interface HttpParserFailure {
|
|
581
566
|
readonly status: 400 | 408 | 431;
|
|
582
567
|
readonly code: 'bad_request' | 'request_timeout' | 'headers_too_large';
|
|
583
568
|
readonly parserCode: HttpParserCode;
|
|
584
569
|
}
|
|
570
|
+
/** Socket failures do not establish that an HTTP request was rejected. */
|
|
571
|
+
type HttpTransportCode = 'ECONNRESET' | 'EPIPE' | 'ETIMEDOUT' | 'ERR_STREAM_PREMATURE_CLOSE';
|
|
585
572
|
/** One sampled rejection. Arbitrary paths, query strings, body data and credentials are excluded. */
|
|
586
573
|
type HttpFailureEntry = ({
|
|
587
574
|
readonly kind: 'parser';
|
|
588
575
|
readonly status: HttpParserFailure['status'];
|
|
589
576
|
readonly code: HttpParserCode;
|
|
577
|
+
} | {
|
|
578
|
+
readonly kind: 'transport';
|
|
579
|
+
readonly code: HttpTransportCode;
|
|
590
580
|
} | {
|
|
591
581
|
readonly kind: 'target';
|
|
592
582
|
readonly status: 400;
|
|
@@ -599,8 +589,6 @@ type HttpFailureEntry = ({
|
|
|
599
589
|
}) & {
|
|
600
590
|
readonly suppressed?: number;
|
|
601
591
|
};
|
|
602
|
-
//#endregion
|
|
603
|
-
//#region src/api-latency-log.d.ts
|
|
604
592
|
/** One sampled API wait; `durationMs` spans the client's request to response close. */
|
|
605
593
|
type ApiLatencyEntry = {
|
|
606
594
|
readonly kind: 'api';
|
|
@@ -611,8 +599,6 @@ type ApiLatencyEntry = {
|
|
|
611
599
|
} & {
|
|
612
600
|
readonly suppressed?: number;
|
|
613
601
|
};
|
|
614
|
-
//#endregion
|
|
615
|
-
//#region src/upstream-auth-log.d.ts
|
|
616
602
|
/** Fixed outcomes of the Gateway's private DSH launch-token exchange. */
|
|
617
603
|
type UpstreamAuthOutcome = 'accepted' | 'invalid-target' | 'unexpected-status' | 'invalid-cookie' | 'timeout' | 'transport-error';
|
|
618
604
|
/** Exchange metadata only: no URL, header, Cookie, Token or raw error is retained. */
|
|
@@ -626,8 +612,6 @@ interface UpstreamAuthEntry {
|
|
|
626
612
|
/** Earlier exchanges with the same success/failure category omitted by sampling. */
|
|
627
613
|
readonly suppressed?: number;
|
|
628
614
|
}
|
|
629
|
-
//#endregion
|
|
630
|
-
//#region src/http-security.d.ts
|
|
631
615
|
export declare const DEVICE_COOKIE = "dsh_ma_device";
|
|
632
616
|
export declare const SESSION_COOKIE = "dsh_ma_session";
|
|
633
617
|
export declare const CSRF_COOKIE = "dsh_ma_csrf";
|
|
@@ -641,8 +625,6 @@ declare class HttpError extends Error {
|
|
|
641
625
|
readonly code: string;
|
|
642
626
|
constructor(status: number, code: string);
|
|
643
627
|
}
|
|
644
|
-
//#endregion
|
|
645
|
-
//#region src/websocket-paths.d.ts
|
|
646
628
|
/** Cap the admin-approved extra WebSocket upgrade paths (exact pathnames). */
|
|
647
629
|
export declare const MAX_EXTRA_WEBSOCKET_PATHS = 16;
|
|
648
630
|
export declare const MAX_WEBSOCKET_PATH_LENGTH = 256;
|
|
@@ -686,8 +668,6 @@ export declare class WebSocketPathStore {
|
|
|
686
668
|
/** Replace the whole list after validating; persists atomically. */
|
|
687
669
|
replace(paths: readonly string[]): Promise<string[]>;
|
|
688
670
|
}
|
|
689
|
-
//#endregion
|
|
690
|
-
//#region src/extension-worker-protocol.d.ts
|
|
691
671
|
/** Metadata for one action, crossing the boundary without its functions. */
|
|
692
672
|
interface WorkerActionMetadata {
|
|
693
673
|
readonly name: string;
|
|
@@ -700,8 +680,6 @@ interface WorkerRouteMetadata {
|
|
|
700
680
|
readonly kind?: 'exact' | 'prefix';
|
|
701
681
|
readonly timeoutMs?: number;
|
|
702
682
|
}
|
|
703
|
-
//#endregion
|
|
704
|
-
//#region src/extension-worker.d.ts
|
|
705
683
|
/** JSON bytes serialized and size-checked inside the worker. */
|
|
706
684
|
declare class PreparedJsonResult {
|
|
707
685
|
readonly bytes: Buffer;
|
|
@@ -797,8 +775,6 @@ declare class ExtensionWorkerHost {
|
|
|
797
775
|
private openStream;
|
|
798
776
|
private cancelStream;
|
|
799
777
|
}
|
|
800
|
-
//#endregion
|
|
801
|
-
//#region src/extension-limits.d.ts
|
|
802
778
|
/** Maximum sizes enforced when reading local extension files. */
|
|
803
779
|
export declare const EXTENSION_LIMITS: Readonly<{
|
|
804
780
|
manifest: number;
|
|
@@ -809,8 +785,6 @@ export declare const EXTENSION_LIMITS: Readonly<{
|
|
|
809
785
|
assetBytes: number;
|
|
810
786
|
assetDepth: 8;
|
|
811
787
|
}>;
|
|
812
|
-
//#endregion
|
|
813
|
-
//#region src/extensions.d.ts
|
|
814
788
|
/** A controlled business failure returned by an extension action or route. */
|
|
815
789
|
export declare class MobileExtensionError extends Error {
|
|
816
790
|
readonly code: string;
|
|
@@ -1016,8 +990,6 @@ export declare class MobileAccessService extends Service {
|
|
|
1016
990
|
}
|
|
1017
991
|
/** Construct the service in a Cordis plugin without importing DSH internals. */
|
|
1018
992
|
export declare function createMobileAccessService(ctx: Context): MobileAccessService;
|
|
1019
|
-
//#endregion
|
|
1020
|
-
//#region src/mobile-push/contracts.d.ts
|
|
1021
993
|
type PushCategory = 'question' | 'plan' | 'approval' | 'response' | 'goal' | 'failure' | 'test';
|
|
1022
994
|
type PushPreferences = Readonly<Record<Exclude<PushCategory, 'test'>, boolean>>;
|
|
1023
995
|
type PushLocale = 'en' | 'zh-CN' | 'it';
|
|
@@ -1074,8 +1046,6 @@ interface PushConfig {
|
|
|
1074
1046
|
readonly status: 'disabled' | 'enabled' | 'suspended' | 'repair-required';
|
|
1075
1047
|
readonly preferences: PushPreferences;
|
|
1076
1048
|
}
|
|
1077
|
-
//#endregion
|
|
1078
|
-
//#region src/mobile-push/gateway.d.ts
|
|
1079
1049
|
/** Trusted per-Gateway binding; authorization is freshly loaded from durable device storage. */
|
|
1080
1050
|
interface PushGatewayOriginBinding {
|
|
1081
1051
|
readonly scopeId: string;
|
|
@@ -1101,12 +1071,10 @@ interface PushGatewayService {
|
|
|
1101
1071
|
test(owner: PushOwner, installationId: string): Promise<void>;
|
|
1102
1072
|
resolve(owner: PushOwner, reference: string): Promise<PushTarget | undefined>;
|
|
1103
1073
|
}
|
|
1104
|
-
//#endregion
|
|
1105
|
-
//#region src/gateway.d.ts
|
|
1106
1074
|
/** A graph-selection conflict with a bounded diagnostic safe for authenticated callers. */
|
|
1107
1075
|
export declare class ClientModuleConflictError extends HttpError {
|
|
1108
1076
|
readonly detail: string;
|
|
1109
|
-
constructor(detail: string);
|
|
1077
|
+
constructor(detail: string, code?: string);
|
|
1110
1078
|
}
|
|
1111
1079
|
/** Rewrite the dedicated mobile graph; exclusions are opt-in and leave stock DSH unchanged. */
|
|
1112
1080
|
export declare function rewriteMobileIndex(html: string, excludedClientModules?: readonly string[]): string;
|
|
@@ -1264,9 +1232,10 @@ export declare class MobileAccessGateway {
|
|
|
1264
1232
|
* @param excluded - Untrusted module IDs to validate against the current boot graph.
|
|
1265
1233
|
* @param deviceId - Authenticated device identity; omitted for computer defaults.
|
|
1266
1234
|
* @param callerSignal - Cancels fetching and validation, not an atomic write already started.
|
|
1235
|
+
* @param revision - Catalog fingerprint the selection was computed against; a mismatch is rejected.
|
|
1267
1236
|
* @returns The catalog and saved selection without reloading clients.
|
|
1268
1237
|
*/
|
|
1269
|
-
configureClientModules(excluded: unknown, deviceId?: string, callerSignal?: AbortSignal): Promise<ClientModulePreferenceView>;
|
|
1238
|
+
configureClientModules(excluded: unknown, deviceId?: string, callerSignal?: AbortSignal, revision?: string): Promise<ClientModulePreferenceView>;
|
|
1270
1239
|
/** Reset one override without reloading connected clients.
|
|
1271
1240
|
* @param deviceId - Authenticated device identity; omitted to reset computer defaults.
|
|
1272
1241
|
* @param callerSignal - Cancels fetching and validation, not an atomic write already started.
|
|
@@ -1381,8 +1350,6 @@ export declare class MobileAccessGateway {
|
|
|
1381
1350
|
readonly failed: number;
|
|
1382
1351
|
};
|
|
1383
1352
|
}
|
|
1384
|
-
//#endregion
|
|
1385
|
-
//#region src/frp-component.d.ts
|
|
1386
1353
|
interface FrpArtifact {
|
|
1387
1354
|
readonly platform: NodeJS.Platform;
|
|
1388
1355
|
readonly arch: string;
|
|
@@ -1441,8 +1408,6 @@ export declare class FrpComponentManager {
|
|
|
1441
1408
|
purge(): Promise<FrpComponentStatus>;
|
|
1442
1409
|
private enqueue;
|
|
1443
1410
|
}
|
|
1444
|
-
//#endregion
|
|
1445
|
-
//#region src/cpolar-component.d.ts
|
|
1446
1411
|
/** Pinned cpolar components fetched only after an explicit user action. */
|
|
1447
1412
|
interface CpolarArtifact {
|
|
1448
1413
|
readonly version: string;
|
|
@@ -1520,8 +1485,6 @@ export declare class CpolarComponentManager {
|
|
|
1520
1485
|
purge(): Promise<CpolarComponentStatus>;
|
|
1521
1486
|
private enqueue;
|
|
1522
1487
|
}
|
|
1523
|
-
//#endregion
|
|
1524
|
-
//#region src/frp-template.d.ts
|
|
1525
1488
|
/** Loopback-only HTTP vhost port used between Caddy and frps. */
|
|
1526
1489
|
export declare const FRP_VHOST_HTTP_PORT = 7080;
|
|
1527
1490
|
/** Caddy snippet owned entirely by DSH Mobile; the main Caddyfile only imports it. */
|
|
@@ -1567,8 +1530,6 @@ export declare function createCaddySite(publicHost: string, options?: CaddySiteO
|
|
|
1567
1530
|
* mode publishes a raw TCP proxy instead of an HTTP vhost.
|
|
1568
1531
|
*/
|
|
1569
1532
|
export declare function createRestrictedFrpServerTemplate(serverPort: number, token: string, publicOrigin: string, options?: CaddySiteOptions): string;
|
|
1570
|
-
//#endregion
|
|
1571
|
-
//#region src/frp-config.d.ts
|
|
1572
1533
|
/** How the restricted FRP channel is provisioned on the VPS. */
|
|
1573
1534
|
type FrpMode = 'deploy' | 'attach';
|
|
1574
1535
|
/** Public entry port used by the self-signed TCP passthrough (never 443 by requirement). */
|
|
@@ -1593,6 +1554,12 @@ interface FrpSettings {
|
|
|
1593
1554
|
readonly vhostHttpPort?: number;
|
|
1594
1555
|
/** Public entry port of the self-signed TCP proxy; defaults to 33080. */
|
|
1595
1556
|
readonly publicPort?: number;
|
|
1557
|
+
/**
|
|
1558
|
+
* Optional frpc `user` field for shared frps services that namespace proxies
|
|
1559
|
+
* per user. When set, frps registers the proxy as `<user>.<proxyName>`;
|
|
1560
|
+
* the locally derived proxy name is unchanged. Absent keeps upstream behaviour.
|
|
1561
|
+
*/
|
|
1562
|
+
readonly user?: string;
|
|
1596
1563
|
}
|
|
1597
1564
|
/** Safe FRP configuration fields returned to the desktop UI. */
|
|
1598
1565
|
interface FrpConfigurationStatus {
|
|
@@ -1611,6 +1578,8 @@ interface FrpConfigurationStatus {
|
|
|
1611
1578
|
readonly entryTls?: FrpEntryTls;
|
|
1612
1579
|
/** Present only when a non-default public entry port is saved. */
|
|
1613
1580
|
readonly publicPort?: number;
|
|
1581
|
+
/** Present only when the optional frpc `user` field is saved. */
|
|
1582
|
+
readonly user?: string;
|
|
1614
1583
|
}
|
|
1615
1584
|
/** Validate the FRP server hostname or IP address. */
|
|
1616
1585
|
export declare function validateFrpServerAddress(value: unknown): string;
|
|
@@ -1739,8 +1708,6 @@ export declare class FrpConfigStore {
|
|
|
1739
1708
|
/** Remove only configuration files owned by the FRP provider. */
|
|
1740
1709
|
purge(): Promise<FrpConfigurationStatus>;
|
|
1741
1710
|
}
|
|
1742
|
-
//#endregion
|
|
1743
|
-
//#region src/frp-attach.d.ts
|
|
1744
1711
|
/** Default proof path used to confirm the public entry answered from this computer. */
|
|
1745
1712
|
export declare const FRP_ATTACH_DISCOVERY_PATH = "/mobile-access/discovery";
|
|
1746
1713
|
/** Declaration printed above the VPS half of an attach template. */
|
|
@@ -1815,8 +1782,6 @@ export declare function frpAttachVpsParts(settings: FrpSettings, options?: FrpAt
|
|
|
1815
1782
|
export declare function createFrpAttachTemplateParts(settings: FrpSettings, options?: FrpAttachOptions): FrpAttachTemplate;
|
|
1816
1783
|
/** Combined attach artefact, ready for the clipboard. */
|
|
1817
1784
|
export declare function createFrpAttachTemplate(settings: FrpSettings, options?: FrpAttachOptions): string;
|
|
1818
|
-
//#endregion
|
|
1819
|
-
//#region src/frp-attach-plan.d.ts
|
|
1820
1785
|
/** Stable step identifiers; the panel maps each one to a translated title. */
|
|
1821
1786
|
type FrpAttachStepId = 'write-snippet' | 'add-import' | 'issue-ip-cert' | 'enable-cert-timer' | 'verify-https' | 'open-public-port' | 'verify-frps' | 'verify-entry';
|
|
1822
1787
|
/** One actionable VPS-side step; `title` is a message key, `label` the copied text. */
|
|
@@ -1854,8 +1819,6 @@ interface FrpAttachPlan {
|
|
|
1854
1819
|
* configuration is written by the ordinary provider lifecycle.
|
|
1855
1820
|
*/
|
|
1856
1821
|
export declare function createFrpAttachPlan(settings: FrpSettings, options?: FrpAttachOptions): FrpAttachPlan;
|
|
1857
|
-
//#endregion
|
|
1858
|
-
//#region src/cert-renewal.d.ts
|
|
1859
1822
|
/** Days left below which the entry certificate is reported as expiring. */
|
|
1860
1823
|
export declare const CERT_EXPIRING_DAYS = 2;
|
|
1861
1824
|
/** Read-only lifetime verdict for one certificate; never mutates or renews anything. */
|
|
@@ -1885,8 +1848,6 @@ export declare function readCertificateRenewal(file: string, now?: number): Prom
|
|
|
1885
1848
|
* leaf is the expected answer for the passthrough entry.
|
|
1886
1849
|
*/
|
|
1887
1850
|
export declare function probeOriginCertificate(host: string, port: number, timeoutMs?: number): Promise<CertRenewalStatus>;
|
|
1888
|
-
//#endregion
|
|
1889
|
-
//#region src/frp-ingress.d.ts
|
|
1890
1851
|
/** Private files owned by the self-signed FRP ingress. */
|
|
1891
1852
|
interface FrpIngressPaths {
|
|
1892
1853
|
readonly directory: string;
|
|
@@ -1940,8 +1901,6 @@ export declare function ensureFrpIngressCertificate(settings: FrpSettings, state
|
|
|
1940
1901
|
* and the token is never read.
|
|
1941
1902
|
*/
|
|
1942
1903
|
export declare function frpIngressSelfCheck(settings: FrpSettings, stateFile: string, ownedRoot?: string): Promise<FrpIngressSelfCheck>;
|
|
1943
|
-
//#endregion
|
|
1944
|
-
//#region src/managed-setup.d.ts
|
|
1945
1904
|
/** One host a server leaf must be valid for: an IP literal, a DNS name, or both. */
|
|
1946
1905
|
interface ServerCertificateTarget {
|
|
1947
1906
|
readonly commonName: string;
|
|
@@ -1967,8 +1926,6 @@ interface ServerCertificateAuthority {
|
|
|
1967
1926
|
* hosts; the Android client accepts either through its pinned CA.
|
|
1968
1927
|
*/
|
|
1969
1928
|
export declare function issueServerCertificate(authority: ServerCertificateAuthority, target: ServerCertificateTarget, output: ServerCertificateFiles, lifetimeDays?: number): Promise<void>;
|
|
1970
|
-
//#endregion
|
|
1971
|
-
//#region src/remote.d.ts
|
|
1972
1929
|
/** Remote transports supported by the desktop plugin and Android client. */
|
|
1973
1930
|
type RemoteProvider = 'tailscale' | 'cpolar' | 'cloudflared' | 'frp' | 'origin' | 'iroh';
|
|
1974
1931
|
/** Common safe status returned by every remote provider controller. */
|
|
@@ -2014,8 +1971,6 @@ export declare class JsonRemoteProviderStore {
|
|
|
2014
1971
|
}
|
|
2015
1972
|
/** Resolve the first-run provider without letting environment values bypass validation. */
|
|
2016
1973
|
export declare function configuredRemoteProvider(environment: NodeJS.ProcessEnv): RemoteProvider;
|
|
2017
|
-
//#endregion
|
|
2018
|
-
//#region src/frp.d.ts
|
|
2019
1974
|
/** Product-facing states for the restricted self-hosted FRP transport. */
|
|
2020
1975
|
type FrpState = 'off' | 'unavailable' | 'starting' | 'connecting' | 'ready' | 'error';
|
|
2021
1976
|
/** Safe FRP state returned only through the loopback DSH control route. */
|
|
@@ -2131,8 +2086,6 @@ export declare class FrpController implements RemoteProviderController {
|
|
|
2131
2086
|
private stop;
|
|
2132
2087
|
private stopProcessAndGateway;
|
|
2133
2088
|
}
|
|
2134
|
-
//#endregion
|
|
2135
|
-
//#region src/origin-proxy-config.d.ts
|
|
2136
2089
|
export declare const DEFAULT_ORIGIN_LISTEN_PORT = 3444;
|
|
2137
2090
|
/** A private HTTP listener behind a user-managed HTTPS reverse proxy. */
|
|
2138
2091
|
interface OriginSettings {
|
|
@@ -2176,8 +2129,6 @@ export declare class OriginConfigStore {
|
|
|
2176
2129
|
configure(value: unknown): Promise<OriginConfigurationStatus>;
|
|
2177
2130
|
purge(): Promise<OriginConfigurationStatus>;
|
|
2178
2131
|
}
|
|
2179
|
-
//#endregion
|
|
2180
|
-
//#region src/origin-proxy.d.ts
|
|
2181
2132
|
type OriginState = 'off' | 'unavailable' | 'starting' | 'ready' | 'error';
|
|
2182
2133
|
/** Ready means the private listener is ready, not that public ingress was tested. */
|
|
2183
2134
|
interface OriginStatus {
|
|
@@ -2218,8 +2169,6 @@ export declare class OriginController implements RemoteProviderController {
|
|
|
2218
2169
|
private start;
|
|
2219
2170
|
private stop;
|
|
2220
2171
|
}
|
|
2221
|
-
//#endregion
|
|
2222
|
-
//#region src/cloudflared-component.d.ts
|
|
2223
2172
|
/**
|
|
2224
2173
|
* Pinned cloudflared components fetched only after an explicit user action.
|
|
2225
2174
|
*
|
|
@@ -2310,8 +2259,6 @@ export declare class CloudflaredComponentManager {
|
|
|
2310
2259
|
purge(): Promise<CloudflaredComponentStatus>;
|
|
2311
2260
|
private enqueue;
|
|
2312
2261
|
}
|
|
2313
|
-
//#endregion
|
|
2314
|
-
//#region src/cloudflared-tunnel.d.ts
|
|
2315
2262
|
/** Which tunnel flavour the cloudflared provider runs. */
|
|
2316
2263
|
type CloudflaredTunnelMode = 'quick' | 'named';
|
|
2317
2264
|
/**
|
|
@@ -2387,8 +2334,6 @@ export declare class CloudflaredTunnelStore {
|
|
|
2387
2334
|
/** Forget a named tunnel and its connector token. */
|
|
2388
2335
|
purge(): Promise<CloudflaredTunnelStatus>;
|
|
2389
2336
|
}
|
|
2390
|
-
//#endregion
|
|
2391
|
-
//#region src/cloudflared.d.ts
|
|
2392
2337
|
/** Product-facing states for the optional cloudflared remote transport. */
|
|
2393
2338
|
type CloudflaredState = 'off' | 'unavailable' | 'starting' | 'connecting' | 'ready' | 'error';
|
|
2394
2339
|
/** Safe cloudflared state returned only through the loopback DSH control route. */
|
|
@@ -2494,8 +2439,6 @@ export declare class CloudflaredController implements RemoteProviderController {
|
|
|
2494
2439
|
private stop;
|
|
2495
2440
|
private stopProcessAndGateway;
|
|
2496
2441
|
}
|
|
2497
|
-
//#endregion
|
|
2498
|
-
//#region src/iroh-component.d.ts
|
|
2499
2442
|
export declare const IROH_VERSION = "0.1.0-alpha.1";
|
|
2500
2443
|
/** A size- and content-pinned sidecar release asset with independent wire and installed-byte checks. */
|
|
2501
2444
|
interface IrohArtifact {
|
|
@@ -2583,8 +2526,6 @@ export declare class IrohComponentManager {
|
|
|
2583
2526
|
purge(): Promise<IrohComponentStatus>;
|
|
2584
2527
|
private refresh;
|
|
2585
2528
|
}
|
|
2586
|
-
//#endregion
|
|
2587
|
-
//#region src/iroh-pairing.d.ts
|
|
2588
2529
|
export declare const PAIRING_DESCRIPTOR_VERSION = 1;
|
|
2589
2530
|
export declare const PAIRING_DESCRIPTOR_TYPE = "dsh-mobile-iroh-pairing";
|
|
2590
2531
|
export declare const MAX_PAIRING_DESCRIPTOR_BYTES = 2200;
|
|
@@ -2625,8 +2566,6 @@ export declare function decodePairingDescriptor(encoded: string, options?: {
|
|
|
2625
2566
|
}): IrohPairingDescriptor;
|
|
2626
2567
|
/** Phone-side listener port advertised in QR codes minted by this computer. */
|
|
2627
2568
|
export declare const PAIRING_DESCRIPTOR_LOCAL_PORT = 25443;
|
|
2628
|
-
//#endregion
|
|
2629
|
-
//#region src/iroh.d.ts
|
|
2630
2569
|
/** Product-facing states for the experimental iroh transport. */
|
|
2631
2570
|
type IrohState = 'off' | 'unavailable' | 'starting' | 'connecting' | 'ready' | 'error';
|
|
2632
2571
|
/** Safe iroh state returned only through the loopback DSH control route. */
|
|
@@ -2705,8 +2644,6 @@ export declare class IrohController implements RemoteProviderController {
|
|
|
2705
2644
|
private waitForReady;
|
|
2706
2645
|
private waitForPairingCode;
|
|
2707
2646
|
}
|
|
2708
|
-
//#endregion
|
|
2709
|
-
//#region src/iroh-origin.d.ts
|
|
2710
2647
|
/** Identity-derived browser origins for the raw TLS-over-iroh carrier.
|
|
2711
2648
|
*
|
|
2712
2649
|
* Ported from the independent `dsh-mobile-iroh` companion's origin contract.
|
|
@@ -2720,8 +2657,6 @@ export declare function irohHostname(endpointId: string): string;
|
|
|
2720
2657
|
export declare function irohOrigin(endpointId: string, localPort?: number): string;
|
|
2721
2658
|
/** Reject an Origin that does not belong to the selected cryptographic host identity. */
|
|
2722
2659
|
export declare function validateIrohOrigin(value: unknown, endpointId: string, localPort?: number): string;
|
|
2723
|
-
//#endregion
|
|
2724
|
-
//#region src/iroh-tls.d.ts
|
|
2725
2660
|
/** Leaf lifetime and renewal headroom, matching the companion's native policy. */
|
|
2726
2661
|
export declare const IROH_LEAF_VALIDITY_DAYS = 90;
|
|
2727
2662
|
export declare const IROH_LEAF_RENEW_BEFORE_DAYS = 30;
|
|
@@ -2762,8 +2697,6 @@ export declare function ensureIrohTls(endpointId: string, stateFile: string, own
|
|
|
2762
2697
|
* the public path is the iroh transport, never a direct bind.
|
|
2763
2698
|
*/
|
|
2764
2699
|
export declare function irohGatewayConfig(template: ResolvedGatewayConfig, endpointId: string, stateFile: string, tls: Pick<FrpIngressCertificate, 'paths' | 'caFingerprint'>, listenPort?: number): ResolvedGatewayConfig;
|
|
2765
|
-
//#endregion
|
|
2766
|
-
//#region src/task-events.d.ts
|
|
2767
2700
|
/**
|
|
2768
2701
|
* Host-side task-completion fan-out for phone notifications.
|
|
2769
2702
|
*
|
|
@@ -2825,8 +2758,6 @@ export declare class TaskEventHub {
|
|
|
2825
2758
|
/** Visible for tests. */
|
|
2826
2759
|
get size(): number;
|
|
2827
2760
|
}
|
|
2828
|
-
//#endregion
|
|
2829
|
-
//#region src/plugin.d.ts
|
|
2830
2761
|
declare module '@deepseek-ai/dsh-llm' {
|
|
2831
2762
|
interface MessageSourceMap {
|
|
2832
2763
|
'plugin:dsh-mobile': {
|
|
@@ -2844,6 +2775,5 @@ export declare const inject: string[];
|
|
|
2844
2775
|
export declare function originGatewayConfig(template: ResolvedGatewayConfig, settings: OriginSettings, stateFile: string, instanceId: string, listenPort?: number, legacyInstanceId?: string): ResolvedGatewayConfig;
|
|
2845
2776
|
/** Mount the resident control route and its optional authenticated LAN gateway. */
|
|
2846
2777
|
export declare function apply(ctx: Context, config: PluginConfig): Promise<void>;
|
|
2847
|
-
//#endregion
|
|
2848
2778
|
export { type AccessControllerOptions, type AuthoritySpec, type BlockedUpgradePathEntry, type CaddySiteOptions, type CertRenewalStatus, type ClientModuleEntry, type ClientModulePreferenceSelection, type ClientModulePreferenceView, type CloudflaredComponentStatus, type CloudflaredControllerOptions, type CloudflaredState, type CloudflaredStatus, type CloudflaredTunnelMode, type CloudflaredTunnelSettings, type CloudflaredTunnelStatus, FRP_VHOST_HTTP_PORT as DEFAULT_VHOST_HTTP_PORT, type DeviceProbeResult, type DeviceSnapshot, type DeviceStore, type DeviceSummary, type DisabledTlsConfig, type FrpAttachOptions, type FrpAttachPlan, type FrpAttachPlanLocal, type FrpAttachPlanStep, type FrpAttachStepId, type FrpAttachTemplate, type FrpAttachVpsParts, type FrpComponentStatus, type FrpConfigurationStatus, type FrpControllerOptions, type FrpEntryTls, type FrpIngressCertificate, type FrpIngressPaths, type FrpIngressSelfCheck, type FrpSettings, type FrpState, type FrpStatus, type HostExecutionConfig, type IrohArtifact, type IrohComponentManagerOptions, type IrohComponentStatus, type IrohControllerOptions, type IrohPairingDescriptor, type IrohState, type IrohStatus, type IrohTlsCertificate, type IrohTlsPaths, type LocalExtensionManifest, type MobileAccessControlState, type MobileAccessControlStore, type MobileAccessService as MobileAccessRegistry, type MobileAccessRuntime, type MobileActionContext, type MobileExtensionClientEntry, type MobileExtensionDefinition, type MobileExtensionManifest, type MobileExtensionStatus, type MobileHostAction, type MobileHostRoute, type MobileRouteRequest, type MobileRouteResponse, type MobileWorkerHostApi, type OriginConfigurationStatus, type OriginControllerOptions, type OriginSettings, type OriginState, type OriginStatus, type PairingDescriptorField, type PairingResult, type ParsedCidr, type PluginConfig, type ProvidedTlsConfig, type RemoteProvider, type RemoteProviderController, type RemoteProviderState, type RemoteProviderStatus, type RenewalResult, type ResolvedGatewayConfig, type ResolvedHostExecutionConfig, type ServerCertificateAuthority, type ServerCertificateFiles, type ServerCertificateTarget, type SessionAuthorization, type SessionEndReason, type StoredDevice, type TaskCompletionEvent, type TaskEventContext, type TaskEventSession, type TaskEventSink, type TaskEventWatcherOptions, type TaskTurnEvent, type TlsConfig };
|
|
2849
2779
|
//# sourceMappingURL=index.d.mts.map
|