effect-agent 0.1.0-beta.115 → 0.1.0-beta.117

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.
Files changed (67) hide show
  1. package/dist/{AgentRuntime-DyZv8uu2.d.mts → AgentRuntime-BUxDdLpw.d.mts} +2 -2
  2. package/dist/{DurableAgentRuntime-tNrkJZNo.mjs → DurableAgentRuntime-DQqxmn2h.mjs} +39 -10
  3. package/dist/DurableAgentRuntime-DQqxmn2h.mjs.map +1 -0
  4. package/dist/{EventSource-DPRdlvhV.d.mts → EventSource-hk1sVGsO.d.mts} +3 -3
  5. package/dist/{PreparedInputAdmission-DqQUjA9k.d.mts → PreparedInputAdmission-DXvFh8zZ.d.mts} +4 -4
  6. package/dist/{Records-Byeb70tt.d.mts → Records-3uLornLz.d.mts} +3 -3
  7. package/dist/{Schedule-krSnBcbU.d.mts → Schedule-yVT2CmKT.d.mts} +2 -2
  8. package/dist/{Subagent-gw9KD6eb.d.mts → Subagent-CNik9RiA.d.mts} +3 -3
  9. package/dist/{Subagent-Di8EEjWZ.mjs → Subagent-DCrB7an7.mjs} +2 -3
  10. package/dist/Subagent-DCrB7an7.mjs.map +1 -0
  11. package/dist/{SubagentHost-P9zB_TfV.d.mts → SubagentHost-4WB8Hj0C.d.mts} +13 -4
  12. package/dist/{Subscription-Xnwd42Sm.d.mts → Subscription-CCvcJGlB.d.mts} +3 -3
  13. package/dist/{SubscriptionInput-CqtJ58vl.d.mts → SubscriptionInput-BlE85a8M.d.mts} +3 -3
  14. package/dist/capabilities/Subagent.d.mts +1 -1
  15. package/dist/capabilities/Subagent.mjs +1 -1
  16. package/dist/durable/ActivityStore.d.mts +1 -1
  17. package/dist/durable/Admin.d.mts +1 -1
  18. package/dist/durable/AgentRegistration.d.mts +1 -1
  19. package/dist/durable/Certification.d.mts +1 -1
  20. package/dist/durable/CommittedActivity.d.mts +1 -1
  21. package/dist/durable/Digest.d.mts +1 -1
  22. package/dist/durable/DurableAgentRuntime.d.mts +1 -1
  23. package/dist/durable/DurableAgentRuntime.mjs +1 -1
  24. package/dist/durable/EventSource.d.mts +1 -1
  25. package/dist/durable/GitHubWorkflowSource.d.mts +3 -3
  26. package/dist/durable/MessageDelivery.d.mts +41 -41
  27. package/dist/durable/MessageDeliveryStoreConformance.d.mts +1 -1
  28. package/dist/durable/PersistentHistory.d.mts +1 -1
  29. package/dist/durable/PreparedInputAdmission.d.mts +1 -1
  30. package/dist/durable/Records.d.mts +1 -1
  31. package/dist/durable/Recovery.d.mts +1 -1
  32. package/dist/durable/RunJournal.d.mts +1 -1
  33. package/dist/durable/Schedule.d.mts +1 -1
  34. package/dist/durable/ScheduleStoreConformance.d.mts +1 -1
  35. package/dist/durable/ScheduleTransition.d.mts +1 -1
  36. package/dist/durable/Scheduling.d.mts +2 -2
  37. package/dist/durable/SqlStorageV2Upgrade.d.mts +2 -2
  38. package/dist/durable/SqlSubscriptionStore.d.mts +2 -2
  39. package/dist/durable/SqlThreadNativeReads.d.mts +1 -1
  40. package/dist/durable/SubmissionLedger.d.mts +1 -1
  41. package/dist/durable/SubmissionLedgerConformance.d.mts +1 -1
  42. package/dist/durable/SubmissionStatus.d.mts +1 -1
  43. package/dist/durable/Subscription.d.mts +1 -1
  44. package/dist/durable/SubscriptionInput.d.mts +1 -1
  45. package/dist/durable/SubscriptionStoreConformance.d.mts +1 -1
  46. package/dist/durable/SubscriptionTools.d.mts +3 -3
  47. package/dist/durable/SubscriptionTransition.d.mts +1 -1
  48. package/dist/durable/Subscriptions.d.mts +5 -5
  49. package/dist/durable/ThreadContextHistory.d.mts +1 -1
  50. package/dist/durable/ThreadContextHistoryProjection.d.mts +1 -1
  51. package/dist/durable/ThreadInvariants.d.mts +1 -1
  52. package/dist/durable/ThreadProjection.d.mts +1 -1
  53. package/dist/durable/ThreadProjectionMaintenance.d.mts +1 -1
  54. package/dist/durable/ThreadStore.d.mts +1 -1
  55. package/dist/durable/ThreadStoreConformance.d.mts +1 -1
  56. package/dist/durable/WorkerHost.d.mts +1 -1
  57. package/dist/engine/AgentRuntime.d.mts +1 -1
  58. package/dist/engine/SubagentHost.d.mts +2 -2
  59. package/dist/engine/SubagentHost.mjs.map +1 -1
  60. package/dist/index.d.mts +9 -9
  61. package/dist/index.mjs +2 -2
  62. package/package.json +1 -1
  63. package/src/capabilities/internal/subagent-background.ts +1 -3
  64. package/src/durable/internal/worker-host.ts +76 -18
  65. package/src/engine/SubagentHost.ts +16 -3
  66. package/dist/DurableAgentRuntime-tNrkJZNo.mjs.map +0 -1
  67. package/dist/Subagent-Di8EEjWZ.mjs.map +0 -1
@@ -1,2 +1,2 @@
1
- import { _i as ResolvedBinding, bi as definitionDigestsEqual, di as AgentRegistration, fi as BindingUnavailable, gi as ReplayVersions, hi as ExecutableAgentBinding, mi as DurableWorkerBinding, pi as DurableBindingFailure, ui as AgentAttemptContext, vi as compileBindingContracts, yi as compileRegistrations } from "../Records-Byeb70tt.mjs";
1
+ import { _i as ResolvedBinding, bi as definitionDigestsEqual, di as AgentRegistration, fi as BindingUnavailable, gi as ReplayVersions, hi as ExecutableAgentBinding, mi as DurableWorkerBinding, pi as DurableBindingFailure, ui as AgentAttemptContext, vi as compileBindingContracts, yi as compileRegistrations } from "../Records-3uLornLz.mjs";
2
2
  export { type AgentAttemptContext, type AgentRegistration, BindingUnavailable, type DurableBindingFailure, DurableWorkerBinding, type ExecutableAgentBinding, type ReplayVersions, type ResolvedBinding, compileBindingContracts, compileRegistrations, definitionDigestsEqual };
@@ -1,4 +1,4 @@
1
- import { bn as ThreadStore, xo as SubmissionLedger } from "../Records-Byeb70tt.mjs";
1
+ import { bn as ThreadStore, xo as SubmissionLedger } from "../Records-3uLornLz.mjs";
2
2
  import { Crypto, Effect, Schema } from "effect";
3
3
  //#region src/durable/Certification.d.ts
