@modelprofile.com/browser-runtime 4.4.0 → 5.0.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.
- package/changelog.md +24 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/classes.runtime.d.ts +32 -11
- package/dist_ts/classes.runtime.js +498 -570
- package/dist_ts/classes.runtimeownership.d.ts +3 -1
- package/dist_ts/classes.runtimeownership.js +27 -7
- package/dist_ts/index.d.ts +1 -1
- package/dist_ts/interfaces.d.ts +8 -3
- package/dist_ts/mcp.js +5 -3
- package/package.json +2 -2
- package/readme.hints.md +13 -10
- package/readme.md +12 -8
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/classes.runtime.ts +534 -638
- package/ts/classes.runtimeownership.ts +23 -6
- package/ts/index.ts +1 -0
- package/ts/interfaces.ts +9 -3
- package/ts/mcp.ts +5 -2
package/changelog.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026-09-08 - 5.0.0
|
|
4
|
+
|
|
5
|
+
### Breaking Changes
|
|
6
|
+
|
|
7
|
+
- share browser incarnations across agents and human viewers (runtime)
|
|
8
|
+
- Replaces exclusive same-resource admission with shared participant leases and a resource-wide operation FIFO.
|
|
9
|
+
- Keeps human leases valid across attachment changes while fencing agent authority by exact session binding.
|
|
10
|
+
- Returns effective viewport results from setViewport() and recomputes shared viewport/input state per participant.
|
|
11
|
+
- Adds Codex MCP session authentication while preserving exact namespace validation.
|
|
12
|
+
- Tightens empty /proc command-line recovery by revalidating process status and PID departure.
|
|
13
|
+
- Bumps @push.rocks/smartpuppeteer to ^2.7.1.
|
|
14
|
+
|
|
15
|
+
### Fixes
|
|
16
|
+
|
|
17
|
+
- bump pnpm to 12.2.1 (package-manager)
|
|
18
|
+
- Updates packageManager from pnpm@11.25.0 to pnpm@12.2.1.
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
- support Flex session IDs for MCP agent bindings (mcp)
|
|
23
|
+
- Allow independently authenticated MCP bindings to use qualified Flex session IDs.
|
|
24
|
+
- Widen MCP capability and authenticated binding types to qualified browser session IDs.
|
|
25
|
+
- Add runtime and adapter coverage for Flex MCP namespace isolation.
|
|
26
|
+
|
|
3
27
|
## 2026-09-05 - 4.4.0
|
|
4
28
|
|
|
5
29
|
### Features
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@modelprofile.com/browser-runtime',
|
|
6
|
-
version: '
|
|
6
|
+
version: '5.0.0',
|
|
7
7
|
description: 'Parent-owned, resource-centric Chromium runtime with revisioned attachment fencing, authenticated human and agent control, fail-closed egress, bounded artifacts, and Flex/MCP adapters.'
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSxtQ0FBbUM7SUFDekMsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLDBMQUEwTDtDQUN4TSxDQUFBIn0=
|
|
@@ -3,7 +3,7 @@ import { BrowserArtifactStore } from './classes.artifactstore.js';
|
|
|
3
3
|
import { BrowserEgressProxy } from './classes.egressproxy.js';
|
|
4
4
|
import { BrowserRuntimeError } from './errors.js';
|
|
5
5
|
import { type IBrowserRuntimeTestingOptions } from './internal.testing.js';
|
|
6
|
-
import type { IAttachTrustedFramedPeerOptions, IApplyBrowserAttachmentBindingRequest, IBrowserAttachmentBinding, TBrowserCapabilityDescriptor, TBrowserCapabilityAuthorizationRequest, TBrowserRuntimeLeaseAuthority, TBrowserRuntimeOperationClassification, IBrowserRuntimeFrameSubscription, IBrowserRuntimeOperationOptions, IBrowserRuntimeOptions, IBrowserResourceRegistration, IBrowserRuntimeState, ICreateBrowserResourceRequest, IRegisterBrowserResourceRequest, TIssueBrowserCapabilityRequest, TIssuedBrowserCapability, ILiveBrowserSessionLike, TBrowserActorRole, TBrowserAgentAction, TBrowserAgentActionResult, TBrowserRuntimeEvent } from './interfaces.js';
|
|
6
|
+
import type { IAttachTrustedFramedPeerOptions, IApplyBrowserAttachmentBindingRequest, IBrowserAttachmentBinding, TBrowserCapabilityDescriptor, TBrowserCapabilityAuthorizationRequest, TBrowserRuntimeLeaseAuthority, TBrowserRuntimeOperationClassification, IBrowserRuntimeFrameSubscription, IBrowserRuntimeOperationOptions, IBrowserRuntimeOptions, IBrowserResourceRegistration, IBrowserRuntimeState, IBrowserRuntimeViewportResult, ICreateBrowserResourceRequest, IRegisterBrowserResourceRequest, TIssueBrowserCapabilityRequest, TIssuedBrowserCapability, ILiveBrowserSessionLike, TBrowserActorRole, TBrowserAgentAction, TBrowserAgentActionResult, TBrowserRuntimeEvent } from './interfaces.js';
|
|
7
7
|
import { TransitionMutex } from './utils.js';
|
|
8
8
|
import { BrowserRuntimeFramedServerPeer } from './classes.framed.js';
|
|
9
9
|
type TCapabilityRecord = TBrowserCapabilityDescriptor & {
|
|
@@ -12,6 +12,7 @@ type TCapabilityRecord = TBrowserCapabilityDescriptor & {
|
|
|
12
12
|
expiryTimer: ReturnType<typeof setTimeout>;
|
|
13
13
|
disconnect?: (signal: AbortSignal) => Promise<void> | void;
|
|
14
14
|
lease?: ILeaseRecord;
|
|
15
|
+
acquiring?: boolean;
|
|
15
16
|
revocationPromise?: Promise<void>;
|
|
16
17
|
revocationInvokeDisconnect?: boolean;
|
|
17
18
|
revocationComplete?: boolean;
|
|
@@ -30,8 +31,9 @@ interface ILeaseRecord {
|
|
|
30
31
|
authorityGeneration: number;
|
|
31
32
|
released: boolean;
|
|
32
33
|
releasePromise?: Promise<void>;
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
preferredViewport?: plugins.smartpuppeteer.ILiveBrowserViewport;
|
|
35
|
+
heldKeys: Map<string, plugins.smartpuppeteer.ILiveBrowserKeyInput>;
|
|
36
|
+
heldButtons: Map<string, plugins.smartpuppeteer.ILiveBrowserMouseInput>;
|
|
35
37
|
}
|
|
36
38
|
export interface IBrowserRuntimeLeaseRenewalOptions {
|
|
37
39
|
signal?: AbortSignal;
|
|
@@ -63,12 +65,15 @@ interface IQueuedOperationRecord {
|
|
|
63
65
|
reject(error: unknown): void;
|
|
64
66
|
state: 'queued' | 'starting' | 'active' | 'settled';
|
|
65
67
|
onQueuedAbort?: () => void;
|
|
68
|
+
/** Resource-owned cleanup, admitted only for this exact released participant. */
|
|
69
|
+
participantCleanup?: boolean;
|
|
66
70
|
}
|
|
67
71
|
interface IOutstandingFrameRecord {
|
|
68
72
|
acknowledgement: plugins.smartpuppeteer.ILiveBrowserFrameAcknowledgementRequest;
|
|
69
73
|
timer?: ReturnType<typeof setTimeout>;
|
|
70
74
|
session: ILiveBrowserSessionLike;
|
|
71
75
|
incarnationGeneration: number;
|
|
76
|
+
producerAcknowledgement: Promise<TFrameAcknowledgementOutcome>;
|
|
72
77
|
}
|
|
73
78
|
type TFrameAcknowledgementOutcome = {
|
|
74
79
|
status: 'fulfilled';
|
|
@@ -100,6 +105,7 @@ interface IFrameRefreshRecord {
|
|
|
100
105
|
abandoned: boolean;
|
|
101
106
|
boundaryCandidate?: plugins.smartpuppeteer.ILiveBrowserFrameIdentity;
|
|
102
107
|
failure?: BrowserRuntimeError;
|
|
108
|
+
producerFailure?: Promise<boolean>;
|
|
103
109
|
}
|
|
104
110
|
interface IResourceSlot {
|
|
105
111
|
projectId: string;
|
|
@@ -119,12 +125,18 @@ interface IResourceSlot {
|
|
|
119
125
|
proxy?: BrowserEgressProxy;
|
|
120
126
|
profileDirectory?: string;
|
|
121
127
|
unsubscribeSession?: () => void;
|
|
122
|
-
|
|
128
|
+
leases: Map<string, ILeaseRecord>;
|
|
123
129
|
operation?: IOperationRecord;
|
|
124
130
|
operationQueue: IQueuedOperationRecord[];
|
|
125
131
|
operationSchedulerRunning: boolean;
|
|
126
|
-
|
|
132
|
+
frameSubscriptions: Map<string, IFrameSubscriptionRecord>;
|
|
133
|
+
highestFrameSequence: number;
|
|
134
|
+
producerAcknowledgements: Set<Promise<TFrameAcknowledgementOutcome>>;
|
|
127
135
|
frameRefresh?: IFrameRefreshRecord;
|
|
136
|
+
frameFailure?: {
|
|
137
|
+
session: ILiveBrowserSessionLike;
|
|
138
|
+
promise: Promise<boolean>;
|
|
139
|
+
};
|
|
128
140
|
idleTimer?: ReturnType<typeof setTimeout>;
|
|
129
141
|
lifecycleTail: Promise<void>;
|
|
130
142
|
lifecycleOperationCount: number;
|
|
@@ -207,11 +219,21 @@ export declare class BrowserRuntime {
|
|
|
207
219
|
/** @internal */
|
|
208
220
|
leaseHumanAgentAction(lease: ILeaseRecord, actionArg: unknown, operationOptions?: IBrowserRuntimeOperationOptions): Promise<TBrowserAgentActionResult>;
|
|
209
221
|
/** @internal */
|
|
210
|
-
leaseSetViewport(lease: ILeaseRecord, viewport: plugins.smartpuppeteer.ILiveBrowserViewport, operationOptions?: IBrowserRuntimeOperationOptions): Promise<
|
|
222
|
+
leaseSetViewport(lease: ILeaseRecord, viewport: plugins.smartpuppeteer.ILiveBrowserViewport, operationOptions?: IBrowserRuntimeOperationOptions): Promise<IBrowserRuntimeViewportResult>;
|
|
223
|
+
private validatePreferredViewport;
|
|
224
|
+
private applySharedViewport;
|
|
211
225
|
/** @internal */
|
|
212
226
|
leaseRefreshFrameStream(lease: ILeaseRecord, operationOptions?: IBrowserRuntimeOperationOptions): Promise<void>;
|
|
213
227
|
/** @internal */
|
|
214
228
|
leaseDispatchRawInput(lease: ILeaseRecord, action: 'dispatchMouse' | 'dispatchWheel' | 'dispatchKey' | 'insertText', input: plugins.smartpuppeteer.ILiveBrowserMouseInput | plugins.smartpuppeteer.ILiveBrowserWheelInput | plugins.smartpuppeteer.ILiveBrowserKeyInput | plugins.smartpuppeteer.ILiveBrowserInsertTextInput, operationOptions?: IBrowserRuntimeOperationOptions): Promise<void>;
|
|
229
|
+
private keyOwnershipKey;
|
|
230
|
+
private validateHeldInputTarget;
|
|
231
|
+
private mouseOwnershipKey;
|
|
232
|
+
private otherParticipantHolds;
|
|
233
|
+
private sharedMouseButtons;
|
|
234
|
+
private sharedModifiers;
|
|
235
|
+
private releaseAllParticipantInput;
|
|
236
|
+
private releaseParticipantInput;
|
|
215
237
|
/** @internal */
|
|
216
238
|
subscribeLeaseEvents(lease: ILeaseRecord, listener: (event: TBrowserRuntimeEvent) => void): Promise<IBrowserRuntimeFrameSubscription>;
|
|
217
239
|
/** @internal */
|
|
@@ -232,8 +254,7 @@ export declare class BrowserRuntime {
|
|
|
232
254
|
private requireArtifactStore;
|
|
233
255
|
private handleOwnershipLost;
|
|
234
256
|
private stopAfterOwnershipLoss;
|
|
235
|
-
private
|
|
236
|
-
private acquireHumanLease;
|
|
257
|
+
private acquireParticipantLease;
|
|
237
258
|
private createLeaseRecord;
|
|
238
259
|
private ensureSession;
|
|
239
260
|
private runOperation;
|
|
@@ -260,7 +281,6 @@ export declare class BrowserRuntime {
|
|
|
260
281
|
private finalizeFrameRefresh;
|
|
261
282
|
private abandonFrameRefresh;
|
|
262
283
|
private armFrameAcknowledgementTimer;
|
|
263
|
-
private matchingFrameRefresh;
|
|
264
284
|
private handleSessionEvent;
|
|
265
285
|
private pushToSubscription;
|
|
266
286
|
private closeFrameSubscription;
|
|
@@ -268,9 +288,10 @@ export declare class BrowserRuntime {
|
|
|
268
288
|
private validateFrameAcknowledgement;
|
|
269
289
|
private frameAcknowledgementKey;
|
|
270
290
|
private waitForFrameAcknowledgement;
|
|
271
|
-
private acknowledgeFrameInBackground;
|
|
272
291
|
private handleFrameFailure;
|
|
292
|
+
private handleFrameFailureInternal;
|
|
273
293
|
private trackFrameCapabilityRevocation;
|
|
294
|
+
private requireQueuedLease;
|
|
274
295
|
private requireValidLease;
|
|
275
296
|
private resolveCapability;
|
|
276
297
|
private describeCapability;
|
|
@@ -346,7 +367,7 @@ export declare class BrowserRuntimeLease {
|
|
|
346
367
|
back(options?: plugins.smartpuppeteer.ILiveBrowserNavigationOptions, operationOptions?: IBrowserRuntimeOperationOptions): Promise<IBrowserRuntimeState>;
|
|
347
368
|
forward(options?: plugins.smartpuppeteer.ILiveBrowserNavigationOptions, operationOptions?: IBrowserRuntimeOperationOptions): Promise<IBrowserRuntimeState>;
|
|
348
369
|
reload(options?: plugins.smartpuppeteer.ILiveBrowserNavigationOptions, operationOptions?: IBrowserRuntimeOperationOptions): Promise<IBrowserRuntimeState>;
|
|
349
|
-
setViewport(viewport: plugins.smartpuppeteer.ILiveBrowserViewport, operationOptions?: IBrowserRuntimeOperationOptions): Promise<
|
|
370
|
+
setViewport(viewport: plugins.smartpuppeteer.ILiveBrowserViewport, operationOptions?: IBrowserRuntimeOperationOptions): Promise<IBrowserRuntimeViewportResult>;
|
|
350
371
|
dispatchMouse(input: plugins.smartpuppeteer.ILiveBrowserMouseInput, operationOptions?: IBrowserRuntimeOperationOptions): Promise<void>;
|
|
351
372
|
dispatchWheel(input: plugins.smartpuppeteer.ILiveBrowserWheelInput, operationOptions?: IBrowserRuntimeOperationOptions): Promise<void>;
|
|
352
373
|
dispatchKey(input: plugins.smartpuppeteer.ILiveBrowserKeyInput, operationOptions?: IBrowserRuntimeOperationOptions): Promise<void>;
|