dsh-mobile 0.6.14 → 0.6.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.mts CHANGED
@@ -370,7 +370,7 @@ interface PluginConfig {
370
370
  maxBodyBytes?: number;
371
371
  /** Transport, upload, static-response and WebSocket-handshake idle timeout. */
372
372
  upstreamTimeoutMs?: number;
373
- /** Authenticated /api response idle timeout after upload; zero disables it. */
373
+ /** Authenticated /api response and established DSH plugin-event stream idle timeout; zero disables it. */
374
374
  upstreamApiTimeoutMs?: number;
375
375
  rateLimitWindowMs?: number;
376
376
  maxPairingAttempts?: number;
@@ -567,6 +567,21 @@ type HttpFailureEntry = ({
567
567
  readonly suppressed?: number;
568
568
  };
569
569
  //#endregion
570
+ //#region src/upstream-auth-log.d.ts
571
+ /** Fixed outcomes of the Gateway's private DSH launch-token exchange. */
572
+ type UpstreamAuthOutcome = 'accepted' | 'invalid-target' | 'unexpected-status' | 'invalid-cookie' | 'timeout' | 'transport-error';
573
+ /** Exchange metadata only: no URL, header, Cookie, Token or raw error is retained. */
574
+ interface UpstreamAuthEntry {
575
+ readonly sequence: number;
576
+ readonly outcome: UpstreamAuthOutcome;
577
+ readonly stage: 'target' | 'request' | 'response' | 'cookie';
578
+ readonly durationMs: number;
579
+ /** Upstream HTTP status after headers arrive, not the phone-facing failure status. */
580
+ readonly status?: number;
581
+ /** Earlier exchanges with the same success/failure category omitted by sampling. */
582
+ readonly suppressed?: number;
583
+ }
584
+ //#endregion
570
585
  //#region src/http-security.d.ts
571
586
  export declare const DEVICE_COOKIE = "dsh_ma_device";
572
587
  export declare const SESSION_COOKIE = "dsh_ma_session";
@@ -998,6 +1013,8 @@ export declare class MobileAccessGateway {
998
1013
  private readonly activeRequests;
999
1014
  private readonly activeWebSockets;
1000
1015
  private readonly mobileBootBatches;
1016
+ private readonly mobileDocumentViews;
1017
+ private readonly mobileGraphTasks;
1001
1018
  /** Cached upstream bundle byte sizes (HEAD probes), keyed by resource URL. */
1002
1019
  private readonly bootEntrySizeCache;
1003
1020
  private readonly extensionEventListeners;
@@ -1030,9 +1047,10 @@ export declare class MobileAccessGateway {
1030
1047
  private readonly clientModuleRevocations;
1031
1048
  private readonly authFailures;
1032
1049
  private readonly httpFailures;
1050
+ private readonly upstreamAuthDiagnostics;
1033
1051
  constructor(config: ResolvedGatewayConfig, store: DeviceStore, extensions?: MobileAccessService | undefined, upstreamAuthenticatedUrl?: string | undefined, extraWebSocketPaths?: {
1034
1052
  has(pathname: string): boolean;
1035
- } | undefined, blockedUpgradeLog?: BlockedUpgradePathLog | undefined, onDiscoveryDegraded?: ((source: 'broadcast' | 'mdns', code: string) => void) | undefined, clientModulePreferences?: ClientModulePreferenceStore, authFailureLog?: (entry: AuthFailureEntry) => void, httpFailureLog?: (entry: HttpFailureEntry) => void);
1053
+ } | undefined, blockedUpgradeLog?: BlockedUpgradePathLog | undefined, onDiscoveryDegraded?: ((source: 'broadcast' | 'mdns', code: string) => void) | undefined, clientModulePreferences?: ClientModulePreferenceStore, authFailureLog?: (entry: AuthFailureEntry) => void, httpFailureLog?: (entry: HttpFailureEntry) => void, upstreamAuthLog?: (entry: UpstreamAuthEntry) => void);
1036
1054
  /** Initialize durable state, validate TLS, and bind the externally reachable listener. */
1037
1055
  start(): Promise<void>;
1038
1056
  /** Install a newly signed provided leaf for future TLS handshakes without dropping sessions. */
@@ -1107,6 +1125,10 @@ export declare class MobileAccessGateway {
1107
1125
  private clientModulePreferenceOperation;
1108
1126
  private fetchAuthenticatedUpstreamIndex;
1109
1127
  private proxyMobileIndex;
1128
+ private removeMobileDocumentView;
1129
+ private rememberMobileDocumentView;
1130
+ private requireMobileDocumentView;
1131
+ private projectMobileDocumentEvent;
1110
1132
  private rememberMobileBootBatch;
1111
1133
  /**
1112
1134
  * Determine which layout-batch entries can share a merged boot batch and which