@qoniai/qoni 0.6.0 → 0.7.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 +45 -0
- package/README.md +44 -5
- package/README.zh-CN.md +32 -5
- package/dist/index.cjs +291 -146
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +87 -7
- package/dist/index.d.ts +87 -7
- package/dist/index.js +291 -146
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -363,7 +363,70 @@ interface Interaction<T extends InteractionType = InteractionType> {
|
|
|
363
363
|
* supplies this (token + run addressing already bound); the handle below uses
|
|
364
364
|
* it to invoke `action.endpoint` without the consumer touching HTTP.
|
|
365
365
|
*/
|
|
366
|
-
type InteractionActionPoster = (action: Action, body: JsonObject | undefined
|
|
366
|
+
type InteractionActionPoster = (action: Action, body: JsonObject | undefined, options?: {
|
|
367
|
+
requiredScopes?: readonly string[];
|
|
368
|
+
}) => Promise<unknown>;
|
|
369
|
+
/** Options for {@link InteractionHandle.openLogin}. */
|
|
370
|
+
interface OpenLoginOptions {
|
|
371
|
+
/**
|
|
372
|
+
* Site to sign in to — one of `interaction.payload.sites[].siteId`. May be
|
|
373
|
+
* omitted when the interaction lists exactly one site.
|
|
374
|
+
*/
|
|
375
|
+
siteId?: string;
|
|
376
|
+
/** Re-login an existing browser profile in place instead of creating one. */
|
|
377
|
+
profileId?: string;
|
|
378
|
+
}
|
|
379
|
+
/** Interactive login session started by {@link InteractionHandle.openLogin}. */
|
|
380
|
+
interface OpenLoginResult {
|
|
381
|
+
profileId: string;
|
|
382
|
+
siteId: string;
|
|
383
|
+
/** Login browser session the user signs in through. */
|
|
384
|
+
sessionId: string;
|
|
385
|
+
/** Live view URL of the login browser to show to the user. */
|
|
386
|
+
liveUrl: string;
|
|
387
|
+
/** Unmodified response body (escape hatch — shape may evolve with the API). */
|
|
388
|
+
raw: JsonObject;
|
|
389
|
+
/**
|
|
390
|
+
* Persist the login into the profile after the user signs in
|
|
391
|
+
* (`POST /profiles/{profileId}/confirm`). Confirming ends this login
|
|
392
|
+
* session and closes its browser, whatever the outcome:
|
|
393
|
+
*
|
|
394
|
+
* - `active: true` — the login is saved; call
|
|
395
|
+
* {@link InteractionHandle.confirmSignedIn}.
|
|
396
|
+
* - `active: false` with `probeResult: "no_session"` — the backend no longer
|
|
397
|
+
* holds the session (it may already have saved the login automatically, or
|
|
398
|
+
* restarted). Call `confirmSignedIn()`: the agent rechecks the site and
|
|
399
|
+
* raises a new `site_login` interaction if it is still signed out.
|
|
400
|
+
* - Rejects with a `QoniError` whose `code` is `no_pending_login` (HTTP 409)
|
|
401
|
+
* when the backend has no pending login for this profile: the session
|
|
402
|
+
* already ended on providers that report it this way, or the profile no
|
|
403
|
+
* longer exists for this user. Handle it like `no_session`: call
|
|
404
|
+
* `confirmSignedIn()`, and the agent asks again if it is still signed out.
|
|
405
|
+
* - `active: false` with any other `probeResult` — the user was not signed
|
|
406
|
+
* in. Start a new session with `openLogin({ siteId, profileId })` and show
|
|
407
|
+
* its new `liveUrl`; the old one no longer works.
|
|
408
|
+
*
|
|
409
|
+
* Requires `QoniScopes.SITE_LOGIN_CONFIRM`.
|
|
410
|
+
*/
|
|
411
|
+
confirm(options?: ConfirmLoginOptions): Promise<ConfirmLoginResult>;
|
|
412
|
+
}
|
|
413
|
+
/** Options for {@link OpenLoginResult.confirm}. */
|
|
414
|
+
interface ConfirmLoginOptions {
|
|
415
|
+
/** Optional human-readable label stored on the profile. */
|
|
416
|
+
displayLabel?: string;
|
|
417
|
+
}
|
|
418
|
+
/** Result of {@link OpenLoginResult.confirm}. */
|
|
419
|
+
interface ConfirmLoginResult {
|
|
420
|
+
profileId: string;
|
|
421
|
+
/** True only when the profile is now `active` (the login was captured). */
|
|
422
|
+
active: boolean;
|
|
423
|
+
/** Profile state after confirmation: `active`, or `pending_login` when no signed-in session was detected. */
|
|
424
|
+
state: string;
|
|
425
|
+
/** Outcome of the backend's signed-in probe, for example `no_session`. */
|
|
426
|
+
probeResult: string;
|
|
427
|
+
/** Unmodified response body (escape hatch — shape may evolve with the API). */
|
|
428
|
+
raw: JsonObject;
|
|
429
|
+
}
|
|
367
430
|
/**
|
|
368
431
|
* Typed wrapper over an {@link Interaction} that exposes one method per
|
|
369
432
|
* action kind. Each method finds the matching declared action and posts to its
|
|
@@ -372,6 +435,7 @@ type InteractionActionPoster = (action: Action, body: JsonObject | undefined) =>
|
|
|
372
435
|
* backend offered it).
|
|
373
436
|
*/
|
|
374
437
|
declare class InteractionHandle<T extends InteractionType = InteractionType> {
|
|
438
|
+
#private;
|
|
375
439
|
private readonly post;
|
|
376
440
|
readonly interaction: Interaction<T>;
|
|
377
441
|
constructor(interaction: Interaction<T>, post: InteractionActionPoster);
|
|
@@ -389,8 +453,16 @@ declare class InteractionHandle<T extends InteractionType = InteractionType> {
|
|
|
389
453
|
confirm(): Promise<void>;
|
|
390
454
|
/** Reject a pending confirmation. */
|
|
391
455
|
reject(): Promise<void>;
|
|
392
|
-
/**
|
|
393
|
-
|
|
456
|
+
/**
|
|
457
|
+
* Start an interactive login session for a `site_login` interaction. The
|
|
458
|
+
* backend needs the site to sign in to: pass `siteId`, or omit it when the
|
|
459
|
+
* interaction lists exactly one site. Show `liveUrl` to the user; when they
|
|
460
|
+
* finish, call `confirm()` on the result to save the login, and act on its
|
|
461
|
+
* outcome (see {@link OpenLoginResult.confirm}) before {@link confirmSignedIn}.
|
|
462
|
+
* The delegation must include `QoniScopes.SITE_LOGIN_REQUEST` and
|
|
463
|
+
* `QoniScopes.SITE_LOGIN_CONFIRM`; the AccessKey policy must allow both.
|
|
464
|
+
*/
|
|
465
|
+
openLogin(options?: OpenLoginOptions): Promise<OpenLoginResult>;
|
|
394
466
|
/** Tell the agent the user has finished signing in. */
|
|
395
467
|
confirmSignedIn(): Promise<void>;
|
|
396
468
|
/** Connect to the live browser for a take_control interaction. */
|
|
@@ -663,7 +735,9 @@ interface RunWireOps {
|
|
|
663
735
|
* Interaction model's `actions[]` carry the endpoint + method, so the SDK
|
|
664
736
|
* never hard-codes a HITL route — it forwards what the backend declared.
|
|
665
737
|
*/
|
|
666
|
-
postAction(action: Action, body: JsonObject | undefined
|
|
738
|
+
postAction(action: Action, body: JsonObject | undefined, options?: {
|
|
739
|
+
requiredScopes?: readonly string[];
|
|
740
|
+
}): Promise<unknown>;
|
|
667
741
|
cancel(reason?: string): Promise<JsonObject>;
|
|
668
742
|
/** Products without artifacts leave this undefined → `result.artifacts` is []. */
|
|
669
743
|
listArtifacts?(signal?: AbortSignal): Promise<Artifact[]>;
|
|
@@ -1090,10 +1164,12 @@ interface MonitorRunsOptions {
|
|
|
1090
1164
|
/** A monitor's check cadence. */
|
|
1091
1165
|
type MonitorSchedule = {
|
|
1092
1166
|
kind: "cron";
|
|
1093
|
-
expr: string;
|
|
1167
|
+
expr: string; /** IANA time zone for the cron expression. */
|
|
1168
|
+
tz?: string;
|
|
1094
1169
|
} | {
|
|
1095
1170
|
kind: "interval";
|
|
1096
1171
|
intervalSeconds: number;
|
|
1172
|
+
tz?: string;
|
|
1097
1173
|
};
|
|
1098
1174
|
/**
|
|
1099
1175
|
* Fields to change on a monitor via {@link MonitorHandle.refine}. Pass any
|
|
@@ -1115,7 +1191,9 @@ interface MonitorWireOps {
|
|
|
1115
1191
|
update(input: JsonObject): Promise<JsonObject>;
|
|
1116
1192
|
runNow(): Promise<JsonObject>;
|
|
1117
1193
|
streamEvents(opts: MonitorEventsOptions): AsyncIterable<QoniEvent<unknown>>;
|
|
1118
|
-
postAction(action: Action, body: JsonObject | undefined
|
|
1194
|
+
postAction(action: Action, body: JsonObject | undefined, options?: {
|
|
1195
|
+
requiredScopes?: readonly string[];
|
|
1196
|
+
}): Promise<unknown>;
|
|
1119
1197
|
listRuns(opts: MonitorRunsOptions): Promise<JsonObject>;
|
|
1120
1198
|
getRun(runId: string): Promise<JsonObject>;
|
|
1121
1199
|
delete(): Promise<void>;
|
|
@@ -1388,6 +1466,8 @@ declare const QoniScopes: {
|
|
|
1388
1466
|
readonly DEEP_RESEARCH_MANAGE: "webagent.deep_research:manage";
|
|
1389
1467
|
readonly TRACK_READ: "webagent.track:read";
|
|
1390
1468
|
readonly TRACK_MANAGE: "webagent.track:manage";
|
|
1469
|
+
readonly SITE_LOGIN_REQUEST: "webagent.site_login:request";
|
|
1470
|
+
readonly SITE_LOGIN_CONFIRM: "webagent.site_login:confirm";
|
|
1391
1471
|
};
|
|
1392
1472
|
type QoniScope = (typeof QoniScopes)[keyof typeof QoniScopes];
|
|
1393
1473
|
/** Product names accepted by `delegateToken({ products })`. */
|
|
@@ -1407,4 +1487,4 @@ declare const QoniScopeBundles: {
|
|
|
1407
1487
|
readonly TRACK: readonly ["webagent.track:read", "webagent.track:manage"];
|
|
1408
1488
|
};
|
|
1409
1489
|
|
|
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 };
|
|
1490
|
+
export { type Action, type ActionKind, ActionKinds, type Artifact, type BrowserProxyOptions, type BrowserbaseRegion, type CaptureOptions, type ClarificationPayload, type CompleteDelegateAgentInput, type CompleteDelegateTokenInput, type ConfirmLoginOptions, type ConfirmLoginResult, 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, type OpenLoginOptions, type OpenLoginResult, 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
|
@@ -363,7 +363,70 @@ interface Interaction<T extends InteractionType = InteractionType> {
|
|
|
363
363
|
* supplies this (token + run addressing already bound); the handle below uses
|
|
364
364
|
* it to invoke `action.endpoint` without the consumer touching HTTP.
|
|
365
365
|
*/
|
|
366
|
-
type InteractionActionPoster = (action: Action, body: JsonObject | undefined
|
|
366
|
+
type InteractionActionPoster = (action: Action, body: JsonObject | undefined, options?: {
|
|
367
|
+
requiredScopes?: readonly string[];
|
|
368
|
+
}) => Promise<unknown>;
|
|
369
|
+
/** Options for {@link InteractionHandle.openLogin}. */
|
|
370
|
+
interface OpenLoginOptions {
|
|
371
|
+
/**
|
|
372
|
+
* Site to sign in to — one of `interaction.payload.sites[].siteId`. May be
|
|
373
|
+
* omitted when the interaction lists exactly one site.
|
|
374
|
+
*/
|
|
375
|
+
siteId?: string;
|
|
376
|
+
/** Re-login an existing browser profile in place instead of creating one. */
|
|
377
|
+
profileId?: string;
|
|
378
|
+
}
|
|
379
|
+
/** Interactive login session started by {@link InteractionHandle.openLogin}. */
|
|
380
|
+
interface OpenLoginResult {
|
|
381
|
+
profileId: string;
|
|
382
|
+
siteId: string;
|
|
383
|
+
/** Login browser session the user signs in through. */
|
|
384
|
+
sessionId: string;
|
|
385
|
+
/** Live view URL of the login browser to show to the user. */
|
|
386
|
+
liveUrl: string;
|
|
387
|
+
/** Unmodified response body (escape hatch — shape may evolve with the API). */
|
|
388
|
+
raw: JsonObject;
|
|
389
|
+
/**
|
|
390
|
+
* Persist the login into the profile after the user signs in
|
|
391
|
+
* (`POST /profiles/{profileId}/confirm`). Confirming ends this login
|
|
392
|
+
* session and closes its browser, whatever the outcome:
|
|
393
|
+
*
|
|
394
|
+
* - `active: true` — the login is saved; call
|
|
395
|
+
* {@link InteractionHandle.confirmSignedIn}.
|
|
396
|
+
* - `active: false` with `probeResult: "no_session"` — the backend no longer
|
|
397
|
+
* holds the session (it may already have saved the login automatically, or
|
|
398
|
+
* restarted). Call `confirmSignedIn()`: the agent rechecks the site and
|
|
399
|
+
* raises a new `site_login` interaction if it is still signed out.
|
|
400
|
+
* - Rejects with a `QoniError` whose `code` is `no_pending_login` (HTTP 409)
|
|
401
|
+
* when the backend has no pending login for this profile: the session
|
|
402
|
+
* already ended on providers that report it this way, or the profile no
|
|
403
|
+
* longer exists for this user. Handle it like `no_session`: call
|
|
404
|
+
* `confirmSignedIn()`, and the agent asks again if it is still signed out.
|
|
405
|
+
* - `active: false` with any other `probeResult` — the user was not signed
|
|
406
|
+
* in. Start a new session with `openLogin({ siteId, profileId })` and show
|
|
407
|
+
* its new `liveUrl`; the old one no longer works.
|
|
408
|
+
*
|
|
409
|
+
* Requires `QoniScopes.SITE_LOGIN_CONFIRM`.
|
|
410
|
+
*/
|
|
411
|
+
confirm(options?: ConfirmLoginOptions): Promise<ConfirmLoginResult>;
|
|
412
|
+
}
|
|
413
|
+
/** Options for {@link OpenLoginResult.confirm}. */
|
|
414
|
+
interface ConfirmLoginOptions {
|
|
415
|
+
/** Optional human-readable label stored on the profile. */
|
|
416
|
+
displayLabel?: string;
|
|
417
|
+
}
|
|
418
|
+
/** Result of {@link OpenLoginResult.confirm}. */
|
|
419
|
+
interface ConfirmLoginResult {
|
|
420
|
+
profileId: string;
|
|
421
|
+
/** True only when the profile is now `active` (the login was captured). */
|
|
422
|
+
active: boolean;
|
|
423
|
+
/** Profile state after confirmation: `active`, or `pending_login` when no signed-in session was detected. */
|
|
424
|
+
state: string;
|
|
425
|
+
/** Outcome of the backend's signed-in probe, for example `no_session`. */
|
|
426
|
+
probeResult: string;
|
|
427
|
+
/** Unmodified response body (escape hatch — shape may evolve with the API). */
|
|
428
|
+
raw: JsonObject;
|
|
429
|
+
}
|
|
367
430
|
/**
|
|
368
431
|
* Typed wrapper over an {@link Interaction} that exposes one method per
|
|
369
432
|
* action kind. Each method finds the matching declared action and posts to its
|
|
@@ -372,6 +435,7 @@ type InteractionActionPoster = (action: Action, body: JsonObject | undefined) =>
|
|
|
372
435
|
* backend offered it).
|
|
373
436
|
*/
|
|
374
437
|
declare class InteractionHandle<T extends InteractionType = InteractionType> {
|
|
438
|
+
#private;
|
|
375
439
|
private readonly post;
|
|
376
440
|
readonly interaction: Interaction<T>;
|
|
377
441
|
constructor(interaction: Interaction<T>, post: InteractionActionPoster);
|
|
@@ -389,8 +453,16 @@ declare class InteractionHandle<T extends InteractionType = InteractionType> {
|
|
|
389
453
|
confirm(): Promise<void>;
|
|
390
454
|
/** Reject a pending confirmation. */
|
|
391
455
|
reject(): Promise<void>;
|
|
392
|
-
/**
|
|
393
|
-
|
|
456
|
+
/**
|
|
457
|
+
* Start an interactive login session for a `site_login` interaction. The
|
|
458
|
+
* backend needs the site to sign in to: pass `siteId`, or omit it when the
|
|
459
|
+
* interaction lists exactly one site. Show `liveUrl` to the user; when they
|
|
460
|
+
* finish, call `confirm()` on the result to save the login, and act on its
|
|
461
|
+
* outcome (see {@link OpenLoginResult.confirm}) before {@link confirmSignedIn}.
|
|
462
|
+
* The delegation must include `QoniScopes.SITE_LOGIN_REQUEST` and
|
|
463
|
+
* `QoniScopes.SITE_LOGIN_CONFIRM`; the AccessKey policy must allow both.
|
|
464
|
+
*/
|
|
465
|
+
openLogin(options?: OpenLoginOptions): Promise<OpenLoginResult>;
|
|
394
466
|
/** Tell the agent the user has finished signing in. */
|
|
395
467
|
confirmSignedIn(): Promise<void>;
|
|
396
468
|
/** Connect to the live browser for a take_control interaction. */
|
|
@@ -663,7 +735,9 @@ interface RunWireOps {
|
|
|
663
735
|
* Interaction model's `actions[]` carry the endpoint + method, so the SDK
|
|
664
736
|
* never hard-codes a HITL route — it forwards what the backend declared.
|
|
665
737
|
*/
|
|
666
|
-
postAction(action: Action, body: JsonObject | undefined
|
|
738
|
+
postAction(action: Action, body: JsonObject | undefined, options?: {
|
|
739
|
+
requiredScopes?: readonly string[];
|
|
740
|
+
}): Promise<unknown>;
|
|
667
741
|
cancel(reason?: string): Promise<JsonObject>;
|
|
668
742
|
/** Products without artifacts leave this undefined → `result.artifacts` is []. */
|
|
669
743
|
listArtifacts?(signal?: AbortSignal): Promise<Artifact[]>;
|
|
@@ -1090,10 +1164,12 @@ interface MonitorRunsOptions {
|
|
|
1090
1164
|
/** A monitor's check cadence. */
|
|
1091
1165
|
type MonitorSchedule = {
|
|
1092
1166
|
kind: "cron";
|
|
1093
|
-
expr: string;
|
|
1167
|
+
expr: string; /** IANA time zone for the cron expression. */
|
|
1168
|
+
tz?: string;
|
|
1094
1169
|
} | {
|
|
1095
1170
|
kind: "interval";
|
|
1096
1171
|
intervalSeconds: number;
|
|
1172
|
+
tz?: string;
|
|
1097
1173
|
};
|
|
1098
1174
|
/**
|
|
1099
1175
|
* Fields to change on a monitor via {@link MonitorHandle.refine}. Pass any
|
|
@@ -1115,7 +1191,9 @@ interface MonitorWireOps {
|
|
|
1115
1191
|
update(input: JsonObject): Promise<JsonObject>;
|
|
1116
1192
|
runNow(): Promise<JsonObject>;
|
|
1117
1193
|
streamEvents(opts: MonitorEventsOptions): AsyncIterable<QoniEvent<unknown>>;
|
|
1118
|
-
postAction(action: Action, body: JsonObject | undefined
|
|
1194
|
+
postAction(action: Action, body: JsonObject | undefined, options?: {
|
|
1195
|
+
requiredScopes?: readonly string[];
|
|
1196
|
+
}): Promise<unknown>;
|
|
1119
1197
|
listRuns(opts: MonitorRunsOptions): Promise<JsonObject>;
|
|
1120
1198
|
getRun(runId: string): Promise<JsonObject>;
|
|
1121
1199
|
delete(): Promise<void>;
|
|
@@ -1388,6 +1466,8 @@ declare const QoniScopes: {
|
|
|
1388
1466
|
readonly DEEP_RESEARCH_MANAGE: "webagent.deep_research:manage";
|
|
1389
1467
|
readonly TRACK_READ: "webagent.track:read";
|
|
1390
1468
|
readonly TRACK_MANAGE: "webagent.track:manage";
|
|
1469
|
+
readonly SITE_LOGIN_REQUEST: "webagent.site_login:request";
|
|
1470
|
+
readonly SITE_LOGIN_CONFIRM: "webagent.site_login:confirm";
|
|
1391
1471
|
};
|
|
1392
1472
|
type QoniScope = (typeof QoniScopes)[keyof typeof QoniScopes];
|
|
1393
1473
|
/** Product names accepted by `delegateToken({ products })`. */
|
|
@@ -1407,4 +1487,4 @@ declare const QoniScopeBundles: {
|
|
|
1407
1487
|
readonly TRACK: readonly ["webagent.track:read", "webagent.track:manage"];
|
|
1408
1488
|
};
|
|
1409
1489
|
|
|
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 };
|
|
1490
|
+
export { type Action, type ActionKind, ActionKinds, type Artifact, type BrowserProxyOptions, type BrowserbaseRegion, type CaptureOptions, type ClarificationPayload, type CompleteDelegateAgentInput, type CompleteDelegateTokenInput, type ConfirmLoginOptions, type ConfirmLoginResult, 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, type OpenLoginOptions, type OpenLoginResult, 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 };
|