@modelprofile.com/browser-runtime 4.3.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 CHANGED
@@ -1,5 +1,39 @@
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
+
27
+ ## 2026-09-05 - 4.4.0
28
+
29
+ ### Features
30
+
31
+ - add live lease renewal support (leases)
32
+ - Expose BrowserRuntimeLease.renew() and expiresAt with exported renewal options.
33
+ - Reauthorize active leases to extend capability expiry without replacing the browser incarnation or frame subscription.
34
+ - Reject expired, released, revoked, fenced, denied, timed-out, or concurrent renewals while keeping failed renewals from extending expiry.
35
+ - Document renewal behavior and add coverage for renewal expiry, denial, timeout, release, attachment changes, and shutdown.
36
+
3
37
  ## 2026-09-04 - 4.3.0
4
38
 
5
39
  ### Features
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@modelprofile.com/browser-runtime',
6
- version: '4.3.0',
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,14 @@ interface ILeaseRecord {
30
31
  authorityGeneration: number;
31
32
  released: boolean;
32
33
  releasePromise?: Promise<void>;
33
- releaseGeneration?: number;
34
- releaseOwnsFence?: boolean;
34
+ preferredViewport?: plugins.smartpuppeteer.ILiveBrowserViewport;
35
+ heldKeys: Map<string, plugins.smartpuppeteer.ILiveBrowserKeyInput>;
36
+ heldButtons: Map<string, plugins.smartpuppeteer.ILiveBrowserMouseInput>;
37
+ }
38
+ export interface IBrowserRuntimeLeaseRenewalOptions {
39
+ signal?: AbortSignal;
40
+ /** Lifetime from successful reauthorization; defaults to the runtime capability lifetime. */
41
+ expiresInMs?: number;
35
42
  }