4
4
  declare const CertifiedAdapterIdentity_base: Schema.Class<CertifiedAdapterIdentity, Schema.Struct<{
@@ -1,4 +1,4 @@
1
- import { O as PersistedJson, Sn as ThreadStoreError, bn as ThreadStore, l as CanonicalRecordEnvelope, ln as ThreadNotMaterialized, xi as DigestError } from "../Records-Byeb70tt.mjs";
1
+ import { O as PersistedJson, Sn as ThreadStoreError, bn as ThreadStore, l as CanonicalRecordEnvelope, ln as ThreadNotMaterialized, xi as DigestError } from "../Records-3uLornLz.mjs";
2
2
  import { ActivityProcessorKey, ActivityProcessorStore, ActivityStoreFailure, PreparedActivity } from "./ActivityStore.mjs";
3
3
  import { Crypto, Effect, Schema, Scope } from "effect";
4
4
  declare namespace CommittedActivity_d_exports {
@@ -1,2 +1,2 @@
1
- import { Ci as EMPTY_TAIL_DIGEST, Di as digestJson, Ei as digestDefinitions, Ti as digestDefinition, wi as digestCanonicalBatch, xi as DigestError } from "../Records-Byeb70tt.mjs";
1
+ import { Ci as EMPTY_TAIL_DIGEST, Di as digestJson, Ei as digestDefinitions, Ti as digestDefinition, wi as digestCanonicalBatch, xi as DigestError } from "../Records-3uLornLz.mjs";
2
2
  export { DigestError, EMPTY_TAIL_DIGEST, digestCanonicalBatch, digestDefinition, digestDefinitions, digestJson };
@@ -1,3 +1,3 @@
1
1
  import { a as Receipt } from "../Receipt-BAHyigAF.mjs";
2
- import { At as DurableRuntimeConfigOptions, Bt as RecoverySweepOptions, Ct as DurableExplainFailure, Dt as DurableResolveFailure, Et as DurableProgressFailure, Ft as DurableWorkerFailure, Gt as recoveryRepairRecordId, Ht as childReservationIdFor, It as DurableWorkerRequirements, Kt as threadCreatedBatchId, Lt as RecoveryBlocked, Mt as DurableSubmitFailure, Nt as DurableSubmitOptions, Ot as DurableRetryFailure, Pt as DurableVerifyFailure, Rt as RecoveryFailure, St as DurableAwaitFailure, Tt as DurableObserveOptions, Ut as isolateRecovery, Vt as RecoverySweepResult, Wt as recoveryRepairBatchId, _t as DurableAbortFailure, bt as DurableApprovalFailure, jt as DurableSubmitAgent, kt as DurableRuntimeConfig, qt as threadCreatedRecordId, vt as DurableAgentRuntime, wt as DurableObligationFailure, xt as DurableApprovalResolver, zt as RecoveryReport } from "../Records-Byeb70tt.mjs";
2
+ import { At as DurableRuntimeConfigOptions, Bt as RecoverySweepOptions, Ct as DurableExplainFailure, Dt as DurableResolveFailure, Et as DurableProgressFailure, Ft as DurableWorkerFailure, Gt as recoveryRepairRecordId, Ht as childReservationIdFor, It as DurableWorkerRequirements, Kt as threadCreatedBatchId, Lt as RecoveryBlocked, Mt as DurableSubmitFailure, Nt as DurableSubmitOptions, Ot as DurableRetryFailure, Pt as DurableVerifyFailure, Rt as RecoveryFailure, St as DurableAwaitFailure, Tt as DurableObserveOptions, Ut as isolateRecovery, Vt as RecoverySweepResult, Wt as recoveryRepairBatchId, _t as DurableAbortFailure, bt as DurableApprovalFailure, jt as DurableSubmitAgent, kt as DurableRuntimeConfig, qt as threadCreatedRecordId, vt as DurableAgentRuntime, wt as DurableObligationFailure, xt as DurableApprovalResolver, zt as RecoveryReport } from "../Records-3uLornLz.mjs";
3
3
  export { DurableAbortFailure, DurableAgentRuntime, DurableApprovalFailure, DurableApprovalResolver, DurableAwaitFailure, DurableExplainFailure, DurableObligationFailure, DurableObserveOptions, DurableProgressFailure, DurableResolveFailure, DurableRetryFailure, DurableRuntimeConfig, DurableRuntimeConfigOptions, DurableSubmitAgent, DurableSubmitFailure, DurableSubmitOptions, DurableVerifyFailure, DurableWorkerFailure, DurableWorkerRequirements, Receipt, RecoveryBlocked, RecoveryFailure, RecoveryReport, RecoverySweepOptions, RecoverySweepResult, childReservationIdFor, isolateRecovery, recoveryRepairBatchId, recoveryRepairRecordId, threadCreatedBatchId, threadCreatedRecordId };
@@ -1,3 +1,3 @@
1
1
  import { Receipt } from "../core/Receipt.mjs";
2
- import { a as RecoveryBlocked, c as RecoverySweepResult, d as recoveryRepairBatchId, f as recoveryRepairRecordId, i as DurableRuntimeConfig, l as childReservationIdFor, m as threadCreatedRecordId, o as RecoveryFailure, p as threadCreatedBatchId, r as DurableApprovalResolver, s as RecoveryReport, t as DurableAgentRuntime, u as isolateRecovery } from "../DurableAgentRuntime-tNrkJZNo.mjs";
2
+ import { a as RecoveryBlocked, c as RecoverySweepResult, d as recoveryRepairBatchId, f as recoveryRepairRecordId, i as DurableRuntimeConfig, l as childReservationIdFor, m as threadCreatedRecordId, o as RecoveryFailure, p as threadCreatedBatchId, r as DurableApprovalResolver, s as RecoveryReport, t as DurableAgentRuntime, u as isolateRecovery } from "../DurableAgentRuntime-DQqxmn2h.mjs";
3
3
  export { DurableAgentRuntime, DurableApprovalResolver, DurableRuntimeConfig, Receipt, RecoveryBlocked, RecoveryFailure, RecoveryReport, RecoverySweepResult, childReservationIdFor, isolateRecovery, recoveryRepairBatchId, recoveryRepairRecordId, threadCreatedBatchId, threadCreatedRecordId };
@@ -1,2 +1,2 @@
1
- import { a as makeEventSource, i as NormalizedEvent, r as EventSources, t as EventSource } from "../EventSource-DPRdlvhV.mjs";
1
+ import { a as makeEventSource, i as NormalizedEvent, r as EventSources, t as EventSource } from "../EventSource-hk1sVGsO.mjs";
2
2
  export { EventSource, EventSources, NormalizedEvent, makeEventSource };
@@ -1,7 +1,7 @@
1
1
  import { r as Principal } from "../Receipt-BAHyigAF.mjs";
2
- import "../Records-Byeb70tt.mjs";
3
- import { E as SubscriptionSourceError } from "../Subscription-Xnwd42Sm.mjs";
4
- import { t as EventSource } from "../EventSource-DPRdlvhV.mjs";
2
+ import "../Records-3uLornLz.mjs";
3
+ import { E as SubscriptionSourceError } from "../Subscription-CCvcJGlB.mjs";
4
+ import { t as EventSource } from "../EventSource-hk1sVGsO.mjs";
5
5
  import { SubscriptionFailure, SubscriptionIntake } from "./Subscriptions.mjs";
6
6
  import { Context, Effect, Layer, Redacted, Schema } from "effect";
7
7
  import { HttpClient } from "effect/unstable/http";
@@ -4,9 +4,9 @@ import { a as Receipt, t as IdempotencyKey } from "../Receipt-BAHyigAF.mjs";
4
4
  import { r as Update } from "../AgentUpdates-DMJ-_xow.mjs";
5
5
  import { a as FailureDiagnostic_d_exports, r as Diagnostic } from "../FailureDiagnostic-CaAkzGHL.mjs";
6
6
  import { t as AgentPolicy } from "../AgentPolicy-BqDoSXO6.mjs";
7
- import { h as DefinitionDigests, ho as Settlement } from "../Records-Byeb70tt.mjs";
8
- import { a as PreparedInput } from "../Subscription-Xnwd42Sm.mjs";
9
- import { t as PreparedInputAdmission } from "../PreparedInputAdmission-DqQUjA9k.mjs";
7
+ import { h as DefinitionDigests, ho as Settlement } from "../Records-3uLornLz.mjs";
8
+ import { a as PreparedInput } from "../Subscription-CCvcJGlB.mjs";
9
+ import { t as PreparedInputAdmission } from "../PreparedInputAdmission-DXvFh8zZ.mjs";
10
10
  import { Context, Crypto, Effect, Layer, Result, Schema } from "effect";
11
11
  declare namespace MessageDelivery_d_exports {
12
12
  export { MessageDeliveryChange, MessageDeliveryDriver, MessageDeliveryDriverLimits, MessageDeliveryError, MessageDeliveryFailpoint, MessageDeliveryFailpointError, MessageDeliveryFailure, MessageDeliveryKey, MessageDeliveryPage, MessageDeliveryPageRequest, MessageDeliveryPolicy, MessageDeliveryRecord, MessageDeliveryStore, MessageDeliveryStoreLimits, applyMessageDeliveryChange, defaultMessageDeliveryPolicy, defaultMessageDeliveryStoreLimits, isWorkerUpdateDelivery, messageDeliveryCapacity, messageDeliveryDeadline, messageDeliveryKeyString, messageDeliveryUsesCapacity, prepareMessageDelivery, readPending, sameMessageDeliveryIdentity, validateMessageDelivery };
@@ -585,6 +585,25 @@ export declare const readPending: (request: Pick<{
585
585
  readonly reportKind?: "update" | undefined;
586
586
  } | undefined;
587
587
  readonly messageAdmission?: {
588
+ readonly schemaVersion: 1;
589
+ readonly message: {
590
+ readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
591
+ readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
592
+ };
593
+ readonly peerName: string;
594
+ readonly sender: {
595
+ readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
596
+ readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
597
+ };
598
+ readonly returnAddress: {
599
+ readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
600
+ readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
601
+ };
602
+ readonly inReplyTo?: {
603
+ readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
604
+ readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
605
+ } | undefined;
606
+ } | {
588
607
  readonly _tag: "WorkerCompletion";
589
608
  readonly budgetExhausted: boolean;
590
609
  readonly schemaVersion: 1;
@@ -625,25 +644,6 @@ export declare const readPending: (request: Pick<{
625
644
  readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
626
645
  };
627
646
  readonly update: Update;
628
- } | {
629
- readonly schemaVersion: 1;
630
- readonly message: {
631
- readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
632
- readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
633
- };
634
- readonly peerName: string;
635
- readonly sender: {
636
- readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
637
- readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
638
- };
639
- readonly returnAddress: {
640
- readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
641
- readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
642
- };
643
- readonly inReplyTo?: {
644
- readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
645
- readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
646
- } | undefined;
647
647
  } | undefined;
648
648
  };
649
649
  readonly envelopeDigest: string & import("effect/Brand").Brand<"@effect-agent/thread/Digest">;
@@ -776,6 +776,25 @@ export declare const prepareMessageDelivery: (options: {
776
776
  readonly reportKind?: "update" | undefined;
777
777
  } | undefined;
778
778
  readonly messageAdmission?: {
779
+ readonly schemaVersion: 1;
780
+ readonly message: {
781
+ readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
782
+ readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
783
+ };
784
+ readonly peerName: string;
785
+ readonly sender: {
786
+ readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
787
+ readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
788
+ };
789
+ readonly returnAddress: {
790
+ readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
791
+ readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
792
+ };
793
+ readonly inReplyTo?: {
794
+ readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
795
+ readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
796
+ } | undefined;
797
+ } | {
779
798
  readonly _tag: "WorkerCompletion";
780
799
  readonly budgetExhausted: boolean;
781
800
  readonly schemaVersion: 1;
@@ -816,25 +835,6 @@ export declare const prepareMessageDelivery: (options: {
816
835
  readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
817
836
  };
818
837
  readonly update: Update;
819
- } | {
820
- readonly schemaVersion: 1;
821
- readonly message: {
822
- readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
823
- readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
824
- };
825
- readonly peerName: string;
826
- readonly sender: {
827
- readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
828
- readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
829
- };
830
- readonly returnAddress: {
831
- readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
832
- readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
833
- };
834
- readonly inReplyTo?: {
835
- readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
836
- readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
837
- } | undefined;
838
838
  } | undefined;
839
839
  };
840
840
  readonly envelopeDigest: string & import("effect/Brand").Brand<"@effect-agent/thread/Digest">;
@@ -3,7 +3,7 @@ import { a as Receipt } from "../Receipt-BAHyigAF.mjs";
3
3
  import { r as Update } from "../AgentUpdates-DMJ-_xow.mjs";
4
4
  import { r as Diagnostic } from "../FailureDiagnostic-CaAkzGHL.mjs";
5
5
  import { t as AgentPolicy } from "../AgentPolicy-BqDoSXO6.mjs";
6
- import { h as DefinitionDigests, ho as Settlement, xi as DigestError } from "../Records-Byeb70tt.mjs";
6
+ import { h as DefinitionDigests, ho as Settlement, xi as DigestError } from "../Records-3uLornLz.mjs";
7
7
  import { MessageDeliveryError, MessageDeliveryFailure, MessageDeliveryStore } from "./MessageDelivery.mjs";
8
8
  import { Effect, Schema } from "effect";
9
9
  //#region src/durable/MessageDeliveryStoreConformance.d.ts
@@ -1,5 +1,5 @@
1
1
  import { t as ThreadHistory } from "../ThreadHistory-tS1KwxHR.mjs";
2
- import { bn as ThreadStore } from "../Records-Byeb70tt.mjs";
2
+ import { bn as ThreadStore } from "../Records-3uLornLz.mjs";
3
3
  import { Layer } from "effect";
4
4
  declare namespace PersistentHistory_d_exports {
5
5
  export { layer };
@@ -1,2 +1,2 @@
1
- import { r as admitPreparedInput, t as PreparedInputAdmission } from "../PreparedInputAdmission-DqQUjA9k.mjs";
1
+ import { r as admitPreparedInput, t as PreparedInputAdmission } from "../PreparedInputAdmission-DXvFh8zZ.mjs";
2
2
  export { PreparedInputAdmission, admitPreparedInput };
@@ -1,2 +1,2 @@
1
- import { $ as ToolCallPrepared, A as ProducerId, B as RunStartedRecord, C as ModelCompleted, D as PeerMessagePrepared, E as ObservationOffset, F as ReplayContract, G as SubagentRequested, H as SettlementOutcome, I as RunCompleted, J as SubmissionSettledRecord, K as SubagentStarted, L as RunDurationExhausted, M as RecordId, O as PersistedJson, P as RepairAnnotated, Q as ToolApprovalRequested, R as RunFailed, S as MAX_PERSISTED_JSON_NODES, T as ModelResponseRecorded, U as SubagentJoined, V as SettlementFailureDiagnostic, W as SubagentLineageRecorded, X as ThreadCreated, Y as SubtreeBudgetReserved, Z as ToolApprovalDecided, _ as Digest, a as BatchId, at as ToolStepSettled, b as MAX_PERSISTED_JSON_COLLECTION_LENGTH, c as CanonicalRecord, ct as WorkerAdmission, d as CanonicalSequence, dt as WorkerOrigin, et as ToolCallResolution, f as CompactionCreated, ft as WorkerOriginRecorded, g as DeploymentId, gt as WorkerStopRequested, h as DefinitionDigests, ht as WorkerReportingIntent, i as ApprovalDecision, it as ToolOperation, j as RecordEnvelope, k as ProducerEpoch, l as CanonicalRecordEnvelope, lt as WorkerInputCompleted, m as DefinitionDigestInput, mt as WorkerReportRefused, n as AbortedSubmissionSettled, nt as ToolCallSettled, o as CURRENT_CANONICAL_SCHEMA_VERSION, ot as ToolUnavailable, p as CompletedSubmissionSettled, pt as WorkerReportPrepared, q as SubmissionSettled, r as AgentUpdateEmitted, rt as ToolCallUnknown, s as CanonicalBatch, st as UserInputRecorded, t as AbortRequested, tt as ToolCallResolved, u as CanonicalRecordPayload, ut as WorkerInputRequested, v as FailedSubmissionSettled, w as ModelResponseInterrupted, x as MAX_PERSISTED_JSON_DEPTH, y as MAX_PERSISTED_JSON_BYTES, z as RunPolicyUsageReserved } from "../Records-Byeb70tt.mjs";
1
+ import { $ as ToolCallPrepared, A as ProducerId, B as RunStartedRecord, C as ModelCompleted, D as PeerMessagePrepared, E as ObservationOffset, F as ReplayContract, G as SubagentRequested, H as SettlementOutcome, I as RunCompleted, J as SubmissionSettledRecord, K as SubagentStarted, L as RunDurationExhausted, M as RecordId, O as PersistedJson, P as RepairAnnotated, Q as ToolApprovalRequested, R as RunFailed, S as MAX_PERSISTED_JSON_NODES, T as ModelResponseRecorded, U as SubagentJoined, V as SettlementFailureDiagnostic, W as SubagentLineageRecorded, X as ThreadCreated, Y as SubtreeBudgetReserved, Z as ToolApprovalDecided, _ as Digest, a as BatchId, at as ToolStepSettled, b as MAX_PERSISTED_JSON_COLLECTION_LENGTH, c as CanonicalRecord, ct as WorkerAdmission, d as CanonicalSequence, dt as WorkerOrigin, et as ToolCallResolution, f as CompactionCreated, ft as WorkerOriginRecorded, g as DeploymentId, gt as WorkerStopRequested, h as DefinitionDigests, ht as WorkerReportingIntent, i as ApprovalDecision, it as ToolOperation, j as RecordEnvelope, k as ProducerEpoch, l as CanonicalRecordEnvelope, lt as WorkerInputCompleted, m as DefinitionDigestInput, mt as WorkerReportRefused, n as AbortedSubmissionSettled, nt as ToolCallSettled, o as CURRENT_CANONICAL_SCHEMA_VERSION, ot as ToolUnavailable, p as CompletedSubmissionSettled, pt as WorkerReportPrepared, q as SubmissionSettled, r as AgentUpdateEmitted, rt as ToolCallUnknown, s as CanonicalBatch, st as UserInputRecorded, t as AbortRequested, tt as ToolCallResolved, u as CanonicalRecordPayload, ut as WorkerInputRequested, v as FailedSubmissionSettled, w as ModelResponseInterrupted, x as MAX_PERSISTED_JSON_DEPTH, y as MAX_PERSISTED_JSON_BYTES, z as RunPolicyUsageReserved } from "../Records-3uLornLz.mjs";
2
2
  export { AbortRequested, AbortedSubmissionSettled, AgentUpdateEmitted, ApprovalDecision, BatchId, CURRENT_CANONICAL_SCHEMA_VERSION, CanonicalBatch, CanonicalRecord, CanonicalRecordEnvelope, CanonicalRecordPayload, CanonicalSequence, CompactionCreated, CompletedSubmissionSettled, DefinitionDigestInput, DefinitionDigests, DeploymentId, Digest, FailedSubmissionSettled, MAX_PERSISTED_JSON_BYTES, MAX_PERSISTED_JSON_COLLECTION_LENGTH, MAX_PERSISTED_JSON_DEPTH, MAX_PERSISTED_JSON_NODES, ModelCompleted, ModelResponseInterrupted, ModelResponseRecorded, ObservationOffset, PeerMessagePrepared, PersistedJson, ProducerEpoch, ProducerId, RecordEnvelope, RecordId, RepairAnnotated, ReplayContract, RunCompleted, RunDurationExhausted, RunFailed, RunPolicyUsageReserved, RunStartedRecord, SettlementFailureDiagnostic, SettlementOutcome, SubagentJoined, SubagentLineageRecorded, SubagentRequested, SubagentStarted, SubmissionSettled, SubmissionSettledRecord, SubtreeBudgetReserved, ThreadCreated, ToolApprovalDecided, ToolApprovalRequested, ToolCallPrepared, ToolCallResolution, ToolCallResolved, ToolCallSettled, ToolCallUnknown, ToolOperation, ToolStepSettled, ToolUnavailable, UserInputRecorded, WorkerAdmission, WorkerInputCompleted, WorkerInputRequested, WorkerOrigin, WorkerOriginRecorded, WorkerReportPrepared, WorkerReportRefused, WorkerReportingIntent, WorkerStopRequested };
@@ -1,2 +1,2 @@
1
- import { $i as ReleaseOrphanChildReservation, Ai as ApplyJoinAccounting, Bi as DeclaredPendingBatchEvidence, Fi as AwaitHostSettlement, Gi as NoAction, Hi as EnsureWaitingForChild, Ii as AwaitParentEstablishment, Ji as PendingApprovalEvidence, Ki as OpenDelegationCallEvidence, Li as AwaitUnknownResolution, Mi as AwaitApprovalDecision, Ni as AwaitChildAdmissionResolution, Oi as AppendReservedSettlement, Pi as AwaitChildSettlement, Ri as CompleteChildAdmission, Ui as FinalizeLedgerFromHistory, Vi as DelegationAdmissionEvidence, Wi as MarkUnknown, Xi as RecoveryDecision, Yi as PropagateChildAbort, Zi as RecoveryEvidence, aa as ResumePendingToolBatch, ca as RevertJoining, da as classifyRecovery, ea as RepairInputMarker, ia as ResumeFromTurnBoundary, ji as ApplyUnknownResolutions, ki as ApplyInput, la as SettleAborted, na as RepairReadiness, oa as ResumeSuspended, qi as OpenToolCallEvidence, ra as RepairSubagentStartLink, sa as ResumeWaitingParent, ta as RepairJoinMarker, ua as SettleJoinedWithHost, zi as CompleteMaterialization } from "../Records-Byeb70tt.mjs";
1
+ import { $i as ReleaseOrphanChildReservation, Ai as ApplyJoinAccounting, Bi as DeclaredPendingBatchEvidence, Fi as AwaitHostSettlement, Gi as NoAction, Hi as EnsureWaitingForChild, Ii as AwaitParentEstablishment, Ji as PendingApprovalEvidence, Ki as OpenDelegationCallEvidence, Li as AwaitUnknownResolution, Mi as AwaitApprovalDecision, Ni as AwaitChildAdmissionResolution, Oi as AppendReservedSettlement, Pi as AwaitChildSettlement, Ri as CompleteChildAdmission, Ui as FinalizeLedgerFromHistory, Vi as DelegationAdmissionEvidence, Wi as MarkUnknown, Xi as RecoveryDecision, Yi as PropagateChildAbort, Zi as RecoveryEvidence, aa as ResumePendingToolBatch, ca as RevertJoining, da as classifyRecovery, ea as RepairInputMarker, ia as ResumeFromTurnBoundary, ji as ApplyUnknownResolutions, ki as ApplyInput, la as SettleAborted, na as RepairReadiness, oa as ResumeSuspended, qi as OpenToolCallEvidence, ra as RepairSubagentStartLink, sa as ResumeWaitingParent, ta as RepairJoinMarker, ua as SettleJoinedWithHost, zi as CompleteMaterialization } from "../Records-3uLornLz.mjs";
2
2
  export { AppendReservedSettlement, ApplyInput, ApplyJoinAccounting, ApplyUnknownResolutions, AwaitApprovalDecision, AwaitChildAdmissionResolution, AwaitChildSettlement, AwaitHostSettlement, AwaitParentEstablishment, AwaitUnknownResolution, CompleteChildAdmission, CompleteMaterialization, DeclaredPendingBatchEvidence, DelegationAdmissionEvidence, EnsureWaitingForChild, FinalizeLedgerFromHistory, MarkUnknown, NoAction, OpenDelegationCallEvidence, OpenToolCallEvidence, PendingApprovalEvidence, PropagateChildAbort, RecoveryDecision, RecoveryEvidence, ReleaseOrphanChildReservation, RepairInputMarker, RepairJoinMarker, RepairReadiness, RepairSubagentStartLink, ResumeFromTurnBoundary, ResumePendingToolBatch, ResumeSuspended, ResumeWaitingParent, RevertJoining, SettleAborted, SettleJoinedWithHost, classifyRecovery };
@@ -1,2 +1,2 @@
1
- import { $n as peerMessageRecordId, Ar as turnCanonicalBatch, Cr as toolCallResultBatchId, Dr as toolStepSettledRecordId, Er as toolStepSettledBatchId, Fr as turnResultsBatch, Gn as childThreadIdFor, Hn as agentUpdateRecordId, In as JournalBoundary, Ir as turnResultsBatchId, Jn as firstWorkerInputRecordId, Kn as compactionBatchId, Ln as RunJournalError, Lr as workerInputRecordId, Mr as turnPreparedBatchId, Nr as turnResponseBatch, Or as turnApprovalsBatchId, Pr as turnResponseBatchId, Qn as modelResponseRecordId, Rn as RunJournalProjection, Rr as workerOriginRecordId, Sr as toolCallResolvedRecordId, Tr as toolCallUnknownRecordId, Un as approvalDecisionBatchId, Vn as TurnCommitInput, Wn as childIdempotencyKeyFor, Xn as modelResponseInterruptedBatchId, Yn as markUnknownBatchId, Zn as modelResponseInterruptedRecordId, _r as subagentStartedRecordId, ar as runDurationBatchId, br as toolCallPreparedRecordId, cr as runStartedBatchId, dr as subagentJoinedRecordId, er as projectRunJournal, fr as subagentLineageBatchId, gr as subagentStartedBatchId, hr as subagentRequestedRecordId, ir as runCompletionDigest, jr as turnIdForRun, kr as turnBatchId, lr as runStartedRecordId, mr as subagentRequestedBatchId, nr as promptFromCanonicalRecords, or as runDurationRecordId, pr as subagentLineageRecordId, qn as compactionRecordId, rr as runCompletedRecordId, sr as runIdForSubmission, tr as projectRunJournalStream, ur as subagentJoinBatchId, vr as toolApprovalDecisionRecordId, wr as toolCallSettledRecordId, xr as toolCallResolutionBatchId, yr as toolApprovalRequestRecordId, zn as RunJournalUsage, zr as workerReportRecordId } from "../Records-Byeb70tt.mjs";
1
+ import { $n as peerMessageRecordId, Ar as turnCanonicalBatch, Cr as toolCallResultBatchId, Dr as toolStepSettledRecordId, Er as toolStepSettledBatchId, Fr as turnResultsBatch, Gn as childThreadIdFor, Hn as agentUpdateRecordId, In as JournalBoundary, Ir as turnResultsBatchId, Jn as firstWorkerInputRecordId, Kn as compactionBatchId, Ln as RunJournalError, Lr as workerInputRecordId, Mr as turnPreparedBatchId, Nr as turnResponseBatch, Or as turnApprovalsBatchId, Pr as turnResponseBatchId, Qn as modelResponseRecordId, Rn as RunJournalProjection, Rr as workerOriginRecordId, Sr as toolCallResolvedRecordId, Tr as toolCallUnknownRecordId, Un as approvalDecisionBatchId, Vn as TurnCommitInput, Wn as childIdempotencyKeyFor, Xn as modelResponseInterruptedBatchId, Yn as markUnknownBatchId, Zn as modelResponseInterruptedRecordId, _r as subagentStartedRecordId, ar as runDurationBatchId, br as toolCallPreparedRecordId, cr as runStartedBatchId, dr as subagentJoinedRecordId, er as projectRunJournal, fr as subagentLineageBatchId, gr as subagentStartedBatchId, hr as subagentRequestedRecordId, ir as runCompletionDigest, jr as turnIdForRun, kr as turnBatchId, lr as runStartedRecordId, mr as subagentRequestedBatchId, nr as promptFromCanonicalRecords, or as runDurationRecordId, pr as subagentLineageRecordId, qn as compactionRecordId, rr as runCompletedRecordId, sr as runIdForSubmission, tr as projectRunJournalStream, ur as subagentJoinBatchId, vr as toolApprovalDecisionRecordId, wr as toolCallSettledRecordId, xr as toolCallResolutionBatchId, yr as toolApprovalRequestRecordId, zn as RunJournalUsage, zr as workerReportRecordId } from "../Records-3uLornLz.mjs";
2
2
  export { JournalBoundary, RunJournalError, RunJournalProjection, RunJournalUsage, TurnCommitInput, agentUpdateRecordId, approvalDecisionBatchId, childIdempotencyKeyFor, childThreadIdFor, compactionBatchId, compactionRecordId, firstWorkerInputRecordId, markUnknownBatchId, modelResponseInterruptedBatchId, modelResponseInterruptedRecordId, modelResponseRecordId, peerMessageRecordId, projectRunJournal, projectRunJournalStream, promptFromCanonicalRecords, runCompletedRecordId, runCompletionDigest, runDurationBatchId, runDurationRecordId, runIdForSubmission, runStartedBatchId, runStartedRecordId, subagentJoinBatchId, subagentJoinedRecordId, subagentLineageBatchId, subagentLineageRecordId, subagentRequestedBatchId, subagentRequestedRecordId, subagentStartedBatchId, subagentStartedRecordId, toolApprovalDecisionRecordId, toolApprovalRequestRecordId, toolCallPreparedRecordId, toolCallResolutionBatchId, toolCallResolvedRecordId, toolCallResultBatchId, toolCallSettledRecordId, toolCallUnknownRecordId, toolStepSettledBatchId, toolStepSettledRecordId, turnApprovalsBatchId, turnBatchId, turnCanonicalBatch, turnIdForRun, turnPreparedBatchId, turnResponseBatch, turnResponseBatchId, turnResultsBatch, turnResultsBatchId, workerInputRecordId, workerOriginRecordId, workerReportRecordId };
@@ -1,2 +1,2 @@
1
- import { A as ScheduleSnapshotPage, B as ScheduledInputAdmission, C as ScheduleRecord, D as ScheduleScope, E as ScheduleRetryReason, F as ScheduleTimingRequest, G as defaultSchedulingLimits, H as ScheduledInputRefused, I as ScheduleValidationError, L as ScheduleWake, M as ScheduleStore, N as ScheduleStoreFailure, O as ScheduleSkippedRange, P as ScheduleTiming, S as SchedulePending, T as ScheduleRetry, U as ScheduledInputRetryable, V as ScheduledInputFailure, W as SchedulingLimits, _ as ScheduleNotFound, a as ScheduleChange, b as SchedulePage, c as ScheduleDestination, d as ScheduleFailpointError, f as ScheduleId, g as ScheduleManagementOperation, h as ScheduleManagementAuthorization, i as ScheduleCapacityError, j as ScheduleStorageError, k as ScheduleSnapshot, l as ScheduleDueCursor, m as ScheduleKey, n as ScheduleAuthorizationError, o as ScheduleConfiguration, p as ScheduleInstant, r as ScheduleAuthorizer, s as ScheduleConflict, t as ScheduleAuthorizationDecision, u as ScheduleFailpoint, v as ScheduleOccurrenceAuthorization, w as ScheduleRefusal, x as SchedulePageRequest, y as ScheduleOwner, z as ScheduledEnvelope } from "../Schedule-krSnBcbU.mjs";
1
+ import { A as ScheduleSnapshotPage, B as ScheduledInputAdmission, C as ScheduleRecord, D as ScheduleScope, E as ScheduleRetryReason, F as ScheduleTimingRequest, G as defaultSchedulingLimits, H as ScheduledInputRefused, I as ScheduleValidationError, L as ScheduleWake, M as ScheduleStore, N as ScheduleStoreFailure, O as ScheduleSkippedRange, P as ScheduleTiming, S as SchedulePending, T as ScheduleRetry, U as ScheduledInputRetryable, V as ScheduledInputFailure, W as SchedulingLimits, _ as ScheduleNotFound, a as ScheduleChange, b as SchedulePage, c as ScheduleDestination, d as ScheduleFailpointError, f as ScheduleId, g as ScheduleManagementOperation, h as ScheduleManagementAuthorization, i as ScheduleCapacityError, j as ScheduleStorageError, k as ScheduleSnapshot, l as ScheduleDueCursor, m as ScheduleKey, n as ScheduleAuthorizationError, o as ScheduleConfiguration, p as ScheduleInstant, r as ScheduleAuthorizer, s as ScheduleConflict, t as ScheduleAuthorizationDecision, u as ScheduleFailpoint, v as ScheduleOccurrenceAuthorization, w as ScheduleRefusal, x as SchedulePageRequest, y as ScheduleOwner, z as ScheduledEnvelope } from "../Schedule-yVT2CmKT.mjs";
2
2
  export { ScheduleAuthorizationDecision, ScheduleAuthorizationError, ScheduleAuthorizer, ScheduleCapacityError, ScheduleChange, ScheduleConfiguration, ScheduleConflict, ScheduleDestination, ScheduleDueCursor, ScheduleFailpoint, ScheduleFailpointError, ScheduleId, ScheduleInstant, ScheduleKey, ScheduleManagementAuthorization, ScheduleManagementOperation, ScheduleNotFound, ScheduleOccurrenceAuthorization, ScheduleOwner, SchedulePage, SchedulePageRequest, SchedulePending, ScheduleRecord, ScheduleRefusal, ScheduleRetry, ScheduleRetryReason, ScheduleScope, ScheduleSkippedRange, ScheduleSnapshot, ScheduleSnapshotPage, ScheduleStorageError, ScheduleStore, ScheduleStoreFailure, ScheduleTiming, ScheduleTimingRequest, ScheduleValidationError, ScheduleWake, ScheduledEnvelope, ScheduledInputAdmission, ScheduledInputFailure, ScheduledInputRefused, ScheduledInputRetryable, SchedulingLimits, defaultSchedulingLimits };
@@ -1,4 +1,4 @@
1
- import { M as ScheduleStore, N as ScheduleStoreFailure } from "../Schedule-krSnBcbU.mjs";
1
+ import { M as ScheduleStore, N as ScheduleStoreFailure } from "../Schedule-yVT2CmKT.mjs";
2
2
  import { Effect, Schema } from "effect";
3
3
  //#region src/durable/ScheduleStoreConformance.d.ts
4
4
  declare const ScheduleStoreConformanceViolation_base: Schema.Class<ScheduleStoreConformanceViolation, Schema.TaggedStruct<"ScheduleStoreConformanceViolation", {
@@ -1,4 +1,4 @@
1
- import { C as ScheduleRecord, a as ScheduleChange, m as ScheduleKey, s as ScheduleConflict, y as ScheduleOwner } from "../Schedule-krSnBcbU.mjs";
1
+ import { C as ScheduleRecord, a as ScheduleChange, m as ScheduleKey, s as ScheduleConflict, y as ScheduleOwner } from "../Schedule-yVT2CmKT.mjs";
2
2
  import { Result } from "effect";
3
3
  declare namespace ScheduleTransition_d_exports {
4
4
  export { applyScheduleChange, compareScheduleKeys, compareScheduleNames, scheduleDeadline, scheduleKeyOf, scheduleKeyString, scheduleOwnerKey, scheduleUsesCapacity };
@@ -1,6 +1,6 @@
1
1
  import { r as Principal } from "../Receipt-BAHyigAF.mjs";
2
- import { _a as AdmissionFence, h as DefinitionDigests, jt as DurableSubmitAgent } from "../Records-Byeb70tt.mjs";
3
- import { A as ScheduleSnapshotPage, B as ScheduledInputAdmission, C as ScheduleRecord, D as ScheduleScope, F as ScheduleTimingRequest, I as ScheduleValidationError, L as ScheduleWake, M as ScheduleStore, N as ScheduleStoreFailure, W as SchedulingLimits, c as ScheduleDestination, f as ScheduleId, j as ScheduleStorageError, k as ScheduleSnapshot, m as ScheduleKey, n as ScheduleAuthorizationError, r as ScheduleAuthorizer, y as ScheduleOwner } from "../Schedule-krSnBcbU.mjs";
2
+ import { _a as AdmissionFence, h as DefinitionDigests, jt as DurableSubmitAgent } from "../Records-3uLornLz.mjs";
3
+ import { A as ScheduleSnapshotPage, B as ScheduledInputAdmission, C as ScheduleRecord, D as ScheduleScope, F as ScheduleTimingRequest, I as ScheduleValidationError, L as ScheduleWake, M as ScheduleStore, N as ScheduleStoreFailure, W as SchedulingLimits, c as ScheduleDestination, f as ScheduleId, j as ScheduleStorageError, k as ScheduleSnapshot, m as ScheduleKey, n as ScheduleAuthorizationError, r as ScheduleAuthorizer, y as ScheduleOwner } from "../Schedule-yVT2CmKT.mjs";
4
4
  import { Context, Crypto, Effect, Layer, Schema } from "effect";
5
5
  declare namespace Scheduling_d_exports {
6
6
  export { ScheduleCreateOptions, ScheduleDriver, ScheduleListOptions, ScheduleManagementFailure, ScheduleProcessFailure, ScheduleUpdateOptions, ScheduleWakeNoop, Scheduling };
@@ -1,5 +1,5 @@
1
- import { d as ScheduleFailpointError } from "../Schedule-krSnBcbU.mjs";
2
- import { g as SubscriptionFailpointError } from "../Subscription-Xnwd42Sm.mjs";
1
+ import { d as ScheduleFailpointError } from "../Schedule-yVT2CmKT.mjs";
2
+ import { g as SubscriptionFailpointError } from "../Subscription-CCvcJGlB.mjs";
3
3
  import { Effect, Schema } from "effect";
4
4
  import * as SqlClient from "effect/unstable/sql/SqlClient";
5
5
  //#region src/durable/SqlStorageV2Upgrade.d.ts
@@ -1,5 +1,5 @@
1
- import { _ as Digest } from "../Records-Byeb70tt.mjs";
2
- import { C as SubscriptionScanCursors, O as SubscriptionStoreFailure, S as SubscriptionRetentionPolicy, _ as SubscriptionKey, b as SubscriptionRecord, d as SubscriptionDelivery, f as SubscriptionDeliveryKey, g as SubscriptionFailpointError, l as SubscriptionChange, m as SubscriptionError, n as DeliveryChange, o as SourcePartition, t as AcceptedEvent, v as SubscriptionLimits } from "../Subscription-Xnwd42Sm.mjs";
1
+ import { _ as Digest } from "../Records-3uLornLz.mjs";
2
+ import { C as SubscriptionScanCursors, O as SubscriptionStoreFailure, S as SubscriptionRetentionPolicy, _ as SubscriptionKey, b as SubscriptionRecord, d as SubscriptionDelivery, f as SubscriptionDeliveryKey, g as SubscriptionFailpointError, l as SubscriptionChange, m as SubscriptionError, n as DeliveryChange, o as SourcePartition, t as AcceptedEvent, v as SubscriptionLimits } from "../Subscription-CCvcJGlB.mjs";
3
3
  import { Context, Effect } from "effect";
4
4
  import * as SqlClientService from "effect/unstable/sql/SqlClient";
5
5
  //#region src/durable/SqlSubscriptionStore.d.ts
@@ -1,4 +1,4 @@
1
- import { Sn as ThreadStoreError, j as RecordEnvelope, l as CanonicalRecordEnvelope, ln as ThreadNotMaterialized, pn as ThreadPeerCountRequest } from "../Records-Byeb70tt.mjs";
1
+ import { Sn as ThreadStoreError, j as RecordEnvelope, l as CanonicalRecordEnvelope, ln as ThreadNotMaterialized, pn as ThreadPeerCountRequest } from "../Records-3uLornLz.mjs";
2
2
  import { Effect, Schema } from "effect";
3
3
  import * as SqlClient from "effect/unstable/sql/SqlClient";
4
4
  declare namespace SqlThreadNativeReads_d_exports {
@@ -1,3 +1,3 @@
1
1
  import { i as QueueSequence, n as JoinedToHost, r as Principal, t as IdempotencyKey } from "../Receipt-BAHyigAF.mjs";
2
- import { $a as OwnershipRenewal, Aa as BeginChildBudgetReleaseRequest, Ao as SuspendRequest, Ba as ClaimJoiningRequest, Bo as WorkerLedgerState, Ca as AdmissionResolution, Da as ApprovalDecisionIntent, Do as SubmissionSnapshot, Ea as ApprovalDecisionCommand, Eo as SubmissionLookupByKey, Fa as ChildReservationId, Fo as UnknownResolutionCommand, Ga as JoiningClaim, Go as submissionInputBatchId, Ha as DEFAULT_OWNERSHIP_LEASE_DURATION, Ho as settlementFailureFromRecord, Ia as ChildReservationStatus, Io as UnknownResolutionConflict, Ja as MarkInputAppliedRequest, Jo as submissionSettlementId, Ka as LedgerCapabilities, Ko as submissionInputRecordId, La as ChildSettledNotification, Lo as UnknownResolutionIntent, Ma as ChildBudgetReservationRequest, Mo as SuspensionReason, Na as ChildBudgetReservationSnapshot, No as SuspensionSnapshot, Oa as ApprovalPendingSuspension, Oo as SubmissionState, Pa as ChildReservationConflict, Po as UnknownResolution, Qa as OwnershipLost, Ra as ChildSettledOutcome, Ro as WaitingChild, Sa as AdmissionRequest, So as SubmissionLedgerFailure, Ta as ApprovalConflict, To as SubmissionLookupById, Ua as InputAppliedMarker, Uo as submissionAbortBatchId, Va as ClaimRequest, Vo as WorkerStopCommand, Wa as JoinSnapshot, Wo as submissionAbortRecordId, Xa as MarkReadyRequest, Xo as workerTerminalFromRecord, Ya as MarkJoinedRequest, Yo as submissionSettlementRecordId, Za as MarkUnknownRequest, _a as AdmissionFence, _o as SettlementFinalization, ao as ReleaseChildBudgetRequest, ba as AdmissionNotAdmitted, bo as SubmissionAdmissionFence, co as ReservedChildBudget, do as ResolutionCompletedWithResult, eo as OwnershipSnapshot, fa as AbortCommand, fo as ResolutionNeverHappened, ga as AdmissionConflict, go as SettlementConflict, ha as AdmissionAdmitted, ho as Settlement, io as RecoverySnapshotRequest, ja as ChildAttachmentSnapshot, jo as SuspensionOutcome, ka as AttachChildToReservationRequest, ko as SubmissionWorkItem, lo as ReservedSettlement, ma as AbortIntentRequest, mo as RevertJoiningRequest, no as ParentLinkage, oo as ReleaseOwnershipRequest, pa as AbortIntent, po as ResolutionSafeToRetry, qa as LedgerError, qo as submissionSettlementBatchId, ro as RecoverySnapshot, so as RenewOwnershipRequest, to as OwnershipToken, uo as ResolutionAbortSubmission, va as AdmissionGroup, vo as SettlementReservation, wa as AdmissionResult, wo as SubmissionLookup, xa as AdmissionPolicyError, xo as SubmissionLedger, ya as AdmissionIndeterminate, yo as SettlementReservationSnapshot, za as Claim, zo as WaitingForChildSuspension } from "../Records-Byeb70tt.mjs";
2
+ import { $a as OwnershipRenewal, Aa as BeginChildBudgetReleaseRequest, Ao as SuspendRequest, Ba as ClaimJoiningRequest, Bo as WorkerLedgerState, Ca as AdmissionResolution, Da as ApprovalDecisionIntent, Do as SubmissionSnapshot, Ea as ApprovalDecisionCommand, Eo as SubmissionLookupByKey, Fa as ChildReservationId, Fo as UnknownResolutionCommand, Ga as JoiningClaim, Go as submissionInputBatchId, Ha as DEFAULT_OWNERSHIP_LEASE_DURATION, Ho as settlementFailureFromRecord, Ia as ChildReservationStatus, Io as UnknownResolutionConflict, Ja as MarkInputAppliedRequest, Jo as submissionSettlementId, Ka as LedgerCapabilities, Ko as submissionInputRecordId, La as ChildSettledNotification, Lo as UnknownResolutionIntent, Ma as ChildBudgetReservationRequest, Mo as SuspensionReason, Na as ChildBudgetReservationSnapshot, No as SuspensionSnapshot, Oa as ApprovalPendingSuspension, Oo as SubmissionState, Pa as ChildReservationConflict, Po as UnknownResolution, Qa as OwnershipLost, Ra as ChildSettledOutcome, Ro as WaitingChild, Sa as AdmissionRequest, So as SubmissionLedgerFailure, Ta as ApprovalConflict, To as SubmissionLookupById, Ua as InputAppliedMarker, Uo as submissionAbortBatchId, Va as ClaimRequest, Vo as WorkerStopCommand, Wa as JoinSnapshot, Wo as submissionAbortRecordId, Xa as MarkReadyRequest, Xo as workerTerminalFromRecord, Ya as MarkJoinedRequest, Yo as submissionSettlementRecordId, Za as MarkUnknownRequest, _a as AdmissionFence, _o as SettlementFinalization, ao as ReleaseChildBudgetRequest, ba as AdmissionNotAdmitted, bo as SubmissionAdmissionFence, co as ReservedChildBudget, do as ResolutionCompletedWithResult, eo as OwnershipSnapshot, fa as AbortCommand, fo as ResolutionNeverHappened, ga as AdmissionConflict, go as SettlementConflict, ha as AdmissionAdmitted, ho as Settlement, io as RecoverySnapshotRequest, ja as ChildAttachmentSnapshot, jo as SuspensionOutcome, ka as AttachChildToReservationRequest, ko as SubmissionWorkItem, lo as ReservedSettlement, ma as AbortIntentRequest, mo as RevertJoiningRequest, no as ParentLinkage, oo as ReleaseOwnershipRequest, pa as AbortIntent, po as ResolutionSafeToRetry, qa as LedgerError, qo as submissionSettlementBatchId, ro as RecoverySnapshot, so as RenewOwnershipRequest, to as OwnershipToken, uo as ResolutionAbortSubmission, va as AdmissionGroup, vo as SettlementReservation, wa as AdmissionResult, wo as SubmissionLookup, xa as AdmissionPolicyError, xo as SubmissionLedger, ya as AdmissionIndeterminate, yo as SettlementReservationSnapshot, za as Claim, zo as WaitingForChildSuspension } from "../Records-3uLornLz.mjs";
3
3
  export { AbortCommand, AbortIntent, AbortIntentRequest, AdmissionAdmitted, AdmissionConflict, AdmissionFence, AdmissionGroup, AdmissionIndeterminate, AdmissionNotAdmitted, AdmissionPolicyError, AdmissionRequest, AdmissionResolution, AdmissionResult, ApprovalConflict, ApprovalDecisionCommand, ApprovalDecisionIntent, ApprovalPendingSuspension, AttachChildToReservationRequest, BeginChildBudgetReleaseRequest, ChildAttachmentSnapshot, ChildBudgetReservationRequest, ChildBudgetReservationSnapshot, ChildReservationConflict, ChildReservationId, ChildReservationStatus, ChildSettledNotification, ChildSettledOutcome, Claim, ClaimJoiningRequest, ClaimRequest, DEFAULT_OWNERSHIP_LEASE_DURATION, IdempotencyKey, InputAppliedMarker, JoinSnapshot, JoinedToHost, JoiningClaim, LedgerCapabilities, LedgerError, MarkInputAppliedRequest, MarkJoinedRequest, MarkReadyRequest, MarkUnknownRequest, OwnershipLost, OwnershipRenewal, OwnershipSnapshot, OwnershipToken, ParentLinkage, Principal, QueueSequence, RecoverySnapshot, RecoverySnapshotRequest, ReleaseChildBudgetRequest, ReleaseOwnershipRequest, RenewOwnershipRequest, ReservedChildBudget, ReservedSettlement, ResolutionAbortSubmission, ResolutionCompletedWithResult, ResolutionNeverHappened, ResolutionSafeToRetry, RevertJoiningRequest, Settlement, SettlementConflict, SettlementFinalization, SettlementReservation, SettlementReservationSnapshot, SubmissionAdmissionFence, SubmissionLedger, SubmissionLedgerFailure, SubmissionLookup, SubmissionLookupById, SubmissionLookupByKey, SubmissionSnapshot, SubmissionState, SubmissionWorkItem, SuspendRequest, SuspensionOutcome, SuspensionReason, SuspensionSnapshot, UnknownResolution, UnknownResolutionCommand, UnknownResolutionConflict, UnknownResolutionIntent, WaitingChild, WaitingForChildSuspension, WorkerLedgerState, WorkerStopCommand, settlementFailureFromRecord, submissionAbortBatchId, submissionAbortRecordId, submissionInputBatchId, submissionInputRecordId, submissionSettlementBatchId, submissionSettlementId, submissionSettlementRecordId, workerTerminalFromRecord };
@@ -1,4 +1,4 @@
1
- import { So as SubmissionLedgerFailure, xi as DigestError, xo as SubmissionLedger } from "../Records-Byeb70tt.mjs";
1
+ import { So as SubmissionLedgerFailure, xi as DigestError, xo as SubmissionLedger } from "../Records-3uLornLz.mjs";
2
2
  import { Crypto, Effect, Schema } from "effect";
3
3
  //#region src/durable/SubmissionLedgerConformance.d.ts
4
4
  declare const SubmissionLedgerConformanceViolation_base: Schema.Class<SubmissionLedgerConformanceViolation, Schema.TaggedStruct<"SubmissionLedgerConformanceViolation", {
@@ -1,2 +1,2 @@
1
- import { Mn as PendingSubmission, Nn as SettledSubmission, Pn as SubmissionStatus } from "../Records-Byeb70tt.mjs";
1
+ import { Mn as PendingSubmission, Nn as SettledSubmission, Pn as SubmissionStatus } from "../Records-3uLornLz.mjs";
2
2
  export { PendingSubmission, SettledSubmission, SubmissionStatus };
@@ -1,2 +1,2 @@
1
- import { A as defaultSubscriptionLimits, C as SubscriptionScanCursors, D as SubscriptionStore, E as SubscriptionSourceError, M as subscriptionKeyString, O as SubscriptionStoreFailure, S as SubscriptionRetentionPolicy, T as SubscriptionSnapshot, _ as SubscriptionKey, a as PreparedInput, b as SubscriptionRecord, c as SubscriptionAuthorizer, d as SubscriptionDelivery, f as SubscriptionDeliveryKey, g as SubscriptionFailpointError, h as SubscriptionFailpoint, i as EventSourceVersion, j as subscriptionDeliveryKeyString, l as SubscriptionChange, m as SubscriptionError, n as DeliveryChange, o as SourcePartition, p as SubscriptionDeliverySnapshot, r as EventAcknowledgement, s as SourceRecovery, t as AcceptedEvent, u as SubscriptionConfiguration, v as SubscriptionLimits, w as SubscriptionScope, x as SubscriptionRefusal, y as SubscriptionName } from "../Subscription-Xnwd42Sm.mjs";
1
+ import { A as defaultSubscriptionLimits, C as SubscriptionScanCursors, D as SubscriptionStore, E as SubscriptionSourceError, M as subscriptionKeyString, O as SubscriptionStoreFailure, S as SubscriptionRetentionPolicy, T as SubscriptionSnapshot, _ as SubscriptionKey, a as PreparedInput, b as SubscriptionRecord, c as SubscriptionAuthorizer, d as SubscriptionDelivery, f as SubscriptionDeliveryKey, g as SubscriptionFailpointError, h as SubscriptionFailpoint, i as EventSourceVersion, j as subscriptionDeliveryKeyString, l as SubscriptionChange, m as SubscriptionError, n as DeliveryChange, o as SourcePartition, p as SubscriptionDeliverySnapshot, r as EventAcknowledgement, s as SourceRecovery, t as AcceptedEvent, u as SubscriptionConfiguration, v as SubscriptionLimits, w as SubscriptionScope, x as SubscriptionRefusal, y as SubscriptionName } from "../Subscription-CCvcJGlB.mjs";
2
2
  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 };
@@ -1,2 +1,2 @@
1
- import { a as resolveSubscriptionInput, i as makeSubscriptionInputBinding, n as SubscriptionInputBindings, t as SubscriptionInputBinding } from "../SubscriptionInput-CqtJ58vl.mjs";
1
+ import { a as resolveSubscriptionInput, i as makeSubscriptionInputBinding, n as SubscriptionInputBindings, t as SubscriptionInputBinding } from "../SubscriptionInput-BlE85a8M.mjs";
2
2
  export { SubscriptionInputBinding, SubscriptionInputBindings, makeSubscriptionInputBinding, resolveSubscriptionInput };
@@ -1,4 +1,4 @@
1
- import { D as SubscriptionStore, O as SubscriptionStoreFailure, o as SourcePartition } from "../Subscription-Xnwd42Sm.mjs";
1
+ import { D as SubscriptionStore, O as SubscriptionStoreFailure, o as SourcePartition } from "../Subscription-CCvcJGlB.mjs";
2
2
  import { Effect, Schema } from "effect";
3
3
  //#region src/durable/SubscriptionStoreConformance.d.ts
4
4
  declare const SubscriptionStoreConformanceViolation_base: Schema.Class<SubscriptionStoreConformanceViolation, Schema.TaggedStruct<"SubscriptionStoreConformanceViolation", {
@@ -1,9 +1,9 @@
1
1
  import { t as AgentId, u as ThreadId } from "../Identifiers-CN2s30fF.mjs";
2
2
  import { r as Principal } from "../Receipt-BAHyigAF.mjs";
3
3
  import { t as DurableStep } from "../DurableStep-Cry_iol4.mjs";
4
- import { h as DefinitionDigests } from "../Records-Byeb70tt.mjs";
5
- import { c as ScheduleDestination } from "../Schedule-krSnBcbU.mjs";
6
- import { E as SubscriptionSourceError, g as SubscriptionFailpointError, i as EventSourceVersion, m as SubscriptionError, w as SubscriptionScope } from "../Subscription-Xnwd42Sm.mjs";
4
+ import { h as DefinitionDigests } from "../Records-3uLornLz.mjs";
5
+ import { c as ScheduleDestination } from "../Schedule-yVT2CmKT.mjs";
6
+ import { E as SubscriptionSourceError, g as SubscriptionFailpointError, i as EventSourceVersion, m as SubscriptionError, w as SubscriptionScope } from "../Subscription-CCvcJGlB.mjs";
7
7
  import { Subscriptions } from "./Subscriptions.mjs";
8
8
  import { Tool, Toolkit } from "effect/unstable/ai";
9
9
  import { Crypto, Layer, Schema } from "effect";
@@ -1,4 +1,4 @@
1
- import { b as SubscriptionRecord, d as SubscriptionDelivery, l as SubscriptionChange, m as SubscriptionError, n as DeliveryChange, o as SourcePartition, t as AcceptedEvent, v as SubscriptionLimits } from "../Subscription-Xnwd42Sm.mjs";
1
+ import { b as SubscriptionRecord, d as SubscriptionDelivery, l as SubscriptionChange, m as SubscriptionError, n as DeliveryChange, o as SourcePartition, t as AcceptedEvent, v as SubscriptionLimits } from "../Subscription-CCvcJGlB.mjs";
2
2
  import { Result } from "effect";
3
3
  declare namespace SubscriptionTransition_d_exports {
4
4
  export { applySubscriptionChange, applySubscriptionDeliveryChange, sameAcceptedEventIdentity, sameSourcePartition, sameSubscriptionDelivery, subscriptionCanSelect, subscriptionDeliveryCanSelect, subscriptionMatchesEvent, validateEventRetention };
@@ -1,9 +1,9 @@
1
1
  import { r as Principal } from "../Receipt-BAHyigAF.mjs";
2
- import { O as PersistedJson, _a as AdmissionFence } from "../Records-Byeb70tt.mjs";
3
- import { D as SubscriptionStore, E as SubscriptionSourceError, O as SubscriptionStoreFailure, T as SubscriptionSnapshot, _ as SubscriptionKey, c as SubscriptionAuthorizer, f as SubscriptionDeliveryKey, i as EventSourceVersion, m as SubscriptionError, p as SubscriptionDeliverySnapshot, r as EventAcknowledgement, u as SubscriptionConfiguration, v as SubscriptionLimits, w as SubscriptionScope } from "../Subscription-Xnwd42Sm.mjs";
4
- import { r as EventSources } from "../EventSource-DPRdlvhV.mjs";
5
- import { t as PreparedInputAdmission } from "../PreparedInputAdmission-DqQUjA9k.mjs";
6
- import { n as SubscriptionInputBindings } from "../SubscriptionInput-CqtJ58vl.mjs";
2
+ import { O as PersistedJson, _a as AdmissionFence } from "../Records-3uLornLz.mjs";
3
+ import { D as SubscriptionStore, E as SubscriptionSourceError, O as SubscriptionStoreFailure, T as SubscriptionSnapshot, _ as SubscriptionKey, c as SubscriptionAuthorizer, f as SubscriptionDeliveryKey, i as EventSourceVersion, m as SubscriptionError, p as SubscriptionDeliverySnapshot, r as EventAcknowledgement, u as SubscriptionConfiguration, v as SubscriptionLimits, w as SubscriptionScope } from "../Subscription-CCvcJGlB.mjs";
4
+ import { r as EventSources } from "../EventSource-hk1sVGsO.mjs";
5
+ import { t as PreparedInputAdmission } from "../PreparedInputAdmission-DXvFh8zZ.mjs";
6
+ import { n as SubscriptionInputBindings } from "../SubscriptionInput-BlE85a8M.mjs";
7
7
  import { Context, Crypto, Effect, Layer } from "effect";
8
8
  declare namespace Subscriptions_d_exports {
9
9
  export { SubscribeOptions, SubscriptionDriver, SubscriptionFailure, SubscriptionIntake, Subscriptions };
@@ -1,5 +1,5 @@
1
1
  import { ContextHistory, ContextHistoryError } from "../engine/ContextHistory.mjs";
2
- import { bn as ThreadStore } from "../Records-Byeb70tt.mjs";
2
+ import { bn as ThreadStore } from "../Records-3uLornLz.mjs";
3
3
  import { Layer, Schema } from "effect";
4
4
  declare namespace ThreadContextHistory_d_exports {
5
5
  export { ThreadContextHistoryOptions, layer };
@@ -1,5 +1,5 @@
1
1
  import { ContextHistoryError } from "../engine/ContextHistory.mjs";
2
- import { l as CanonicalRecordEnvelope } from "../Records-Byeb70tt.mjs";
2
+ import { l as CanonicalRecordEnvelope } from "../Records-3uLornLz.mjs";
3
3
  import { Effect, Schema } from "effect";
4
4
  declare namespace ThreadContextHistoryProjection_d_exports {
5
5
  export { ContextHistoryBoundary, ContextHistoryEvidence, ContextHistoryProjection, matchText, normalizeQuery, normalizeText, project, windowIdFor };
@@ -1,4 +1,4 @@
1
- import { A as ProducerId, Do as SubmissionSnapshot, a as BatchId, in as ThreadCheckpoint, on as ThreadExport, qr as IntegrityReport } from "../Records-Byeb70tt.mjs";
1
+ import { A as ProducerId, Do as SubmissionSnapshot, a as BatchId, in as ThreadCheckpoint, on as ThreadExport, qr as IntegrityReport } from "../Records-3uLornLz.mjs";
2
2
  import { Crypto, Effect } from "effect";
3
3
  declare namespace ThreadInvariants_d_exports {
4
4
  export { ThreadInvariantInput, verifyThreadInvariants };
@@ -1,5 +1,5 @@
1
1
  import { u as ThreadId } from "../Identifiers-CN2s30fF.mjs";
2
- import { G as SubagentRequested, J as SubmissionSettledRecord, K as SubagentStarted, Q as ToolApprovalRequested, U as SubagentJoined, W as SubagentLineageRecorded, Z as ToolApprovalDecided, _ as Digest, l as CanonicalRecordEnvelope, q as SubmissionSettled, rt as ToolCallUnknown, t as AbortRequested } from "../Records-Byeb70tt.mjs";
2
+ import { G as SubagentRequested, J as SubmissionSettledRecord, K as SubagentStarted, Q as ToolApprovalRequested, U as SubagentJoined, W as SubagentLineageRecorded, Z as ToolApprovalDecided, _ as Digest, l as CanonicalRecordEnvelope, q as SubmissionSettled, rt as ToolCallUnknown, t as AbortRequested } from "../Records-3uLornLz.mjs";
3
3
  import { Schema } from "effect";
4
4
  declare namespace ThreadProjection_d_exports {
5
5
  export { ApprovalRecord, OpenToolCallState, SubagentInvocationState, ThreadProjection, initialThreadProjection, reduceThreadRecord, replayThread, replayThreadFromCheckpoint };
@@ -1,4 +1,4 @@
1
- import { Qt as FencedAppendRequest, Yt as AppendResult } from "../Records-Byeb70tt.mjs";
1
+ import { Qt as FencedAppendRequest, Yt as AppendResult } from "../Records-3uLornLz.mjs";
2
2
  import { Context, Effect, Layer, Option, Schema } from "effect";
3
3
  declare namespace ThreadProjectionMaintenance_d_exports {
4
4
  export { ThreadProjectionError, ThreadProjectionMaintenance, ThreadProjectionMaintenanceService, drainDue };
@@ -1,2 +1,2 @@
1
- import { $t as LoadCheckpointRequest, An as readOutstanding, Cn as ThreadStoreFailure, Dn as ThreadWorkerStateRequest, En as ThreadTailRequest, Jt as AppendConflict, On as getRecord, Qt as FencedAppendRequest, Sn as ThreadStoreError, Tn as ThreadTail, Xt as CheckpointRejected, Yt as AppendResult, Zt as FenceRejected, _n as ThreadRecoveryCheckpoints, an as ThreadCheckpoints, bn as ThreadStore, cn as ThreadMaterialization, dn as ThreadOutstanding, en as MAX_THREAD_EXPORT_RECORDS, fn as ThreadOutstandingRequest, gn as ThreadRecordRequest, hn as ThreadReadRequest, in as ThreadCheckpoint, jn as readWorkerState, kn as getRunInput, ln as ThreadNotMaterialized, mn as ThreadRead, nn as SaveRecoveryCheckpointRequest, on as ThreadExport, pn as ThreadPeerCountRequest, rn as SelectedThreadRead, sn as ThreadExportRequest, tn as SaveCheckpointRequest, un as ThreadObservation, vn as ThreadRunInputRequest, xn as ThreadStoreDiagnostic, yn as ThreadSelection } from "../Records-Byeb70tt.mjs";
1
+ import { $t as LoadCheckpointRequest, An as readOutstanding, Cn as ThreadStoreFailure, Dn as ThreadWorkerStateRequest, En as ThreadTailRequest, Jt as AppendConflict, On as getRecord, Qt as FencedAppendRequest, Sn as ThreadStoreError, Tn as ThreadTail, Xt as CheckpointRejected, Yt as AppendResult, Zt as FenceRejected, _n as ThreadRecoveryCheckpoints, an as ThreadCheckpoints, bn as ThreadStore, cn as ThreadMaterialization, dn as ThreadOutstanding, en as MAX_THREAD_EXPORT_RECORDS, fn as ThreadOutstandingRequest, gn as ThreadRecordRequest, hn as ThreadReadRequest, in as ThreadCheckpoint, jn as readWorkerState, kn as getRunInput, ln as ThreadNotMaterialized, mn as ThreadRead, nn as SaveRecoveryCheckpointRequest, on as ThreadExport, pn as ThreadPeerCountRequest, rn as SelectedThreadRead, sn as ThreadExportRequest, tn as SaveCheckpointRequest, un as ThreadObservation, vn as ThreadRunInputRequest, xn as ThreadStoreDiagnostic, yn as ThreadSelection } from "../Records-3uLornLz.mjs";
2
2
  export { AppendConflict, AppendResult, CheckpointRejected, FenceRejected, FencedAppendRequest, LoadCheckpointRequest, MAX_THREAD_EXPORT_RECORDS, SaveCheckpointRequest, SaveRecoveryCheckpointRequest, SelectedThreadRead, ThreadCheckpoint, ThreadCheckpoints, ThreadExport, ThreadExportRequest, ThreadMaterialization, ThreadNotMaterialized, ThreadObservation, ThreadOutstanding, ThreadOutstandingRequest, ThreadPeerCountRequest, ThreadRead, ThreadReadRequest, ThreadRecordRequest, ThreadRecoveryCheckpoints, ThreadRunInputRequest, ThreadSelection, ThreadStore, ThreadStoreDiagnostic, ThreadStoreError, ThreadStoreFailure, ThreadTail, ThreadTailRequest, ThreadWorkerStateRequest, getRecord, getRunInput, readOutstanding, readWorkerState };
@@ -1,4 +1,4 @@
1
- import { Cn as ThreadStoreFailure, Xt as CheckpointRejected, bn as ThreadStore } from "../Records-Byeb70tt.mjs";
1
+ import { Cn as ThreadStoreFailure, Xt as CheckpointRejected, bn as ThreadStore } from "../Records-3uLornLz.mjs";
2
2
  import { Effect, Schema } from "effect";
3
3
  //#region src/durable/ThreadStoreConformance.d.ts
4
4
  declare const ThreadStoreConformanceViolation_base: Schema.Class<ThreadStoreConformanceViolation, Schema.TaggedStruct<"ThreadStoreConformanceViolation", {
@@ -4,7 +4,7 @@ import { r as Principal } from "../Receipt-BAHyigAF.mjs";
4
4
  import { t as AgentPolicy } from "../AgentPolicy-BqDoSXO6.mjs";
5
5
  import { r as AnyDefinition, t as Agent_d_exports } from "../Agent-D9cXqfF3.mjs";
6
6
  import { c as WorkerError, f as WorkerRef, h as WorkerSource } from "../Worker-fwWkBg12.mjs";
7
- import { Do as SubmissionSnapshot, O as PersistedJson, _ as Digest, dt as WorkerOrigin, h as DefinitionDigests } from "../Records-Byeb70tt.mjs";
7
+ import { Do as SubmissionSnapshot, O as PersistedJson, _ as Digest, dt as WorkerOrigin, h as DefinitionDigests } from "../Records-3uLornLz.mjs";
8
8
  import { Context, Effect, Option, Schema } from "effect";
9
9
  declare namespace WorkerHost_d_exports {
10
10
  export { WorkerBudgetAuthorizer, WorkerConcurrencyLimit, WorkerConcurrencyResolver, WorkerHostAuthorizationRequest, WorkerHostAuthorizer, WorkerHostConfig, WorkerHostLimits, WorkerPolicyResolver, WorkerPolicySource, WorkerPolicyTarget };
@@ -1,2 +1,2 @@
1
- import { A as start, C as decodeFinalOutput, D as renderInputPrompt, E as projectCompletionOutput, F as withTerminalDefectEvent, M as stream, N as streamUnknown, O as run, P as streamWithUsageAccountingUnknown, S as ToolCallWaiting, T as projectCompletionFromToolOutput, _ as SubagentDurability, a as AgentResultSchema, b as SubagentDurabilityError, c as AgentSpawner, d as DetachedRun, f as EngineProvidedToolServices, g as SpawnedChildRun, h as SpawnRunOptions, i as AgentResult, j as startUnknown, k as runUnknown, l as AgentSpawnerParent, m as SpawnDelegation, n as AgentChildPending, o as AgentRuntimeFailure, p as RuntimeBinding, r as AgentCompletionProjectionRequirements, s as AgentRuntimeRequirements, u as AgentSpawnerService, v as SubagentDurabilityDurable, w as encodeRunDisposition, x as SubagentDurabilityService, y as SubagentDurabilityEphemeral } from "../AgentRuntime-DyZv8uu2.mjs";
1
+ import { A as start, C as decodeFinalOutput, D as renderInputPrompt, E as projectCompletionOutput, F as withTerminalDefectEvent, M as stream, N as streamUnknown, O as run, P as streamWithUsageAccountingUnknown, S as ToolCallWaiting, T as projectCompletionFromToolOutput, _ as SubagentDurability, a as AgentResultSchema, b as SubagentDurabilityError, c as AgentSpawner, d as DetachedRun, f as EngineProvidedToolServices, g as SpawnedChildRun, h as SpawnRunOptions, i as AgentResult, j as startUnknown, k as runUnknown, l as AgentSpawnerParent, m as SpawnDelegation, n as AgentChildPending, o as AgentRuntimeFailure, p as RuntimeBinding, r as AgentCompletionProjectionRequirements, s as AgentRuntimeRequirements, u as AgentSpawnerService, v as SubagentDurabilityDurable, w as encodeRunDisposition, x as SubagentDurabilityService, y as SubagentDurabilityEphemeral } from "../AgentRuntime-BUxDdLpw.mjs";
2
2
  export { AgentChildPending, type AgentCompletionProjectionRequirements, type AgentResult, AgentResultSchema, type AgentRuntimeFailure, type AgentRuntimeRequirements, AgentSpawner, type AgentSpawnerParent, type AgentSpawnerService, type DetachedRun, type EngineProvidedToolServices, type RuntimeBinding, type SpawnDelegation, type SpawnRunOptions, type SpawnedChildRun, SubagentDurability, type SubagentDurabilityDurable, type SubagentDurabilityEphemeral, SubagentDurabilityError, type SubagentDurabilityService, ToolCallWaiting, decodeFinalOutput, encodeRunDisposition, projectCompletionFromToolOutput, projectCompletionOutput, renderInputPrompt, run, runUnknown, start, startUnknown, stream, streamUnknown, streamWithUsageAccountingUnknown, withTerminalDefectEvent };
@@ -1,2 +1,2 @@
1
- import { a as SubagentHost, c as WorkerObservation, d as WorkerReporting, f as WorkerRunReport, i as StartWorkerRequest, l as WorkerReceiptRequest, n as DeferredStartWorkerRequest, r as FollowUpWorkerRequest, s as WorkerMessageRequest, t as BackgroundReporting, u as WorkerReportPreparationFailure } from "../SubagentHost-P9zB_TfV.mjs";
2
- export { BackgroundReporting, DeferredStartWorkerRequest, FollowUpWorkerRequest, StartWorkerRequest, SubagentHost, WorkerMessageRequest, WorkerObservation, WorkerReceiptRequest, WorkerReportPreparationFailure, WorkerReporting, WorkerRunReport };
1
+ import { a as StartWorkerRequest, c as WorkerMessageRequest, d as WorkerReportPreparationFailure, f as WorkerReporting, i as FollowUpWorkerRequest, l as WorkerObservation, n as DeferredFollowUpWorkerRequest, o as SubagentHost, p as WorkerRunReport, r as DeferredStartWorkerRequest, t as BackgroundReporting, u as WorkerReceiptRequest } from "../SubagentHost-4WB8Hj0C.mjs";
2
+ export { BackgroundReporting, DeferredFollowUpWorkerRequest, DeferredStartWorkerRequest, FollowUpWorkerRequest, StartWorkerRequest, SubagentHost, WorkerMessageRequest, WorkerObservation, WorkerReceiptRequest, WorkerReportPreparationFailure, WorkerReporting, WorkerRunReport };
@@ -1 +1 @@
1
- {"version":3,"file":"SubagentHost.mjs","names":[],"sources":["../../src/engine/SubagentHost.ts"],"sourcesContent":["import type { Effect, Option } from \"effect\";\nimport { Context, Schema, Stream } from \"effect\";\n\nimport type * as Agent from \"../core/Agent.ts\";\nimport type { AgentPolicy } from \"../core/AgentPolicy.ts\";\nimport type * as FailureDiagnostic from \"../core/FailureDiagnostic.ts\";\nimport type { DelegationId, RunId, SettlementId, ThreadId } from \"../core/Identifiers.ts\";\nimport type { MessageRef, MessageStatus } from \"../core/Messaging.ts\";\nimport { type IdempotencyKey, type JoinedToHost, type Receipt } from \"../core/Receipt.ts\";\nimport type { SubagentBudgetReservation } from \"../core/SubagentContract.ts\";\nimport {\n WorkerError,\n type WorkerStop,\n type WorkerStopped,\n type WorkerCompletion,\n type WorkerHistoryEntry,\n type WorkerContext,\n type WorkerBudgetScope,\n type WorkerSource,\n type WorkerPage,\n type WorkerRef,\n type WorkerStarted,\n type WorkerSummary,\n} from \"../core/Worker.ts\";\n\n/** Prepared values cross this port only to be Schema-decoded before durable storage. */\nexport interface StartWorkerRequest {\n readonly delegationId: DelegationId;\n readonly target: Agent.AnyDefinition;\n readonly idempotencyKey: IdempotencyKey;\n readonly encodedInput: unknown;\n readonly encodedParameters: unknown;\n readonly policy: AgentPolicy;\n readonly budget: SubagentBudgetReservation;\n readonly encodedGrant: unknown;\n readonly toolCallAllowance?: number;\n /** Author-owned request; the durable host must separately authorize worker-run funding. */\n readonly budgetScope?: WorkerBudgetScope;\n}\n\n/**\n * First-admission preparation stays lazy until the owner authorizes the caller and checks the\n * retained command. Replays compare declared parameters/options and reuse the original capture.\n * Prepared policy, budget, and allowance are frozen first-admission configuration, not replay\n * arguments; changing them requires a new command key. Current caller authorization still applies.\n * Preparation must be free of external effects: concurrent first admissions can prepare before\n * the retained delivery chooses its first writer.\n */\nexport interface DeferredStartWorkerRequest<E = never, R = never> extends Pick<\n StartWorkerRequest,\n | \"delegationId\"\n | \"target\"\n | \"idempotencyKey\"\n | \"encodedParameters\"\n | \"encodedGrant\"\n | \"budgetScope\"\n> {\n readonly prepare: Effect.Effect<\n Pick<StartWorkerRequest, \"encodedInput\" | \"policy\" | \"budget\" | \"toolCallAllowance\">,\n E,\n R\n >;\n}\n\nexport interface FollowUpWorkerRequest {\n readonly worker: WorkerRef;\n readonly target: Agent.AnyDefinition;\n readonly idempotencyKey: IdempotencyKey;\n readonly encodedInput: unknown;\n readonly encodedParameters: unknown;\n}\n\nexport interface WorkerReceiptRequest {\n readonly worker: WorkerRef;\n readonly target: Agent.AnyDefinition;\n readonly receipt: Receipt;\n}\n\nexport interface WorkerMessageRequest {\n readonly worker: WorkerRef;\n readonly target: Agent.AnyDefinition;\n readonly message: MessageRef;\n}\n\n/**\n * Canonical terminal values remain encoded until the capability decodes the saved parameters\n * and target output and applies its declared result projection. Child E does not survive settlement.\n */\nexport type WorkerObservation =\n | { readonly _tag: \"Pending\"; readonly receipt: Receipt }\n | {\n readonly _tag: \"Settled\";\n readonly receipt: Receipt;\n /** Absent when an input failed or was cancelled before any Run started. */\n readonly runId?: RunId;\n readonly settlementId: SettlementId;\n readonly outcome: \"completed\" | \"failed\" | \"aborted\";\n readonly encodedParameters: unknown;\n readonly encodedResult: unknown;\n /** Operator-private failed-settlement evidence; never part of a model Tool result. */\n readonly diagnostic?: FailureDiagnostic.Failure;\n readonly budgetExhausted: boolean;\n };\n\n/** One actual canonical Run, independent of how many input Receipts joined it. */\nexport interface WorkerRunReport {\n readonly worker: WorkerRef;\n readonly context: WorkerContext;\n readonly observation: Extract<WorkerObservation, { readonly _tag: \"Settled\" }> & {\n readonly runId: RunId;\n };\n}\n\n/** A bounded projection failure; raw application errors never enter durable report records. */\nexport class WorkerReportPreparationFailure extends Schema.TaggedError<WorkerReportPreparationFailure>()(\n \"WorkerReportPreparationFailure\",\n { stage: Schema.Literals([\"projection\", \"input\", \"preparation\"]) },\n) {}\n\n/**\n * Source-owned standard projection discovered from background tools.\n * The concrete descriptor retains its E/R; durable registration captures R and records\n * bounded preparation failure rather than serializing arbitrary application errors.\n */\nexport interface WorkerReporting<E = never, R = never> {\n readonly delegationId: DelegationId;\n readonly target: Agent.AnyDefinition;\n readonly prepare: (report: WorkerRunReport) => Effect.Effect<\n {\n readonly message: WorkerCompletion;\n },\n E | WorkerReportPreparationFailure,\n R\n >;\n}\n\n/** Descriptor carried by background tools; registration discovers it without an app handoff. */\nexport const BackgroundReporting = Context.Reference<\n WorkerReporting<WorkerReportPreparationFailure> | undefined\n>(\"@effect-agent/engine/BackgroundReporting\", { defaultValue: () => undefined });\n\n/**\n * Trusted, caller-bound host port. The interpreter supplies a fresh facet for each Tool Call;\n * programmatic callers acquire a separately authorized Thread facet. Request values cannot\n * choose the source identity, replace worker provenance or expand its authority and budgets.\n */\nexport class SubagentHost extends Context.Service<\n SubagentHost,\n {\n readonly context: Effect.Effect<WorkerContext, WorkerError>;\n /** Resolve prepared input through host authority; None retains legacy target inheritance. */\n readonly resolveTargetPolicy: (request: {\n readonly target: Agent.AnyDefinition;\n readonly encodedInput: unknown;\n }) => Effect.Effect<Option.Option<AgentPolicy>, WorkerError>;\n /** Prepared callers retain strict input/policy conflicts; deferred callers replay the saved capture. */\n readonly start: <E = never, R = never>(\n request: StartWorkerRequest | DeferredStartWorkerRequest<E, R>,\n ) => Effect.Effect<WorkerStarted, WorkerError | E, R>;\n readonly followUp: (\n request: FollowUpWorkerRequest,\n ) => Effect.Effect<MessageStatus, WorkerError>;\n readonly inspect: (\n request: WorkerReceiptRequest | WorkerMessageRequest,\n ) => Effect.Effect<WorkerObservation | MessageStatus, WorkerError>;\n /** Inspect the continuing worker using the same summary contract as discovery. */\n readonly summary: (request: {\n readonly worker: WorkerRef;\n readonly target: Agent.AnyDefinition;\n }) => Effect.Effect<WorkerSummary, WorkerError>;\n /** A finite snapshot through the captured tail; resume with the last sequence as `after`. */\n readonly observe: (request: {\n readonly worker: WorkerRef;\n readonly target: Agent.AnyDefinition;\n readonly after?: number;\n }) => Stream.Stream<WorkerHistoryEntry, WorkerError>;\n /** Interrupting this wait never requests cancellation of accepted work. */\n readonly await: (\n request: WorkerReceiptRequest,\n ) => Effect.Effect<WorkerObservation, WorkerError>;\n readonly list: (request: {\n readonly delegationId: DelegationId;\n readonly target: Agent.AnyDefinition;\n readonly limit: number;\n readonly after?: ThreadId;\n }) => Effect.Effect<WorkerPage, WorkerError>;\n /** Seal the whole worker; retries reconcile the same command, including a lost acknowledgement. */\n readonly stop: (\n request: WorkerStop & { readonly target: Agent.AnyDefinition },\n ) => Effect.Effect<WorkerStopped, WorkerError>;\n /** Cancel exactly this Receipt; preserve JoinedToHost without broadening its target. */\n readonly cancel: (\n request: WorkerReceiptRequest,\n ) => Effect.Effect<void, WorkerError | JoinedToHost>;\n }\n>()(\"@effect-agent/engine/SubagentHost\") {\n static readonly unavailable: SubagentHost[\"Service\"] = {\n context: WorkerError.make({ operation: \"context\", reason: \"unavailable\" }),\n resolveTargetPolicy: () => WorkerError.make({ operation: \"start\", reason: \"unavailable\" }),\n start: () => WorkerError.make({ operation: \"start\", reason: \"unavailable\" }),\n followUp: () => WorkerError.make({ operation: \"followUp\", reason: \"unavailable\" }),\n inspect: () => WorkerError.make({ operation: \"inspect\", reason: \"unavailable\" }),\n summary: () => WorkerError.make({ operation: \"inspect\", reason: \"unavailable\" }),\n observe: () => Stream.fail(WorkerError.make({ operation: \"observe\", reason: \"unavailable\" })),\n await: () => WorkerError.make({ operation: \"await\", reason: \"unavailable\" }),\n list: () => WorkerError.make({ operation: \"list\", reason: \"unavailable\" }),\n stop: () => WorkerError.make({ operation: \"stop\", reason: \"unavailable\" }),\n cancel: () => WorkerError.make({ operation: \"cancel\", reason: \"unavailable\" }),\n };\n\n /** Runtime-owned per-call binding. Unconfigured Runs deny background operations. */\n static readonly forTool = Context.Reference<\n (source: Extract<WorkerSource, { readonly _tag: \"tool\" }>) => SubagentHost[\"Service\"]\n >(\"@effect-agent/engine/SubagentHost/forTool\", {\n defaultValue: () => () => SubagentHost.unavailable,\n });\n}\n"],"mappings":";;;;;;;;;;AAkHA,IAAa,iCAAb,cAAoD,OAAO,YAA4C,CAAC,CACtG,kCACA,EAAE,OAAO,OAAO,SAAS;CAAC;CAAc;CAAS;AAAa,CAAC,EAAE,CACnE,CAAC,CAAC,CAAC;;AAoBH,MAAa,sBAAsB,QAAQ,UAEzC,4CAA4C,EAAE,oBAAoB,KAAA,EAAU,CAAC;;;;;;AAO/E,IAAa,eAAb,MAAa,qBAAqB,QAAQ,QAiDxC,CAAC,CAAC,mCAAmC,CAAC,CAAC;CACvC,OAAgB,cAAuC;EACrD,SAAS,YAAY,KAAK;GAAE,WAAW;GAAW,QAAQ;EAAc,CAAC;EACzE,2BAA2B,YAAY,KAAK;GAAE,WAAW;GAAS,QAAQ;EAAc,CAAC;EACzF,aAAa,YAAY,KAAK;GAAE,WAAW;GAAS,QAAQ;EAAc,CAAC;EAC3E,gBAAgB,YAAY,KAAK;GAAE,WAAW;GAAY,QAAQ;EAAc,CAAC;EACjF,eAAe,YAAY,KAAK;GAAE,WAAW;GAAW,QAAQ;EAAc,CAAC;EAC/E,eAAe,YAAY,KAAK;GAAE,WAAW;GAAW,QAAQ;EAAc,CAAC;EAC/E,eAAe,OAAO,KAAK,YAAY,KAAK;GAAE,WAAW;GAAW,QAAQ;EAAc,CAAC,CAAC;EAC5F,aAAa,YAAY,KAAK;GAAE,WAAW;GAAS,QAAQ;EAAc,CAAC;EAC3E,YAAY,YAAY,KAAK;GAAE,WAAW;GAAQ,QAAQ;EAAc,CAAC;EACzE,YAAY,YAAY,KAAK;GAAE,WAAW;GAAQ,QAAQ;EAAc,CAAC;EACzE,cAAc,YAAY,KAAK;GAAE,WAAW;GAAU,QAAQ;EAAc,CAAC;CAC/E;;CAGA,OAAgB,UAAU,QAAQ,UAEhC,6CAA6C,EAC7C,0BAA0B,aAAa,YACzC,CAAC;AACH"}
1
+ {"version":3,"file":"SubagentHost.mjs","names":[],"sources":["../../src/engine/SubagentHost.ts"],"sourcesContent":["import type { Effect, Option } from \"effect\";\nimport { Context, Schema, Stream } from \"effect\";\n\nimport type * as Agent from \"../core/Agent.ts\";\nimport type { AgentPolicy } from \"../core/AgentPolicy.ts\";\nimport type * as FailureDiagnostic from \"../core/FailureDiagnostic.ts\";\nimport type { DelegationId, RunId, SettlementId, ThreadId } from \"../core/Identifiers.ts\";\nimport type { MessageRef, MessageStatus } from \"../core/Messaging.ts\";\nimport { type IdempotencyKey, type JoinedToHost, type Receipt } from \"../core/Receipt.ts\";\nimport type { SubagentBudgetReservation } from \"../core/SubagentContract.ts\";\nimport {\n WorkerError,\n type WorkerStop,\n type WorkerStopped,\n type WorkerCompletion,\n type WorkerHistoryEntry,\n type WorkerContext,\n type WorkerBudgetScope,\n type WorkerSource,\n type WorkerPage,\n type WorkerRef,\n type WorkerStarted,\n type WorkerSummary,\n} from \"../core/Worker.ts\";\n\n/** Prepared values cross this port only to be Schema-decoded before durable storage. */\nexport interface StartWorkerRequest {\n readonly delegationId: DelegationId;\n readonly target: Agent.AnyDefinition;\n readonly idempotencyKey: IdempotencyKey;\n readonly encodedInput: unknown;\n readonly encodedParameters: unknown;\n readonly policy: AgentPolicy;\n readonly budget: SubagentBudgetReservation;\n readonly encodedGrant: unknown;\n readonly toolCallAllowance?: number;\n /** Author-owned request; the durable host must separately authorize worker-run funding. */\n readonly budgetScope?: WorkerBudgetScope;\n}\n\n/**\n * First-admission preparation stays lazy until the owner authorizes the caller and checks the\n * retained command. Replays compare declared parameters/options and reuse the original capture.\n * Prepared policy, budget, and allowance are frozen first-admission configuration, not replay\n * arguments; changing them requires a new command key. Current caller authorization still applies.\n * Preparation must be free of external effects: concurrent first admissions can prepare before\n * the retained delivery chooses its first writer.\n */\nexport interface DeferredStartWorkerRequest<E = never, R = never> extends Pick<\n StartWorkerRequest,\n | \"delegationId\"\n | \"target\"\n | \"idempotencyKey\"\n | \"encodedParameters\"\n | \"encodedGrant\"\n | \"budgetScope\"\n> {\n readonly prepare: Effect.Effect<\n Pick<StartWorkerRequest, \"encodedInput\" | \"policy\" | \"budget\" | \"toolCallAllowance\">,\n E,\n R\n >;\n}\n\nexport interface FollowUpWorkerRequest {\n readonly worker: WorkerRef;\n readonly target: Agent.AnyDefinition;\n readonly idempotencyKey: IdempotencyKey;\n readonly encodedInput: unknown;\n readonly encodedParameters: unknown;\n}\n\n/**\n * Like deferred starts, follow-ups prepare only after current authorization and retained-command\n * lookup. Replays compare declared parameters and reuse the original input and worker authority.\n * Preparation must be free of external effects because concurrent first admissions can prepare.\n */\nexport interface DeferredFollowUpWorkerRequest<E = never, R = never> extends Omit<\n FollowUpWorkerRequest,\n \"encodedInput\"\n> {\n readonly prepare: Effect.Effect<Pick<FollowUpWorkerRequest, \"encodedInput\">, E, R>;\n}\n\nexport interface WorkerReceiptRequest {\n readonly worker: WorkerRef;\n readonly target: Agent.AnyDefinition;\n readonly receipt: Receipt;\n}\n\nexport interface WorkerMessageRequest {\n readonly worker: WorkerRef;\n readonly target: Agent.AnyDefinition;\n readonly message: MessageRef;\n}\n\n/**\n * Canonical terminal values remain encoded until the capability decodes the saved parameters\n * and target output and applies its declared result projection. Child E does not survive settlement.\n */\nexport type WorkerObservation =\n | { readonly _tag: \"Pending\"; readonly receipt: Receipt }\n | {\n readonly _tag: \"Settled\";\n readonly receipt: Receipt;\n /** Absent when an input failed or was cancelled before any Run started. */\n readonly runId?: RunId;\n readonly settlementId: SettlementId;\n readonly outcome: \"completed\" | \"failed\" | \"aborted\";\n readonly encodedParameters: unknown;\n readonly encodedResult: unknown;\n /** Operator-private failed-settlement evidence; never part of a model Tool result. */\n readonly diagnostic?: FailureDiagnostic.Failure;\n readonly budgetExhausted: boolean;\n };\n\n/** One actual canonical Run, independent of how many input Receipts joined it. */\nexport interface WorkerRunReport {\n readonly worker: WorkerRef;\n readonly context: WorkerContext;\n readonly observation: Extract<WorkerObservation, { readonly _tag: \"Settled\" }> & {\n readonly runId: RunId;\n };\n}\n\n/** A bounded projection failure; raw application errors never enter durable report records. */\nexport class WorkerReportPreparationFailure extends Schema.TaggedError<WorkerReportPreparationFailure>()(\n \"WorkerReportPreparationFailure\",\n { stage: Schema.Literals([\"projection\", \"input\", \"preparation\"]) },\n) {}\n\n/**\n * Source-owned standard projection discovered from background tools.\n * The concrete descriptor retains its E/R; durable registration captures R and records\n * bounded preparation failure rather than serializing arbitrary application errors.\n */\nexport interface WorkerReporting<E = never, R = never> {\n readonly delegationId: DelegationId;\n readonly target: Agent.AnyDefinition;\n readonly prepare: (report: WorkerRunReport) => Effect.Effect<\n {\n readonly message: WorkerCompletion;\n },\n E | WorkerReportPreparationFailure,\n R\n >;\n}\n\n/** Descriptor carried by background tools; registration discovers it without an app handoff. */\nexport const BackgroundReporting = Context.Reference<\n WorkerReporting<WorkerReportPreparationFailure> | undefined\n>(\"@effect-agent/engine/BackgroundReporting\", { defaultValue: () => undefined });\n\n/**\n * Trusted, caller-bound host port. The interpreter supplies a fresh facet for each Tool Call;\n * programmatic callers acquire a separately authorized Thread facet. Request values cannot\n * choose the source identity, replace worker provenance or expand its authority and budgets.\n */\nexport class SubagentHost extends Context.Service<\n SubagentHost,\n {\n readonly context: Effect.Effect<WorkerContext, WorkerError>;\n /** Resolve prepared input through host authority; None retains legacy target inheritance. */\n readonly resolveTargetPolicy: (request: {\n readonly target: Agent.AnyDefinition;\n readonly encodedInput: unknown;\n }) => Effect.Effect<Option.Option<AgentPolicy>, WorkerError>;\n /** Prepared callers retain strict input/policy conflicts; deferred callers replay the saved capture. */\n readonly start: <E = never, R = never>(\n request: StartWorkerRequest | DeferredStartWorkerRequest<E, R>,\n ) => Effect.Effect<WorkerStarted, WorkerError | E, R>;\n /** Prepared callers retain strict input conflicts; deferred callers replay the saved capture. */\n readonly followUp: <E = never, R = never>(\n request: FollowUpWorkerRequest | DeferredFollowUpWorkerRequest<E, R>,\n ) => Effect.Effect<MessageStatus, WorkerError | E, R>;\n readonly inspect: (\n request: WorkerReceiptRequest | WorkerMessageRequest,\n ) => Effect.Effect<WorkerObservation | MessageStatus, WorkerError>;\n /** Inspect the continuing worker using the same summary contract as discovery. */\n readonly summary: (request: {\n readonly worker: WorkerRef;\n readonly target: Agent.AnyDefinition;\n }) => Effect.Effect<WorkerSummary, WorkerError>;\n /** A finite snapshot through the captured tail; resume with the last sequence as `after`. */\n readonly observe: (request: {\n readonly worker: WorkerRef;\n readonly target: Agent.AnyDefinition;\n readonly after?: number;\n }) => Stream.Stream<WorkerHistoryEntry, WorkerError>;\n /** Interrupting this wait never requests cancellation of accepted work. */\n readonly await: (\n request: WorkerReceiptRequest,\n ) => Effect.Effect<WorkerObservation, WorkerError>;\n readonly list: (request: {\n readonly delegationId: DelegationId;\n readonly target: Agent.AnyDefinition;\n readonly limit: number;\n readonly after?: ThreadId;\n }) => Effect.Effect<WorkerPage, WorkerError>;\n /** Seal the whole worker; retries reconcile the same command, including a lost acknowledgement. */\n readonly stop: (\n request: WorkerStop & { readonly target: Agent.AnyDefinition },\n ) => Effect.Effect<WorkerStopped, WorkerError>;\n /** Cancel exactly this Receipt; preserve JoinedToHost without broadening its target. */\n readonly cancel: (\n request: WorkerReceiptRequest,\n ) => Effect.Effect<void, WorkerError | JoinedToHost>;\n }\n>()(\"@effect-agent/engine/SubagentHost\") {\n static readonly unavailable: SubagentHost[\"Service\"] = {\n context: WorkerError.make({ operation: \"context\", reason: \"unavailable\" }),\n resolveTargetPolicy: () => WorkerError.make({ operation: \"start\", reason: \"unavailable\" }),\n start: () => WorkerError.make({ operation: \"start\", reason: \"unavailable\" }),\n followUp: () => WorkerError.make({ operation: \"followUp\", reason: \"unavailable\" }),\n inspect: () => WorkerError.make({ operation: \"inspect\", reason: \"unavailable\" }),\n summary: () => WorkerError.make({ operation: \"inspect\", reason: \"unavailable\" }),\n observe: () => Stream.fail(WorkerError.make({ operation: \"observe\", reason: \"unavailable\" })),\n await: () => WorkerError.make({ operation: \"await\", reason: \"unavailable\" }),\n list: () => WorkerError.make({ operation: \"list\", reason: \"unavailable\" }),\n stop: () => WorkerError.make({ operation: \"stop\", reason: \"unavailable\" }),\n cancel: () => WorkerError.make({ operation: \"cancel\", reason: \"unavailable\" }),\n };\n\n /** Runtime-owned per-call binding. Unconfigured Runs deny background operations. */\n static readonly forTool = Context.Reference<\n (source: Extract<WorkerSource, { readonly _tag: \"tool\" }>) => SubagentHost[\"Service\"]\n >(\"@effect-agent/engine/SubagentHost/forTool\", {\n defaultValue: () => () => SubagentHost.unavailable,\n });\n}\n"],"mappings":";;;;;;;;;;AA8HA,IAAa,iCAAb,cAAoD,OAAO,YAA4C,CAAC,CACtG,kCACA,EAAE,OAAO,OAAO,SAAS;CAAC;CAAc;CAAS;AAAa,CAAC,EAAE,CACnE,CAAC,CAAC,CAAC;;AAoBH,MAAa,sBAAsB,QAAQ,UAEzC,4CAA4C,EAAE,oBAAoB,KAAA,EAAU,CAAC;;;;;;AAO/E,IAAa,eAAb,MAAa,qBAAqB,QAAQ,QAkDxC,CAAC,CAAC,mCAAmC,CAAC,CAAC;CACvC,OAAgB,cAAuC;EACrD,SAAS,YAAY,KAAK;GAAE,WAAW;GAAW,QAAQ;EAAc,CAAC;EACzE,2BAA2B,YAAY,KAAK;GAAE,WAAW;GAAS,QAAQ;EAAc,CAAC;EACzF,aAAa,YAAY,KAAK;GAAE,WAAW;GAAS,QAAQ;EAAc,CAAC;EAC3E,gBAAgB,YAAY,KAAK;GAAE,WAAW;GAAY,QAAQ;EAAc,CAAC;EACjF,eAAe,YAAY,KAAK;GAAE,WAAW;GAAW,QAAQ;EAAc,CAAC;EAC/E,eAAe,YAAY,KAAK;GAAE,WAAW;GAAW,QAAQ;EAAc,CAAC;EAC/E,eAAe,OAAO,KAAK,YAAY,KAAK;GAAE,WAAW;GAAW,QAAQ;EAAc,CAAC,CAAC;EAC5F,aAAa,YAAY,KAAK;GAAE,WAAW;GAAS,QAAQ;EAAc,CAAC;EAC3E,YAAY,YAAY,KAAK;GAAE,WAAW;GAAQ,QAAQ;EAAc,CAAC;EACzE,YAAY,YAAY,KAAK;GAAE,WAAW;GAAQ,QAAQ;EAAc,CAAC;EACzE,cAAc,YAAY,KAAK;GAAE,WAAW;GAAU,QAAQ;EAAc,CAAC;CAC/E;;CAGA,OAAgB,UAAU,QAAQ,UAEhC,6CAA6C,EAC7C,0BAA0B,aAAa,YACzC,CAAC;AACH"}