@qoniai/qoni 0.5.2 → 0.6.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 +9 -0
- package/README.md +8 -1
- package/README.zh-CN.md +4 -1
- package/dist/index.cjs +14 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -2
- package/dist/index.d.ts +15 -2
- package/dist/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -445,6 +445,8 @@ declare const QoniEventTypes: {
|
|
|
445
445
|
readonly Interaction: "interaction";
|
|
446
446
|
/** A live screenshot frame (opt in with `capture: { screenshots: true }`); image on `event.image`. */
|
|
447
447
|
readonly Screenshot: "screenshot";
|
|
448
|
+
/** The browser viewer moved to a new page or needs a fresh attachment. Use `event.data.liveUrl` for the live preview. */
|
|
449
|
+
readonly BrowserLiveUrlChanged: "browserLiveUrlChanged";
|
|
448
450
|
/** Terminal — the run finished; outcome + output in `event.data` (cost is on the `RunResult`). */
|
|
449
451
|
readonly Done: "done";
|
|
450
452
|
/** Web Search results are ready; `event.data` is the count (the list is in `done.output`). */
|
|
@@ -487,6 +489,13 @@ interface RunScreenshotData {
|
|
|
487
489
|
pageUrl?: string;
|
|
488
490
|
step?: number;
|
|
489
491
|
}
|
|
492
|
+
/** `browserLiveUrlChanged` — the provider's live viewer URL can rotate as tabs change. */
|
|
493
|
+
interface RunBrowserLiveUrlChangedData {
|
|
494
|
+
liveUrl: string;
|
|
495
|
+
supportsLivePump: boolean;
|
|
496
|
+
forceViewerReload: boolean;
|
|
497
|
+
providerSessionId?: string;
|
|
498
|
+
}
|
|
490
499
|
/** `done` — terminal outcome + final output. (Total cost is on the `RunResult`.) */
|
|
491
500
|
interface RunDoneData {
|
|
492
501
|
output?: unknown;
|
|
@@ -510,6 +519,10 @@ type RunEvent = (RunEventBase & {
|
|
|
510
519
|
data: RunScreenshotData;
|
|
511
520
|
image: RunImage;
|
|
512
521
|
isTerminal: false;
|
|
522
|
+
}) | (RunEventBase & {
|
|
523
|
+
type: "browserLiveUrlChanged";
|
|
524
|
+
data: RunBrowserLiveUrlChangedData;
|
|
525
|
+
isTerminal: false;
|
|
513
526
|
}) | (RunEventBase & {
|
|
514
527
|
type: "done";
|
|
515
528
|
data: RunDoneData;
|
|
@@ -541,7 +554,7 @@ type RunEvent = (RunEventBase & {
|
|
|
541
554
|
});
|
|
542
555
|
/** Events any product run can emit. */
|
|
543
556
|
type CoreRunEvent = Extract<RunEvent, {
|
|
544
|
-
type: "progress" | "message" | "interaction" | "screenshot" | "done";
|
|
557
|
+
type: "progress" | "message" | "interaction" | "screenshot" | "browserLiveUrlChanged" | "done";
|
|
545
558
|
}>;
|
|
546
559
|
/** Do Anything — core events only. */
|
|
547
560
|
type DoAnythingEvent = CoreRunEvent;
|
|
@@ -1394,4 +1407,4 @@ declare const QoniScopeBundles: {
|
|
|
1394
1407
|
readonly TRACK: readonly ["webagent.track:read", "webagent.track:manage"];
|
|
1395
1408
|
};
|
|
1396
1409
|
|
|
1397
|
-
export { type Action, type ActionKind, ActionKinds, type Artifact, type BrowserProxyOptions, type BrowserbaseRegion, type CaptureOptions, type ClarificationPayload, type CompleteDelegateAgentInput, type CompleteDelegateTokenInput, type ConfirmationPayload, type CoreRunEvent, type DeepResearchAttachOptions, type DeepResearchEvent, type DeepResearchRunOptions, type DelegateAgentInput, type DelegateAgentResponse, type DelegateAgentTokenResponse, type DelegateTokenInput, type DelegateTokenInteractiveInput, type DelegateTokenResponse, type DelegateTokenResult, type DelegateTokenSilentInput, type DelegateTokenSilentResponse, type DelegationMode, type DelegationTokenResponse, type DoAnythingAttachOptions, type DoAnythingEvent, type DoAnythingRunOptions, type DoAnythingSnapshot, type GenAuthAccessTokenInput, type GenAuthAdminToken, type GenAuthAdminTokenOverrideInput, type GenAuthDelegationIntrospectionInput, type GenAuthUserCreateBatchInput, type GenAuthUserCreateInput, type GenAuthUserDeleteBatchInput, type GenAuthUserGetBatchInput, type GenAuthUserGetInput, type GenAuthUserListInput, type GenAuthUserUpdateInput, type Interaction, type InteractionEvidence, InteractionHandle, type InteractionPayloadByType, type InteractionSite, type InteractionStatus, InteractionStatuses, type InteractionType, InteractionTypes, type InteractiveDelegationResponse, type JsonObject, type MonitorEvent, type MonitorEventsOptions, MonitorHandle, type MonitorRunsOptions, Qoni, QoniAuthError, QoniDelegationRequiredError, QoniError, type QoniErrorCode, type QoniErrorOptions, type QoniEvent, type QoniEventType, QoniEventTypes, type QoniMeta, type QoniOptions, QoniPermissionDeniedError, type QoniProduct, type QoniProductName, QoniProductScopes, QoniRateLimitError, type QoniResponse, type QoniRuntimeConfig, type QoniSSEEvent, QoniScopeBundles, QoniScopes, QoniTimeoutError, QoniTokenExpiredError, QoniUpstreamError, QoniValidationError, type RawRequestInput, type RunDoneData, type RunEvent, type RunEventsOptions, RunHandle, type RunImage, type RunLimits, type RunMessageData, type RunReconnectInfo, type RunResult, type RunScreenshotData, type RunStatus, type RunWaitOptions, type RuntimeTokenInput, type SessionRef, type SiteLoginPayload, type SnapshotAction, type SnapshotImage, type TakeControlPayload, type TokenInput, type TrackAttachOptions, type TrackCreateOptions, type WaitKind, type WaitPayload, type WebSearchAttachOptions, type WebSearchEvent, type WebSearchRunOptions, buildAuthorization, buildSignature, buildStringToSign };
|
|
1410
|
+
export { type Action, type ActionKind, ActionKinds, type Artifact, type BrowserProxyOptions, type BrowserbaseRegion, type CaptureOptions, type ClarificationPayload, type CompleteDelegateAgentInput, type CompleteDelegateTokenInput, type ConfirmationPayload, type CoreRunEvent, type DeepResearchAttachOptions, type DeepResearchEvent, type DeepResearchRunOptions, type DelegateAgentInput, type DelegateAgentResponse, type DelegateAgentTokenResponse, type DelegateTokenInput, type DelegateTokenInteractiveInput, type DelegateTokenResponse, type DelegateTokenResult, type DelegateTokenSilentInput, type DelegateTokenSilentResponse, type DelegationMode, type DelegationTokenResponse, type DoAnythingAttachOptions, type DoAnythingEvent, type DoAnythingRunOptions, type DoAnythingSnapshot, type GenAuthAccessTokenInput, type GenAuthAdminToken, type GenAuthAdminTokenOverrideInput, type GenAuthDelegationIntrospectionInput, type GenAuthUserCreateBatchInput, type GenAuthUserCreateInput, type GenAuthUserDeleteBatchInput, type GenAuthUserGetBatchInput, type GenAuthUserGetInput, type GenAuthUserListInput, type GenAuthUserUpdateInput, type Interaction, type InteractionEvidence, InteractionHandle, type InteractionPayloadByType, type InteractionSite, type InteractionStatus, InteractionStatuses, type InteractionType, InteractionTypes, type InteractiveDelegationResponse, type JsonObject, type MonitorEvent, type MonitorEventsOptions, MonitorHandle, type MonitorRunsOptions, Qoni, QoniAuthError, QoniDelegationRequiredError, QoniError, type QoniErrorCode, type QoniErrorOptions, type QoniEvent, type QoniEventType, QoniEventTypes, type QoniMeta, type QoniOptions, QoniPermissionDeniedError, type QoniProduct, type QoniProductName, QoniProductScopes, QoniRateLimitError, type QoniResponse, type QoniRuntimeConfig, type QoniSSEEvent, QoniScopeBundles, QoniScopes, QoniTimeoutError, QoniTokenExpiredError, QoniUpstreamError, QoniValidationError, type RawRequestInput, type RunBrowserLiveUrlChangedData, type RunDoneData, type RunEvent, type RunEventsOptions, RunHandle, type RunImage, type RunLimits, type RunMessageData, type RunReconnectInfo, type RunResult, type RunScreenshotData, type RunStatus, type RunWaitOptions, type RuntimeTokenInput, type SessionRef, type SiteLoginPayload, type SnapshotAction, type SnapshotImage, type TakeControlPayload, type TokenInput, type TrackAttachOptions, type TrackCreateOptions, type WaitKind, type WaitPayload, type WebSearchAttachOptions, type WebSearchEvent, type WebSearchRunOptions, buildAuthorization, buildSignature, buildStringToSign };
|
package/dist/index.d.ts
CHANGED
|
@@ -445,6 +445,8 @@ declare const QoniEventTypes: {
|
|
|
445
445
|
readonly Interaction: "interaction";
|
|
446
446
|
/** A live screenshot frame (opt in with `capture: { screenshots: true }`); image on `event.image`. */
|
|
447
447
|
readonly Screenshot: "screenshot";
|
|
448
|
+
/** The browser viewer moved to a new page or needs a fresh attachment. Use `event.data.liveUrl` for the live preview. */
|
|
449
|
+
readonly BrowserLiveUrlChanged: "browserLiveUrlChanged";
|
|
448
450
|
/** Terminal — the run finished; outcome + output in `event.data` (cost is on the `RunResult`). */
|
|
449
451
|
readonly Done: "done";
|
|
450
452
|
/** Web Search results are ready; `event.data` is the count (the list is in `done.output`). */
|
|
@@ -487,6 +489,13 @@ interface RunScreenshotData {
|
|
|
487
489
|
pageUrl?: string;
|
|
488
490
|
step?: number;
|
|
489
491
|
}
|
|
492
|
+
/** `browserLiveUrlChanged` — the provider's live viewer URL can rotate as tabs change. */
|
|
493
|
+
interface RunBrowserLiveUrlChangedData {
|
|
494
|
+
liveUrl: string;
|
|
495
|
+
supportsLivePump: boolean;
|
|
496
|
+
forceViewerReload: boolean;
|
|
497
|
+
providerSessionId?: string;
|
|
498
|
+
}
|
|
490
499
|
/** `done` — terminal outcome + final output. (Total cost is on the `RunResult`.) */
|
|
491
500
|
interface RunDoneData {
|
|
492
501
|
output?: unknown;
|
|
@@ -510,6 +519,10 @@ type RunEvent = (RunEventBase & {
|
|
|
510
519
|
data: RunScreenshotData;
|
|
511
520
|
image: RunImage;
|
|
512
521
|
isTerminal: false;
|
|
522
|
+
}) | (RunEventBase & {
|
|
523
|
+
type: "browserLiveUrlChanged";
|
|
524
|
+
data: RunBrowserLiveUrlChangedData;
|
|
525
|
+
isTerminal: false;
|
|
513
526
|
}) | (RunEventBase & {
|
|
514
527
|
type: "done";
|
|
515
528
|
data: RunDoneData;
|
|
@@ -541,7 +554,7 @@ type RunEvent = (RunEventBase & {
|
|
|
541
554
|
});
|
|
542
555
|
/** Events any product run can emit. */
|
|
543
556
|
type CoreRunEvent = Extract<RunEvent, {
|
|
544
|
-
type: "progress" | "message" | "interaction" | "screenshot" | "done";
|
|
557
|
+
type: "progress" | "message" | "interaction" | "screenshot" | "browserLiveUrlChanged" | "done";
|
|
545
558
|
}>;
|
|
546
559
|
/** Do Anything — core events only. */
|
|
547
560
|
type DoAnythingEvent = CoreRunEvent;
|
|
@@ -1394,4 +1407,4 @@ declare const QoniScopeBundles: {
|
|
|
1394
1407
|
readonly TRACK: readonly ["webagent.track:read", "webagent.track:manage"];
|
|
1395
1408
|
};
|
|
1396
1409
|
|
|
1397
|
-
export { type Action, type ActionKind, ActionKinds, type Artifact, type BrowserProxyOptions, type BrowserbaseRegion, type CaptureOptions, type ClarificationPayload, type CompleteDelegateAgentInput, type CompleteDelegateTokenInput, type ConfirmationPayload, type CoreRunEvent, type DeepResearchAttachOptions, type DeepResearchEvent, type DeepResearchRunOptions, type DelegateAgentInput, type DelegateAgentResponse, type DelegateAgentTokenResponse, type DelegateTokenInput, type DelegateTokenInteractiveInput, type DelegateTokenResponse, type DelegateTokenResult, type DelegateTokenSilentInput, type DelegateTokenSilentResponse, type DelegationMode, type DelegationTokenResponse, type DoAnythingAttachOptions, type DoAnythingEvent, type DoAnythingRunOptions, type DoAnythingSnapshot, type GenAuthAccessTokenInput, type GenAuthAdminToken, type GenAuthAdminTokenOverrideInput, type GenAuthDelegationIntrospectionInput, type GenAuthUserCreateBatchInput, type GenAuthUserCreateInput, type GenAuthUserDeleteBatchInput, type GenAuthUserGetBatchInput, type GenAuthUserGetInput, type GenAuthUserListInput, type GenAuthUserUpdateInput, type Interaction, type InteractionEvidence, InteractionHandle, type InteractionPayloadByType, type InteractionSite, type InteractionStatus, InteractionStatuses, type InteractionType, InteractionTypes, type InteractiveDelegationResponse, type JsonObject, type MonitorEvent, type MonitorEventsOptions, MonitorHandle, type MonitorRunsOptions, Qoni, QoniAuthError, QoniDelegationRequiredError, QoniError, type QoniErrorCode, type QoniErrorOptions, type QoniEvent, type QoniEventType, QoniEventTypes, type QoniMeta, type QoniOptions, QoniPermissionDeniedError, type QoniProduct, type QoniProductName, QoniProductScopes, QoniRateLimitError, type QoniResponse, type QoniRuntimeConfig, type QoniSSEEvent, QoniScopeBundles, QoniScopes, QoniTimeoutError, QoniTokenExpiredError, QoniUpstreamError, QoniValidationError, type RawRequestInput, type RunDoneData, type RunEvent, type RunEventsOptions, RunHandle, type RunImage, type RunLimits, type RunMessageData, type RunReconnectInfo, type RunResult, type RunScreenshotData, type RunStatus, type RunWaitOptions, type RuntimeTokenInput, type SessionRef, type SiteLoginPayload, type SnapshotAction, type SnapshotImage, type TakeControlPayload, type TokenInput, type TrackAttachOptions, type TrackCreateOptions, type WaitKind, type WaitPayload, type WebSearchAttachOptions, type WebSearchEvent, type WebSearchRunOptions, buildAuthorization, buildSignature, buildStringToSign };
|
|
1410
|
+
export { type Action, type ActionKind, ActionKinds, type Artifact, type BrowserProxyOptions, type BrowserbaseRegion, type CaptureOptions, type ClarificationPayload, type CompleteDelegateAgentInput, type CompleteDelegateTokenInput, type ConfirmationPayload, type CoreRunEvent, type DeepResearchAttachOptions, type DeepResearchEvent, type DeepResearchRunOptions, type DelegateAgentInput, type DelegateAgentResponse, type DelegateAgentTokenResponse, type DelegateTokenInput, type DelegateTokenInteractiveInput, type DelegateTokenResponse, type DelegateTokenResult, type DelegateTokenSilentInput, type DelegateTokenSilentResponse, type DelegationMode, type DelegationTokenResponse, type DoAnythingAttachOptions, type DoAnythingEvent, type DoAnythingRunOptions, type DoAnythingSnapshot, type GenAuthAccessTokenInput, type GenAuthAdminToken, type GenAuthAdminTokenOverrideInput, type GenAuthDelegationIntrospectionInput, type GenAuthUserCreateBatchInput, type GenAuthUserCreateInput, type GenAuthUserDeleteBatchInput, type GenAuthUserGetBatchInput, type GenAuthUserGetInput, type GenAuthUserListInput, type GenAuthUserUpdateInput, type Interaction, type InteractionEvidence, InteractionHandle, type InteractionPayloadByType, type InteractionSite, type InteractionStatus, InteractionStatuses, type InteractionType, InteractionTypes, type InteractiveDelegationResponse, type JsonObject, type MonitorEvent, type MonitorEventsOptions, MonitorHandle, type MonitorRunsOptions, Qoni, QoniAuthError, QoniDelegationRequiredError, QoniError, type QoniErrorCode, type QoniErrorOptions, type QoniEvent, type QoniEventType, QoniEventTypes, type QoniMeta, type QoniOptions, QoniPermissionDeniedError, type QoniProduct, type QoniProductName, QoniProductScopes, QoniRateLimitError, type QoniResponse, type QoniRuntimeConfig, type QoniSSEEvent, QoniScopeBundles, QoniScopes, QoniTimeoutError, QoniTokenExpiredError, QoniUpstreamError, QoniValidationError, type RawRequestInput, type RunBrowserLiveUrlChangedData, type RunDoneData, type RunEvent, type RunEventsOptions, RunHandle, type RunImage, type RunLimits, type RunMessageData, type RunReconnectInfo, type RunResult, type RunScreenshotData, type RunStatus, type RunWaitOptions, type RuntimeTokenInput, type SessionRef, type SiteLoginPayload, type SnapshotAction, type SnapshotImage, type TakeControlPayload, type TokenInput, type TrackAttachOptions, type TrackCreateOptions, type WaitKind, type WaitPayload, type WebSearchAttachOptions, type WebSearchEvent, type WebSearchRunOptions, buildAuthorization, buildSignature, buildStringToSign };
|
package/dist/index.js
CHANGED
|
@@ -230,6 +230,8 @@ var QoniEventTypes = {
|
|
|
230
230
|
Interaction: "interaction",
|
|
231
231
|
/** A live screenshot frame (opt in with `capture: { screenshots: true }`); image on `event.image`. */
|
|
232
232
|
Screenshot: "screenshot",
|
|
233
|
+
/** The browser viewer moved to a new page or needs a fresh attachment. Use `event.data.liveUrl` for the live preview. */
|
|
234
|
+
BrowserLiveUrlChanged: "browserLiveUrlChanged",
|
|
233
235
|
/** Terminal — the run finished; outcome + output in `event.data` (cost is on the `RunResult`). */
|
|
234
236
|
Done: "done",
|
|
235
237
|
// --- Web Search ---
|
|
@@ -360,7 +362,6 @@ var WIRE_TO_SEMANTIC = {
|
|
|
360
362
|
"run.recording_started": "progress",
|
|
361
363
|
"run.recording_paused": "progress",
|
|
362
364
|
"run.recording_finalized": "progress",
|
|
363
|
-
"run.browser_live_url_changed": "progress",
|
|
364
365
|
// side-channel
|
|
365
366
|
"run.feedback_submitted": "progress"
|
|
366
367
|
};
|
|
@@ -422,6 +423,18 @@ function normalizeRunEvent(wire, options = {}) {
|
|
|
422
423
|
return { ...base, type: "screenshot", data: sData, image, isTerminal: false };
|
|
423
424
|
}
|
|
424
425
|
}
|
|
426
|
+
if (wireType === "run.browser_live_url_changed") {
|
|
427
|
+
const liveUrl = asString(c.liveUrl);
|
|
428
|
+
if (!liveUrl) return null;
|
|
429
|
+
const data2 = {
|
|
430
|
+
liveUrl,
|
|
431
|
+
supportsLivePump: c.supportsLivePump === true,
|
|
432
|
+
forceViewerReload: c.forceViewerReload === true
|
|
433
|
+
};
|
|
434
|
+
const providerSessionId = asString(c.providerSessionId);
|
|
435
|
+
if (providerSessionId) data2.providerSessionId = providerSessionId;
|
|
436
|
+
return { ...base, type: "browserLiveUrlChanged", data: data2, isTerminal: false };
|
|
437
|
+
}
|
|
425
438
|
if (wireType === INTERACTION) {
|
|
426
439
|
const interaction = normalizeInteraction(payload);
|
|
427
440
|
if (interaction) {
|