device-passport 1.1.0 → 1.2.0

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +10 -7
  2. package/README.md +41 -0
  3. package/assets/ego-profile-manager.png +0 -0
  4. package/dist/adapters/index.cjs +2 -2
  5. package/dist/adapters/index.d.cts +4 -94
  6. package/dist/adapters/index.d.mts +4 -94
  7. package/dist/adapters/index.d.ts +4 -94
  8. package/dist/adapters/index.mjs +2 -2
  9. package/dist/ego/index.cjs +22 -0
  10. package/dist/ego/index.d.cts +5 -0
  11. package/dist/ego/index.d.mts +5 -0
  12. package/dist/ego/index.d.ts +5 -0
  13. package/dist/ego/index.mjs +8 -0
  14. package/dist/evaluator/index.cjs +22 -584
  15. package/dist/evaluator/index.mjs +3 -564
  16. package/dist/geo/index.cjs +1 -1
  17. package/dist/geo/index.d.cts +4 -0
  18. package/dist/geo/index.d.mts +4 -0
  19. package/dist/geo/index.d.ts +4 -0
  20. package/dist/geo/index.mjs +2 -2
  21. package/dist/index.cjs +41 -441
  22. package/dist/index.d.cts +10 -198
  23. package/dist/index.d.mts +10 -198
  24. package/dist/index.d.ts +10 -198
  25. package/dist/index.mjs +7 -418
  26. package/dist/shared/device-passport.BGfRcQNh.mjs +565 -0
  27. package/dist/shared/{device-passport.BPd2-w8e.cjs → device-passport.BKtmLzPt.cjs} +4 -3
  28. package/dist/shared/{device-passport.BBf9OKap.mjs → device-passport.BPQj0qdT.mjs} +4 -3
  29. package/dist/shared/device-passport.CDS7xrj8.d.ts +469 -0
  30. package/dist/shared/device-passport.CfLes-lq.d.cts +469 -0
  31. package/dist/shared/device-passport.CsOWqPIr.d.cts +77 -0
  32. package/dist/shared/device-passport.D7pEnyp2.d.ts +77 -0
  33. package/dist/shared/{device-passport.CLaBZWUV.cjs → device-passport.D9xW6R0B.cjs} +4 -2
  34. package/dist/shared/device-passport.DirQmSd4.d.cts +47 -0
  35. package/dist/shared/device-passport.DirQmSd4.d.mts +47 -0
  36. package/dist/shared/device-passport.DirQmSd4.d.ts +47 -0
  37. package/dist/shared/device-passport.EK4RX7Xd.cjs +584 -0
  38. package/dist/shared/device-passport.ZBspe4ZW.d.mts +77 -0
  39. package/dist/shared/device-passport.dVEqzSEb.d.mts +469 -0
  40. package/dist/shared/{device-passport.NHw_f6HT.mjs → device-passport.gNo82fQ5.mjs} +5 -3
  41. package/dist/shared/device-passport.kekU28UM.mjs +705 -0
  42. package/dist/shared/device-passport.qL4tjwc0.cjs +718 -0
  43. package/dist/storage/index.d.cts +3 -34
  44. package/dist/storage/index.d.mts +3 -34
  45. package/dist/storage/index.d.ts +3 -34
  46. package/dist/types/index.d.cts +183 -1
  47. package/dist/types/index.d.mts +183 -1
  48. package/dist/types/index.d.ts +183 -1
  49. package/package.json +6 -1
@@ -1,35 +1,4 @@
1
- /**
2
- * StorageAdapter interface for DevicePassport persistence.
3
- * Implementations provide pluggable storage backends (Memory, File, Redis, DB, etc.)
4
- */
5
- interface StorageAdapter<T = any> {
6
- /**
7
- * Retrieve an item by key.
8
- * Returns null if key does not exist.
9
- */
10
- get(key: string): Promise<T | null>;
11
- /**
12
- * Store an item with the given key.
13
- */
14
- set(key: string, value: T): Promise<void>;
15
- /**
16
- * Check if a key exists in storage.
17
- */
18
- has(key: string): Promise<boolean>;
19
- /**
20
- * Delete an item by key.
21
- * Returns true if item existed and was deleted, false otherwise.
22
- */
23
- delete(key: string): Promise<boolean>;
24
- /**
25
- * Return all keys currently stored.
26
- */
27
- keys(): Promise<string[]>;
28
- /**
29
- * Clear all items in this storage.
30
- */
31
- clear(): Promise<void>;
32
- }
1
+ import { S as StorageAdapter } from '../shared/device-passport.DirQmSd4.cjs';
33
2
 
