@effect-agent/platform-cloudflare 0.1.0-beta.122 → 0.1.0-beta.124
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/BrowserCredentials.d.mts +91 -0
- package/dist/BrowserCredentials.mjs +120 -0
- package/dist/BrowserCredentials.mjs.map +1 -0
- package/dist/BrowserSession-DuOUcC6G.mjs +442 -0
- package/dist/BrowserSession-DuOUcC6G.mjs.map +1 -0
- package/dist/BrowserSession-DxCN-5F9.d.mts +109 -0
- package/dist/BrowserSession.d.mts +3 -0
- package/dist/BrowserSession.mjs +4 -0
- package/dist/CloudflareThreadClient.d.mts +48 -48
- package/dist/{InteractiveBrowser-Cm4xgiGy.d.mts → InteractiveBrowser-BnqY_Y-F.d.mts} +2 -2
- package/dist/{InteractiveBrowser-DXwmvWdA.mjs → InteractiveBrowser-DeOlcu-2.mjs} +4 -5
- package/dist/InteractiveBrowser-DeOlcu-2.mjs.map +1 -0
- package/dist/InteractiveBrowser.d.mts +1 -1
- package/dist/InteractiveBrowser.mjs +1 -1
- package/dist/{ThreadObject-mt0uxvZZ.d.mts → ThreadObject-QBlTByAB.d.mts} +32 -32
- package/dist/ThreadObject.d.mts +1 -1
- package/dist/index.d.mts +4 -2
- package/dist/index.mjs +3 -1
- package/package.json +1 -1
- package/src/BrowserCredentials.ts +146 -0
- package/src/BrowserSession.ts +589 -0
- package/src/index.ts +2 -0
- package/src/internal/browser-binding.ts +3 -3
- package/src/internal/browser-credentials.ts +362 -0
- package/dist/InteractiveBrowser-DXwmvWdA.mjs.map +0 -1
- package/dist/ProtectedBrowser.d.mts +0 -142
- package/dist/ProtectedBrowser.mjs +0 -1242
- package/dist/ProtectedBrowser.mjs.map +0 -1
- package/src/ProtectedBrowser.ts +0 -9
- package/src/protected-browser/binding.ts +0 -445
- package/src/protected-browser/host.ts +0 -398
- package/src/protected-browser/inspect-frame.ts +0 -140
- package/src/protected-browser/native.ts +0 -483
- package/src/protected-browser/policy.ts +0 -872
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { BrowserCredentialAccess, CredentialFillError, CredentialFillResult, FillCredentialRequest } from "./BrowserCredentials.mjs";
|
|
2
|
+
import { A as BrowserRunSessionLifecycle, O as BrowserRunCleanupError, _ as BrowserRunLiveViewRequest, i as BrowserRunHandoffState, k as BrowserRunLifecycleOptions, n as BrowserRunHandoffRequest, r as BrowserRunHandoffResult, v as BrowserRunLiveViewResult } from "./InteractiveBrowser-BnqY_Y-F.mjs";
|
|
3
|
+
import { Cause, Context, Effect, ErrorReporter, Layer, Redacted, Schema, Scope } from "effect";
|
|
4
|
+
import { Browser, Page } from "puppeteer-core/lib/esm/puppeteer/puppeteer-core-browser.js";
|
|
5
|
+
//#region src/internal/browser-failure.d.ts
|
|
6
|
+
declare const BrowserRunFailure_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => Cause.YieldableError & {
|
|
7
|
+
readonly _tag: "BrowserRunFailure";
|
|
8
|
+
} & Readonly<A>;
|
|
9
|
+
/** Source-authored stages and classifications only; never retain SDK text or session capabilities. */
|
|
10
|
+
declare class BrowserRunFailure extends BrowserRunFailure_base<{
|
|
11
|
+
readonly operation: string;
|
|
12
|
+
readonly reason: "provider" | "timeout" | "malformed" | "configuration" | "authorization" | "rate-limited" | "pending";
|
|
13
|
+
readonly status?: number;
|
|
14
|
+
readonly cause?: BrowserRunFailure | {
|
|
15
|
+
readonly name: string;
|
|
16
|
+
};
|
|
17
|
+
}> {
|
|
18
|
+
readonly [ErrorReporter.severity]: "Error";
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/internal/browser-binding.d.ts
|
|
22
|
+
/** Private attachment ownership is available before asynchronous SDK initialization completes. */
|
|
23
|
+
interface BrowserRunAttachment {
|
|
24
|
+
readonly browser: Promise<Browser>;
|
|
25
|
+
/** Fence SDK dispatch/callbacks and await local socket closure; never terminate the provider. */
|
|
26
|
+
readonly retire: Effect.Effect<void, BrowserRunFailure>;
|
|
27
|
+
}
|
|
28
|
+
declare const BrowserRunBinding_base: Context.ServiceClass<BrowserRunBinding, "@effect-agent/platform-cloudflare/internal/BrowserRunBinding", {
|
|
29
|
+
readonly acquire: (keepAliveMillis: number, operation: "interactive.acquire" | "session.acquire") => Promise<string>;
|
|
30
|
+
readonly connect: (sessionId: string, operation: string, signal?: AbortSignal) => BrowserRunAttachment;
|
|
31
|
+
readonly keepAlive: (sessionId: string) => Effect.Effect<void, BrowserRunFailure>;
|
|
32
|
+
}>;
|
|
33
|
+
/** Native transport port shared by both scoped adapters; the Layer owns the foreign binding. */
|
|
34
|
+
declare class BrowserRunBinding extends BrowserRunBinding_base {
|
|
35
|
+
static layer(browser: Pick<BrowserRun, "fetch">): Layer.Layer<BrowserRunBinding, never, never>;
|
|
36
|
+
}
|
|
37
|
+
declare namespace BrowserSession_d_exports {
|
|
38
|
+
export { BrowserRunHandoffRequest, BrowserRunHandoffResult, BrowserRunHandoffState, BrowserRunLiveViewRequest, BrowserRunLiveViewResult, BrowserSession, BrowserSessionError, BrowserSessionOptions, BrowserSessionReference, BrowserSessions, BrowserSessionsOptions };
|
|
39
|
+
}
|
|
40
|
+
declare const BrowserSessionReference_base: Schema.Class<BrowserSessionReference, Schema.Struct<{
|
|
41
|
+
readonly version: Schema.Literal<1>;
|
|
42
|
+
readonly sessionId: Schema.Redacted<Schema.String>;
|
|
43
|
+
readonly contextId: Schema.Redacted<Schema.NonEmptyString>;
|
|
44
|
+
readonly targetId: Schema.Redacted<Schema.NonEmptyString>;
|
|
45
|
+
readonly expiresAt: Schema.Int;
|
|
46
|
+
readonly commandTimeoutMillis: Schema.Int;
|
|
47
|
+
}>, {}>;
|
|
48
|
+
/** Private host record, not a model capability. Persist together with the owner's controller state. */
|
|
49
|
+
declare class BrowserSessionReference extends BrowserSessionReference_base {}
|
|
50
|
+
declare const BrowserSessionOptions_base: Schema.Class<BrowserSessionOptions, Schema.Struct<{
|
|
51
|
+
readonly maxElapsedMillis: Schema.Int;
|
|
52
|
+
readonly keepAliveMillis: Schema.optionalKey<Schema.Int>;
|
|
53
|
+
readonly commandTimeoutMillis: Schema.optionalKey<Schema.Int>;
|
|
54
|
+
}>, {}>;
|
|
55
|
+
declare class BrowserSessionOptions extends BrowserSessionOptions_base {}
|
|
56
|
+
declare const BrowserSessionError_base: Schema.Class<BrowserSessionError, Schema.TaggedStruct<"BrowserSessionError", {
|
|
57
|
+
readonly reason: Schema.Literals<readonly ["invalid", "expired", "missing-page", "busy", "closed", "provider", "timeout", "cleanup"]>;
|
|
58
|
+
readonly dispatch: Schema.Literals<readonly ["not-dispatched", "possibly-dispatched"]>;
|
|
59
|
+
readonly cleanup: Schema.Literals<readonly ["not-requested", "confirmed", "unconfirmed"]>;
|
|
60
|
+
}>, Cause.YieldableError>;
|
|
61
|
+
/** No SDK text, selectors, page data, or credential values are retained in public failures. */
|
|
62
|
+
declare class BrowserSessionError extends BrowserSessionError_base {}
|
|
63
|
+
/**
|
|
64
|
+
* One local attachment to an application-owned browser. Scope release disconnects; it never
|
|
65
|
+
* transfers ownership or closes a healthy remote session. The owner serializes attachments,
|
|
66
|
+
* fences old attempts, authorizes human access, and calls BrowserSessions.close on expiry/stop.
|
|
67
|
+
* Native callbacks are trusted host code: never retain SDK handles or start unawaited work.
|
|
68
|
+
*/
|
|
69
|
+
interface BrowserSession {
|
|
70
|
+
readonly reference: BrowserSessionReference;
|
|
71
|
+
/**
|
|
72
|
+
* Check current authority under the lock before native dispatch. A settled SDK rejection leaves
|
|
73
|
+
* the session available for inspection, but may have changed the website; never retry blindly.
|
|
74
|
+
* Timeout/interruption fences outstanding SDK work and terminates the exact browser.
|
|
75
|
+
*/
|
|
76
|
+
readonly run: <A, E, R>(authorize: Effect.Effect<void, E, R>, action: (page: Page) => Promise<A>) => Effect.Effect<A, E | BrowserSessionError, R>;
|
|
77
|
+
/**
|
|
78
|
+
* Resolves host-owned material under fresh credential grants. Never submits or retries a write.
|
|
79
|
+
* Credential timeouts retain acknowledged writes and dispatch evidence alongside cleanup.
|
|
80
|
+
*/
|
|
81
|
+
readonly fillCredential: (request: FillCredentialRequest) => Effect.Effect<CredentialFillResult, CredentialFillError | BrowserSessionError, BrowserCredentialAccess>;
|
|
82
|
+
readonly handoff: <E, R>(authorize: Effect.Effect<void, E, R>, request: BrowserRunHandoffRequest) => Effect.Effect<BrowserRunHandoffResult, E | BrowserSessionError, R>;
|
|
83
|
+
readonly getLiveView: <E, R>(authorize: Effect.Effect<void, E, R>, request: BrowserRunLiveViewRequest) => Effect.Effect<BrowserRunLiveViewResult, E | BrowserSessionError, R>;
|
|
84
|
+
readonly getHandoffState: <E, R>(authorize: Effect.Effect<void, E, R>) => Effect.Effect<BrowserRunHandoffState, E | BrowserSessionError, R>;
|
|
85
|
+
}
|
|
86
|
+
interface BrowserSessionsOptions extends BrowserRunLifecycleOptions {
|
|
87
|
+
readonly browser: Pick<BrowserRun, "fetch">;
|
|
88
|
+
}
|
|
89
|
+
declare const BrowserSessions_base: Context.ServiceClass<BrowserSessions, "@effect-agent/platform-cloudflare/BrowserSessions", {
|
|
90
|
+
/**
|
|
91
|
+
* Allocate once and commit its private reference in retain. Failed/uncommitted creation closes
|
|
92
|
+
* the allocation. After retain succeeds the application owns remote cleanup, independent of
|
|
93
|
+
* attempt Scopes. A lost allocation reply can remain indeterminate until provider idle expiry.
|
|
94
|
+
*/
|
|
95
|
+
readonly create: <E, R>(options: BrowserSessionOptions, retain: (reference: BrowserSessionReference) => Effect.Effect<void, E, R>) => Effect.Effect<BrowserSessionReference, E | BrowserSessionError, R>;
|
|
96
|
+
/** Attach only the exact saved context/page. Never recreate missing/expired state. */
|
|
97
|
+
readonly attach: (reference: BrowserSessionReference) => Effect.Effect<BrowserSession, BrowserSessionError, Scope.Scope>;
|
|
98
|
+
/** Refresh provider inactivity only; the owner must still enforce its expiresAt. */
|
|
99
|
+
readonly keepAlive: (sessionId: Redacted.Redacted<string>) => Effect.Effect<void, BrowserSessionError>;
|
|
100
|
+
readonly close: (sessionId: Redacted.Redacted<string>) => Effect.Effect<void, BrowserSessionError>;
|
|
101
|
+
}>;
|
|
102
|
+
/** Native Cloudflare sessions; no framework browser workflow, checkpoint transfer, or observation policy. */
|
|
103
|
+
declare class BrowserSessions extends BrowserSessions_base {
|
|
104
|
+
static readonly layerNoDeps: Layer.Layer<BrowserSessions, never, BrowserRunBinding | BrowserRunSessionLifecycle>;
|
|
105
|
+
static layer(options: BrowserSessionsOptions): Layer.Layer<BrowserSessions, BrowserRunCleanupError, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
106
|
+
}
|
|
107
|
+
//#endregion
|
|
108
|
+
export { BrowserSession_d_exports as a, BrowserSessionReference as i, BrowserSessionError as n, BrowserSessions as o, BrowserSessionOptions as r, BrowserSessionsOptions as s, BrowserSession as t };
|
|
109
|
+
//# sourceMappingURL=BrowserSession-DxCN-5F9.d.mts.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { _ as BrowserRunLiveViewRequest, i as BrowserRunHandoffState, n as BrowserRunHandoffRequest, r as BrowserRunHandoffResult, v as BrowserRunLiveViewResult } from "./InteractiveBrowser-BnqY_Y-F.mjs";
|
|
2
|
+
import { i as BrowserSessionReference, n as BrowserSessionError, o as BrowserSessions, r as BrowserSessionOptions, s as BrowserSessionsOptions, t as BrowserSession } from "./BrowserSession-DxCN-5F9.mjs";
|
|
3
|
+
export { BrowserRunHandoffRequest, BrowserRunHandoffResult, BrowserRunHandoffState, BrowserRunLiveViewRequest, BrowserRunLiveViewResult, BrowserSession, BrowserSessionError, BrowserSessionOptions, BrowserSessionReference, BrowserSessions, BrowserSessionsOptions };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import "./BrowserCredentials.mjs";
|
|
2
|
+
import { c as BrowserRunLiveViewResult, n as BrowserRunHandoffResult, r as BrowserRunHandoffState, s as BrowserRunLiveViewRequest, t as BrowserRunHandoffRequest } from "./InteractiveBrowser-DeOlcu-2.mjs";
|
|
3
|
+
import { a as BrowserSessions, n as BrowserSessionOptions, r as BrowserSessionReference, t as BrowserSessionError } from "./BrowserSession-DuOUcC6G.mjs";
|
|
4
|
+
export { BrowserRunHandoffRequest, BrowserRunHandoffResult, BrowserRunHandoffState, BrowserRunLiveViewRequest, BrowserRunLiveViewResult, BrowserSessionError, BrowserSessionOptions, BrowserSessionReference, BrowserSessions };
|
|
@@ -1540,20 +1540,33 @@ export declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorde
|
|
|
1540
1540
|
} | {
|
|
1541
1541
|
readonly _tag: "HostFailed";
|
|
1542
1542
|
readonly failure: {
|
|
1543
|
-
readonly _tag: "
|
|
1543
|
+
readonly _tag: "ThreadNotMaterialized";
|
|
1544
|
+
readonly threadId: string;
|
|
1545
|
+
} | {
|
|
1546
|
+
readonly _tag: "ThreadStoreError";
|
|
1544
1547
|
readonly operation: string;
|
|
1545
1548
|
readonly message: string;
|
|
1546
1549
|
readonly cause?: Schema.Json | undefined;
|
|
1550
|
+
readonly diagnostic?: {
|
|
1551
|
+
readonly causeTag: string;
|
|
1552
|
+
readonly operation: string;
|
|
1553
|
+
readonly decoder?: string | undefined;
|
|
1554
|
+
readonly issueTag?: string | undefined;
|
|
1555
|
+
readonly sequence?: number | undefined;
|
|
1556
|
+
} | undefined;
|
|
1547
1557
|
} | {
|
|
1548
1558
|
readonly _tag: "HostProtocolError";
|
|
1549
1559
|
readonly message: string;
|
|
1550
1560
|
} | {
|
|
1551
|
-
readonly _tag: "
|
|
1552
|
-
readonly
|
|
1561
|
+
readonly _tag: "AdmissionLimitExceeded";
|
|
1562
|
+
readonly limit: "database-bytes" | "input-bytes" | "queue-depth";
|
|
1563
|
+
readonly actual: number;
|
|
1564
|
+
readonly maximum: number;
|
|
1553
1565
|
} | {
|
|
1554
|
-
readonly _tag: "
|
|
1566
|
+
readonly _tag: "LedgerError";
|
|
1567
|
+
readonly operation: string;
|
|
1555
1568
|
readonly message: string;
|
|
1556
|
-
readonly cause?:
|
|
1569
|
+
readonly cause?: import("effect-agent/failure-diagnostic").Diagnostic | undefined;
|
|
1557
1570
|
} | {
|
|
1558
1571
|
readonly _tag: "AdmissionConflict";
|
|
1559
1572
|
readonly threadId: string;
|
|
@@ -1568,42 +1581,8 @@ export declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorde
|
|
|
1568
1581
|
readonly cause?: import("effect-agent/failure-diagnostic").Diagnostic | undefined;
|
|
1569
1582
|
readonly stack?: string | undefined;
|
|
1570
1583
|
} | {
|
|
1571
|
-
readonly _tag: "
|
|
1572
|
-
readonly submissionId: string;
|
|
1573
|
-
readonly existingOutcome: "aborted" | "completed" | "failed";
|
|
1574
|
-
} | {
|
|
1575
|
-
readonly _tag: "ApprovalConflict";
|
|
1576
|
-
readonly submissionId: string;
|
|
1577
|
-
readonly toolCallId: string;
|
|
1578
|
-
readonly existingDecision: "approved" | "denied";
|
|
1579
|
-
} | {
|
|
1580
|
-
readonly _tag: "UnknownResolutionConflict";
|
|
1581
|
-
readonly submissionId: string;
|
|
1582
|
-
readonly toolCallId: string;
|
|
1583
|
-
} | {
|
|
1584
|
-
readonly _tag: "JoinedToHost";
|
|
1585
|
-
readonly submissionId: string;
|
|
1586
|
-
readonly hostSubmissionId: string;
|
|
1587
|
-
} | {
|
|
1588
|
-
readonly _tag: "LedgerError";
|
|
1589
|
-
readonly operation: string;
|
|
1590
|
-
readonly message: string;
|
|
1591
|
-
readonly cause?: import("effect-agent/failure-diagnostic").Diagnostic | undefined;
|
|
1592
|
-
} | {
|
|
1593
|
-
readonly _tag: "ThreadStoreError";
|
|
1594
|
-
readonly operation: string;
|
|
1584
|
+
readonly _tag: "AgentInputError";
|
|
1595
1585
|
readonly message: string;
|
|
1596
|
-
readonly cause?: Schema.Json | undefined;
|
|
1597
|
-
readonly diagnostic?: {
|
|
1598
|
-
readonly causeTag: string;
|
|
1599
|
-
readonly operation: string;
|
|
1600
|
-
readonly decoder?: string | undefined;
|
|
1601
|
-
readonly issueTag?: string | undefined;
|
|
1602
|
-
readonly sequence?: number | undefined;
|
|
1603
|
-
} | undefined;
|
|
1604
|
-
} | {
|
|
1605
|
-
readonly _tag: "ThreadNotMaterialized";
|
|
1606
|
-
readonly threadId: string;
|
|
1607
1586
|
} | {
|
|
1608
1587
|
readonly _tag: "AppendConflict";
|
|
1609
1588
|
readonly threadId: string;
|
|
@@ -1612,24 +1591,45 @@ export declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorde
|
|
|
1612
1591
|
readonly actualTailSequence?: number | undefined;
|
|
1613
1592
|
readonly actualTailDigest?: string | undefined;
|
|
1614
1593
|
} | {
|
|
1615
|
-
readonly _tag: "
|
|
1616
|
-
readonly
|
|
1617
|
-
readonly
|
|
1618
|
-
|
|
1594
|
+
readonly _tag: "DigestError";
|
|
1595
|
+
readonly message: string;
|
|
1596
|
+
readonly cause?: Schema.Json | undefined;
|
|
1597
|
+
} | {
|
|
1598
|
+
readonly _tag: "DurableAlarmError";
|
|
1599
|
+
readonly operation: string;
|
|
1600
|
+
readonly message: string;
|
|
1601
|
+
readonly cause?: Schema.Json | undefined;
|
|
1619
1602
|
} | {
|
|
1620
1603
|
readonly _tag: "DurableRuntimeFailpointError";
|
|
1621
1604
|
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-stop-append" | "worker:after-stop-seal" | "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-stop-append" | "worker:before-stop-seal" | "worker:before-subtree-append";
|
|
1622
1605
|
} | {
|
|
1623
|
-
readonly _tag: "
|
|
1624
|
-
readonly
|
|
1625
|
-
readonly
|
|
1626
|
-
readonly
|
|
1606
|
+
readonly _tag: "FenceRejected";
|
|
1607
|
+
readonly threadId: string;
|
|
1608
|
+
readonly actualEpoch: number;
|
|
1609
|
+
readonly attemptedEpoch: number;
|
|
1627
1610
|
} | {
|
|
1628
1611
|
readonly _tag: "OperationDenied";
|
|
1629
1612
|
readonly operation: "abort" | "awaitSettlement" | "explain" | "observe" | "resolveApproval" | "resolveUnknown" | "retry" | "scanObligations" | "verify" | "wake";
|
|
1630
1613
|
readonly reason: string;
|
|
1631
1614
|
readonly threadId?: string | undefined;
|
|
1632
1615
|
readonly submissionId?: string | undefined;
|
|
1616
|
+
} | {
|
|
1617
|
+
readonly _tag: "SettlementConflict";
|
|
1618
|
+
readonly submissionId: string;
|
|
1619
|
+
readonly existingOutcome: "aborted" | "completed" | "failed";
|
|
1620
|
+
} | {
|
|
1621
|
+
readonly _tag: "JoinedToHost";
|
|
1622
|
+
readonly submissionId: string;
|
|
1623
|
+
readonly hostSubmissionId: string;
|
|
1624
|
+
} | {
|
|
1625
|
+
readonly _tag: "ApprovalConflict";
|
|
1626
|
+
readonly submissionId: string;
|
|
1627
|
+
readonly toolCallId: string;
|
|
1628
|
+
readonly existingDecision: "approved" | "denied";
|
|
1629
|
+
} | {
|
|
1630
|
+
readonly _tag: "UnknownResolutionConflict";
|
|
1631
|
+
readonly submissionId: string;
|
|
1632
|
+
readonly toolCallId: string;
|
|
1633
1633
|
};
|
|
1634
1634
|
}, Schema.SchemaError, never>;
|
|
1635
1635
|
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>;
|
|
@@ -224,5 +224,5 @@ declare const CloudflareInteractiveBrowser: {
|
|
|
224
224
|
hostLayer: (options: CloudflareInteractiveBrowserOptions) => Layer.Layer<BrowserRunInteractiveHost, BrowserRunCleanupError | InteractiveBrowserPolicyDeniedError, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
225
225
|
};
|
|
226
226
|
//#endregion
|
|
227
|
-
export { CloudflareInteractiveBrowserOptions as C, isBrowserRunUndispatchedActionError as D, browserRunInteractiveLayer as E, BrowserRunCleanupError as O, CloudflareInteractiveBrowser as S, browserRunInteractiveImplementation as T, BrowserRunLiveViewRequest as _, BrowserRunInputState as a, BrowserRunPageObservation as b, BrowserRunInteractiveBrowser as c, BrowserRunInteractiveContext as d, BrowserRunInteractiveHost as f, BrowserRunInteractiveSession as g, BrowserRunInteractiveRequestListener as h, BrowserRunHandoffState as i,
|
|
228
|
-
//# sourceMappingURL=InteractiveBrowser-
|
|
227
|
+
export { BrowserRunSessionLifecycle as A, CloudflareInteractiveBrowserOptions as C, isBrowserRunUndispatchedActionError as D, browserRunInteractiveLayer as E, BrowserRunCleanupError as O, CloudflareInteractiveBrowser as S, browserRunInteractiveImplementation as T, BrowserRunLiveViewRequest as _, BrowserRunInputState as a, BrowserRunPageObservation as b, BrowserRunInteractiveBrowser as c, BrowserRunInteractiveContext as d, BrowserRunInteractiveHost as f, BrowserRunInteractiveSession as g, BrowserRunInteractiveRequestListener as h, BrowserRunHandoffState as i, BrowserRunLifecycleOptions as k, BrowserRunInteractiveCdpSession as l, BrowserRunInteractiveRequest as m, BrowserRunHandoffRequest as n, BrowserRunInteractiveAcquisition as o, BrowserRunInteractivePage as p, BrowserRunHandoffResult as r, BrowserRunInteractiveBinding as s, BrowserRunCloudflareCommand as t, BrowserRunInteractiveCheckpoint as u, BrowserRunLiveViewResult as v, browserRunInteractiveHostLayer as w, BrowserRunViewport as x, BrowserRunPageIdentity as y };
|
|
228
|
+
//# sourceMappingURL=InteractiveBrowser-BnqY_Y-F.d.mts.map
|
|
@@ -11,7 +11,6 @@ var BrowserRunFailure = class extends Data.TaggedError("BrowserRunFailure") {
|
|
|
11
11
|
};
|
|
12
12
|
/** A public projection of an already reported private failure must not produce another issue. */
|
|
13
13
|
const reportedBrowserError = (error) => Object.assign(error, { [ErrorReporter.ignore]: true });
|
|
14
|
-
const inheritBrowserReport = (original, error) => ErrorReporter.isIgnored(original) ? reportedBrowserError(error) : error;
|
|
15
14
|
const reasonSchema = Schema.Literals([
|
|
16
15
|
"provider",
|
|
17
16
|
"timeout",
|
|
@@ -105,7 +104,7 @@ var BrowserRunBinding = class extends Context.Service()("@effect-agent/platform-
|
|
|
105
104
|
let retired = false;
|
|
106
105
|
let closedByAbort = false;
|
|
107
106
|
let retirementFailure;
|
|
108
|
-
const disconnectOperation = operation === "
|
|
107
|
+
const disconnectOperation = operation === "session.connect" ? "session.disconnect" : "interactive.disconnect";
|
|
109
108
|
const transport = {
|
|
110
109
|
send: (message) => {
|
|
111
110
|
if (retired || socket === void 0) throw new BrowserRunFailure({
|
|
@@ -199,7 +198,7 @@ var BrowserRunBinding = class extends Context.Service()("@effect-agent/platform-
|
|
|
199
198
|
};
|
|
200
199
|
},
|
|
201
200
|
keepAlive: Effect.fnUntraced(function* (sessionId) {
|
|
202
|
-
const operation = "
|
|
201
|
+
const operation = "session.keepAlive";
|
|
203
202
|
const runReport = Effect.runPromiseWith(yield* Effect.context());
|
|
204
203
|
const release = (socket) => Effect.sync(() => socket.close()).pipe(Effect.catchCause((cause) => reportBrowserCause(operation, cause)));
|
|
205
204
|
const socket = yield* Effect.acquireRelease(Effect.tryPromise({
|
|
@@ -1916,6 +1915,6 @@ const CloudflareInteractiveBrowser = {
|
|
|
1916
1915
|
hostLayer: (options) => browserRunInteractiveHostLayer().pipe(Layer.provide(interactiveBindingLayer(options)))
|
|
1917
1916
|
};
|
|
1918
1917
|
//#endregion
|
|
1919
|
-
export {
|
|
1918
|
+
export { BrowserRunCleanupError as _, BrowserRunInteractiveCheckpoint as a, reportBrowserCause as b, BrowserRunLiveViewResult as c, BrowserRunViewport as d, CloudflareInteractiveBrowser as f, isBrowserRunUndispatchedActionError as g, browserRunInteractiveLayer as h, BrowserRunInteractiveBinding as i, BrowserRunPageIdentity as l, browserRunInteractiveImplementation as m, BrowserRunHandoffResult as n, BrowserRunInteractiveHost as o, browserRunInteractiveHostLayer as p, BrowserRunHandoffState as r, BrowserRunLiveViewRequest as s, BrowserRunHandoffRequest as t, BrowserRunPageObservation as u, BrowserRunSessionLifecycle as v, reportedBrowserError as x, BrowserRunBinding as y };
|
|
1920
1919
|
|
|
1921
|
-
//# sourceMappingURL=InteractiveBrowser-
|
|
1920
|
+
//# sourceMappingURL=InteractiveBrowser-DeOlcu-2.mjs.map
|