effect-agent 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/Agent-1DMSO_Fl.mjs.map +1 -1
- package/dist/{Agent-DriBcXBN.d.mts → Agent-D9cXqfF3.d.mts} +9 -2
- package/dist/{AgentRuntime-DLwPoEVH.mjs → AgentRuntime-Cp1hAb-W.mjs} +8 -4
- package/dist/AgentRuntime-Cp1hAb-W.mjs.map +1 -0
- package/dist/{AgentRuntime-CWkHuzyt.d.mts → AgentRuntime-DyZv8uu2.d.mts} +6 -6
- package/dist/{DurableAgentRuntime-BIrgxwRl.mjs → DurableAgentRuntime-tNrkJZNo.mjs} +254 -162
- package/dist/DurableAgentRuntime-tNrkJZNo.mjs.map +1 -0
- package/dist/{DurableFailpoint-mx3-nsxU.d.mts → DurableFailpoint-Cnr3wx1L.d.mts} +3 -3
- package/dist/{EventSource-ARs56eBq.d.mts → EventSource-DPRdlvhV.d.mts} +3 -3
- package/dist/{Messaging-DaZDlBqh.d.mts → Messaging-JYYN3oYS.d.mts} +3 -3
- package/dist/{MessagingHost-e1Sbzfao.d.mts → MessagingHost-CqzpxbGz.d.mts} +3 -3
- package/dist/{MessagingHost-D89X7ma8.mjs → MessagingHost-DfsbMPvq.mjs} +2 -2
- package/dist/{MessagingHost-D89X7ma8.mjs.map → MessagingHost-DfsbMPvq.mjs.map} +1 -1
- package/dist/{Output-CAFJTAbP.d.mts → Output-V-6YL1_Z.d.mts} +2 -2
- package/dist/{PreparedInputAdmission-_WYg-D0f.d.mts → PreparedInputAdmission-DqQUjA9k.d.mts} +4 -4
- package/dist/{Records-BtxMy8xD.d.mts → Records-Byeb70tt.d.mts} +89 -31
- package/dist/{RunOptions-BoESJrxw.d.mts → RunOptions-CSBsSj0X.d.mts} +3 -3
- package/dist/{Schedule-DGPyXBzK.d.mts → Schedule-krSnBcbU.d.mts} +2 -2
- package/dist/{Subagent-D9eYdGTl.mjs → Subagent-Di8EEjWZ.mjs} +67 -105
- package/dist/Subagent-Di8EEjWZ.mjs.map +1 -0
- package/dist/{Subagent-F72tuaxy.d.mts → Subagent-gw9KD6eb.d.mts} +310 -35
- package/dist/{SubagentHost-CmiNTOBZ.d.mts → SubagentHost-P9zB_TfV.d.mts} +24 -18
- package/dist/{Subscription-B9VszlF9.d.mts → Subscription-Xnwd42Sm.d.mts} +6 -3
- package/dist/{SubscriptionInput-BJWZqCWP.d.mts → SubscriptionInput-CqtJ58vl.d.mts} +3 -3
- package/dist/{Worker-T_3RbaKc.mjs → Worker-CfwzMZEK.mjs} +66 -5
- package/dist/Worker-CfwzMZEK.mjs.map +1 -0
- package/dist/{Worker-Du9dhVnp.d.mts → Worker-fwWkBg12.d.mts} +199 -6
- package/dist/{agent-registration-B5CI-Ygk.mjs → agent-registration-CKNsrpwo.mjs} +7 -7
- package/dist/agent-registration-CKNsrpwo.mjs.map +1 -0
- package/dist/capabilities/Commands.d.mts +1 -1
- package/dist/capabilities/Messaging.d.mts +1 -1
- package/dist/capabilities/Messaging.mjs +2 -2
- package/dist/capabilities/RunHooks.d.mts +1 -1
- package/dist/capabilities/Subagent.d.mts +3 -3
- package/dist/capabilities/Subagent.mjs +3 -3
- package/dist/core/Agent.d.mts +1 -1
- package/dist/core/Worker.d.mts +2 -2
- package/dist/core/Worker.mjs +2 -2
- package/dist/durable/ActivityStore.d.mts +1 -1
- package/dist/durable/Admin.d.mts +1 -1
- package/dist/durable/AgentRegistration.d.mts +1 -1
- package/dist/durable/AgentRegistration.mjs +1 -1
- package/dist/durable/Certification.d.mts +2 -2
- package/dist/durable/CommittedActivity.d.mts +1 -1
- package/dist/durable/Digest.d.mts +1 -1
- package/dist/durable/DurableAgentRuntime.d.mts +1 -1
- package/dist/durable/DurableAgentRuntime.mjs +1 -1
- package/dist/durable/DurableFailpoint.d.mts +1 -1
- package/dist/durable/DurableFailpoint.mjs +4 -0
- package/dist/durable/DurableFailpoint.mjs.map +1 -1
- package/dist/durable/DurableFailpointTestControl.d.mts +1 -1
- package/dist/durable/EventSource.d.mts +1 -1
- package/dist/durable/GitHubWorkflowSource.d.mts +3 -3
- package/dist/durable/MessageDelivery.d.mts +20 -3
- package/dist/durable/MessageDelivery.mjs +12 -4
- package/dist/durable/MessageDelivery.mjs.map +1 -1
- package/dist/durable/MessageDeliveryStoreConformance.d.mts +41 -39
- package/dist/durable/MessageDeliveryStoreConformance.mjs +1 -1
- package/dist/durable/PersistentHistory.d.mts +1 -1
- package/dist/durable/PreparedInputAdmission.d.mts +1 -1
- package/dist/durable/Records.d.mts +2 -2
- package/dist/durable/Records.mjs +12 -5
- package/dist/durable/Records.mjs.map +1 -1
- package/dist/durable/Recovery.d.mts +1 -1
- package/dist/durable/RunJournal.d.mts +1 -1
- package/dist/durable/Schedule.d.mts +1 -1
- package/dist/durable/ScheduleStoreConformance.d.mts +1 -1
- package/dist/durable/ScheduleTransition.d.mts +1 -1
- package/dist/durable/Scheduling.d.mts +2 -2
- package/dist/durable/SqlMessageDeliveryStore.mjs +7 -1
- package/dist/durable/SqlMessageDeliveryStore.mjs.map +1 -1
- package/dist/durable/SqlStorageV2Upgrade.d.mts +2 -2
- package/dist/durable/SqlSubscriptionStore.d.mts +2 -2
- package/dist/durable/SqlThreadNativeReads.d.mts +5 -1
- package/dist/durable/SqlThreadNativeReads.mjs +6 -0
- package/dist/durable/SqlThreadNativeReads.mjs.map +1 -1
- package/dist/durable/SubmissionLedger.d.mts +2 -2
- package/dist/durable/SubmissionLedger.mjs +34 -4
- package/dist/durable/SubmissionLedger.mjs.map +1 -1
- package/dist/durable/SubmissionLedgerConformance.d.mts +1 -1
- package/dist/durable/SubmissionLedgerConformance.mjs +899 -706
- package/dist/durable/SubmissionLedgerConformance.mjs.map +1 -1
- package/dist/durable/SubmissionStatus.d.mts +1 -1
- package/dist/durable/Subscription.d.mts +1 -1
- package/dist/durable/Subscription.mjs +1 -1
- package/dist/durable/SubscriptionInput.d.mts +1 -1
- package/dist/durable/SubscriptionInput.mjs +1 -1
- package/dist/durable/SubscriptionStoreConformance.d.mts +1 -1
- package/dist/durable/SubscriptionTools.d.mts +3 -3
- package/dist/durable/SubscriptionTransition.d.mts +1 -1
- package/dist/durable/Subscriptions.d.mts +5 -5
- package/dist/durable/ThreadContextHistory.d.mts +1 -1
- package/dist/durable/ThreadContextHistoryProjection.d.mts +1 -1
- package/dist/durable/ThreadInvariants.d.mts +1 -1
- package/dist/durable/ThreadProjection.d.mts +1 -1
- package/dist/durable/ThreadProjectionMaintenance.d.mts +1 -1
- package/dist/durable/ThreadStore.d.mts +1 -1
- package/dist/durable/ThreadStore.mjs +5 -0
- package/dist/durable/ThreadStore.mjs.map +1 -1
- package/dist/durable/ThreadStoreConformance.d.mts +1 -1
- package/dist/durable/WorkerHost.d.mts +3 -3
- package/dist/durable/WorkerHost.mjs +1 -1
- package/dist/engine/AgentRuntime.d.mts +1 -1
- package/dist/engine/AgentRuntime.mjs +1 -1
- package/dist/engine/MessagingHost.d.mts +1 -1
- package/dist/engine/MessagingHost.mjs +1 -1
- package/dist/engine/Output.d.mts +1 -1
- package/dist/engine/RunOptions.d.mts +1 -1
- package/dist/engine/SubagentHost.d.mts +2 -2
- package/dist/engine/SubagentHost.mjs +5 -1
- package/dist/engine/SubagentHost.mjs.map +1 -1
- package/dist/index.d.mts +16 -16
- package/dist/index.mjs +5 -5
- package/package.json +1 -1
- package/src/capabilities/Subagent.ts +2 -1
- package/src/capabilities/internal/subagent-background.ts +86 -57
- package/src/capabilities/internal/subagent-reporting.ts +3 -128
- package/src/core/Agent.ts +8 -1
- package/src/core/Worker.ts +58 -2
- package/src/durable/DurableAgentRuntime.ts +2 -0
- package/src/durable/DurableFailpoint.ts +4 -0
- package/src/durable/MessageDelivery.ts +17 -2
- package/src/durable/Records.ts +12 -2
- package/src/durable/SqlMessageDeliveryStore.ts +15 -1
- package/src/durable/SqlThreadNativeReads.ts +14 -0
- package/src/durable/SubmissionLedger.ts +48 -1
- package/src/durable/SubmissionLedgerConformance.ts +260 -42
- package/src/durable/ThreadStore.ts +5 -0
- package/src/durable/internal/agent-registration.ts +13 -48
- package/src/durable/internal/worker-host.ts +490 -341
- package/src/engine/SubagentHost.ts +37 -13
- package/src/engine/internal/agent-runtime.ts +17 -2
- package/dist/AgentRuntime-DLwPoEVH.mjs.map +0 -1
- package/dist/DurableAgentRuntime-BIrgxwRl.mjs.map +0 -1
- package/dist/Subagent-D9eYdGTl.mjs.map +0 -1
- package/dist/Worker-T_3RbaKc.mjs.map +0 -1
- package/dist/agent-registration-B5CI-Ygk.mjs.map +0 -1
|
@@ -5,12 +5,12 @@ import { a as Receipt, n as JoinedToHost, t as IdempotencyKey } from "./Receipt-
|
|
|
5
5
|
import { s as RunTotals } from "./Usage-Dx0aknfk.mjs";
|
|
6
6
|
import { t as ThreadHistory } from "./ThreadHistory-tS1KwxHR.mjs";
|
|
7
7
|
import { a as FailureDiagnostic_d_exports, r as Diagnostic } from "./FailureDiagnostic-CaAkzGHL.mjs";
|
|
8
|
-
import { E as RunDispositionDeclaration, _ as InstructionSource, c as Definition, m as InputPromptSource, r as AnyDefinition, y as ModelServices } from "./Agent-
|
|
9
|
-
import { a as
|
|
10
|
-
import { V as RunSubagentDigests, x as RunContextPreparation } from "./RunOptions-
|
|
8
|
+
import { E as RunDispositionDeclaration, _ as InstructionSource, c as Definition, m as InputPromptSource, r as AnyDefinition, y as ModelServices } from "./Agent-D9cXqfF3.mjs";
|
|
9
|
+
import { a as WorkerBudgetScope, c as WorkerError, f as WorkerRef, o as WorkerCompletion, p as WorkerReport } from "./Worker-fwWkBg12.mjs";
|
|
10
|
+
import { V as RunSubagentDigests, x as RunContextPreparation } from "./RunOptions-CSBsSj0X.mjs";
|
|
11
11
|
import { c as MessageRef, l as MessageStatus } from "./Messaging-Dkg87ebg.mjs";
|
|
12
|
-
import {
|
|
13
|
-
import { S as ToolCallWaiting, _ as SubagentDurability, b as SubagentDurabilityError, c as AgentSpawner, h as SpawnRunOptions, l as AgentSpawnerParent, o as AgentRuntimeFailure, p as RuntimeBinding, s as AgentRuntimeRequirements } from "./AgentRuntime-
|
|
12
|
+
import { a as SubagentHost } from "./SubagentHost-P9zB_TfV.mjs";
|
|
13
|
+
import { S as ToolCallWaiting, _ as SubagentDurability, b as SubagentDurabilityError, c as AgentSpawner, h as SpawnRunOptions, l as AgentSpawnerParent, o as AgentRuntimeFailure, p as RuntimeBinding, s as AgentRuntimeRequirements } from "./AgentRuntime-DyZv8uu2.mjs";
|
|
14
14
|
import { t as RunEventSink } from "./RunEventSink-D5aVhISG.mjs";
|
|
15
15
|
import { Tool, Toolkit } from "effect/unstable/ai";
|
|
16
16
|
import { Crypto, Duration, Effect, Layer, Schema, Scope, Stream } from "effect";
|
|
@@ -474,7 +474,77 @@ declare const operations: <const Name extends string, Input extends Schema.Top,
|
|
|
474
474
|
readonly after?: ThreadId;
|
|
475
475
|
} | undefined) => Effect.Effect<{
|
|
476
476
|
items: {
|
|
477
|
-
state: "active" | "idle" | "starting";
|
|
477
|
+
state: "active" | "cancelled" | "completed" | "failed" | "idle" | "starting" | "stopped" | "stopping";
|
|
478
|
+
acceptedInput: {
|
|
479
|
+
readonly receipt: Receipt;
|
|
480
|
+
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
481
|
+
} | null;
|
|
482
|
+
appliedInput: {
|
|
483
|
+
readonly receipt: Receipt;
|
|
484
|
+
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
485
|
+
readonly runId: string & import("effect/Brand").Brand<"@effect-agent/core/RunId">;
|
|
486
|
+
readonly sequence: number;
|
|
487
|
+
} | null;
|
|
488
|
+
run: {
|
|
489
|
+
readonly runId: string & import("effect/Brand").Brand<"@effect-agent/core/RunId">;
|
|
490
|
+
readonly hostReceipt: Receipt;
|
|
491
|
+
readonly outcome: "aborted" | "completed" | "failed" | null;
|
|
492
|
+
readonly disposition: Schema.Json;
|
|
493
|
+
} | null;
|
|
494
|
+
pendingDelivery: {
|
|
495
|
+
readonly message: {
|
|
496
|
+
readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
497
|
+
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
498
|
+
};
|
|
499
|
+
readonly status: "pending";
|
|
500
|
+
readonly receipt: null;
|
|
501
|
+
readonly settlement: null;
|
|
502
|
+
readonly reason: string | null;
|
|
503
|
+
} | {
|
|
504
|
+
readonly message: {
|
|
505
|
+
readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
506
|
+
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
507
|
+
};
|
|
508
|
+
readonly status: "accepted";
|
|
509
|
+
readonly receipt: Receipt;
|
|
510
|
+
readonly settlement: null;
|
|
511
|
+
readonly reason: string | null;
|
|
512
|
+
} | {
|
|
513
|
+
readonly message: {
|
|
514
|
+
readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
515
|
+
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
516
|
+
};
|
|
517
|
+
readonly status: "processed";
|
|
518
|
+
readonly receipt: Receipt;
|
|
519
|
+
readonly settlement: {
|
|
520
|
+
readonly settlementId: string & import("effect/Brand").Brand<"@effect-agent/core/SettlementId">;
|
|
521
|
+
readonly outcome: "aborted" | "completed" | "failed";
|
|
522
|
+
};
|
|
523
|
+
readonly reason: null;
|
|
524
|
+
} | {
|
|
525
|
+
readonly message: {
|
|
526
|
+
readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
527
|
+
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
528
|
+
};
|
|
529
|
+
readonly status: "refused";
|
|
530
|
+
readonly receipt: null;
|
|
531
|
+
readonly settlement: null;
|
|
532
|
+
readonly reason: string;
|
|
533
|
+
} | {
|
|
534
|
+
readonly message: {
|
|
535
|
+
readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
536
|
+
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
537
|
+
};
|
|
538
|
+
readonly status: "parked";
|
|
539
|
+
readonly receipt: Receipt | null;
|
|
540
|
+
readonly settlement: null;
|
|
541
|
+
readonly reason: string;
|
|
542
|
+
} | null;
|
|
543
|
+
watermark: {
|
|
544
|
+
readonly canonicalSequence: number;
|
|
545
|
+
readonly acceptedQueueSequence: number;
|
|
546
|
+
readonly pendingDeliveryVersion: number | null;
|
|
547
|
+
};
|
|
478
548
|
worker: {
|
|
479
549
|
readonly schemaVersion: 1;
|
|
480
550
|
readonly delegationId: string & import("effect/Brand").Brand<"@effect-agent/core/DelegationId">;
|
|
@@ -610,7 +680,77 @@ declare const summary: <const Name extends string>(declaration: WorkerDeclaratio
|
|
|
610
680
|
readonly target: AnyDefinition;
|
|
611
681
|
}, worker: Worker<Name>) => Effect.Effect<{
|
|
612
682
|
latestReceipt: Receipt | null;
|
|
613
|
-
state: "active" | "idle" | "starting";
|
|
683
|
+
state: "active" | "cancelled" | "completed" | "failed" | "idle" | "starting" | "stopped" | "stopping";
|
|
684
|
+
acceptedInput: {
|
|
685
|
+
readonly receipt: Receipt;
|
|
686
|
+
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
687
|
+
} | null;
|
|
688
|
+
appliedInput: {
|
|
689
|
+
readonly receipt: Receipt;
|
|
690
|
+
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
691
|
+
readonly runId: string & import("effect/Brand").Brand<"@effect-agent/core/RunId">;
|
|
692
|
+
readonly sequence: number;
|
|
693
|
+
} | null;
|
|
694
|
+
run: {
|
|
695
|
+
readonly runId: string & import("effect/Brand").Brand<"@effect-agent/core/RunId">;
|
|
696
|
+
readonly hostReceipt: Receipt;
|
|
697
|
+
readonly outcome: "aborted" | "completed" | "failed" | null;
|
|
698
|
+
readonly disposition: Schema.Json;
|
|
699
|
+
} | null;
|
|
700
|
+
pendingDelivery: {
|
|
701
|
+
readonly message: {
|
|
702
|
+
readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
703
|
+
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
704
|
+
};
|
|
705
|
+
readonly status: "pending";
|
|
706
|
+
readonly receipt: null;
|
|
707
|
+
readonly settlement: null;
|
|
708
|
+
readonly reason: string | null;
|
|
709
|
+
} | {
|
|
710
|
+
readonly message: {
|
|
711
|
+
readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
712
|
+
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
713
|
+
};
|
|
714
|
+
readonly status: "accepted";
|
|
715
|
+
readonly receipt: Receipt;
|
|
716
|
+
readonly settlement: null;
|
|
717
|
+
readonly reason: string | null;
|
|
718
|
+
} | {
|
|
719
|
+
readonly message: {
|
|
720
|
+
readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
721
|
+
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
722
|
+
};
|
|
723
|
+
readonly status: "processed";
|
|
724
|
+
readonly receipt: Receipt;
|
|
725
|
+
readonly settlement: {
|
|
726
|
+
readonly settlementId: string & import("effect/Brand").Brand<"@effect-agent/core/SettlementId">;
|
|
727
|
+
readonly outcome: "aborted" | "completed" | "failed";
|
|
728
|
+
};
|
|
729
|
+
readonly reason: null;
|
|
730
|
+
} | {
|
|
731
|
+
readonly message: {
|
|
732
|
+
readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
733
|
+
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
734
|
+
};
|
|
735
|
+
readonly status: "refused";
|
|
736
|
+
readonly receipt: null;
|
|
737
|
+
readonly settlement: null;
|
|
738
|
+
readonly reason: string;
|
|
739
|
+
} | {
|
|
740
|
+
readonly message: {
|
|
741
|
+
readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
742
|
+
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
743
|
+
};
|
|
744
|
+
readonly status: "parked";
|
|
745
|
+
readonly receipt: Receipt | null;
|
|
746
|
+
readonly settlement: null;
|
|
747
|
+
readonly reason: string;
|
|
748
|
+
} | null;
|
|
749
|
+
watermark: {
|
|
750
|
+
readonly canonicalSequence: number;
|
|
751
|
+
readonly acceptedQueueSequence: number;
|
|
752
|
+
readonly pendingDeliveryVersion: number | null;
|
|
753
|
+
};
|
|
614
754
|
worker: {
|
|
615
755
|
readonly schemaVersion: 1;
|
|
616
756
|
readonly delegationId: string & import("effect/Brand").Brand<"@effect-agent/core/DelegationId">;
|
|
@@ -632,6 +772,20 @@ declare const observe: <const Name extends string>(declaration: WorkerDeclaratio
|
|
|
632
772
|
readonly recordId: string;
|
|
633
773
|
readonly record: Schema.Json;
|
|
634
774
|
}, WorkerError, SubagentHost>;
|
|
775
|
+
/** Seal a continuing worker, retaining a stable command identity across retries and Runs. */
|
|
776
|
+
declare const stop: <const Name extends string>(declaration: WorkerDeclaration<Name> & {
|
|
777
|
+
readonly target: AnyDefinition;
|
|
778
|
+
}, worker: Worker<Name>, options: {
|
|
779
|
+
readonly idempotencyKey: IdempotencyKey;
|
|
780
|
+
}) => Effect.Effect<{
|
|
781
|
+
readonly worker: {
|
|
782
|
+
readonly schemaVersion: 1;
|
|
783
|
+
readonly delegationId: string & import("effect/Brand").Brand<"@effect-agent/core/DelegationId">;
|
|
784
|
+
readonly targetAgentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
|
|
785
|
+
readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
786
|
+
};
|
|
787
|
+
readonly idempotencyKey: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
788
|
+
}, WorkerError, SubagentHost>;
|
|
635
789
|
/** Wait for the exact Receipt. Interrupting this Effect never cancels accepted work. */
|
|
636
790
|
declare const awaitWorker: <const Name extends string, Input extends Schema.Top, Output extends Schema.Top, Parameters extends Schema.Top, Success extends Schema.Top, Failure extends Schema.Top, Prepare, Project>(declaration: Declaration<Name, Input, Output, Parameters, Success, Failure, Prepare, Project>, worker: Worker<Name>, receipt: Receipt) => Effect.Effect<{
|
|
637
791
|
readonly _tag: "Pending";
|
|
@@ -679,7 +833,77 @@ declare const list: <const Name extends string, Input extends Schema.Top, Output
|
|
|
679
833
|
readonly after?: ThreadId;
|
|
680
834
|
}) => Effect.Effect<{
|
|
681
835
|
items: {
|
|
682
|
-
state: "active" | "idle" | "starting";
|
|
836
|
+
state: "active" | "cancelled" | "completed" | "failed" | "idle" | "starting" | "stopped" | "stopping";
|
|
837
|
+
acceptedInput: {
|
|
838
|
+
readonly receipt: Receipt;
|
|
839
|
+
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
840
|
+
} | null;
|
|
841
|
+
appliedInput: {
|
|
842
|
+
readonly receipt: Receipt;
|
|
843
|
+
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
844
|
+
readonly runId: string & import("effect/Brand").Brand<"@effect-agent/core/RunId">;
|
|
845
|
+
readonly sequence: number;
|
|
846
|
+
} | null;
|
|
847
|
+
run: {
|
|
848
|
+
readonly runId: string & import("effect/Brand").Brand<"@effect-agent/core/RunId">;
|
|
849
|
+
readonly hostReceipt: Receipt;
|
|
850
|
+
readonly outcome: "aborted" | "completed" | "failed" | null;
|
|
851
|
+
readonly disposition: Schema.Json;
|
|
852
|
+
} | null;
|
|
853
|
+
pendingDelivery: {
|
|
854
|
+
readonly message: {
|
|
855
|
+
readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
856
|
+
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
857
|
+
};
|
|
858
|
+
readonly status: "pending";
|
|
859
|
+
readonly receipt: null;
|
|
860
|
+
readonly settlement: null;
|
|
861
|
+
readonly reason: string | null;
|
|
862
|
+
} | {
|
|
863
|
+
readonly message: {
|
|
864
|
+
readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
865
|
+
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
866
|
+
};
|
|
867
|
+
readonly status: "accepted";
|
|
868
|
+
readonly receipt: Receipt;
|
|
869
|
+
readonly settlement: null;
|
|
870
|
+
readonly reason: string | null;
|
|
871
|
+
} | {
|
|
872
|
+
readonly message: {
|
|
873
|
+
readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
874
|
+
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
875
|
+
};
|
|
876
|
+
readonly status: "processed";
|
|
877
|
+
readonly receipt: Receipt;
|
|
878
|
+
readonly settlement: {
|
|
879
|
+
readonly settlementId: string & import("effect/Brand").Brand<"@effect-agent/core/SettlementId">;
|
|
880
|
+
readonly outcome: "aborted" | "completed" | "failed";
|
|
881
|
+
};
|
|
882
|
+
readonly reason: null;
|
|
883
|
+
} | {
|
|
884
|
+
readonly message: {
|
|
885
|
+
readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
886
|
+
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
887
|
+
};
|
|
888
|
+
readonly status: "refused";
|
|
889
|
+
readonly receipt: null;
|
|
890
|
+
readonly settlement: null;
|
|
891
|
+
readonly reason: string;
|
|
892
|
+
} | {
|
|
893
|
+
readonly message: {
|
|
894
|
+
readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
895
|
+
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
896
|
+
};
|
|
897
|
+
readonly status: "parked";
|
|
898
|
+
readonly receipt: Receipt | null;
|
|
899
|
+
readonly settlement: null;
|
|
900
|
+
readonly reason: string;
|
|
901
|
+
} | null;
|
|
902
|
+
watermark: {
|
|
903
|
+
readonly canonicalSequence: number;
|
|
904
|
+
readonly acceptedQueueSequence: number;
|
|
905
|
+
readonly pendingDeliveryVersion: number | null;
|
|
906
|
+
};
|
|
683
907
|
worker: {
|
|
684
908
|
readonly schemaVersion: 1;
|
|
685
909
|
readonly delegationId: string & import("effect/Brand").Brand<"@effect-agent/core/DelegationId">;
|
|
@@ -694,8 +918,8 @@ declare const list: <const Name extends string, Input extends Schema.Top, Output
|
|
|
694
918
|
declare const cancel: <const Name extends string, Input extends Schema.Top, Output extends Schema.Top, Parameters extends Schema.Top, Success extends Schema.Top, Failure extends Schema.Top, Prepare, Project>(declaration: Declaration<Name, Input, Output, Parameters, Success, Failure, Prepare, Project>, worker: Worker<Name>, receipt: Receipt) => Effect.Effect<void, JoinedToHost | WorkerError, SubagentHost>;
|
|
695
919
|
/** Opt in to each model-facing operation. Waiting remains programmatic only. */
|
|
696
920
|
interface BackgroundOptions {
|
|
697
|
-
/** Deliver
|
|
698
|
-
readonly reportToParent?: true
|
|
921
|
+
/** Deliver standard completion and progress messages to the parent. */
|
|
922
|
+
readonly reportToParent?: true;
|
|
699
923
|
readonly start?: true;
|
|
700
924
|
readonly followUp?: true;
|
|
701
925
|
readonly inspect?: true;
|
|
@@ -811,14 +1035,84 @@ declare const WorkerParameters: <Name extends string>(declaration: WorkerDeclara
|
|
|
811
1035
|
}>, `@effect-agent/Worker/${Name}`>;
|
|
812
1036
|
}>;
|
|
813
1037
|
declare const Summary: <Name extends string>(declaration: WorkerDeclaration<Name>) => Schema.Struct<{
|
|
1038
|
+
readonly latestReceipt: Schema.NullOr<typeof Receipt>;
|
|
1039
|
+
readonly state: Schema.Literals<readonly ["starting", "active", "idle", "stopping", "stopped", "completed", "failed", "cancelled"]>;
|
|
1040
|
+
readonly acceptedInput: Schema.NullOr<Schema.Struct<{
|
|
1041
|
+
readonly receipt: typeof Receipt;
|
|
1042
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1043
|
+
}>>;
|
|
1044
|
+
readonly appliedInput: Schema.NullOr<Schema.Struct<{
|
|
1045
|
+
readonly receipt: typeof Receipt;
|
|
1046
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1047
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
1048
|
+
readonly sequence: Schema.Natural;
|
|
1049
|
+
}>>;
|
|
1050
|
+
readonly run: Schema.NullOr<Schema.Struct<{
|
|
1051
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
1052
|
+
readonly hostReceipt: typeof Receipt;
|
|
1053
|
+
readonly outcome: Schema.NullOr<Schema.Literals<readonly ["completed", "failed", "aborted"]>>;
|
|
1054
|
+
readonly disposition: Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
1055
|
+
}>>;
|
|
1056
|
+
readonly pendingDelivery: Schema.NullOr<Schema.Union<readonly [Schema.Struct<{
|
|
1057
|
+
readonly message: Schema.Struct<{
|
|
1058
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1059
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1060
|
+
}>;
|
|
1061
|
+
readonly status: Schema.Literal<"pending">;
|
|
1062
|
+
readonly receipt: Schema.Null;
|
|
1063
|
+
readonly settlement: Schema.Null;
|
|
1064
|
+
readonly reason: Schema.NullOr<Schema.NonEmptyString>;
|
|
1065
|
+
}>, Schema.Struct<{
|
|
1066
|
+
readonly message: Schema.Struct<{
|
|
1067
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1068
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1069
|
+
}>;
|
|
1070
|
+
readonly status: Schema.Literal<"accepted">;
|
|
1071
|
+
readonly receipt: typeof Receipt;
|
|
1072
|
+
readonly settlement: Schema.Null;
|
|
1073
|
+
readonly reason: Schema.NullOr<Schema.NonEmptyString>;
|
|
1074
|
+
}>, Schema.Struct<{
|
|
1075
|
+
readonly message: Schema.Struct<{
|
|
1076
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1077
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1078
|
+
}>;
|
|
1079
|
+
readonly status: Schema.Literal<"processed">;
|
|
1080
|
+
readonly receipt: typeof Receipt;
|
|
1081
|
+
readonly settlement: Schema.Struct<{
|
|
1082
|
+
readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
|
|
1083
|
+
readonly outcome: Schema.Literals<readonly ["completed", "failed", "aborted"]>;
|
|
1084
|
+
}>;
|
|
1085
|
+
readonly reason: Schema.Null;
|
|
1086
|
+
}>, Schema.Struct<{
|
|
1087
|
+
readonly message: Schema.Struct<{
|
|
1088
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1089
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1090
|
+
}>;
|
|
1091
|
+
readonly status: Schema.Literal<"refused">;
|
|
1092
|
+
readonly receipt: Schema.Null;
|
|
1093
|
+
readonly settlement: Schema.Null;
|
|
1094
|
+
readonly reason: Schema.NonEmptyString;
|
|
1095
|
+
}>, Schema.Struct<{
|
|
1096
|
+
readonly message: Schema.Struct<{
|
|
1097
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1098
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1099
|
+
}>;
|
|
1100
|
+
readonly status: Schema.Literal<"parked">;
|
|
1101
|
+
readonly receipt: Schema.NullOr<typeof Receipt>;
|
|
1102
|
+
readonly settlement: Schema.Null;
|
|
1103
|
+
readonly reason: Schema.NonEmptyString;
|
|
1104
|
+
}>]>>;
|
|
1105
|
+
readonly watermark: Schema.Struct<{
|
|
1106
|
+
readonly canonicalSequence: Schema.Natural;
|
|
1107
|
+
readonly acceptedQueueSequence: Schema.Natural;
|
|
1108
|
+
readonly pendingDeliveryVersion: Schema.NullOr<Schema.Natural>;
|
|
1109
|
+
}>;
|
|
814
1110
|
readonly worker: Schema.brand<Schema.Struct<{
|
|
815
1111
|
readonly schemaVersion: Schema.Literal<1>;
|
|
816
1112
|
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
817
1113
|
readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
818
1114
|
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
819
1115
|
}>, `@effect-agent/Worker/${Name}`>;
|
|
820
|
-
readonly latestReceipt: Schema.NullOr<typeof Receipt>;
|
|
821
|
-
readonly state: Schema.Literals<readonly ["starting", "active", "idle"]>;
|
|
822
1116
|
}>;
|
|
823
1117
|
declare const FollowUpParameters: <Name extends string, Parameters extends Schema.Top>(declaration: WorkerDeclaration<Name>, parameters: Parameters) => Schema.Struct<{
|
|
824
1118
|
readonly worker: Schema.brand<Schema.Struct<{
|
|
@@ -971,29 +1265,10 @@ type BackgroundTools<Name extends string, Parameters extends Schema.Top, Success
|
|
|
971
1265
|
declare const background$1: <const Name extends string, Input extends Schema.Top, Output extends Schema.Top, Parameters extends Schema.Top, Success extends Schema.Top, Failure extends Schema.Top, Prepare, Project, const Selected extends BackgroundOptions>(declaration: Declaration<Name, Input, Output, Parameters, Success, Failure, Prepare, Project>, selected: Selected) => Readonly<{
|
|
972
1266
|
tools: BackgroundTools<Name, Parameters, Success, Failure, Selected>;
|
|
973
1267
|
toolkit: Toolkit.Toolkit<BackgroundTools<Name, Parameters, Success, Failure, Selected>>;
|
|
974
|
-
layer: Layer.Layer<Tool.HandlersFor<BackgroundTools<Name, Parameters, Success, Failure, Selected>>, never, (Selected["
|
|
1268
|
+
layer: Layer.Layer<Tool.HandlersFor<BackgroundTools<Name, Parameters, Success, Failure, Selected>>, never, (Selected["followUp"] extends (infer T) ? T extends Selected["followUp"] ? T extends true ? Prepare | Input["EncodingServices"] | Parameters["EncodingServices"] : never : never : never) | (Selected["inspect"] extends (infer T_1) ? T_1 extends Selected["inspect"] ? T_1 extends true ? Project | Output["DecodingServices"] | Parameters["DecodingServices"] | Success["EncodingServices"] : never : never : never) | (Selected["reportToParent"] extends (infer T_2) ? T_2 extends Selected["reportToParent"] ? T_2 extends true ? Exclude<Project, Scope.Scope> | Exclude<Output["DecodingServices"], Scope.Scope> | Exclude<Parameters["DecodingServices"], Scope.Scope> | Exclude<Success["EncodingServices"], Scope.Scope> : never : never : never) | (Selected["start"] extends (infer T_3) ? T_3 extends Selected["start"] ? T_3 extends true ? Prepare | Input["EncodingServices"] | Parameters["EncodingServices"] : never : never : never)>;
|
|
975
1269
|
}>;
|
|
976
|
-
//#endregion
|
|
977
|
-
//#region src/capabilities/internal/subagent-reporting.d.ts
|
|
978
|
-
/**
|
|
979
|
-
* Define an optional application-specific conversion for `background({ reportToParent: report })`.
|
|
980
|
-
* Existing Agent Registration `reporting` arrays remain supported. The input Schema must be the coordinator Definition's exact input Schema.
|
|
981
|
-
* Preparation is bounded by the durable host; a retained prepared envelope is never reprojected
|
|
982
|
-
* during delivery retries. The callback should be deterministic and have no external side effects.
|
|
983
|
-
*/
|
|
984
|
-
declare const reporting: <const Name extends string, Input extends Schema.Top, Output extends Schema.Top, Parameters extends Schema.Top, Success extends Schema.Top, Failure extends Schema.Top, Prepare, Project, CoordinatorInput extends Schema.Top, ReportFailure extends Schema.Top = typeof Schema.Never, ReportRequirements = never>(declaration: Declaration<Name, Input, Output, Parameters, Success, Failure, Prepare, Project>, options: {
|
|
985
|
-
readonly input: CoordinatorInput;
|
|
986
|
-
readonly failure?: ReportFailure;
|
|
987
|
-
readonly prepare: (report: WorkerReport<Success>) => Effect.Effect<CoordinatorInput["Type"], ReportFailure["Type"], ReportRequirements>;
|
|
988
|
-
}) => WorkerReporting<Failure["Type"] | ReportFailure["Type"], Parameters["DecodingServices"] | Output["DecodingServices"] | Success["EncodingServices"] | CoordinatorInput["EncodingServices"] | Project | ReportRequirements>;
|
|
989
|
-
/**
|
|
990
|
-
* Adapt a report expressed in a receiving worker declaration's Parameters to its Agent input.
|
|
991
|
-
* Use this on that worker's registration when it can itself launch reporting workers. This
|
|
992
|
-
* explicit conversion preserves custom Parameters and charges the next input to its ancestor.
|
|
993
|
-
*/
|
|
994
|
-
declare const reportingToWorker: <E, R, const Name extends string, Input extends Schema.Top, Output extends Schema.Top, Parameters extends Schema.Top, Success extends Schema.Top, Failure extends Schema.Top, Prepare, Project>(report: WorkerReporting<E, R>, destination: Declaration<Name, Input, Output, Parameters, Success, Failure, Prepare, Project>) => WorkerReporting<E | Failure["Type"], R | Prepare | Parameters["DecodingServices"] | Input["EncodingServices"]>;
|
|
995
1270
|
declare namespace Subagent_d_exports {
|
|
996
|
-
export { BackgroundOptions, BackgroundTools, SubagentChildRunFailure, SubagentContainedFailure, SubagentDeclarationOptions, SubagentDefineOptions, SubagentDelegation, SubagentDurableAccounting, SubagentDurableOptions, SubagentExecutionFailure, SubagentExecutionFailureClassification, SubagentFailureMode, SubagentGrant, SubagentLayerRequirements, SubagentPolicy, SubagentPolicyInput, SubagentPrepareContext, SubagentPrestartDenied, SubagentProjectionFailure, SubagentResult, SubagentResultContext, SubagentReturnModeFailure, SubagentRuntimeOptions, SubagentTool, SubagentToolFailure, SubagentTools, Worker, WorkerCompletion, WorkerObservation, WorkerReport, awaitWorker as await, background, cancel, define, delegationAllocationFromPolicy, delegationCapsFromPolicy, followUp, inspect, layer, list, make, observe,
|
|
1271
|
+
export { BackgroundOptions, BackgroundTools, SubagentChildRunFailure, SubagentContainedFailure, SubagentDeclarationOptions, SubagentDefineOptions, SubagentDelegation, SubagentDurableAccounting, SubagentDurableOptions, SubagentExecutionFailure, SubagentExecutionFailureClassification, SubagentFailureMode, SubagentGrant, SubagentLayerRequirements, SubagentPolicy, SubagentPolicyInput, SubagentPrepareContext, SubagentPrestartDenied, SubagentProjectionFailure, SubagentResult, SubagentResultContext, SubagentReturnModeFailure, SubagentRuntimeOptions, SubagentTool, SubagentToolFailure, SubagentTools, Worker, WorkerCompletion, WorkerObservation, WorkerReport, awaitWorker as await, background, cancel, define, delegationAllocationFromPolicy, delegationCapsFromPolicy, followUp, inspect, layer, list, make, observe, start, stop };
|
|
997
1272
|
}
|
|
998
1273
|
/**
|
|
999
1274
|
* Bounded parent metadata visible to `prepareInput`.
|
|
@@ -1356,5 +1631,5 @@ declare function background<const Name extends string, Input extends Schema.Top,
|
|
|
1356
1631
|
}, selected: Selected): ReturnType<typeof background$1<Name, Input, Output, Input, SubagentResult<Output>, typeof Schema.Never, never, never, Selected>>;
|
|
1357
1632
|
declare function background<const Name extends string, Input extends Schema.Top, Output extends Schema.Top, Parameters extends Schema.Top, Success extends Schema.Top, Failure extends Schema.Top, Prepare, Project, const Selected extends BackgroundOptions>(declaration: Declaration<Name, Input, Output, Parameters, Success, Failure, Prepare, Project>, selected: Selected): ReturnType<typeof background$1<Name, Input, Output, Parameters, Success, Failure, Prepare, Project, Selected>>;
|
|
1358
1633
|
//#endregion
|
|
1359
|
-
export {
|
|
1360
|
-
//# sourceMappingURL=Subagent-
|
|
1634
|
+
export { inspect as A, delegationCapsFromPolicy as B, BackgroundOptions as C, awaitWorker as D, WorkerObservation as E, SubagentPolicy as F, SubagentPolicyInput as I, SubagentPrestartDenied as L, observe as M, start as N, cancel as O, stop as P, SubagentProjectionFailure as R, make as S, Worker as T, SubagentTools as _, SubagentDelegation as a, define as b, SubagentFailureMode as c, SubagentResult as d, SubagentResultContext as f, SubagentToolFailure as g, SubagentTool as h, SubagentDefineOptions as i, list as j, followUp as k, SubagentLayerRequirements as l, SubagentRuntimeOptions as m, SubagentContainedFailure as n, SubagentDurableAccounting as o, SubagentReturnModeFailure as p, SubagentDeclarationOptions as r, SubagentDurableOptions as s, SubagentChildRunFailure as t, SubagentPrepareContext as u, Subagent_d_exports as v, BackgroundTools as w, layer as x, background as y, delegationAllocationFromPolicy as z };
|
|
1635
|
+
//# sourceMappingURL=Subagent-gw9KD6eb.d.mts.map
|
|
@@ -3,12 +3,12 @@ import { i as SubagentBudgetReservation } from "./SubagentContract-DdT7Cqe6.mjs"
|
|
|
3
3
|
import { a as Receipt, n as JoinedToHost, t as IdempotencyKey } from "./Receipt-BAHyigAF.mjs";
|
|
4
4
|
import { a as FailureDiagnostic_d_exports, i as Failure } from "./FailureDiagnostic-CaAkzGHL.mjs";
|
|
5
5
|
import { t as AgentPolicy } from "./AgentPolicy-BqDoSXO6.mjs";
|
|
6
|
-
import { r as AnyDefinition, t as Agent_d_exports } from "./Agent-
|
|
7
|
-
import { a as
|
|
6
|
+
import { r as AnyDefinition, t as Agent_d_exports } from "./Agent-D9cXqfF3.mjs";
|
|
7
|
+
import { _ as WorkerStop, a as WorkerBudgetScope, c as WorkerError, d as WorkerPage, f as WorkerRef, g as WorkerStarted, h as WorkerSource, l as WorkerHistoryEntry, o as WorkerCompletion, s as WorkerContext, v as WorkerStopped, y as WorkerSummary } from "./Worker-fwWkBg12.mjs";
|
|
8
8
|
import { c as MessageRef, l as MessageStatus } from "./Messaging-Dkg87ebg.mjs";
|
|
9
9
|
import { Context, Effect, Option, Schema, Stream } from "effect";
|
|
10
10
|
declare namespace SubagentHost_d_exports {
|
|
11
|
-
export { BackgroundReporting, FollowUpWorkerRequest, StartWorkerRequest, SubagentHost, WorkerMessageRequest, WorkerObservation, WorkerReceiptRequest, WorkerReportPreparationFailure, WorkerReporting, WorkerRunReport };
|
|
11
|
+
export { BackgroundReporting, DeferredStartWorkerRequest, FollowUpWorkerRequest, StartWorkerRequest, SubagentHost, WorkerMessageRequest, WorkerObservation, WorkerReceiptRequest, WorkerReportPreparationFailure, WorkerReporting, WorkerRunReport };
|
|
12
12
|
}
|
|
13
13
|
/** Prepared values cross this port only to be Schema-decoded before durable storage. */
|
|
14
14
|
interface StartWorkerRequest {
|
|
@@ -24,6 +24,17 @@ interface StartWorkerRequest {
|
|
|
24
24
|
/** Author-owned request; the durable host must separately authorize worker-run funding. */
|
|
25
25
|
readonly budgetScope?: WorkerBudgetScope;
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* First-admission preparation stays lazy until the owner authorizes the caller and checks the
|
|
29
|
+
* retained command. Replays compare declared parameters/options and reuse the original capture.
|
|
30
|
+
* Prepared policy, budget, and allowance are frozen first-admission configuration, not replay
|
|
31
|
+
* arguments; changing them requires a new command key. Current caller authorization still applies.
|
|
32
|
+
* Preparation must be free of external effects: concurrent first admissions can prepare before
|
|
33
|
+
* the retained delivery chooses its first writer.
|
|
34
|
+
*/
|
|
35
|
+
interface DeferredStartWorkerRequest<E = never, R = never> extends Pick<StartWorkerRequest, "delegationId" | "target" | "idempotencyKey" | "encodedParameters" | "encodedGrant" | "budgetScope"> {
|
|
36
|
+
readonly prepare: Effect.Effect<Pick<StartWorkerRequest, "encodedInput" | "policy" | "budget" | "toolCallAllowance">, E, R>;
|
|
37
|
+
}
|
|
27
38
|
interface FollowUpWorkerRequest {
|
|
28
39
|
readonly worker: WorkerRef;
|
|
29
40
|
readonly target: AnyDefinition;
|
|
@@ -77,25 +88,15 @@ declare const WorkerReportPreparationFailure_base: Schema.Class<WorkerReportPrep
|
|
|
77
88
|
/** A bounded projection failure; raw application errors never enter durable report records. */
|
|
78
89
|
declare class WorkerReportPreparationFailure extends WorkerReportPreparationFailure_base {}
|
|
79
90
|
/**
|
|
80
|
-
* Source-owned projection discovered from background tools
|
|
91
|
+
* Source-owned standard projection discovered from background tools.
|
|
81
92
|
* The concrete descriptor retains its E/R; durable registration captures R and records
|
|
82
93
|
* bounded preparation failure rather than serializing arbitrary application errors.
|
|
83
94
|
*/
|
|
84
95
|
interface WorkerReporting<E = never, R = never> {
|
|
85
96
|
readonly delegationId: DelegationId;
|
|
86
97
|
readonly target: AnyDefinition;
|
|
87
|
-
/** Standard messages retain the parent's original application input. */
|
|
88
|
-
readonly mode?: "standard";
|
|
89
|
-
readonly input?: Schema.Top;
|
|
90
|
-
/** Required for custom mapping when the receiving coordinator is itself an established worker. */
|
|
91
|
-
readonly destination?: {
|
|
92
|
-
readonly delegationId: DelegationId;
|
|
93
|
-
readonly target: AnyDefinition;
|
|
94
|
-
};
|
|
95
98
|
readonly prepare: (report: WorkerRunReport) => Effect.Effect<{
|
|
96
|
-
readonly
|
|
97
|
-
readonly encodedParameters?: Schema.Json;
|
|
98
|
-
readonly message?: WorkerCompletion;
|
|
99
|
+
readonly message: WorkerCompletion;
|
|
99
100
|
}, E | WorkerReportPreparationFailure, R>;
|
|
100
101
|
}
|
|
101
102
|
/** Descriptor carried by background tools; registration discovers it without an app handoff. */
|
|
@@ -107,7 +108,8 @@ declare const SubagentHost_base: Context.ServiceClass<SubagentHost, "@effect-age
|
|
|
107
108
|
readonly target: AnyDefinition;
|
|
108
109
|
readonly encodedInput: unknown;
|
|
109
110
|
}) => Effect.Effect<Option.Option<AgentPolicy>, WorkerError>;
|
|
110
|
-
|
|
111
|
+
/** Prepared callers retain strict input/policy conflicts; deferred callers replay the saved capture. */
|
|
112
|
+
readonly start: <E = never, R = never>(request: StartWorkerRequest | DeferredStartWorkerRequest<E, R>) => Effect.Effect<WorkerStarted, WorkerError | E, R>;
|
|
111
113
|
readonly followUp: (request: FollowUpWorkerRequest) => Effect.Effect<MessageStatus, WorkerError>;
|
|
112
114
|
readonly inspect: (request: WorkerReceiptRequest | WorkerMessageRequest) => Effect.Effect<WorkerObservation | MessageStatus, WorkerError>;
|
|
113
115
|
/** Inspect the continuing worker using the same summary contract as discovery. */
|
|
@@ -129,6 +131,10 @@ declare const SubagentHost_base: Context.ServiceClass<SubagentHost, "@effect-age
|
|
|
129
131
|
readonly limit: number;
|
|
130
132
|
readonly after?: ThreadId;
|
|
131
133
|
}) => Effect.Effect<WorkerPage, WorkerError>;
|
|
134
|
+
/** Seal the whole worker; retries reconcile the same command, including a lost acknowledgement. */
|
|
135
|
+
readonly stop: (request: WorkerStop & {
|
|
136
|
+
readonly target: AnyDefinition;
|
|
137
|
+
}) => Effect.Effect<WorkerStopped, WorkerError>;
|
|
132
138
|
/** Cancel exactly this Receipt; preserve JoinedToHost without broadening its target. */
|
|
133
139
|
readonly cancel: (request: WorkerReceiptRequest) => Effect.Effect<void, WorkerError | JoinedToHost>;
|
|
134
140
|
}>;
|
|
@@ -145,5 +151,5 @@ declare class SubagentHost extends SubagentHost_base {
|
|
|
145
151
|
}>) => SubagentHost["Service"]>;
|
|
146
152
|
}
|
|
147
153
|
//#endregion
|
|
148
|
-
export {
|
|
149
|
-
//# sourceMappingURL=SubagentHost-
|
|
154
|
+
export { SubagentHost as a, WorkerObservation as c, WorkerReporting as d, WorkerRunReport as f, StartWorkerRequest as i, WorkerReceiptRequest as l, DeferredStartWorkerRequest as n, SubagentHost_d_exports as o, FollowUpWorkerRequest as r, WorkerMessageRequest as s, BackgroundReporting as t, WorkerReportPreparationFailure as u };
|
|
155
|
+
//# sourceMappingURL=SubagentHost-P9zB_TfV.d.mts.map
|
|
@@ -2,8 +2,8 @@ import { d as SubagentReservationAmounts, l as SubagentGrant, o as SubagentDeleg
|
|
|
2
2
|
import { a as Receipt, r as Principal } from "./Receipt-BAHyigAF.mjs";
|
|
3
3
|
import { r as Update } from "./AgentUpdates-DMJ-_xow.mjs";
|
|
4
4
|
import { t as AgentPolicy } from "./AgentPolicy-BqDoSXO6.mjs";
|
|
5
|
-
import { _ as Digest, h as DefinitionDigests } from "./Records-
|
|
6
|
-
import { t as ScheduleAuthorizationDecision } from "./Schedule-
|
|
5
|
+
import { _ as Digest, h as DefinitionDigests } from "./Records-Byeb70tt.mjs";
|
|
6
|
+
import { t as ScheduleAuthorizationDecision } from "./Schedule-krSnBcbU.mjs";
|
|
7
7
|
import { Context, Effect, Schema } from "effect";
|
|
8
8
|
declare namespace Subscription_d_exports {
|
|
9
9
|
export { AcceptedEvent, DeliveryChange, EventAcknowledgement, EventSourceVersion, PreparedInput, SourcePartition, SourceRecovery, SubscriptionAuthorizer, SubscriptionChange, SubscriptionConfiguration, SubscriptionDelivery, SubscriptionDeliveryKey, SubscriptionDeliverySnapshot, SubscriptionError, SubscriptionFailpoint, SubscriptionFailpointError, SubscriptionKey, SubscriptionLimits, SubscriptionName, SubscriptionRecord, SubscriptionRefusal, SubscriptionRetentionPolicy, SubscriptionScanCursors, SubscriptionScope, SubscriptionSnapshot, SubscriptionSourceError, SubscriptionStore, SubscriptionStoreFailure, defaultSubscriptionLimits, subscriptionDeliveryKeyString, subscriptionKeyString };
|
|
@@ -226,6 +226,7 @@ declare const PreparedInput: Schema.Struct<{
|
|
|
226
226
|
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
227
227
|
}>]>;
|
|
228
228
|
readonly budgetScope: Schema.optionalKey<Schema.Literals<readonly ["source-subtree", "worker-run"]>>;
|
|
229
|
+
readonly lifecycle: Schema.optionalKey<Schema.Literal<"assignment">>;
|
|
229
230
|
readonly targetDigests: typeof DefinitionDigests;
|
|
230
231
|
readonly policy: Schema.toCodecJson<typeof AgentPolicy>;
|
|
231
232
|
readonly budget: Schema.Struct<{
|
|
@@ -433,6 +434,7 @@ declare const SubscriptionDelivery: Schema.Struct<{
|
|
|
433
434
|
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
434
435
|
}>]>;
|
|
435
436
|
readonly budgetScope: Schema.optionalKey<Schema.Literals<readonly ["source-subtree", "worker-run"]>>;
|
|
437
|
+
readonly lifecycle: Schema.optionalKey<Schema.Literal<"assignment">>;
|
|
436
438
|
readonly targetDigests: typeof DefinitionDigests;
|
|
437
439
|
readonly policy: Schema.toCodecJson<typeof AgentPolicy>;
|
|
438
440
|
readonly budget: Schema.Struct<{
|
|
@@ -756,6 +758,7 @@ declare const DeliveryChange: Schema.Union<readonly [Schema.Struct<{
|
|
|
756
758
|
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
757
759
|
}>]>;
|
|
758
760
|
readonly budgetScope: Schema.optionalKey<Schema.Literals<readonly ["source-subtree", "worker-run"]>>;
|
|
761
|
+
readonly lifecycle: Schema.optionalKey<Schema.Literal<"assignment">>;
|
|
759
762
|
readonly targetDigests: typeof DefinitionDigests;
|
|
760
763
|
readonly policy: Schema.toCodecJson<typeof AgentPolicy>;
|
|
761
764
|
readonly budget: Schema.Struct<{
|
|
@@ -942,4 +945,4 @@ declare const subscriptionKeyString: (key: SubscriptionKey) => string;
|
|
|
942
945
|
declare const subscriptionDeliveryKeyString: (key: SubscriptionDeliveryKey) => string;
|
|
943
946
|
//#endregion
|
|
944
947
|
export { defaultSubscriptionLimits as A, SubscriptionScanCursors as C, SubscriptionStore as D, SubscriptionSourceError as E, subscriptionKeyString as M, SubscriptionStoreFailure as O, SubscriptionRetentionPolicy as S, SubscriptionSnapshot as T, SubscriptionKey as _, PreparedInput as a, SubscriptionRecord as b, SubscriptionAuthorizer as c, SubscriptionDelivery as d, SubscriptionDeliveryKey as f, SubscriptionFailpointError as g, SubscriptionFailpoint as h, EventSourceVersion as i, subscriptionDeliveryKeyString as j, Subscription_d_exports as k, SubscriptionChange as l, SubscriptionError as m, DeliveryChange as n, SourcePartition as o, SubscriptionDeliverySnapshot as p, EventAcknowledgement as r, SourceRecovery as s, AcceptedEvent as t, SubscriptionConfiguration as u, SubscriptionLimits as v, SubscriptionScope as w, SubscriptionRefusal as x, SubscriptionName as y };
|
|
945
|
-
//# sourceMappingURL=Subscription-
|
|
948
|
+
//# sourceMappingURL=Subscription-Xnwd42Sm.d.mts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as AgentId } from "./Identifiers-CN2s30fF.mjs";
|
|
2
|
-
import { O as PersistedJson, h as DefinitionDigests } from "./Records-
|
|
3
|
-
import { E as SubscriptionSourceError, b as SubscriptionRecord, i as EventSourceVersion, m as SubscriptionError, t as AcceptedEvent, u as SubscriptionConfiguration } from "./Subscription-
|
|
2
|
+
import { O as PersistedJson, h as DefinitionDigests } from "./Records-Byeb70tt.mjs";
|
|
3
|
+
import { E as SubscriptionSourceError, b as SubscriptionRecord, i as EventSourceVersion, m as SubscriptionError, t as AcceptedEvent, u as SubscriptionConfiguration } from "./Subscription-Xnwd42Sm.mjs";
|
|
4
4
|
import { Context, Effect, Schema, Scope } from "effect";
|
|
5
5
|
declare namespace SubscriptionInput_d_exports {
|
|
6
6
|
export { SubscriptionInputBinding, SubscriptionInputBindings, makeSubscriptionInputBinding, resolveSubscriptionInput };
|
|
@@ -38,4 +38,4 @@ declare const makeSubscriptionInputBinding: <Event extends Schema.Top, Parameter
|
|
|
38
38
|
}) => Effect.Effect<SubscriptionInputBinding, never, Exclude<R, Scope.Scope> | Exclude<Continuation["DecodingServices"], Scope.Scope> | Exclude<Continuation["EncodingServices"], Scope.Scope> | Exclude<Event["DecodingServices"], Scope.Scope> | Exclude<Input["EncodingServices"], Scope.Scope> | Exclude<Parameters["DecodingServices"], Scope.Scope>>;
|
|
39
39
|
//#endregion
|
|
40
40
|
export { resolveSubscriptionInput as a, makeSubscriptionInputBinding as i, SubscriptionInputBindings as n, SubscriptionInput_d_exports as r, SubscriptionInputBinding as t };
|
|
41
|
-
//# sourceMappingURL=SubscriptionInput-
|
|
41
|
+
//# sourceMappingURL=SubscriptionInput-CqtJ58vl.d.mts.map
|