@modelprofile.com/browser-runtime 3.0.1 → 3.1.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 +10 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/classes.runtime.d.ts +42 -1
- package/dist_ts/classes.runtime.js +430 -31
- package/dist_ts/errors.d.ts +1 -1
- package/dist_ts/errors.js +2 -1
- package/dist_ts/interfaces.d.ts +2 -1
- package/package.json +2 -2
- package/readme.hints.md +2 -0
- package/readme.md +4 -2
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/classes.runtime.ts +534 -32
- package/ts/errors.ts +2 -0
- package/ts/interfaces.ts +4 -0
package/changelog.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026-08-23 - 3.1.0
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- add human frame stream refresh operation (frame-stream)
|
|
8
|
+
- Expose refreshFrameStream() on human leases with audited FIFO execution under the new frame-stream classification.
|
|
9
|
+
- Validate refreshed screencast boundaries and surface FRAME_STREAM_FAILED for refresh protocol failures.
|
|
10
|
+
- Keep refresh-owned acknowledgements within the configured outstanding frame window.
|
|
11
|
+
- Update SmartPuppeteer to ^2.5.0 for screencast refresh support.
|
|
12
|
+
|
|
3
13
|
## 2026-08-15 - 3.0.1
|
|
4
14
|
|
|
5
15
|
### Fixes
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@modelprofile.com/browser-runtime',
|
|
6
|
-
version: '3.0
|
|
6
|
+
version: '3.1.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=
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as plugins from './plugins.js';
|
|
2
2
|
import { BrowserArtifactStore } from './classes.artifactstore.js';
|
|
3
3
|
import { BrowserEgressProxy } from './classes.egressproxy.js';
|
|
4
|
+
import { BrowserRuntimeError } from './errors.js';
|
|
4
5
|
import { type IBrowserRuntimeTestingOptions } from './internal.testing.js';
|
|
5
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
7
|
import { TransitionMutex } from './utils.js';
|
|
@@ -52,6 +53,7 @@ interface IQueuedOperationRecord {
|
|
|
52
53
|
onOperationStarted?: (operationId: string) => void;
|
|
53
54
|
signal: AbortSignal;
|
|
54
55
|
execute: (signal: AbortSignal, session: ILiveBrowserSessionLike) => Promise<unknown>;
|
|
56
|
+
finalize?: () => Promise<void>;
|
|
55
57
|
resolve(value: unknown): void;
|
|
56
58
|
reject(error: unknown): void;
|
|
57
59
|
state: 'queued' | 'starting' | 'active' | 'settled';
|
|
@@ -59,10 +61,18 @@ interface IQueuedOperationRecord {
|
|
|
59
61
|
}
|
|
60
62
|
interface IOutstandingFrameRecord {
|
|
61
63
|
acknowledgement: plugins.smartpuppeteer.ILiveBrowserFrameAcknowledgementRequest;
|
|
62
|
-
timer
|
|
64
|
+
timer?: ReturnType<typeof setTimeout>;
|
|
63
65
|
session: ILiveBrowserSessionLike;
|
|
64
66
|
incarnationGeneration: number;
|
|
65
67
|
}
|
|
68
|
+
type TFrameAcknowledgementOutcome = {
|
|
69
|
+
status: 'fulfilled';
|
|
70
|
+
accepted: boolean;
|
|
71
|
+
} | {
|
|
72
|
+
status: 'rejected';
|
|
73
|
+
} | {
|
|
74
|
+
status: 'timedOut';
|
|
75
|
+
};
|
|
66
76
|
interface IFrameSubscriptionRecord {
|
|
67
77
|
lease: ILeaseRecord;
|
|
68
78
|
listener: (event: TBrowserRuntimeEvent) => void;
|
|
@@ -70,6 +80,22 @@ interface IFrameSubscriptionRecord {
|
|
|
70
80
|
highestSequence: number;
|
|
71
81
|
closed: boolean;
|
|
72
82
|
}
|
|
83
|
+
interface IFrameRefreshRecord {
|
|
84
|
+
lease: ILeaseRecord;
|
|
85
|
+
subscription: IFrameSubscriptionRecord;
|
|
86
|
+
session: ILiveBrowserSessionLike;
|
|
87
|
+
incarnationGeneration: number;
|
|
88
|
+
initialTabId: string;
|
|
89
|
+
initialGeneration: number;
|
|
90
|
+
initialViewportRevision: number;
|
|
91
|
+
startingHighestSequence: number;
|
|
92
|
+
pendingAcknowledgements: Set<Promise<TFrameAcknowledgementOutcome>>;
|
|
93
|
+
refreshStarted: boolean;
|
|
94
|
+
admissionClosed: boolean;
|
|
95
|
+
abandoned: boolean;
|
|
96
|
+
boundaryCandidate?: plugins.smartpuppeteer.ILiveBrowserFrameIdentity;
|
|
97
|
+
failure?: BrowserRuntimeError;
|
|
98
|
+
}
|
|
73
99
|
interface IResourceSlot {
|
|
74
100
|
projectId: string;
|
|
75
101
|
browserResourceId: string;
|
|
@@ -93,6 +119,7 @@ interface IResourceSlot {
|
|
|
93
119
|
operationQueue: IQueuedOperationRecord[];
|
|
94
120
|
operationSchedulerRunning: boolean;
|
|
95
121
|
frameSubscription?: IFrameSubscriptionRecord;
|
|
122
|
+
frameRefresh?: IFrameRefreshRecord;
|
|
96
123
|
idleTimer?: ReturnType<typeof setTimeout>;
|
|
97
124
|
lifecycleTail: Promise<void>;
|
|
98
125
|
lifecycleOperationCount: number;
|
|
@@ -176,6 +203,8 @@ export declare class BrowserRuntime {
|
|
|
176
203
|
/** @internal */
|
|
177
204
|
leaseSetViewport(lease: ILeaseRecord, viewport: plugins.smartpuppeteer.ILiveBrowserViewport, operationOptions?: IBrowserRuntimeOperationOptions): Promise<void>;
|
|
178
205
|
/** @internal */
|
|
206
|
+
leaseRefreshFrameStream(lease: ILeaseRecord, operationOptions?: IBrowserRuntimeOperationOptions): Promise<void>;
|
|
207
|
+
/** @internal */
|
|
179
208
|
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>;
|
|
180
209
|
/** @internal */
|
|
181
210
|
subscribeLeaseEvents(lease: ILeaseRecord, listener: (event: TBrowserRuntimeEvent) => void): Promise<IBrowserRuntimeFrameSubscription>;
|
|
@@ -210,6 +239,17 @@ export declare class BrowserRuntime {
|
|
|
210
239
|
private executeAgentActionInternal;
|
|
211
240
|
private resolveSemanticTarget;
|
|
212
241
|
private resourceState;
|
|
242
|
+
private beginFrameRefresh;
|
|
243
|
+
private executeFrameRefresh;
|
|
244
|
+
private drainFrameRefreshOutstanding;
|
|
245
|
+
private validateFrameRefreshBoundary;
|
|
246
|
+
private reconcileFrameRefreshOutstanding;
|
|
247
|
+
private beginFrameAcknowledgement;
|
|
248
|
+
private failFrameRefresh;
|
|
249
|
+
private finalizeFrameRefresh;
|
|
250
|
+
private abandonFrameRefresh;
|
|
251
|
+
private armFrameAcknowledgementTimer;
|
|
252
|
+
private matchingFrameRefresh;
|
|
213
253
|
private handleSessionEvent;
|
|
214
254
|
private pushToSubscription;
|
|
215
255
|
private closeFrameSubscription;
|
|
@@ -299,6 +339,7 @@ export declare class BrowserRuntimeLease {
|
|
|
299
339
|
insertText(input: plugins.smartpuppeteer.ILiveBrowserInsertTextInput, operationOptions?: IBrowserRuntimeOperationOptions): Promise<void>;
|
|
300
340
|
subscribeEvents(listener: (event: TBrowserRuntimeEvent) => void): Promise<IBrowserRuntimeFrameSubscription>;
|
|
301
341
|
acknowledgeFrame(acknowledgement: plugins.smartpuppeteer.ILiveBrowserFrameAcknowledgementRequest): Promise<boolean>;
|
|
342
|
+
refreshFrameStream(operationOptions?: IBrowserRuntimeOperationOptions): Promise<void>;
|
|
302
343
|
readArtifact(artifactId: string): Promise<Uint8Array>;
|
|
303
344
|
deleteArtifact(artifactId: string): Promise<void>;
|
|
304
345
|
cancelActiveOperation(): boolean;
|