34
3
  interface MemoryStorageOptions {
35
4
  /**
@@ -124,5 +93,5 @@ declare class JSONFileStorage<T = any> implements StorageAdapter<T> {
124
93
  get size(): number;
125
94
  }
126
95
 
127
- export { JSONFileStorage, MemoryStorage };
128
- export type { JSONFileStorageOptions, MemoryStorageOptions, StorageAdapter };
96
+ export { JSONFileStorage, MemoryStorage, StorageAdapter };
97
+ export type { JSONFileStorageOptions, MemoryStorageOptions };
@@ -1,35 +1,4 @@
1
- /**
2
- * StorageAdapter interface for DevicePassport persistence.
3
- * Implementations provide pluggable storage backends (Memory, File, Redis, DB, etc.)
4
- */
5
- interface StorageAdapter<T = any> {
6
- /**
7
- * Retrieve an item by key.
8
- * Returns null if key does not exist.
9
- */
10
- get(key: string): Promise<T | null>;
11
- /**
12
- * Store an item with the given key.
13
- */
14
- set(key: string, value: T): Promise<void>;
15
- /**
16
- * Check if a key exists in storage.
17
- */
18
- has(key: string): Promise<boolean>;
19
- /**
20
- * Delete an item by key.
21
- * Returns true if item existed and was deleted, false otherwise.
22
- */
23
- delete(key: string): Promise<boolean>;
24
- /**
25
- * Return all keys currently stored.
26
- */
27
- keys(): Promise<string[]>;
28
- /**
29
- * Clear all items in this storage.
30
- */
31
- clear(): Promise<void>;
32
- }
1
+ import { S as StorageAdapter } from '../shared/device-passport.DirQmSd4.mjs';
33
2
 
34
3
  interface MemoryStorageOptions {
35
4
  /**
@@ -124,5 +93,5 @@ declare class JSONFileStorage<T = any> implements StorageAdapter<T> {
124
93
  get size(): number;
125
94
  }
126
95
 
127
- export { JSONFileStorage, MemoryStorage };
128
- export type { JSONFileStorageOptions, MemoryStorageOptions, StorageAdapter };
96
+ export { JSONFileStorage, MemoryStorage, StorageAdapter };
97
+ export type { JSONFileStorageOptions, MemoryStorageOptions };
@@ -1,35 +1,4 @@
1
- /**
2
- * StorageAdapter interface for DevicePassport persistence.
3
- * Implementations provide pluggable storage backends (Memory, File, Redis, DB, etc.)
4
- */
5
- interface StorageAdapter<T = any> {
6
- /**
7
- * Retrieve an item by key.
8
- * Returns null if key does not exist.
9
- */
10
- get(key: string): Promise<T | null>;
11
- /**
12
- * Store an item with the given key.
13
- */
14
- set(key: string, value: T): Promise<void>;
15
- /**
16
- * Check if a key exists in storage.
17
- */
18
- has(key: string): Promise<boolean>;
19
- /**
20
- * Delete an item by key.
21
- * Returns true if item existed and was deleted, false otherwise.
22
- */
23
- delete(key: string): Promise<boolean>;
24
- /**
25
- * Return all keys currently stored.
26
- */
27
- keys(): Promise<string[]>;
28
- /**
29
- * Clear all items in this storage.
30
- */
31
- clear(): Promise<void>;
32
- }
1
+ import { S as StorageAdapter } from '../shared/device-passport.DirQmSd4.js';
33
2
 
34
3
  interface MemoryStorageOptions {
35
4
  /**
@@ -124,5 +93,5 @@ declare class JSONFileStorage<T = any> implements StorageAdapter<T> {
124
93
  get size(): number;
125
94
  }
126
95
 
127
- export { JSONFileStorage, MemoryStorage };
128
- export type { JSONFileStorageOptions, MemoryStorageOptions, StorageAdapter };
96
+ export { JSONFileStorage, MemoryStorage, StorageAdapter };
97
+ export type { JSONFileStorageOptions, MemoryStorageOptions };
@@ -46,6 +46,188 @@ interface BenchmarkMetrics {
46
46
  timestamp: string;
47
47
  }
48
48
 
49
+ /**
50
+ * Chrome DevTools Protocol command types.
51
+ *
52
+ * 🔴 SSOP: these live in `src/types/` so that both the CDP adapter and the
53
+ * ego-lite account profile layer speak about "a CDP command" with one shape.
54
+ * Do not redeclare these interfaces inside a submodule.
55
+ */
56
+ /** A single CDP command, ready to be sent over any CDP transport. */
57
+ interface CdpCommand {
58
+ method: string;
59
+ params?: Record<string, unknown>;
60
+ /** `sessionId` is required for page-scoped domains when using flattened sessions. */
61
+ sessionId?: string;
62
+ }
63
+ /** An init script installed on every new document of a target. */
64
+ interface CdpInitScript {
65
+ source: string;
66
+ /** `sessionId` is required for page-scoped targets when using flattened sessions. */
67
+ sessionId?: string;
68
+ }
69
+ /** The ordered, declarative plan that applies a passport to a CDP target. */
70
+ interface CdpPassportPlan {
71
+ /** Ordered commands to apply the passport to a target. */
72
+ commands: CdpCommand[];
73
+ /** Init scripts to install on every new document. */
74
+ initScripts: CdpInitScript[];
75
+ /** Extra HTTP headers to set on the session. */
76
+ headers: Record<string, string>;
77
+ /** The raw stealth + pixel-protection script, for callers that prefer their own path. */
78
+ stealthScript: string;
79
+ }
80
+
81
+ /**
82
+ * ego-lite account profile types.
83
+ *
84
+ * 🔴 SSOP: shared domain types live here, not inside `src/ego/`.
85
+ *
86
+ * ## Why the proxy is a declared *gap* rather than a feature
87
+ *
88
+ * ego-lite exposes no browser-level proxy configuration:
89
+ * · there is no `Browser.setProxySettings` in CDP (Chromium has never shipped it),
90
+ * · ego-lite's native bindings have no proxy setter either — the binding list is
91
+ * `listProfiles / createTaskSpace / useTaskSpace / closeTaskSpace / listTaskSpaces /
92
+ * sendCDPMessage / snapshot / createTab / setAgentTaskState / handOffTaskSpace /
93
+ * takeOverTaskSpace / claimTaskSpace / completeTaskSpace / animations / learnings / helpers`,
94
+ * · `--proxy-server` is a *launch* flag on the browser process, not a CDP command,
95
+ * so it cannot be changed after the profile is already running.
96
+ *
97
+ * A proxy therefore has to be bound **outside** the browser: at the OS level
98
+ * (system proxy / TUN / transparent redirect), or by routing the ego-lite process
99
+ * through a local forwarder that owns the upstream proxy.
100
+ *
101
+ * This layer refuses to pretend otherwise. An account profile either carries a
102
+ * declared proxy binding (`ready`) or it does not (`missing-proxy`), and the
103
+ * session plan repeats that state so a caller cannot mistake "no proxy" for
104
+ * "proxy applied".
105
+ */
106
+
107
+ /**
108
+ * One browser profile exposed by ego-lite.
109
+ *
110
+ * Mirrors `ego.listProfiles()`: ids are stable locators, display names are not
111
+ * guaranteed to be unique.
112
+ */
113
+ interface EgoProfile {
114
+ /** Stable profile id — the value to pass as `profileId` when creating a task space. */
115
+ id: string;
116
+ /** Human-readable display name. Not unique. */
117
+ name: string;
118
+ /** Whether this is the browser's default profile. */
119
+ isDefault: boolean;
120
+ }
121
+ /**
122
+ * The slice of the ego-lite global bridge this layer talks to.
123
+ *
124
+ * Deliberately narrow and structural: the layer never imports ego-lite (it is an
125
+ * optional peer dependency, and this package ships zero dependencies). Tests and
126
+ * callers inject their own implementation.
127
+ */
128
+ interface EgoLiteBridge {
129
+ /**
130
+ * List the browser profiles available for new task spaces.
131
+ * Mirrors `ego.listProfiles()`.
132
+ */
133
+ listProfiles(): Promise<EgoProfile[]>;
134
+ /**
135
+ * Create (or reuse) a task space bound to a profile.
136
+ * Mirrors `taskSpace(name, { profileId })`.
137
+ *
138
+ * @returns The task space identifier used to select the space later.
139
+ */
140
+ createTaskSpace(name: string, profileId: string): Promise<string>;
141
+ }
142
+ /**
143
+ * A proxy binding for an account profile.
144
+ *
145
+ * ⚠️ This is a *declaration*, not an applied configuration. ego-lite cannot
146
+ * configure a proxy at the browser layer, so the caller must make this true at
147
+ * the system layer (OS proxy / TUN / local forwarder) before starting a session.
148
+ */
149
+ interface EgoProxyBinding {
150
+ /** Proxy URL, e.g. `http://user:pass@gate.example.com:7000`. */
151
+ url: string;
152
+ /** Human-readable description of which egress this binding represents. */
153
+ description: string;
154
+ /**
155
+ * ISO 3166-1 alpha-2 country the proxy egresses from, when known.
156
+ * Used to keep the passport's geo context aligned with the exit IP.
157
+ */
158
+ country?: string;
159
+ }
160
+ /**
161
+ * Readiness of an account profile for launching a session.
162
+ *
163
+ * - `ready` — a profile is bound AND a proxy is declared.
164
+ * - `missing-proxy` — a profile is bound, but no proxy is declared.
165
+ * - `missing-profile`— a proxy is declared, but no ego-lite profile is bound.
166
+ *
167
+ * `missing-proxy` exists so that "the browser has no proxy" can never be
168
+ * silently read as "the proxy is in effect".
169
+ */
170
+ type EgoProfileReadiness = 'ready' | 'missing-proxy' | 'missing-profile';
171
+ /**
172
+ * The persisted account profile: one account (seed) mapped to a sticky
173
+ * passport, an ego-lite profile binding, and a proxy declaration.
174
+ */
175
+ interface EgoAccountProfile {
176
+ /** The account seed. Same seed ⇒ same sticky passport, forever. */
177
+ seed: string;
178
+ /** Id of the persisted passport record (see `DevicePassport.id`). */
179
+ passportId: string;
180
+ /** The ego-lite profile this account is bound to. */
181
+ profileId: string;
182
+ /** Declared proxy binding, or `null` when the account has no proxy. */
183
+ proxy: EgoProxyBinding | null;
184
+ /** ISO 8601 timestamp of the last write. */
185
+ updatedAt: string;
186
+ }
187
+ /**
188
+ * The proxy declaration attached to a session plan.
189
+ *
190
+ * `bound: false` means the session will egress directly — the caller must
191
+ * arrange the proxy outside the browser before launching.
192
+ */
193
+ interface EgoProxyDeclaration {
194
+ /** Whether a proxy is declared for this account. */
195
+ bound: boolean;
196
+ /** The declared binding, present only when `bound` is true. */
197
+ binding: EgoProxyBinding | null;
198
+ /**
199
+ * How the proxy is actually applied, given ego-lite's capability boundary.
200
+ * Always `'system-level'` — the browser layer cannot set it.
201
+ */
202
+ resolution: 'system-level';
203
+ /**
204
+ * Human-readable note telling the operator what to do when `bound` is true,
205
+ * or why it cannot be applied when `bound` is false.
206
+ */
207
+ note: string;
208
+ }
209
+ /**
210
+ * Everything required to start one account session in ego-lite.
211
+ *
212
+ * Extends {@link CdpPassportPlan} so the CDP payload has exactly one definition.
213
+ * Re-declaring `commands` / `initScripts` / `headers` here would let the two
214
+ * shapes drift apart, and would silently drop `stealthScript` from the plan.
215
+ */
216
+ interface EgoSessionPlan extends CdpPassportPlan {
217
+ /** The account seed this plan belongs to. */
218
+ seed: string;
219
+ /** The ego-lite profile the session must run under. */
220
+ profileId: string;
221
+ /** Suggested task space name (unique per launch attempt). */
222
+ taskSpaceName: string;
223
+ /** The proxy declaration, with its `bound` state spelled out. */
224
+ proxy: EgoProxyDeclaration;
225
+ /** Readiness of the underlying account profile. */
226
+ readiness: EgoProfileReadiness;
227
+ /** Whether the session may be launched as-is. */
228
+ launchable: boolean;
229
+ }
230
+
49
231
  /**
50
232
  * Core type definitions for Device Passport.
51
233
  * Compliant with RFC 8942, W3C User-Agent Client Hints, and WebGL specs.
@@ -212,4 +394,4 @@ interface PassportGeneratorOptions {
212
394
  }
213
395
 
214
396
  export { LocaleProfile };
215
- export type { BenchmarkMetrics, BrandVersion, BrowserProfile, ClientHintsHeaders, ConsistencyCategory, ConsistencyCheck, CpuProfile, DevicePassport, DevicePassportContext, DeviceProfile, EntropyAnalysis, EvaluationGrade, EvaluationStatus, GpuProfile, HardwareProfile, MemoryProfile, OperatingSystemProfile, PassportEvaluation, PassportGeneratorOptions, ScreenProfile, SupportedArchitecture, SupportedBrowserName, SupportedPlatform, UserAgentClientHints };
397
+ export type { BenchmarkMetrics, BrandVersion, BrowserProfile, CdpCommand, CdpInitScript, CdpPassportPlan, ClientHintsHeaders, ConsistencyCategory, ConsistencyCheck, CpuProfile, DevicePassport, DevicePassportContext, DeviceProfile, EgoAccountProfile, EgoLiteBridge, EgoProfile, EgoProfileReadiness, EgoProxyBinding, EgoProxyDeclaration, EgoSessionPlan, EntropyAnalysis, EvaluationGrade, EvaluationStatus, GpuProfile, HardwareProfile, MemoryProfile, OperatingSystemProfile, PassportEvaluation, PassportGeneratorOptions, ScreenProfile, SupportedArchitecture, SupportedBrowserName, SupportedPlatform, UserAgentClientHints };
@@ -46,6 +46,188 @@ interface BenchmarkMetrics {
46
46
  timestamp: string;
47
47
  }
48
48
 
49
+ /**
50
+ * Chrome DevTools Protocol command types.
51
+ *
52
+ * 🔴 SSOP: these live in `src/types/` so that both the CDP adapter and the
53
+ * ego-lite account profile layer speak about "a CDP command" with one shape.
54
+ * Do not redeclare these interfaces inside a submodule.
55
+ */
56
+ /** A single CDP command, ready to be sent over any CDP transport. */
57
+ interface CdpCommand {
58
+ method: string;
59
+ params?: Record<string, unknown>;
60
+ /** `sessionId` is required for page-scoped domains when using flattened sessions. */
61
+ sessionId?: string;
62
+ }
63
+ /** An init script installed on every new document of a target. */
64
+ interface CdpInitScript {
65
+ source: string;
66
+ /** `sessionId` is required for page-scoped targets when using flattened sessions. */
67
+ sessionId?: string;
68
+ }
69
+ /** The ordered, declarative plan that applies a passport to a CDP target. */
70
+ interface CdpPassportPlan {
71
+ /** Ordered commands to apply the passport to a target. */
72
+ commands: CdpCommand[];
73
+ /** Init scripts to install on every new document. */
74
+ initScripts: CdpInitScript[];
75
+ /** Extra HTTP headers to set on the session. */
76
+ headers: Record<string, string>;
77
+ /** The raw stealth + pixel-protection script, for callers that prefer their own path. */
78
+ stealthScript: string;
79
+ }
80
+
81
+ /**
82
+ * ego-lite account profile types.
83
+ *
84
+ * 🔴 SSOP: shared domain types live here, not inside `src/ego/`.
85
+ *
86
+ * ## Why the proxy is a declared *gap* rather than a feature
87
+ *
88
+ * ego-lite exposes no browser-level proxy configuration:
89
+ * · there is no `Browser.setProxySettings` in CDP (Chromium has never shipped it),
90
+ * · ego-lite's native bindings have no proxy setter either — the binding list is
91
+ * `listProfiles / createTaskSpace / useTaskSpace / closeTaskSpace / listTaskSpaces /
92
+ * sendCDPMessage / snapshot / createTab / setAgentTaskState / handOffTaskSpace /
93
+ * takeOverTaskSpace / claimTaskSpace / completeTaskSpace / animations / learnings / helpers`,
94
+ * · `--proxy-server` is a *launch* flag on the browser process, not a CDP command,
95
+ * so it cannot be changed after the profile is already running.
96
+ *
97
+ * A proxy therefore has to be bound **outside** the browser: at the OS level
98
+ * (system proxy / TUN / transparent redirect), or by routing the ego-lite process
99
+ * through a local forwarder that owns the upstream proxy.
100
+ *
101
+ * This layer refuses to pretend otherwise. An account profile either carries a
102
+ * declared proxy binding (`ready`) or it does not (`missing-proxy`), and the
103
+ * session plan repeats that state so a caller cannot mistake "no proxy" for
104
+ * "proxy applied".
105
+ */
106
+
107
+ /**
108
+ * One browser profile exposed by ego-lite.
109
+ *
110
+ * Mirrors `ego.listProfiles()`: ids are stable locators, display names are not
111
+ * guaranteed to be unique.
112
+ */
113
+ interface EgoProfile {
114
+ /** Stable profile id — the value to pass as `profileId` when creating a task space. */
115
+ id: string;
116
+ /** Human-readable display name. Not unique. */
117
+ name: string;
118
+ /** Whether this is the browser's default profile. */
119
+ isDefault: boolean;
120
+ }
121
+ /**
122
+ * The slice of the ego-lite global bridge this layer talks to.
123
+ *
124
+ * Deliberately narrow and structural: the layer never imports ego-lite (it is an
125
+ * optional peer dependency, and this package ships zero dependencies). Tests and
126
+ * callers inject their own implementation.
127
+ */
128
+ interface EgoLiteBridge {
129
+ /**
130
+ * List the browser profiles available for new task spaces.
131
+ * Mirrors `ego.listProfiles()`.
132
+ */
133
+ listProfiles(): Promise<EgoProfile[]>;
134
+ /**
135
+ * Create (or reuse) a task space bound to a profile.
136
+ * Mirrors `taskSpace(name, { profileId })`.
137
+ *
138
+ * @returns The task space identifier used to select the space later.
139
+ */
140
+ createTaskSpace(name: string, profileId: string): Promise<string>;
141
+ }
142
+ /**
143
+ * A proxy binding for an account profile.
144
+ *
145
+ * ⚠️ This is a *declaration*, not an applied configuration. ego-lite cannot
146
+ * configure a proxy at the browser layer, so the caller must make this true at
147
+ * the system layer (OS proxy / TUN / local forwarder) before starting a session.
148
+ */
149
+ interface EgoProxyBinding {
150
+ /** Proxy URL, e.g. `http://user:pass@gate.example.com:7000`. */
151
+ url: string;
152
+ /** Human-readable description of which egress this binding represents. */
153
+ description: string;
154
+ /**
155
+ * ISO 3166-1 alpha-2 country the proxy egresses from, when known.
156
+ * Used to keep the passport's geo context aligned with the exit IP.
157
+ */
158
+ country?: string;
159
+ }
160
+ /**
161
+ * Readiness of an account profile for launching a session.
162
+ *
163
+ * - `ready` — a profile is bound AND a proxy is declared.
164
+ * - `missing-proxy` — a profile is bound, but no proxy is declared.
165
+ * - `missing-profile`— a proxy is declared, but no ego-lite profile is bound.
166
+ *
167
+ * `missing-proxy` exists so that "the browser has no proxy" can never be
168
+ * silently read as "the proxy is in effect".
169
+ */
170
+ type EgoProfileReadiness = 'ready' | 'missing-proxy' | 'missing-profile';
171
+ /**
172
+ * The persisted account profile: one account (seed) mapped to a sticky
173
+ * passport, an ego-lite profile binding, and a proxy declaration.
174
+ */
175
+ interface EgoAccountProfile {
176
+ /** The account seed. Same seed ⇒ same sticky passport, forever. */
177
+ seed: string;
178
+ /** Id of the persisted passport record (see `DevicePassport.id`). */
179
+ passportId: string;
180
+ /** The ego-lite profile this account is bound to. */
181
+ profileId: string;
182
+ /** Declared proxy binding, or `null` when the account has no proxy. */
183
+ proxy: EgoProxyBinding | null;
184
+ /** ISO 8601 timestamp of the last write. */
185
+ updatedAt: string;
186
+ }
187
+ /**
188
+ * The proxy declaration attached to a session plan.
189
+ *
190
+ * `bound: false` means the session will egress directly — the caller must
191
+ * arrange the proxy outside the browser before launching.
192
+ */
193
+ interface EgoProxyDeclaration {
194
+ /** Whether a proxy is declared for this account. */
195
+ bound: boolean;
196
+ /** The declared binding, present only when `bound` is true. */
197
+ binding: EgoProxyBinding | null;
198
+ /**
199
+ * How the proxy is actually applied, given ego-lite's capability boundary.
200
+ * Always `'system-level'` — the browser layer cannot set it.
201
+ */
202
+ resolution: 'system-level';
203
+ /**
204
+ * Human-readable note telling the operator what to do when `bound` is true,
205
+ * or why it cannot be applied when `bound` is false.
206
+ */
207
+ note: string;
208
+ }
209
+ /**
210
+ * Everything required to start one account session in ego-lite.
211
+ *
212
+ * Extends {@link CdpPassportPlan} so the CDP payload has exactly one definition.
213
+ * Re-declaring `commands` / `initScripts` / `headers` here would let the two
214
+ * shapes drift apart, and would silently drop `stealthScript` from the plan.
215
+ */
216
+ interface EgoSessionPlan extends CdpPassportPlan {
217
+ /** The account seed this plan belongs to. */
218
+ seed: string;
219
+ /** The ego-lite profile the session must run under. */
220
+ profileId: string;
221
+ /** Suggested task space name (unique per launch attempt). */
222
+ taskSpaceName: string;
223
+ /** The proxy declaration, with its `bound` state spelled out. */
224
+ proxy: EgoProxyDeclaration;
225
+ /** Readiness of the underlying account profile. */
226
+ readiness: EgoProfileReadiness;
227
+ /** Whether the session may be launched as-is. */
228
+ launchable: boolean;
229
+ }
230
+
49
231
  /**
50
232
  * Core type definitions for Device Passport.
51
233
  * Compliant with RFC 8942, W3C User-Agent Client Hints, and WebGL specs.
@@ -212,4 +394,4 @@ interface PassportGeneratorOptions {
212
394
  }
213
395
 
214
396
  export { LocaleProfile };
215
- export type { BenchmarkMetrics, BrandVersion, BrowserProfile, ClientHintsHeaders, ConsistencyCategory, ConsistencyCheck, CpuProfile, DevicePassport, DevicePassportContext, DeviceProfile, EntropyAnalysis, EvaluationGrade, EvaluationStatus, GpuProfile, HardwareProfile, MemoryProfile, OperatingSystemProfile, PassportEvaluation, PassportGeneratorOptions, ScreenProfile, SupportedArchitecture, SupportedBrowserName, SupportedPlatform, UserAgentClientHints };
397
+ export type { BenchmarkMetrics, BrandVersion, BrowserProfile, CdpCommand, CdpInitScript, CdpPassportPlan, ClientHintsHeaders, ConsistencyCategory, ConsistencyCheck, CpuProfile, DevicePassport, DevicePassportContext, DeviceProfile, EgoAccountProfile, EgoLiteBridge, EgoProfile, EgoProfileReadiness, EgoProxyBinding, EgoProxyDeclaration, EgoSessionPlan, EntropyAnalysis, EvaluationGrade, EvaluationStatus, GpuProfile, HardwareProfile, MemoryProfile, OperatingSystemProfile, PassportEvaluation, PassportGeneratorOptions, ScreenProfile, SupportedArchitecture, SupportedBrowserName, SupportedPlatform, UserAgentClientHints };