@qoniai/qoni 0.4.0 → 0.4.2

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/dist/index.d.cts CHANGED
@@ -224,6 +224,7 @@ interface RawRequestInput extends TokenInput {
224
224
  headers?: Record<string, string>;
225
225
  }
226
226
  interface RequestPayload {
227
+ signal?: AbortSignal;
227
228
  query?: JsonObject;
228
229
  body?: JsonObject | BodyInit;
229
230
  headers?: Record<string, string>;
@@ -638,7 +639,7 @@ interface RunWaitOptions {
638
639
  * with the token + run addressing already bound.
639
640
  */
640
641
  interface RunWireOps {
641
- getDetail(): Promise<JsonObject>;
642
+ getDetail(signal?: AbortSignal): Promise<JsonObject>;
642
643
  streamEvents(opts: RunEventsOptions): AsyncIterable<QoniEvent<unknown>>;
643
644
  /**
644
645
  * Invoke an interaction action by posting to its declared endpoint. The
@@ -648,7 +649,7 @@ interface RunWireOps {
648
649
  postAction(action: Action, body: JsonObject | undefined): Promise<void>;
649
650
  cancel(reason?: string): Promise<JsonObject>;
650
651
  /** Products without artifacts leave this undefined → `result.artifacts` is []. */
651
- listArtifacts?(): Promise<Artifact[]>;
652
+ listArtifacts?(signal?: AbortSignal): Promise<Artifact[]>;
652
653
  }
653
654
  /**
654
655
  * Handle to a single run. Generic over the product's event set (分型): a
@@ -782,6 +783,7 @@ declare function createDoAnythingNamespace(transport: QoniTransport): {
782
783
  createRun: <T = unknown>(input: RuntimeTokenInput & JsonObject) => Promise<QoniResponse<T>>;
783
784
  getRun: <T = unknown>(input: RuntimeTokenInput & {
784
785
  runId: string;
786
+ signal?: AbortSignal;
785
787
  }) => Promise<QoniResponse<T>>;
786
788
  events: <T = unknown>(input: RuntimeTokenInput & {
787
789
  runId: string;
@@ -862,6 +864,7 @@ declare function createDeepResearchNamespace(transport: QoniTransport): {
862
864
  run: <T = unknown>(input: RuntimeTokenInput & JsonObject) => Promise<QoniResponse<T>>;
863
865
  get: <T = unknown>(input: RuntimeTokenInput & {
864
866
  runId: string;
867
+ signal?: AbortSignal;
865
868
  }) => Promise<QoniResponse<T>>;
866
869
  events: <T = unknown>(input: RuntimeTokenInput & {
867
870
  runId: string;
@@ -885,6 +888,7 @@ declare function createDeepResearchNamespace(transport: QoniTransport): {
885
888
  } & JsonObject) => Promise<QoniResponse<T>>;
886
889
  listArtifacts: <T = unknown>(input: RuntimeTokenInput & {
887
890
  runId: string;
891
+ signal?: AbortSignal;
888
892
  }) => Promise<QoniResponse<T>>;
889
893
  getArtifact: <T = unknown>(input: RuntimeTokenInput & {
890
894
  runId: string;
@@ -1190,6 +1194,7 @@ declare function createWebSearchNamespace(transport: QoniTransport): {
1190
1194
  run: <T = unknown>(input: RuntimeTokenInput & JsonObject) => Promise<QoniResponse<T>>;
1191
1195
  get: <T = unknown>(input: RuntimeTokenInput & {
1192
1196
  runId: string;
1197
+ signal?: AbortSignal;
1193
1198
  }) => Promise<QoniResponse<T>>;
1194
1199
  events: <T = unknown>(input: RuntimeTokenInput & {
1195
1200
  runId: string;
@@ -1208,7 +1213,7 @@ declare function createWebSearchNamespace(transport: QoniTransport): {
1208
1213
  };
1209
1214
  };
1210
1215
 
1211
- declare class QoniAgentKit {
1216
+ declare class Qoni {
1212
1217
  private readonly options;
1213
1218
  private readonly fetchImpl;
1214
1219
  private readonly timeoutMs;
@@ -1359,4 +1364,4 @@ declare const QoniScopeBundles: {
1359
1364
  readonly TRACK: readonly ["webagent.track:read", "webagent.track:manage"];
1360
1365
  };
1361
1366
 
1362
- export { type Action, type ActionKind, ActionKinds, type Artifact, 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, QoniAgentKit as Qoni, QoniAgentKit, 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 };
1367
+ export { type Action, type ActionKind, ActionKinds, type Artifact, 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 };
package/dist/index.d.ts CHANGED
@@ -224,6 +224,7 @@ interface RawRequestInput extends TokenInput {
224
224
  headers?: Record<string, string>;
225
225
  }
226
226
  interface RequestPayload {
227
+ signal?: AbortSignal;
227
228
  query?: JsonObject;
228
229
  body?: JsonObject | BodyInit;
229
230
  headers?: Record<string, string>;
@@ -638,7 +639,7 @@ interface RunWaitOptions {
638
639
  * with the token + run addressing already bound.
639
640
  */
640
641
  interface RunWireOps {
641
- getDetail(): Promise<JsonObject>;
642
+ getDetail(signal?: AbortSignal): Promise<JsonObject>;
642
643
  streamEvents(opts: RunEventsOptions): AsyncIterable<QoniEvent<unknown>>;
643
644
  /**
644
645
  * Invoke an interaction action by posting to its declared endpoint. The
@@ -648,7 +649,7 @@ interface RunWireOps {
648
649
  postAction(action: Action, body: JsonObject | undefined): Promise<void>;
649
650
  cancel(reason?: string): Promise<JsonObject>;
650
651
  /** Products without artifacts leave this undefined → `result.artifacts` is []. */
651
- listArtifacts?(): Promise<Artifact[]>;
652
+ listArtifacts?(signal?: AbortSignal): Promise<Artifact[]>;
652
653
  }
653
654
  /**
654
655
  * Handle to a single run. Generic over the product's event set (分型): a
@@ -782,6 +783,7 @@ declare function createDoAnythingNamespace(transport: QoniTransport): {
782
783
  createRun: <T = unknown>(input: RuntimeTokenInput & JsonObject) => Promise<QoniResponse<T>>;
783
784
  getRun: <T = unknown>(input: RuntimeTokenInput & {
784
785
  runId: string;
786
+ signal?: AbortSignal;
785
787
  }) => Promise<QoniResponse<T>>;
786
788
  events: <T = unknown>(input: RuntimeTokenInput & {
787
789
  runId: string;
@@ -862,6 +864,7 @@ declare function createDeepResearchNamespace(transport: QoniTransport): {
862
864
  run: <T = unknown>(input: RuntimeTokenInput & JsonObject) => Promise<QoniResponse<T>>;
863
865
  get: <T = unknown>(input: RuntimeTokenInput & {
864
866
  runId: string;
867
+ signal?: AbortSignal;
865
868
  }) => Promise<QoniResponse<T>>;
866
869
  events: <T = unknown>(input: RuntimeTokenInput & {
867
870
  runId: string;
@@ -885,6 +888,7 @@ declare function createDeepResearchNamespace(transport: QoniTransport): {
885
888
  } & JsonObject) => Promise<QoniResponse<T>>;
886
889
  listArtifacts: <T = unknown>(input: RuntimeTokenInput & {
887
890
  runId: string;
891
+ signal?: AbortSignal;
888
892
  }) => Promise<QoniResponse<T>>;
889
893
  getArtifact: <T = unknown>(input: RuntimeTokenInput & {
890
894
  runId: string;
@@ -1190,6 +1194,7 @@ declare function createWebSearchNamespace(transport: QoniTransport): {
1190
1194
  run: <T = unknown>(input: RuntimeTokenInput & JsonObject) => Promise<QoniResponse<T>>;
1191
1195
  get: <T = unknown>(input: RuntimeTokenInput & {
1192
1196
  runId: string;
1197
+ signal?: AbortSignal;
1193
1198
  }) => Promise<QoniResponse<T>>;
1194
1199
  events: <T = unknown>(input: RuntimeTokenInput & {
1195
1200
  runId: string;
@@ -1208,7 +1213,7 @@ declare function createWebSearchNamespace(transport: QoniTransport): {
1208
1213
  };
1209
1214
  };
1210
1215
 
1211
- declare class QoniAgentKit {
1216
+ declare class Qoni {
1212
1217
  private readonly options;
1213
1218
  private readonly fetchImpl;
1214
1219
  private readonly timeoutMs;
@@ -1359,4 +1364,4 @@ declare const QoniScopeBundles: {
1359
1364
  readonly TRACK: readonly ["webagent.track:read", "webagent.track:manage"];
1360
1365
  };
1361
1366
 
1362
- export { type Action, type ActionKind, ActionKinds, type Artifact, 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, QoniAgentKit as Qoni, QoniAgentKit, 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 };
1367
+ export { type Action, type ActionKind, ActionKinds, type Artifact, 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 };