36
43
  interface IOperationRecord {
37
44
  operationId: string;
@@ -58,12 +65,15 @@ interface IQueuedOperationRecord {
58
65
  reject(error: unknown): void;
59
66
  state: 'queued' | 'starting' | 'active' | 'settled';
60
67
  onQueuedAbort?: () => void;
68
+ /** Resource-owned cleanup, admitted only for this exact released participant. */
69
+ participantCleanup?: boolean;
61
70
  }
62
71
  interface IOutstandingFrameRecord {
63
72
  acknowledgement: plugins.smartpuppeteer.ILiveBrowserFrameAcknowledgementRequest;
64
73
  timer?: ReturnType<typeof setTimeout>;
65
74
  session: ILiveBrowserSessionLike;
66
75
  incarnationGeneration: number;
76
+ producerAcknowledgement: Promise<TFrameAcknowledgementOutcome>;
67
77
  }
68
78
  type TFrameAcknowledgementOutcome = {
69
79
  status: 'fulfilled';
@@ -95,6 +105,7 @@ interface IFrameRefreshRecord {
95
105
  abandoned: boolean;
96
106
  boundaryCandidate?: plugins.smartpuppeteer.ILiveBrowserFrameIdentity;
97
107
  failure?: BrowserRuntimeError;
108
+ producerFailure?: Promise<boolean>;
98
109
  }
99
110
  interface IResourceSlot {
100
111
  projectId: string;
@@ -114,12 +125,18 @@ interface IResourceSlot {
114
125
  proxy?: BrowserEgressProxy;
115
126
  profileDirectory?: string;
116
127
  unsubscribeSession?: () => void;
117
- lease?: ILeaseRecord;
128
+ leases: Map<string, ILeaseRecord>;
118
129
  operation?: IOperationRecord;
119
130
  operationQueue: IQueuedOperationRecord[];
120
131
  operationSchedulerRunning: boolean;
121
- frameSubscription?: IFrameSubscriptionRecord;
132
+ frameSubscriptions: Map<string, IFrameSubscriptionRecord>;
133
+ highestFrameSequence: number;
134
+ producerAcknowledgements: Set<Promise<TFrameAcknowledgementOutcome>>;
122
135
  frameRefresh?: IFrameRefreshRecord;
136
+ frameFailure?: {
137
+ session: ILiveBrowserSessionLike;
138
+ promise: Promise<boolean>;
139
+ };
123
140
  idleTimer?: ReturnType<typeof setTimeout>;
124
141
  lifecycleTail: Promise<void>;
125
142
  lifecycleOperationCount: number;
@@ -147,6 +164,7 @@ export declare class BrowserRuntime {
147
164
  private readonly failedRevocations;
148
165
  private readonly capabilityMutex;
149
166
  private readonly cleanupOperations;
167
+ private readonly leaseRenewals;
150
168
  private readonly framedPeers;
151
169
  private startPromise?;
152
170
  private stopPromise?;
@@ -185,6 +203,8 @@ export declare class BrowserRuntime {
185
203
  /** @internal */
186
204
  getLeaseAuthority(lease: ILeaseRecord): TBrowserRuntimeLeaseAuthority;
187
205
  /** @internal */
206
+ renewLease(lease: ILeaseRecord, optionsArg?: IBrowserRuntimeLeaseRenewalOptions): Promise<number>;
207
+ /** @internal */
188
208
  isLeaseAuthorityCurrent(lease: ILeaseRecord, authorityArg: TBrowserRuntimeLeaseAuthority): boolean;
189
209
  /** @internal */
190
210
  executeLeaseAgentAction(lease: ILeaseRecord, actionArg: unknown, operationOptions?: IBrowserRuntimeOperationOptions): Promise<TBrowserAgentActionResult>;
@@ -199,11 +219,21 @@ export declare class BrowserRuntime {
199
219
  /** @internal */
200
220
  leaseHumanAgentAction(lease: ILeaseRecord, actionArg: unknown, operationOptions?: IBrowserRuntimeOperationOptions): Promise<TBrowserAgentActionResult>;
201
221
  /** @internal */
202
- leaseSetViewport(lease: ILeaseRecord, viewport: plugins.smartpuppeteer.ILiveBrowserViewport, operationOptions?: IBrowserRuntimeOperationOptions): Promise<void>;
222
+ leaseSetViewport(lease: ILeaseRecord, viewport: plugins.smartpuppeteer.ILiveBrowserViewport, operationOptions?: IBrowserRuntimeOperationOptions): Promise<IBrowserRuntimeViewportResult>;
223
+ private validatePreferredViewport;
224
+ private applySharedViewport;
203
225
  /** @internal */
204
226
  leaseRefreshFrameStream(lease: ILeaseRecord, operationOptions?: IBrowserRuntimeOperationOptions): Promise<void>;
205
227
  /** @internal */
206
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;
207
237
  /** @internal */
208
238
  subscribeLeaseEvents(lease: ILeaseRecord, listener: (event: TBrowserRuntimeEvent) => void): Promise<IBrowserRuntimeFrameSubscription>;
209
239
  /** @internal */
@@ -224,8 +254,7 @@ export declare class BrowserRuntime {
224
254
  private requireArtifactStore;
225
255
  private handleOwnershipLost;
226
256
  private stopAfterOwnershipLoss;
227
- private acquireAgentLease;
228
- private acquireHumanLease;
257
+ private acquireParticipantLease;
229
258
  private createLeaseRecord;
230
259
  private ensureSession;
231
260
  private runOperation;
@@ -252,7 +281,6 @@ export declare class BrowserRuntime {
252
281
  private finalizeFrameRefresh;
253
282
  private abandonFrameRefresh;
254
283
  private armFrameAcknowledgementTimer;
255
- private matchingFrameRefresh;
256
284
  private handleSessionEvent;
257
285
  private pushToSubscription;
258
286
  private closeFrameSubscription;
@@ -260,9 +288,10 @@ export declare class BrowserRuntime {
260
288
  private validateFrameAcknowledgement;
261
289
  private frameAcknowledgementKey;
262
290
  private waitForFrameAcknowledgement;
263
- private acknowledgeFrameInBackground;
264
291
  private handleFrameFailure;
292
+ private handleFrameFailureInternal;
265
293
  private trackFrameCapabilityRevocation;
294
+ private requireQueuedLease;
266
295
  private requireValidLease;
267
296
  private resolveCapability;
268
297
  private describeCapability;
@@ -319,6 +348,9 @@ export declare class BrowserRuntimeLease {
319
348
  constructor(runtime: BrowserRuntime, record: ILeaseRecord);
320
349
  get leaseId(): string;
321
350
  get capabilityId(): string;
351
+ get expiresAt(): number;
352
+ /** Reauthorize this exact live lease without replacing its frame stream or browser incarnation. */
353
+ renew(options?: IBrowserRuntimeLeaseRenewalOptions): Promise<number>;
322
354
  get role(): TBrowserActorRole;
323
355
  get projectId(): string;
324
356
  get browserResourceId(): string;
@@ -335,7 +367,7 @@ export declare class BrowserRuntimeLease {
335
367
  back(options?: plugins.smartpuppeteer.ILiveBrowserNavigationOptions, operationOptions?: IBrowserRuntimeOperationOptions): Promise<IBrowserRuntimeState>;
336
368
  forward(options?: plugins.smartpuppeteer.ILiveBrowserNavigationOptions, operationOptions?: IBrowserRuntimeOperationOptions): Promise<IBrowserRuntimeState>;
337
369
  reload(options?: plugins.smartpuppeteer.ILiveBrowserNavigationOptions, operationOptions?: IBrowserRuntimeOperationOptions): Promise<IBrowserRuntimeState>;
338
- setViewport(viewport: plugins.smartpuppeteer.ILiveBrowserViewport, operationOptions?: IBrowserRuntimeOperationOptions): Promise<void>;
370
+ setViewport(viewport: plugins.smartpuppeteer.ILiveBrowserViewport, operationOptions?: IBrowserRuntimeOperationOptions): Promise<IBrowserRuntimeViewportResult>;
339
371
  dispatchMouse(input: plugins.smartpuppeteer.ILiveBrowserMouseInput, operationOptions?: IBrowserRuntimeOperationOptions): Promise<void>;
340
372
  dispatchWheel(input: plugins.smartpuppeteer.ILiveBrowserWheelInput, operationOptions?: IBrowserRuntimeOperationOptions): Promise<void>;
341
373
  dispatchKey(input: plugins.smartpuppeteer.ILiveBrowserKeyInput, operationOptions?: IBrowserRuntimeOperationOptions): Promise<void>;