@effect-agent/platform-cloudflare 0.1.0-beta.113 → 0.1.0-beta.115
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/Alarm.d.mts +32 -48
- package/dist/Alarm.mjs +173 -175
- package/dist/Alarm.mjs.map +1 -1
- package/dist/CloudflareThreadClient.d.mts +45 -30
- package/dist/ProtectedBrowser.mjs +2 -1
- package/dist/ProtectedBrowser.mjs.map +1 -1
- package/dist/{ThreadObject-BPt5uByD.mjs → ThreadObject-CEWwifrL.mjs} +10 -29
- package/dist/ThreadObject-CEWwifrL.mjs.map +1 -0
- package/dist/{ThreadObject-DAuaRyGl.d.mts → ThreadObject-HwODpdru.d.mts} +22 -22
- package/dist/ThreadObject.d.mts +1 -1
- package/dist/ThreadObject.mjs +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/Alarm.ts +291 -350
- package/src/ThreadObject.ts +4 -0
- package/src/internal/layers.ts +8 -0
- package/src/internal/message-delivery.ts +4 -64
- package/src/protected-browser/inspect-frame.ts +2 -1
- package/dist/ThreadObject-BPt5uByD.mjs.map +0 -1
|
@@ -66,6 +66,7 @@ declare const SubmitRequest_base: Schema.Class<SubmitRequest, Schema.Struct<{
|
|
|
66
66
|
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
67
67
|
}>]>;
|
|
68
68
|
readonly budgetScope: Schema.optionalKey<Schema.Literals<readonly ["source-subtree", "worker-run"]>>;
|
|
69
|
+
readonly lifecycle: Schema.optionalKey<Schema.Literal<"assignment">>;
|
|
69
70
|
readonly targetDigests: typeof DefinitionDigests;
|
|
70
71
|
readonly policy: Schema.toCodecJson<typeof import("effect-agent/agent-policy").AgentPolicy>;
|
|
71
72
|
readonly budget: Schema.Struct<{
|
|
@@ -268,6 +269,7 @@ export declare const encodeSubmitRequest: (input: SubmitRequest, options?: impor
|
|
|
268
269
|
readonly threadId: string;
|
|
269
270
|
};
|
|
270
271
|
readonly budgetScope?: "source-subtree" | "worker-run" | undefined;
|
|
272
|
+
readonly lifecycle?: "assignment" | undefined;
|
|
271
273
|
readonly targetDigests: {
|
|
272
274
|
readonly agent: string;
|
|
273
275
|
readonly model: string;
|
|
@@ -665,14 +667,6 @@ export declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorde
|
|
|
665
667
|
readonly createdAt: string;
|
|
666
668
|
readonly deploymentId: string;
|
|
667
669
|
readonly payload: {
|
|
668
|
-
readonly _tag: "SubagentStarted";
|
|
669
|
-
readonly runId: string;
|
|
670
|
-
readonly toolCallId: string;
|
|
671
|
-
readonly childThreadId: string;
|
|
672
|
-
readonly childSubmissionId: string;
|
|
673
|
-
readonly childReceiptId: string;
|
|
674
|
-
readonly childRunId: string;
|
|
675
|
-
} | {
|
|
676
670
|
readonly _tag: "ThreadCreated";
|
|
677
671
|
readonly agentId: string;
|
|
678
672
|
readonly definitions: {
|
|
@@ -1089,6 +1083,14 @@ export declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorde
|
|
|
1089
1083
|
readonly childLifetimes?: readonly ("attached" | "background")[] | undefined;
|
|
1090
1084
|
} | undefined;
|
|
1091
1085
|
readonly depth?: number | undefined;
|
|
1086
|
+
} | {
|
|
1087
|
+
readonly _tag: "SubagentStarted";
|
|
1088
|
+
readonly runId: string;
|
|
1089
|
+
readonly toolCallId: string;
|
|
1090
|
+
readonly childThreadId: string;
|
|
1091
|
+
readonly childSubmissionId: string;
|
|
1092
|
+
readonly childReceiptId: string;
|
|
1093
|
+
readonly childRunId: string;
|
|
1092
1094
|
} | {
|
|
1093
1095
|
readonly _tag: "SubagentJoined";
|
|
1094
1096
|
readonly runId: string;
|
|
@@ -1196,6 +1198,7 @@ export declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorde
|
|
|
1196
1198
|
readonly threadId: string;
|
|
1197
1199
|
};
|
|
1198
1200
|
readonly budgetScope?: "source-subtree" | "worker-run" | undefined;
|
|
1201
|
+
readonly lifecycle?: "assignment" | undefined;
|
|
1199
1202
|
readonly targetDigests: {
|
|
1200
1203
|
readonly agent: string;
|
|
1201
1204
|
readonly model: string;
|
|
@@ -1279,6 +1282,17 @@ export declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorde
|
|
|
1279
1282
|
readonly reportKind?: "update" | undefined;
|
|
1280
1283
|
};
|
|
1281
1284
|
readonly inputDigest: string;
|
|
1285
|
+
} | {
|
|
1286
|
+
readonly _tag: "WorkerStopRequested";
|
|
1287
|
+
readonly command: {
|
|
1288
|
+
readonly worker: {
|
|
1289
|
+
readonly schemaVersion: 1;
|
|
1290
|
+
readonly delegationId: string;
|
|
1291
|
+
readonly targetAgentId: string;
|
|
1292
|
+
readonly threadId: string;
|
|
1293
|
+
};
|
|
1294
|
+
readonly idempotencyKey: string;
|
|
1295
|
+
};
|
|
1282
1296
|
} | {
|
|
1283
1297
|
readonly _tag: "WorkerOriginRecorded";
|
|
1284
1298
|
readonly origin: {
|
|
@@ -1300,6 +1314,7 @@ export declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorde
|
|
|
1300
1314
|
readonly threadId: string;
|
|
1301
1315
|
};
|
|
1302
1316
|
readonly budgetScope?: "source-subtree" | "worker-run" | undefined;
|
|
1317
|
+
readonly lifecycle?: "assignment" | undefined;
|
|
1303
1318
|
readonly targetDigests: {
|
|
1304
1319
|
readonly agent: string;
|
|
1305
1320
|
readonly model: string;
|
|
@@ -1549,27 +1564,6 @@ export declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorde
|
|
|
1549
1564
|
readonly operation: string;
|
|
1550
1565
|
readonly message: string;
|
|
1551
1566
|
readonly cause?: import("effect-agent/failure-diagnostic").Diagnostic | undefined;
|
|
1552
|
-
} | {
|
|
1553
|
-
readonly _tag: "AdmissionConflict";
|
|
1554
|
-
readonly threadId: string;
|
|
1555
|
-
readonly principal: string;
|
|
1556
|
-
readonly idempotencyKey: string;
|
|
1557
|
-
readonly existingInputDigest: string;
|
|
1558
|
-
readonly attemptedInputDigest: string;
|
|
1559
|
-
} | {
|
|
1560
|
-
readonly _tag: "AdmissionPolicyError";
|
|
1561
|
-
readonly reason: "occupied" | "refused" | "unavailable";
|
|
1562
|
-
readonly code: string;
|
|
1563
|
-
readonly cause?: import("effect-agent/failure-diagnostic").Diagnostic | undefined;
|
|
1564
|
-
readonly stack?: string | undefined;
|
|
1565
|
-
} | {
|
|
1566
|
-
readonly _tag: "SettlementConflict";
|
|
1567
|
-
readonly submissionId: string;
|
|
1568
|
-
readonly existingOutcome: "aborted" | "completed" | "failed";
|
|
1569
|
-
} | {
|
|
1570
|
-
readonly _tag: "JoinedToHost";
|
|
1571
|
-
readonly submissionId: string;
|
|
1572
|
-
readonly hostSubmissionId: string;
|
|
1573
1567
|
} | {
|
|
1574
1568
|
readonly _tag: "AppendConflict";
|
|
1575
1569
|
readonly threadId: string;
|
|
@@ -1588,6 +1582,19 @@ export declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorde
|
|
|
1588
1582
|
readonly reason: string;
|
|
1589
1583
|
readonly threadId?: string | undefined;
|
|
1590
1584
|
readonly submissionId?: string | undefined;
|
|
1585
|
+
} | {
|
|
1586
|
+
readonly _tag: "AdmissionConflict";
|
|
1587
|
+
readonly threadId: string;
|
|
1588
|
+
readonly principal: string;
|
|
1589
|
+
readonly idempotencyKey: string;
|
|
1590
|
+
readonly existingInputDigest: string;
|
|
1591
|
+
readonly attemptedInputDigest: string;
|
|
1592
|
+
} | {
|
|
1593
|
+
readonly _tag: "AdmissionPolicyError";
|
|
1594
|
+
readonly reason: "occupied" | "refused" | "unavailable";
|
|
1595
|
+
readonly code: string;
|
|
1596
|
+
readonly cause?: import("effect-agent/failure-diagnostic").Diagnostic | undefined;
|
|
1597
|
+
readonly stack?: string | undefined;
|
|
1591
1598
|
} | {
|
|
1592
1599
|
readonly _tag: "AgentInputError";
|
|
1593
1600
|
readonly message: string;
|
|
@@ -1597,7 +1604,15 @@ export declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorde
|
|
|
1597
1604
|
readonly cause?: Schema.Json | undefined;
|
|
1598
1605
|
} | {
|
|
1599
1606
|
readonly _tag: "DurableRuntimeFailpointError";
|
|
1600
|
-
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";
|
|
1607
|
+
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";
|
|
1608
|
+
} | {
|
|
1609
|
+
readonly _tag: "SettlementConflict";
|
|
1610
|
+
readonly submissionId: string;
|
|
1611
|
+
readonly existingOutcome: "aborted" | "completed" | "failed";
|
|
1612
|
+
} | {
|
|
1613
|
+
readonly _tag: "JoinedToHost";
|
|
1614
|
+
readonly submissionId: string;
|
|
1615
|
+
readonly hostSubmissionId: string;
|
|
1601
1616
|
} | {
|
|
1602
1617
|
readonly _tag: "AdmissionLimitExceeded";
|
|
1603
1618
|
readonly limit: "database-bytes" | "input-bytes" | "queue-depth";
|
|
@@ -496,7 +496,8 @@ const inspectFrame = `(() => {
|
|
|
496
496
|
if (type === 'password' && form) role = 'password';
|
|
497
497
|
} else if (['text','email','tel','number','month','search','url','date','time','week','datetime-local','textarea',''].includes(type) || el instanceof HTMLSelectElement) {
|
|
498
498
|
if (cardRoles[autocomplete]) { if (form) role = cardRoles[autocomplete]; }
|
|
499
|
-
|
|
499
|
+
// Email autocomplete alone is contact data; explicit usernames and password forms identify login fields.
|
|
500
|
+
else if (autocomplete === 'username') { if (form) role = 'username'; }
|
|
500
501
|
else if (['text','email'].includes(type) && form && form.querySelector('input[type="password"]')) role = 'username';
|
|
501
502
|
else if (el instanceof HTMLSelectElement) { if (!el.multiple) role = 'select'; }
|
|
502
503
|
else role = 'text';
|