@effect-agent/platform-cloudflare 0.1.0-beta.106 → 0.1.0-beta.108
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/CloudflareThreadClient.d.mts +47 -47
- package/dist/{InteractiveBrowser-BR16UPbF.d.mts → InteractiveBrowser-CKp6pqmw.d.mts} +4 -2
- package/dist/{InteractiveBrowser-BCS9g0tn.mjs → InteractiveBrowser-l6J4eP6T.mjs} +286 -39
- package/dist/InteractiveBrowser-l6J4eP6T.mjs.map +1 -0
- package/dist/InteractiveBrowser.d.mts +1 -1
- package/dist/InteractiveBrowser.mjs +1 -1
- package/dist/ProtectedBrowser.d.mts +3 -3
- package/dist/ProtectedBrowser.mjs +160 -135
- package/dist/ProtectedBrowser.mjs.map +1 -1
- package/dist/{ThreadObject-CLBMWEPn.d.mts → ThreadObject-D_vvj7Qx.d.mts} +31 -31
- package/dist/ThreadObject.d.mts +1 -1
- package/dist/index.d.mts +1 -1
- package/package.json +1 -1
- package/src/InteractiveBrowser.ts +242 -48
- package/src/internal/browser-binding.ts +82 -0
- package/src/internal/browser-failure.ts +92 -0
- package/src/internal/browser-file-selection.ts +126 -0
- package/src/internal/browser-session-lifecycle.ts +38 -5
- package/src/protected-browser/binding.ts +170 -129
- package/src/protected-browser/host.ts +52 -19
- package/src/protected-browser/native.ts +45 -17
- package/src/protected-browser/policy.ts +75 -39
- package/dist/InteractiveBrowser-BCS9g0tn.mjs.map +0 -1
|
@@ -1486,36 +1486,15 @@ export declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorde
|
|
|
1486
1486
|
readonly message: string;
|
|
1487
1487
|
readonly cause?: Schema.Json | undefined;
|
|
1488
1488
|
} | {
|
|
1489
|
-
readonly _tag: "
|
|
1490
|
-
readonly operation: string;
|
|
1489
|
+
readonly _tag: "HostProtocolError";
|
|
1491
1490
|
readonly message: string;
|
|
1492
|
-
readonly cause?: Schema.Json | undefined;
|
|
1493
|
-
} | {
|
|
1494
|
-
readonly _tag: "ThreadNotMaterialized";
|
|
1495
|
-
readonly threadId: string;
|
|
1496
1491
|
} | {
|
|
1497
|
-
readonly _tag: "
|
|
1498
|
-
readonly operation: string;
|
|
1492
|
+
readonly _tag: "AgentInputError";
|
|
1499
1493
|
readonly message: string;
|
|
1500
|
-
readonly cause?: import("effect-agent/failure-diagnostic").Diagnostic | undefined;
|
|
1501
|
-
} | {
|
|
1502
|
-
readonly _tag: "AppendConflict";
|
|
1503
|
-
readonly threadId: string;
|
|
1504
|
-
readonly batchId: string;
|
|
1505
|
-
readonly reason: "batch-digest" | "record-identity" | "tail";
|
|
1506
|
-
readonly actualTailSequence?: number | undefined;
|
|
1507
|
-
readonly actualTailDigest?: string | undefined;
|
|
1508
1494
|
} | {
|
|
1509
|
-
readonly _tag: "
|
|
1510
|
-
readonly
|
|
1511
|
-
readonly
|
|
1512
|
-
readonly attemptedEpoch: number;
|
|
1513
|
-
} | {
|
|
1514
|
-
readonly _tag: "OperationDenied";
|
|
1515
|
-
readonly operation: "abort" | "awaitSettlement" | "explain" | "observe" | "resolveApproval" | "resolveUnknown" | "retry" | "scanObligations" | "verify" | "wake";
|
|
1516
|
-
readonly reason: string;
|
|
1517
|
-
readonly threadId?: string | undefined;
|
|
1518
|
-
readonly submissionId?: string | undefined;
|
|
1495
|
+
readonly _tag: "DigestError";
|
|
1496
|
+
readonly message: string;
|
|
1497
|
+
readonly cause?: Schema.Json | undefined;
|
|
1519
1498
|
} | {
|
|
1520
1499
|
readonly _tag: "AdmissionConflict";
|
|
1521
1500
|
readonly threadId: string;
|
|
@@ -1529,41 +1508,62 @@ export declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorde
|
|
|
1529
1508
|
readonly code: string;
|
|
1530
1509
|
readonly cause?: import("effect-agent/failure-diagnostic").Diagnostic | undefined;
|
|
1531
1510
|
readonly stack?: string | undefined;
|
|
1532
|
-
} | {
|
|
1533
|
-
readonly _tag: "AgentInputError";
|
|
1534
|
-
readonly message: string;
|
|
1535
|
-
} | {
|
|
1536
|
-
readonly _tag: "DigestError";
|
|
1537
|
-
readonly message: string;
|
|
1538
|
-
readonly cause?: Schema.Json | undefined;
|
|
1539
|
-
} | {
|
|
1540
|
-
readonly _tag: "DurableRuntimeFailpointError";
|
|
1541
|
-
readonly location: "abort:after-intent" | "approval:after-request-append" | "approval:after-suspend" | "checkpoint:after-save" | "checkpoint:before-save" | "claim:after-claim" | "compaction:after-canonical-append" | "compaction:before-canonical-append" | "input:after-canonical-append" | "join:after-canonical-append" | "join:after-claim" | "policy:after-reservation-append" | "policy:before-reservation-append" | "resolve:after-intent" | "run:after-duration-append" | "run:after-start-append" | "run:before-duration-append" | "run:before-start-append" | "step:after-step-append" | "subagent:after-admit" | "subagent:after-child-abort-intent" | "subagent:after-child-ready" | "subagent:after-join-append" | "subagent:after-release" | "subagent:after-release-pending" | "subagent:after-request-append" | "subagent:after-reserve" | "subagent:after-sibling-settle" | "subagent:after-start-append" | "subagent:after-suspend" | "subagent:before-join-append" | "submit:after-admit" | "submit:after-materialize" | "terminalize:after-canonical-append" | "terminalize:after-reserve" | "tools:after-prepared-append" | "tools:after-unavailable-append" | "tools:before-prepared-append" | "tools:before-unavailable-append" | "turn:after-canonical-append" | "turn:after-response-append" | "turn:after-results-append" | "update:after-canonical-append" | "update:after-delivery-insert" | "update:before-canonical-append" | "update:before-delivery-insert" | "worker:after-completion-append" | "worker:after-origin-append" | "worker:after-report-append" | "worker:after-report-delivery" | "worker:after-source-append" | "worker:after-subtree-append" | "worker:before-completion-append" | "worker:before-origin-append" | "worker:before-report-append" | "worker:before-report-delivery" | "worker:before-source-append" | "worker:before-subtree-append";
|
|
1542
1511
|
} | {
|
|
1543
1512
|
readonly _tag: "SettlementConflict";
|
|
1544
1513
|
readonly submissionId: string;
|
|
1545
1514
|
readonly existingOutcome: "aborted" | "completed" | "failed";
|
|
1515
|
+
} | {
|
|
1516
|
+
readonly _tag: "ApprovalConflict";
|
|
1517
|
+
readonly submissionId: string;
|
|
1518
|
+
readonly toolCallId: string;
|
|
1519
|
+
readonly existingDecision: "approved" | "denied";
|
|
1520
|
+
} | {
|
|
1521
|
+
readonly _tag: "UnknownResolutionConflict";
|
|
1522
|
+
readonly submissionId: string;
|
|
1523
|
+
readonly toolCallId: string;
|
|
1546
1524
|
} | {
|
|
1547
1525
|
readonly _tag: "JoinedToHost";
|
|
1548
1526
|
readonly submissionId: string;
|
|
1549
1527
|
readonly hostSubmissionId: string;
|
|
1528
|
+
} | {
|
|
1529
|
+
readonly _tag: "LedgerError";
|
|
1530
|
+
readonly operation: string;
|
|
1531
|
+
readonly message: string;
|
|
1532
|
+
readonly cause?: import("effect-agent/failure-diagnostic").Diagnostic | undefined;
|
|
1533
|
+
} | {
|
|
1534
|
+
readonly _tag: "ThreadStoreError";
|
|
1535
|
+
readonly operation: string;
|
|
1536
|
+
readonly message: string;
|
|
1537
|
+
readonly cause?: Schema.Json | undefined;
|
|
1538
|
+
} | {
|
|
1539
|
+
readonly _tag: "ThreadNotMaterialized";
|
|
1540
|
+
readonly threadId: string;
|
|
1541
|
+
} | {
|
|
1542
|
+
readonly _tag: "AppendConflict";
|
|
1543
|
+
readonly threadId: string;
|
|
1544
|
+
readonly batchId: string;
|
|
1545
|
+
readonly reason: "batch-digest" | "record-identity" | "tail";
|
|
1546
|
+
readonly actualTailSequence?: number | undefined;
|
|
1547
|
+
readonly actualTailDigest?: string | undefined;
|
|
1548
|
+
} | {
|
|
1549
|
+
readonly _tag: "FenceRejected";
|
|
1550
|
+
readonly threadId: string;
|
|
1551
|
+
readonly actualEpoch: number;
|
|
1552
|
+
readonly attemptedEpoch: number;
|
|
1553
|
+
} | {
|
|
1554
|
+
readonly _tag: "DurableRuntimeFailpointError";
|
|
1555
|
+
readonly location: "abort:after-intent" | "approval:after-request-append" | "approval:after-suspend" | "checkpoint:after-save" | "checkpoint:before-save" | "claim:after-claim" | "compaction:after-canonical-append" | "compaction:before-canonical-append" | "input:after-canonical-append" | "join:after-canonical-append" | "join:after-claim" | "policy:after-reservation-append" | "policy:before-reservation-append" | "resolve:after-intent" | "run:after-duration-append" | "run:after-start-append" | "run:before-duration-append" | "run:before-start-append" | "step:after-step-append" | "subagent:after-admit" | "subagent:after-child-abort-intent" | "subagent:after-child-ready" | "subagent:after-join-append" | "subagent:after-release" | "subagent:after-release-pending" | "subagent:after-request-append" | "subagent:after-reserve" | "subagent:after-sibling-settle" | "subagent:after-start-append" | "subagent:after-suspend" | "subagent:before-join-append" | "submit:after-admit" | "submit:after-materialize" | "terminalize:after-canonical-append" | "terminalize:after-reserve" | "tools:after-prepared-append" | "tools:after-unavailable-append" | "tools:before-prepared-append" | "tools:before-unavailable-append" | "turn:after-canonical-append" | "turn:after-response-append" | "turn:after-results-append" | "update:after-canonical-append" | "update:after-delivery-insert" | "update:before-canonical-append" | "update:before-delivery-insert" | "worker:after-completion-append" | "worker:after-origin-append" | "worker:after-report-append" | "worker:after-report-delivery" | "worker:after-source-append" | "worker:after-subtree-append" | "worker:before-completion-append" | "worker:before-origin-append" | "worker:before-report-append" | "worker:before-report-delivery" | "worker:before-source-append" | "worker:before-subtree-append";
|
|
1550
1556
|
} | {
|
|
1551
1557
|
readonly _tag: "AdmissionLimitExceeded";
|
|
1552
1558
|
readonly limit: "database-bytes" | "input-bytes" | "queue-depth";
|
|
1553
1559
|
readonly actual: number;
|
|
1554
1560
|
readonly maximum: number;
|
|
1555
1561
|
} | {
|
|
1556
|
-
readonly _tag: "
|
|
1557
|
-
readonly
|
|
1558
|
-
|
|
1559
|
-
readonly
|
|
1560
|
-
readonly submissionId
|
|
1561
|
-
readonly toolCallId: string;
|
|
1562
|
-
readonly existingDecision: "approved" | "denied";
|
|
1563
|
-
} | {
|
|
1564
|
-
readonly _tag: "UnknownResolutionConflict";
|
|
1565
|
-
readonly submissionId: string;
|
|
1566
|
-
readonly toolCallId: string;
|
|
1562
|
+
readonly _tag: "OperationDenied";
|
|
1563
|
+
readonly operation: "abort" | "awaitSettlement" | "explain" | "observe" | "resolveApproval" | "resolveUnknown" | "retry" | "scanObligations" | "verify" | "wake";
|
|
1564
|
+
readonly reason: string;
|
|
1565
|
+
readonly threadId?: string | undefined;
|
|
1566
|
+
readonly submissionId?: string | undefined;
|
|
1567
1567
|
};
|
|
1568
1568
|
}, Schema.SchemaError, never>;
|
|
1569
1569
|
export declare const decodeHostResponse: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<AbortRecorded | ApprovalRecorded | HostFailed | ObservedPage | ProgressCancelled | ProgressObserved | SettlementReached | SubmissionStatusResponse | SubmitSucceeded | UnknownResolutionRecorded, Schema.SchemaError, never>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Context, Effect, Layer, Redacted, Schema, Scope } from "effect";
|
|
2
2
|
import { SandboxImplementation } from "effect-agent/sandbox";
|
|
3
3
|
import { HttpClient } from "effect/unstable/http";
|
|
4
|
-
import { BrowserHandle, InteractiveBrowser, InteractiveBrowserError, InteractiveBrowserPolicy, InteractiveBrowserPolicyDeniedError } from "effect-agent/interactive-browser";
|
|
4
|
+
import { BrowserHandle, BrowserSelectFileRequest, InteractiveBrowser, InteractiveBrowserError, InteractiveBrowserPolicy, InteractiveBrowserPolicyDeniedError } from "effect-agent/interactive-browser";
|
|
5
5
|
//#region src/internal/browser-session-lifecycle.d.ts
|
|
6
6
|
declare const BrowserRunCleanupError_base: Schema.Class<BrowserRunCleanupError, Schema.TaggedStruct<"BrowserRunCleanupError", {
|
|
7
7
|
readonly reason: Schema.Literals<readonly ["configuration", "authorization", "rate-limited", "provider", "malformed", "timeout", "pending"]>;
|
|
8
8
|
readonly status: Schema.optionalKey<Schema.Int>;
|
|
9
|
+
readonly cause: Schema.optionalKey<Schema.Defect>;
|
|
9
10
|
}>, import("effect/Cause").YieldableError>;
|
|
10
11
|
declare class BrowserRunCleanupError extends BrowserRunCleanupError_base {}
|
|
11
12
|
interface BrowserRunLifecycleOptions {
|
|
@@ -83,6 +84,7 @@ interface BrowserRunInteractivePage {
|
|
|
83
84
|
readonly readText: (selector: string | undefined, maximumBytes: number) => Promise<unknown>;
|
|
84
85
|
readonly fill: (selector: string, value: string, signal: AbortSignal, onDispatch: () => void) => Promise<unknown>;
|
|
85
86
|
readonly click: (selector: string, signal: AbortSignal, onDispatch: () => void) => Promise<unknown>;
|
|
87
|
+
readonly selectFile: (request: BrowserSelectFileRequest, signal: AbortSignal, onDispatch: () => void) => Promise<unknown>;
|
|
86
88
|
readonly screenshot: (fullPage: boolean) => Promise<unknown>;
|
|
87
89
|
readonly scroll: (deltaX: number, deltaY: number) => Promise<void>;
|
|
88
90
|
readonly setViewport: (viewport: BrowserRunViewport) => Promise<void>;
|
|
@@ -166,4 +168,4 @@ declare const CloudflareInteractiveBrowser: {
|
|
|
166
168
|
};
|
|
167
169
|
//#endregion
|
|
168
170
|
export { isBrowserRunUndispatchedActionError as C, browserRunInteractiveLayer as S, BrowserRunSessionLifecycle as T, BrowserRunViewport as _, BrowserRunInteractiveAcquisition as a, browserRunInteractiveHostLayer as b, BrowserRunInteractiveCdpSession as c, BrowserRunInteractivePage as d, BrowserRunInteractiveRequest as f, BrowserRunLiveViewResult as g, BrowserRunLiveViewRequest as h, BrowserRunHandoffState as i, BrowserRunInteractiveContext as l, BrowserRunInteractiveSession as m, BrowserRunHandoffRequest as n, BrowserRunInteractiveBinding as o, BrowserRunInteractiveRequestListener as p, BrowserRunHandoffResult as r, BrowserRunInteractiveBrowser as s, BrowserRunCloudflareCommand as t, BrowserRunInteractiveHost as u, CloudflareInteractiveBrowser as v, BrowserRunCleanupError as w, browserRunInteractiveImplementation as x, CloudflareInteractiveBrowserOptions as y };
|
|
169
|
-
//# sourceMappingURL=InteractiveBrowser-
|
|
171
|
+
//# sourceMappingURL=InteractiveBrowser-CKp6pqmw.d.mts.map
|