@agentproto/runtime 5.13.0 → 5.14.0

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/index.d.ts CHANGED
@@ -532,6 +532,44 @@ type DeliveryPreference = {
532
532
  callbackUrl?: string;
533
533
  secret?: string;
534
534
  };
535
+ /** One polled item the provider could not turn into a {@link SentinelEvent}
536
+ * (poison envelope). Reported — never silently skipped — so the runtime can
537
+ * quarantine it durably BEFORE the cursor moves past it. Deliberately carries
538
+ * no payload `data`: identifiers, the parse error, and a digest only, so the
539
+ * quarantine record can be inspected without exposing secrets. */
540
+ interface SentinelMalformedItem {
541
+ /** Provider sequence number, when the item had one. */
542
+ seq?: number;
543
+ /** The provider's own delivery id (agentpush `delivery_id`). */
544
+ remoteDeliveryId?: string;
545
+ error: string;
546
+ /** Best-effort string identifiers lifted from the envelope. */
547
+ excerpt?: {
548
+ id?: string;
549
+ type?: string;
550
+ subject?: string;
551
+ source?: string;
552
+ };
553
+ /** sha256 hex of the item's JSON, for correlating with the remote copy. */
554
+ digest?: string;
555
+ bytes?: number;
556
+ }
557
+ /** Result of one provider poll. */
558
+ interface SentinelPollResult {
559
+ events: SentinelEvent[];
560
+ cursor: string;
561
+ /** Items that could not be parsed. The runtime quarantines each before it
562
+ * acknowledges `cursor`. */
563
+ malformed?: SentinelMalformedItem[];
564
+ }
565
+ /** `renew` found the backing remote subscription already expired or deleted.
566
+ * The caller must unsubscribe and recreate; a provider never silently
567
+ * provisions a replacement. */
568
+ declare class SentinelBackingExpiredError extends Error {
569
+ readonly code: "backing_subscription_expired";
570
+ readonly remoteId?: string;
571
+ constructor(message: string, remoteId?: string);
572
+ }
535
573
  /** Extra context the runtime/tools hand to `create` beyond the spec. */
536
574
  interface SentinelCreateContext {
537
575
  /** The id the store will record this sentinel under (`sen_<ulid>`), minted
@@ -563,6 +601,19 @@ interface SentinelProviderHandle extends AdapterHandle {
563
601
  * cursor). */
564
602
  attach(handle: SentinelHandle, delivery: DeliveryPreference): Promise<SentinelHandle>;
565
603
  cancel(handle: SentinelHandle): Promise<void>;
604
+ /** True when every handle owns a DISTINCT remote resource (agentpush: one
605
+ * subscription per sentinel), so a failed `cancel` is worth persisting and
606
+ * retrying as a cancel tombstone keyed by `provider + remoteId`. Providers
607
+ * that share one remote across handles (the webhook provider's per-repo
608
+ * hook, refcounted by holder) leave this unset and keep the best-effort
609
+ * cancel. */
610
+ exclusiveRemote?: boolean;
611
+ /** Extend the backing remote watch to `until` (MCP Events refresh). Throws
612
+ * {@link SentinelBackingExpiredError} when the remote is already expired or
613
+ * deleted; any other throw is a transient failure. Absent = the provider
614
+ * holds no remote lifetime to extend (local-only watches). Returns the
615
+ * (possibly updated) handle. */
616
+ renew?(handle: SentinelHandle, until: SentinelUntil): Promise<SentinelHandle>;
566
617
  status(handle: SentinelHandle): Promise<{
567
618
  ok: boolean;
568
619
  detail?: string;
@@ -570,10 +621,7 @@ interface SentinelProviderHandle extends AdapterHandle {
570
621
  }>;
571
622
  /** Poll mode: events after `handle.cursor`, oldest first, plus the new
572
623
  * cursor. */
573
- poll?(handle: SentinelHandle, limit: number): Promise<{
574
- events: SentinelEvent[];
575
- cursor: string;
576
- }>;
624
+ poll?(handle: SentinelHandle, limit: number): Promise<SentinelPollResult>;
577
625
  ack?(handle: SentinelHandle, cursor: string): Promise<void>;
578
626
  /** Push mode: verify + parse one inbound HTTP request into events (called
579
627
  * by the `"sentinel"` dialect on `POST /inbound/sentinel-<hookKey>`). */
@@ -832,6 +880,57 @@ interface SessionFollowStoreOptions {
832
880
  }
833
881
  declare function createSessionFollowStore(opts?: SessionFollowStoreOptions): SessionFollowStore;
834
882
 
883
+ /**
884
+ * Persisted cancel tombstones — the remote-deletion half of unwatching.
885
+ *
886
+ * Removing a local sentinel while the backing remote subscription is
887
+ * unreachable used to orphan the remote (a best-effort `provider.cancel` whose
888
+ * failure was swallowed). Now the intent to delete is recorded durably FIRST,
889
+ * keyed by `provider + remoteId` — the identity of the remote resource, NOT the
890
+ * (deterministic) MCP subscription id, so an immediate re-subscribe, which
891
+ * provisions a new remote with a new id, is never touched by the old tombstone.
892
+ * A sweep retries (with backoff) until the provider reports the remote gone
893
+ * (`cancel` is idempotent: 404/204 both resolve).
894
+ *
895
+ * Only identifiers are persisted; any state field that looks like a secret or
896
+ * route key is stripped from the stored handle.
897
+ */
898
+
899
+ interface CancelTombstone {
900
+ /** `provider|remoteId`. */
901
+ key: string;
902
+ provider: string;
903
+ remoteId: string;
904
+ /** The handle with secrets stripped — enough for `provider.cancel`. */
905
+ handle: SentinelHandle;
906
+ createdAt: number;
907
+ attempts: number;
908
+ nextAttemptAt: number;
909
+ lastAttemptAt?: number;
910
+ lastError?: string;
911
+ }
912
+ interface CancelResult {
913
+ /** The provider confirmed the remote is gone (deleted or already absent). */
914
+ converged: boolean;
915
+ tombstone?: CancelTombstone;
916
+ }
917
+ interface CancelTombstoneStore {
918
+ /** Record the deletion intent durably, run `afterRecorded` (the caller drops
919
+ * its local record there, so delivery eligibility ends BEFORE any network
920
+ * call), attempt the remote delete, and remove the tombstone once the
921
+ * provider confirms. Rejects only when the intent could not be made
922
+ * durable — nothing local has been dropped yet at that point. */
923
+ cancel(handle: SentinelHandle, afterRecorded?: () => void): Promise<CancelResult>;
924
+ /** Retry every tombstone whose backoff elapsed. */
925
+ sweep(): Promise<{
926
+ attempted: number;
927
+ converged: number;
928
+ remaining: number;
929
+ }>;
930
+ list(): CancelTombstone[];
931
+ has(provider: string, remoteId: string): boolean;
932
+ }
933
+
835
934
  /**
836
935
  * LlmEndpointRegistry — supervised-sidecar manager for the
837
936
  * `@agentproto/llm-endpoint` proxy gateway.
@@ -3354,18 +3453,44 @@ interface BranchGcOutcomeView {
3354
3453
  to?: BranchGcClass;
3355
3454
  message?: string;
3356
3455
  }
3357
- type BranchGcResult = {
3358
- mode: "plan";
3359
- plan: BranchGcPlanView;
3360
- summary: BranchGcSummaryView;
3361
- } | {
3456
+ /** Per-scope tally of apply outcomes. `skipped` = everything that was not
3457
+ * deleted and did not fail (held, skipped-review, aborted-*); the exact
3458
+ * per-result counts stay in `byResult`. */
3459
+ interface BranchGcApplyScopeCounts {
3460
+ deleted: number;
3461
+ skipped: number;
3462
+ failed: number;
3463
+ }
3464
+ interface BranchGcApplySummary {
3465
+ /** `ok` = deletes only, no failures/aborts; `partial` = some deleted but
3466
+ * also failed or aborted; `failed` = failures and nothing deleted;
3467
+ * `noop` = nothing deleted, nothing failed. */
3468
+ status: "ok" | "partial" | "failed" | "noop";
3469
+ totals: BranchGcApplyScopeCounts;
3470
+ byScope: Record<BranchGcKind, BranchGcApplyScopeCounts>;
3471
+ byResult: Partial<Record<BranchGcOutcomeView["result"], number>>;
3472
+ restoreLog: string | null;
3473
+ }
3474
+ type BranchGcApplyResult = {
3362
3475
  mode: "apply";
3363
3476
  plan: BranchGcPlanView;
3364
3477
  summary: BranchGcSummaryView;
3365
3478
  outcomes: BranchGcOutcomeView[];
3366
3479
  /** Restore log written before the first delete; `null` when nothing was deleted. */
3367
3480
  restoreLog: string | null;
3481
+ /** Same value as `applySummary.status`, hoisted so a caller can branch on it. */
3482
+ status?: BranchGcApplySummary["status"];
3483
+ applySummary?: BranchGcApplySummary;
3368
3484
  };
3485
+ type BranchGcResult = {
3486
+ mode: "plan";
3487
+ plan: BranchGcPlanView;
3488
+ summary: BranchGcSummaryView;
3489
+ } | BranchGcApplyResult;
3490
+ /** Pure: tally an apply result's outcomes per scope. */
3491
+ declare function summarizeBranchGcApply(result: BranchGcApplyResult): BranchGcApplySummary;
3492
+ /** Attach `status` + `applySummary` to an apply result; a plan passes through. */
3493
+ declare function withBranchGcApplySummary(result: BranchGcResult): BranchGcResult;
3369
3494
  /** Input to the injected runner. `apply` defaults to false at the tool/route
3370
3495
  * boundary — a bare call is a dry run — and an apply requires `scopes`. */
3371
3496
  interface BranchGcRunInput {
@@ -7169,6 +7294,50 @@ interface SentinelView {
7169
7294
  lastError?: string;
7170
7295
  }
7171
7296
 
7297
+ /**
7298
+ * Poison-item quarantine for polled sentinel batches.
7299
+ *
7300
+ * A provider that cannot turn a polled item into a `SentinelEvent` reports it
7301
+ * as malformed. The runtime must not advance (and acknowledge) the cursor past
7302
+ * it without a durable trace, or the item is lost the moment the remote drops
7303
+ * acked rows — yet it also must not stall the subscription forever on an item
7304
+ * that will never parse. So: record it here (fsynced append), THEN ack.
7305
+ *
7306
+ * Records carry identifiers, the parse error and a digest only — never the
7307
+ * envelope `data` or any credential — so the file is safe to inspect and ship
7308
+ * in a bug report. Recording is idempotent per
7309
+ * (sentinel, provider, remote delivery id | seq, digest): a redelivered batch
7310
+ * after a crash between "quarantined" and "acked" does not duplicate lines.
7311
+ */
7312
+
7313
+ interface SentinelQuarantineRecord {
7314
+ /** Idempotency key. */
7315
+ key: string;
7316
+ quarantinedAt: string;
7317
+ sentinelId: string;
7318
+ provider: string;
7319
+ remoteId?: string;
7320
+ seq?: number;
7321
+ remoteDeliveryId?: string;
7322
+ error: string;
7323
+ excerpt?: SentinelMalformedItem["excerpt"];
7324
+ digest?: string;
7325
+ bytes?: number;
7326
+ }
7327
+ interface SentinelQuarantine {
7328
+ /** Durably record one poison item (idempotent). Throws when the write
7329
+ * fails — the caller must then NOT acknowledge the cursor. */
7330
+ record(input: {
7331
+ sentinelId: string;
7332
+ provider: string;
7333
+ remoteId?: string;
7334
+ item: SentinelMalformedItem;
7335
+ }): SentinelQuarantineRecord;
7336
+ list(filter?: {
7337
+ sentinelId?: string;
7338
+ }): SentinelQuarantineRecord[];
7339
+ }
7340
+
7172
7341
  /**
7173
7342
  * session-follow — wake a long-lived session (the FOLLOWER) when sessions it
7174
7343
  * did not necessarily spawn end a turn, await input, exit/crash, or get a PR
@@ -7558,8 +7727,8 @@ declare function findEventDefinition(name: string): EventRegistration | undefine
7558
7727
  * `runtime/index.ts`.
7559
7728
  *
7560
7729
  * INVARIANTS v1 (plan §2, code-verified):
7561
- * - every event is NON-REPLAYABLE → `cursor` is always `null`, `truncated`
7562
- * is never set;
7730
+ * - every event is NON-REPLAYABLE → `cursor` is always `null`; subscribe
7731
+ * results carry `truncated: false`, events never set `truncated`;
7563
7732
  * - no `read` tool, no separate package, no batching.
7564
7733
  *
7565
7734
  * Subscription ids are deterministic (`subscription-id.ts`): subscribe upserts
@@ -7646,6 +7815,10 @@ interface EventsUnsubscribeContext {
7646
7815
  principal: Principal;
7647
7816
  store: SentinelStore;
7648
7817
  resolveProvider: (slug: string) => Promise<SentinelProviderHandle | null>;
7818
+ /** Persisted remote-cancel store. Present ⇒ unsubscribe records a tombstone
7819
+ * keyed by provider + remote id, drops the local row (delivery eligibility
7820
+ * ends immediately) and lets the sweep converge an unreachable remote. */
7821
+ tombstones?: CancelTombstoneStore;
7649
7822
  }
7650
7823
  declare function eventsList(r: EventsListRequest, ctx: EventsListContext): Promise<EventsListResult>;
7651
7824
  declare function eventsSubscribe(input: EventsSubscribeInput, ctx: EventsSubscribeContext): Promise<EventsSubscribeResult>;
@@ -7823,12 +7996,16 @@ type PersistedOutboxRow = SentinelWebhookOutboxRow & {
7823
7996
  event?: SentinelEvent;
7824
7997
  };
7825
7998
  interface SentinelWebhookOutbox {
7826
- /** Append a row for a matched webhook-delivery event. Idempotent per
7827
- * `(sentinelId, eventId)`: an existing row (pending OR terminal) is never
7828
- * duplicated — returns `undefined`, and for a terminal existing row
7829
- * re-fires `onTerminal` so a lost ack (crash between the terminal
7830
- * transition and the store write) still lands. Kicks dispatch off
7831
- * asynchronously. */
7999
+ /** Append a row for a matched webhook-delivery event. Resolves ONLY after
8000
+ * the row is crash-durable (atomic write + fsync + rename + dir fsync) —
8001
+ * callers ack the upstream (Agentpush cursor, push HTTP 2xx) on resolve.
8002
+ * A persistence failure rejects and rolls the row back, so the caller
8003
+ * leaves the upstream un-acked. Idempotent per `(sentinelId, eventId)`: an
8004
+ * existing row (pending OR terminal) is never duplicated — returns
8005
+ * `undefined` (after waiting for any in-flight write that carries it), and
8006
+ * for a terminal existing row re-fires `onTerminal` so a lost ack (crash
8007
+ * between the terminal transition and the store write) still lands. Kicks
8008
+ * dispatch off asynchronously once durable. */
7832
8009
  enqueue(input: {
7833
8010
  sentinelId: string;
7834
8011
  event: SentinelEvent;
@@ -7852,7 +8029,8 @@ interface SentinelWebhookOutboxOptions {
7852
8029
  filePath?: string;
7853
8030
  /** Injectable clock. */
7854
8031
  nowMs?: () => number;
7855
- /** Debounce interval for disk persistence. Default 1500 ms. */
8032
+ /** Debounce interval for the non-critical (status-transition) disk writes.
8033
+ * Enqueue never debounces. Default 1500 ms. */
7856
8034
  debounceMs?: number;
7857
8035
  /** Disable disk persistence (unit tests). Default false unless filePath. */
7858
8036
  persist?: boolean;
@@ -9696,4 +9874,4 @@ interface GatewayHandle {
9696
9874
  */
9697
9875
  declare function createGateway(opts: CreateGatewayOptions): Promise<GatewayHandle>;
9698
9876
 
9699
- export { ActivityListFilter, type ActivityPolicyLister, type ActivityProjector, type ActivityProjectorRegistry, type ActivityProjectorSession, ActivityRecord, type ActivityWorkflowLister, AdapterAuthDescriptor, type AdapterCapabilitiesLister, type AdapterInstallResult, type AdapterListEntry, type AgentAdapterInstaller, type AgentAdapterLister, type AgentAdapterResolver, AgentSessionLike, AgentStreamEvent, type ArgumentsResult, type AttachSandboxOpts, type AttachSandboxResult, BUCKETS_ROOT, type BranchGcClass, type BranchGcCoverageView, type BranchGcHoldReason, type BranchGcKind, type BranchGcOutcomeView, type BranchGcPlanEntryView, type BranchGcPlanView, type BranchGcReclaimReason, type BranchGcResult, type BranchGcRunInput, type BranchGcRunner, type BranchGcStatus, type BranchGcSummaryView, type BranchGcTriageVerdict, type BranchGcVerdictInput, type BranchGcVerdictLookupInput, type BranchGcVerdictReader, type BranchGcVerdictRecordView, type BranchGcVerdictRecorder, type BrowserAdapterHandle, type BrowserAdapterInfo, type BrowserAdapterLister, type BrowserAdapterResolver, BuildHeartbeatAgent, CLAMP_LIMIT_BYTES, CONTINUE_PROMPT_SOURCE, CanonicalPosture, type CapabilitiesInventory, type CapabilitiesInventoryMcp, type CapabilitiesInventorySkills, type CatalogModelsLister, CatalogModelsQuery, CatalogModelsResponse, type CatalogProviderModel, type CatalogProviderModelsQuery, type CatalogProviderModelsResponse, type CatalogProviderPricing, type ChallengeFailureReason, type ChallengeOutcome, type ClaudeNativeRef, CompletionPolicySupervisor, type ComposeCandidate, ContextProfile, type ContinueInterruptedMode, type ContinueInterruptedOutcome, type ContinueInterruptedResult, type ContinueInterruptedSkipReason, type ContinueOnBootSummary, type ConversationIndexRecord, type ConversationNativeRef, type CostBudgetDecision, type CrashDetectSummary, type CrashReaperRegistry, type CreateGatewayOptions, type CreateJoinTokenInput, type CreateReviewRunnerOptions, type CreatedJoinToken, DEAD_SESSION_STATUSES, DEFAULT_ALWAYS_ON_TOOLS, DEFAULT_BUCKET, DEFAULT_CONTINUE_PROMPT, DEFAULT_HOST_LOAD_BUDGET_MS, DEFAULT_HOST_LOAD_THRESHOLDS, DEFAULT_ORCHESTRATOR_TOOLS, DEFAULT_TTL_MS, DEVICE_PROMPT_PATH_PREFIX, type DaemonReviewerHostDeps, DeclaredAdapterOption, type DeclaredAdapterPreset, DefaultsAdapterAuthConfig, type DeliveryOutcome, type DeliveryReplay, type DeliveryState, type Device, type DeviceKind, type DeviceMirrorSyncResult, type DeviceMirrorTarget, type DevicePromptSessionsLike, type DeviceRegistry, type DeviceRole, type DiskLoad, EVENT_REGISTRY, type EagerResumeSummary, type EgressDispatcher, type EnableInput, type EnableResult, type EventDefinition, type EventRegistration, type EventsListContext, type EventsListRequest, type EventsListResult, type EventsSubscribeContext, type EventsSubscribeInput, type EventsSubscribeResult, type EventsUnsubscribeContext, type EventsUnsubscribeInput, FOLLOW_EVENTS, type FetchHostTurnsResult, type FindComposeCandidateInput, type FollowEvent, type ForwardHttpRequest, type ForwardHttpResponse, GC_REAPABLE_STATES, GITHUB_SCHEME, type GatewayHandle, type GhRunner, HOSTS_VERSION, HOST_HANDSHAKE_REMEDIATION_HINT, HOST_SCOPE_HEADER, type HarnessPreset, type HarnessPresetValidationDeps, HarnessPresetValidationError, type HarnessPresetsFile, type HermesNativeRef, type HostEventRecord, type HostJoinMeta, type HostLoadCpu, type HostLoadDetail, type HostLoadMemory, type HostLoadReport, type HostLoadService, type HostLoadSwap, type HostLoadThresholds, type HostProbes, type HostProcess, type HostProcessOwner, type HostRecord, type HostRegistry, type HostRegistryDeps, type HostSessionRollup, type HostWarning, type HostWarningKind, INBOUND_PROVIDERS, INDEX_DEFAULT_LIMIT, INDEX_MAX_OUTPUT, INDEX_MAX_PROMPT, INDEX_TAIL_BYTES, type IdleReapSummary, type IdleReaperRegistry, type InboundEndpoint, type InboundEndpointStore, type InboundEndpointStoreOptions, type InboundEnqueuePrompt, type InboundIsSessionAlive, type InboundMessage, type InboundProvider, type InboundRestartSession, type InboundRouteMode, type InboundRouterDeps, type InboundRouterLog, type InboundSpawnForContact, type InboundWatcher, type InternalEventMeta, JOIN_TOKENS_VERSION, type JoinTokenRecord, type JoinTokenRegistry, type JoinTokenRegistryDeps, LEGACY_SESSIONS_FILE, type LedgerAnnotations, type LedgerEntry, type LedgerHostMeta, type LlmEndpointDescriptor, type LlmEndpointStatus, type LlmEndpointStatusReport, type LocatedConversation, type LocatedConversationByPath, MAX_ATTEMPTS, MAX_AUTO_CONTINUE_ATTEMPTS, MAX_TTL_MS, MCP_APP_BRIDGE_SCRIPT, MIN_TTL_MS, type McpCredentialDeps, type McpEventEnvelope, McpEventsError, type MeasurableTool, type MeasuredToolEntry, MessageKind, MessageUrgency, type MigrationMarker, type ModelRolesInput, type ModelRolesOutput, type NormalizeInboundResult, type OpenPrResolver, type OrchestratorGatewayDeps, type OrchestratorInjection, type OrchestratorInjector, type OrchestratorInjectorDeps, type OrchestratorMcpServerFactory, type OrchestratorScope, type OrphanReaperRegistry, POSTURE_NATIVE_ALIASES, POSTURE_PREAMBLES, type PersistedOutboxRow, PolicyRunState, Posture, type PostureResolution, PrLookupError, type PrLookupErrorCode, PrResolvedState, type PrStateResolver, type PrStatusSnapshot, type PresetInfo, type Principal, type ProjectBrowserToolsOptions, type ProjectedBrowserTool, type ProjectedBrowserTools, type ProjectedProvider, type ProjectedToolResult, type PromptHostSessionInput, type PromptHostSessionResult, ProvisionInFlight, QuotaReadableProfile, type RegisterBrainToolsOptions, type RegisterDeviceToolsOptions, type RegisterPairingToolsOptions, type RegisterReviewToolsOptions, type RegisterWebSearchToolsOptions, RemainingQuotaReader, type RemoteStatus, type ResolveNativeLinkInput, ResolvedAuthSpec, ResolvedModelRole, type ReuseResolution, type ReviewComposeContext, type ReviewLedger, type ReviewLedgerFilter, type ReviewRun, type ReviewRunInput, type ReviewRunStatus, type ReviewRunner, type ReviewSignature, type ReviewSigningKey, type ReviewerRunResult, type ReviewerSessionHost, type RouteAwareLaunchConfig, type RouteAwareLaunchConfigInput, RouteSpec, type RuntimeMeta, SIGN_NAMESPACE, type SandboxAdapterInfo, type SandboxConnectionDescriptor, type SandboxGcCandidate, type SandboxGcProviderHandle, type SandboxGcReapDeps, type SandboxGcReapResult, type SandboxLedgerEntry, type SandboxLedgerState, type SandboxProviderCapabilities, type SandboxProviderHandle, type SandboxProviderLister, type SandboxProviderResolver, type SandboxReconcileDeps, type SandboxReconcileProviderHandle, type SandboxReconcileResult, type SandboxReconcileRow, type SandboxReconcileVerdict, type SchemeRegistry, type ScopeTokenRegistry, type SentinelMatchClause, type SentinelSpec, type SentinelStatus, type SentinelTarget, type SentinelUntil, type SentinelView, type SentinelWebhookOutbox, type SentinelWebhookOutboxOptions, type SentinelWebhookOutboxRow, type SentinelWebhookOutboxStatus, SessionDescriptor, SessionEndReason, type SessionFollow, type SessionFollowHandle, type SessionFollowStore, type SessionIndexEntry, SessionMessage, type SessionMessageSentRecord, type SessionObserver, type SessionRecap, SessionUsage, type SessionUsageWithSubtree, type SessionWaitEvent, type SessionWaitResult, SessionsRegistry, type SkillPackInventoryEntry, type SkillsByHarnessEntry, SpawnDefaultsConfig, SsrfFetchError, type SsrfFetchInit, type SsrfFetchReason, type SsrfFetchResult, type StallWatchdogRegistry, type StallWatchdogSummary, type SubscriptionIdentity, type SubtreeChildUsage, type SubtreeUsageTotals, TaskLedger, type ToolListMeasurement, type TranscriptPrompt, type TranscriptTail, type TransmitterBinding, type TransmitterBindingStore, type TunnelDescriptor, type TunnelProvider, type TunnelStatus, UsageReadContext, UsageReadResult, UsageRollup, UsageSnapshotRecord, UserPreset, type VerifyCallbackInput, type VerifySignedAttestationResult, type WatcherDescriptor, type WatcherStartInput, type WebSearchInput, type WebSearchOutput, type WebSearchResult, type WebhookSignInput, type WebhookSignatureHeaders, type WorkspaceBrainSubscriber, type WorkspaceBrainSubscriberOptions, type WorkspaceBrains, WorkspaceFs, WorktreeAutoReclaimer, WorktreeField, type WorktreeGcClass, type WorktreeGcOutcomeView, type WorktreeGcPlanEntryView, type WorktreeGcReclaimReason, type WorktreeGcResult, type WorktreeGcRunInput, type WorktreeGcRunner, WorktreeIsolationMode, WorktreeProvisioner, type WorktreeStatusLister, type WorktreeStatusView, addHarnessPreset, allowedSignersLine, appendConversationRecord, attachSandbox, backfillSessionIndexes, bucketDir, bucketSessionsFile, bucketTranscriptDir, buildCatalogProviderModels, buildHostLoadReport, buildMcpConfigSnippet, buildRouteAwareLaunchConfig, buildSessionRecap, canonicalForModeId, canonicalizeJcs, challengeCacheSize, challengeReasonForSsrf, claudeProjectSlug, collectGcCandidates, collectHostSample, composeSessionObservers, composedFromRangeSha, computeHostWarnings, computeRefreshBefore, continueInterruptedSessions, continueSkipReason, conversationIndexPath, createActivityProjector, createDaemonReviewerHost, createDefaultHostProbes, createDeviceRegistry, createFileStepCache, createGateway, createHostLoadService, createHostRegistry, createInboundEndpointStore, createJoinTokenRegistry, createOrchestratorInjector, createOrchestratorMcpServerFactory, createPrProvenanceReconciler, createReviewLaneExecutor, createReviewLedger, createReviewPackLoader, createReviewRunner, createScopeTokenRegistry, createSentinelWebhookOutbox, createSessionFollowStore, createWorkspaceBrainSubscriber, createWorkspaceBrains, daemonBearerPrincipal, daemonRegistryDir, declaredPresetToProviderPreset, decodeWhsecSecret, defaultBrowserAdapterIds, defaultBrowserAdapterResolution, defaultReviewKeysDir, defaultReviewLedgerRoot, defaultReviewPackCacheDir, defaultTranscriptBaseDir, defineBraveSearchHttpDriver, defineSerperHttpDriver, deliverEventEnvelope, deliveryBackoffDelay, deriveIndexFromTranscript, describeOwner, encodeWhsecSecret, enrichRollupWithProviderQuota, enrichWithRemainingQuota, ensureReviewSigningKey, envelopeClampedBytes, evaluateCostBudget, eventsList, eventsSubscribe, eventsUnsubscribe, execGh, extractHelpSection, fetchHostTurns, fetchPrStatus, fileExists, findComposeCandidate, findConversationRecord, findEventDefinition, findNativeMode, findPrForCommit, formatToolCall, formatToolResult, getDefaultHarnessPreset, getHarnessPreset, getHostLoadService, getMcpCredentialDeps, getToolHelp, githubRepoOf, harnessPresetsPath, hostPlaceholders, hostRecordToMirrorRecord, indexEntryFromDescriptor, injectMcpAppBridge, isAgentCliAuthConfigured, isAutomatedPromptSource, isNoSessionPromptFailure, isPubliclyRoutable, isRetired, isSafeBucketSlug, listBuckets, listHarnessPresets, listPresets, listToolHelpTopics, loadHarnessPresets, loadWorkspaceModelRoles, locateConversationByNativePath, locateConversationBySessionId, makeBrowserAdapterLister, makeRestartForRouting, makeSandboxCredsStore, makeSandboxResolver, matchesSessionQuery, measureTool, measureToolList, migrateLegacySessionsFile, migrationMarkerPath, mirrorCursorForSession, monitorPolicyWait, monitorSessionWait, narrowOrchestratorTools, normalizeCallbackUrl, normalizeInbound, normalizeModeId, normalizeRemote, parsePrUrl, prHeadSha, projectBrowserTools, promptDeviceSession, promptHostSession, readAllSessionIndexes, readConversationIndex, readDaemonRegistry, readHostsSnapshot, readRegisteredSlugs, readRuntimeMeta, readSandboxLedger, readSessionForBrain, readSessionIndex, readTranscriptTail, readUsageSnapshots, reapGcEntry, reapOrphanedDescendants, reconcileSandboxLedger, recordSandboxBoot, recordSandboxLiveness, recordSandboxOrigin, recordSandboxState, registerBrainTools, registerBuiltinRoutes, registerDeviceTools, registerPairingTools, registerReviewTools, registerSandboxAttachTool, registerWebSearchTools, removeHarnessPreset, removeSandboxLedgerEntry, repoSlug, resetChallengeCacheForTests, resolveBucketSlug, resolveDevicePromptMapping, resolveEffectiveLlmEndpointFlag, resolveNativeLink, resolvePosture, resolvePrincipal, resolveReuseFromLedger, resolveReviewerPreset, resolveSuccessor, rollupSessionSubtree, runContinueOnBootPass, runCrashDetectPass, runEagerResumePass, runIdleReapPass, runShellLane, runStallWatchdogPass, sandboxLedgerPath, searchSessionIndexes, seedWalkForTranscript, serializeEnvelope, sessionEventsPath, sessionIndexPath, sessionPrincipal, sessionTranscriptDir, setDefaultPreset, setDefaultSessionsBaseDir, setEgressDispatcherForTests, setMcpCredentialDeps, signAttestation, signWebhook, ssrfFetch, subscriptionId, sweepStaleDaemonRegistry, sweepStaleRuntimeMetas, syncDeviceMirror, tenantScope, toMcpEvent, toWebhookEnvelope, toWorktreeStatusView, unlinkDaemonRegistryEntry, unlinkRuntimeMeta, untilForTtl, updateHarnessPreset, upsertSandboxLedger, validateAgainstInputSchema, verifyCallback, verifyInboundSignature, verifySignedAttestation, webSearchTool, webhookRequestId, wireSessionFollow, withPr, withPrStatus, writeDaemonRegistryEntry, writeSessionIndex };
9877
+ export { ActivityListFilter, type ActivityPolicyLister, type ActivityProjector, type ActivityProjectorRegistry, type ActivityProjectorSession, ActivityRecord, type ActivityWorkflowLister, AdapterAuthDescriptor, type AdapterCapabilitiesLister, type AdapterInstallResult, type AdapterListEntry, type AgentAdapterInstaller, type AgentAdapterLister, type AgentAdapterResolver, AgentSessionLike, AgentStreamEvent, type ArgumentsResult, type AttachSandboxOpts, type AttachSandboxResult, BUCKETS_ROOT, type BranchGcApplyScopeCounts, type BranchGcApplySummary, type BranchGcClass, type BranchGcCoverageView, type BranchGcHoldReason, type BranchGcKind, type BranchGcOutcomeView, type BranchGcPlanEntryView, type BranchGcPlanView, type BranchGcReclaimReason, type BranchGcResult, type BranchGcRunInput, type BranchGcRunner, type BranchGcStatus, type BranchGcSummaryView, type BranchGcTriageVerdict, type BranchGcVerdictInput, type BranchGcVerdictLookupInput, type BranchGcVerdictReader, type BranchGcVerdictRecordView, type BranchGcVerdictRecorder, type BrowserAdapterHandle, type BrowserAdapterInfo, type BrowserAdapterLister, type BrowserAdapterResolver, BuildHeartbeatAgent, CLAMP_LIMIT_BYTES, CONTINUE_PROMPT_SOURCE, type CancelTombstone, type CancelTombstoneStore, CanonicalPosture, type CapabilitiesInventory, type CapabilitiesInventoryMcp, type CapabilitiesInventorySkills, type CatalogModelsLister, CatalogModelsQuery, CatalogModelsResponse, type CatalogProviderModel, type CatalogProviderModelsQuery, type CatalogProviderModelsResponse, type CatalogProviderPricing, type ChallengeFailureReason, type ChallengeOutcome, type ClaudeNativeRef, CompletionPolicySupervisor, type ComposeCandidate, ContextProfile, type ContinueInterruptedMode, type ContinueInterruptedOutcome, type ContinueInterruptedResult, type ContinueInterruptedSkipReason, type ContinueOnBootSummary, type ConversationIndexRecord, type ConversationNativeRef, type CostBudgetDecision, type CrashDetectSummary, type CrashReaperRegistry, type CreateGatewayOptions, type CreateJoinTokenInput, type CreateReviewRunnerOptions, type CreatedJoinToken, DEAD_SESSION_STATUSES, DEFAULT_ALWAYS_ON_TOOLS, DEFAULT_BUCKET, DEFAULT_CONTINUE_PROMPT, DEFAULT_HOST_LOAD_BUDGET_MS, DEFAULT_HOST_LOAD_THRESHOLDS, DEFAULT_ORCHESTRATOR_TOOLS, DEFAULT_TTL_MS, DEVICE_PROMPT_PATH_PREFIX, type DaemonReviewerHostDeps, DeclaredAdapterOption, type DeclaredAdapterPreset, DefaultsAdapterAuthConfig, type DeliveryOutcome, type DeliveryReplay, type DeliveryState, type Device, type DeviceKind, type DeviceMirrorSyncResult, type DeviceMirrorTarget, type DevicePromptSessionsLike, type DeviceRegistry, type DeviceRole, type DiskLoad, EVENT_REGISTRY, type EagerResumeSummary, type EgressDispatcher, type EnableInput, type EnableResult, type EventDefinition, type EventRegistration, type EventsListContext, type EventsListRequest, type EventsListResult, type EventsSubscribeContext, type EventsSubscribeInput, type EventsSubscribeResult, type EventsUnsubscribeContext, type EventsUnsubscribeInput, FOLLOW_EVENTS, type FetchHostTurnsResult, type FindComposeCandidateInput, type FollowEvent, type ForwardHttpRequest, type ForwardHttpResponse, GC_REAPABLE_STATES, GITHUB_SCHEME, type GatewayHandle, type GhRunner, HOSTS_VERSION, HOST_HANDSHAKE_REMEDIATION_HINT, HOST_SCOPE_HEADER, type HarnessPreset, type HarnessPresetValidationDeps, HarnessPresetValidationError, type HarnessPresetsFile, type HermesNativeRef, type HostEventRecord, type HostJoinMeta, type HostLoadCpu, type HostLoadDetail, type HostLoadMemory, type HostLoadReport, type HostLoadService, type HostLoadSwap, type HostLoadThresholds, type HostProbes, type HostProcess, type HostProcessOwner, type HostRecord, type HostRegistry, type HostRegistryDeps, type HostSessionRollup, type HostWarning, type HostWarningKind, INBOUND_PROVIDERS, INDEX_DEFAULT_LIMIT, INDEX_MAX_OUTPUT, INDEX_MAX_PROMPT, INDEX_TAIL_BYTES, type IdleReapSummary, type IdleReaperRegistry, type InboundEndpoint, type InboundEndpointStore, type InboundEndpointStoreOptions, type InboundEnqueuePrompt, type InboundIsSessionAlive, type InboundMessage, type InboundProvider, type InboundRestartSession, type InboundRouteMode, type InboundRouterDeps, type InboundRouterLog, type InboundSpawnForContact, type InboundWatcher, type InternalEventMeta, JOIN_TOKENS_VERSION, type JoinTokenRecord, type JoinTokenRegistry, type JoinTokenRegistryDeps, LEGACY_SESSIONS_FILE, type LedgerAnnotations, type LedgerEntry, type LedgerHostMeta, type LlmEndpointDescriptor, type LlmEndpointStatus, type LlmEndpointStatusReport, type LocatedConversation, type LocatedConversationByPath, MAX_ATTEMPTS, MAX_AUTO_CONTINUE_ATTEMPTS, MAX_TTL_MS, MCP_APP_BRIDGE_SCRIPT, MIN_TTL_MS, type McpCredentialDeps, type McpEventEnvelope, McpEventsError, type MeasurableTool, type MeasuredToolEntry, MessageKind, MessageUrgency, type MigrationMarker, type ModelRolesInput, type ModelRolesOutput, type NormalizeInboundResult, type OpenPrResolver, type OrchestratorGatewayDeps, type OrchestratorInjection, type OrchestratorInjector, type OrchestratorInjectorDeps, type OrchestratorMcpServerFactory, type OrchestratorScope, type OrphanReaperRegistry, POSTURE_NATIVE_ALIASES, POSTURE_PREAMBLES, type PersistedOutboxRow, PolicyRunState, Posture, type PostureResolution, PrLookupError, type PrLookupErrorCode, PrResolvedState, type PrStateResolver, type PrStatusSnapshot, type PresetInfo, type Principal, type ProjectBrowserToolsOptions, type ProjectedBrowserTool, type ProjectedBrowserTools, type ProjectedProvider, type ProjectedToolResult, type PromptHostSessionInput, type PromptHostSessionResult, ProvisionInFlight, QuotaReadableProfile, type RegisterBrainToolsOptions, type RegisterDeviceToolsOptions, type RegisterPairingToolsOptions, type RegisterReviewToolsOptions, type RegisterWebSearchToolsOptions, RemainingQuotaReader, type RemoteStatus, type ResolveNativeLinkInput, ResolvedAuthSpec, ResolvedModelRole, type ReuseResolution, type ReviewComposeContext, type ReviewLedger, type ReviewLedgerFilter, type ReviewRun, type ReviewRunInput, type ReviewRunStatus, type ReviewRunner, type ReviewSignature, type ReviewSigningKey, type ReviewerRunResult, type ReviewerSessionHost, type RouteAwareLaunchConfig, type RouteAwareLaunchConfigInput, RouteSpec, type RuntimeMeta, SIGN_NAMESPACE, type SandboxAdapterInfo, type SandboxConnectionDescriptor, type SandboxGcCandidate, type SandboxGcProviderHandle, type SandboxGcReapDeps, type SandboxGcReapResult, type SandboxLedgerEntry, type SandboxLedgerState, type SandboxProviderCapabilities, type SandboxProviderHandle, type SandboxProviderLister, type SandboxProviderResolver, type SandboxReconcileDeps, type SandboxReconcileProviderHandle, type SandboxReconcileResult, type SandboxReconcileRow, type SandboxReconcileVerdict, type SchemeRegistry, type ScopeTokenRegistry, SentinelBackingExpiredError, type SentinelMalformedItem, type SentinelMatchClause, type SentinelPollResult, type SentinelQuarantine, type SentinelQuarantineRecord, type SentinelSpec, type SentinelStatus, type SentinelTarget, type SentinelUntil, type SentinelView, type SentinelWebhookOutbox, type SentinelWebhookOutboxOptions, type SentinelWebhookOutboxRow, type SentinelWebhookOutboxStatus, SessionDescriptor, SessionEndReason, type SessionFollow, type SessionFollowHandle, type SessionFollowStore, type SessionIndexEntry, SessionMessage, type SessionMessageSentRecord, type SessionObserver, type SessionRecap, SessionUsage, type SessionUsageWithSubtree, type SessionWaitEvent, type SessionWaitResult, SessionsRegistry, type SkillPackInventoryEntry, type SkillsByHarnessEntry, SpawnDefaultsConfig, SsrfFetchError, type SsrfFetchInit, type SsrfFetchReason, type SsrfFetchResult, type StallWatchdogRegistry, type StallWatchdogSummary, type SubscriptionIdentity, type SubtreeChildUsage, type SubtreeUsageTotals, TaskLedger, type ToolListMeasurement, type TranscriptPrompt, type TranscriptTail, type TransmitterBinding, type TransmitterBindingStore, type TunnelDescriptor, type TunnelProvider, type TunnelStatus, UsageReadContext, UsageReadResult, UsageRollup, UsageSnapshotRecord, UserPreset, type VerifyCallbackInput, type VerifySignedAttestationResult, type WatcherDescriptor, type WatcherStartInput, type WebSearchInput, type WebSearchOutput, type WebSearchResult, type WebhookSignInput, type WebhookSignatureHeaders, type WorkspaceBrainSubscriber, type WorkspaceBrainSubscriberOptions, type WorkspaceBrains, WorkspaceFs, WorktreeAutoReclaimer, WorktreeField, type WorktreeGcClass, type WorktreeGcOutcomeView, type WorktreeGcPlanEntryView, type WorktreeGcReclaimReason, type WorktreeGcResult, type WorktreeGcRunInput, type WorktreeGcRunner, WorktreeIsolationMode, WorktreeProvisioner, type WorktreeStatusLister, type WorktreeStatusView, addHarnessPreset, allowedSignersLine, appendConversationRecord, attachSandbox, backfillSessionIndexes, bucketDir, bucketSessionsFile, bucketTranscriptDir, buildCatalogProviderModels, buildHostLoadReport, buildMcpConfigSnippet, buildRouteAwareLaunchConfig, buildSessionRecap, canonicalForModeId, canonicalizeJcs, challengeCacheSize, challengeReasonForSsrf, claudeProjectSlug, collectGcCandidates, collectHostSample, composeSessionObservers, composedFromRangeSha, computeHostWarnings, computeRefreshBefore, continueInterruptedSessions, continueSkipReason, conversationIndexPath, createActivityProjector, createDaemonReviewerHost, createDefaultHostProbes, createDeviceRegistry, createFileStepCache, createGateway, createHostLoadService, createHostRegistry, createInboundEndpointStore, createJoinTokenRegistry, createOrchestratorInjector, createOrchestratorMcpServerFactory, createPrProvenanceReconciler, createReviewLaneExecutor, createReviewLedger, createReviewPackLoader, createReviewRunner, createScopeTokenRegistry, createSentinelWebhookOutbox, createSessionFollowStore, createWorkspaceBrainSubscriber, createWorkspaceBrains, daemonBearerPrincipal, daemonRegistryDir, declaredPresetToProviderPreset, decodeWhsecSecret, defaultBrowserAdapterIds, defaultBrowserAdapterResolution, defaultReviewKeysDir, defaultReviewLedgerRoot, defaultReviewPackCacheDir, defaultTranscriptBaseDir, defineBraveSearchHttpDriver, defineSerperHttpDriver, deliverEventEnvelope, deliveryBackoffDelay, deriveIndexFromTranscript, describeOwner, encodeWhsecSecret, enrichRollupWithProviderQuota, enrichWithRemainingQuota, ensureReviewSigningKey, envelopeClampedBytes, evaluateCostBudget, eventsList, eventsSubscribe, eventsUnsubscribe, execGh, extractHelpSection, fetchHostTurns, fetchPrStatus, fileExists, findComposeCandidate, findConversationRecord, findEventDefinition, findNativeMode, findPrForCommit, formatToolCall, formatToolResult, getDefaultHarnessPreset, getHarnessPreset, getHostLoadService, getMcpCredentialDeps, getToolHelp, githubRepoOf, harnessPresetsPath, hostPlaceholders, hostRecordToMirrorRecord, indexEntryFromDescriptor, injectMcpAppBridge, isAgentCliAuthConfigured, isAutomatedPromptSource, isNoSessionPromptFailure, isPubliclyRoutable, isRetired, isSafeBucketSlug, listBuckets, listHarnessPresets, listPresets, listToolHelpTopics, loadHarnessPresets, loadWorkspaceModelRoles, locateConversationByNativePath, locateConversationBySessionId, makeBrowserAdapterLister, makeRestartForRouting, makeSandboxCredsStore, makeSandboxResolver, matchesSessionQuery, measureTool, measureToolList, migrateLegacySessionsFile, migrationMarkerPath, mirrorCursorForSession, monitorPolicyWait, monitorSessionWait, narrowOrchestratorTools, normalizeCallbackUrl, normalizeInbound, normalizeModeId, normalizeRemote, parsePrUrl, prHeadSha, projectBrowserTools, promptDeviceSession, promptHostSession, readAllSessionIndexes, readConversationIndex, readDaemonRegistry, readHostsSnapshot, readRegisteredSlugs, readRuntimeMeta, readSandboxLedger, readSessionForBrain, readSessionIndex, readTranscriptTail, readUsageSnapshots, reapGcEntry, reapOrphanedDescendants, reconcileSandboxLedger, recordSandboxBoot, recordSandboxLiveness, recordSandboxOrigin, recordSandboxState, registerBrainTools, registerBuiltinRoutes, registerDeviceTools, registerPairingTools, registerReviewTools, registerSandboxAttachTool, registerWebSearchTools, removeHarnessPreset, removeSandboxLedgerEntry, repoSlug, resetChallengeCacheForTests, resolveBucketSlug, resolveDevicePromptMapping, resolveEffectiveLlmEndpointFlag, resolveNativeLink, resolvePosture, resolvePrincipal, resolveReuseFromLedger, resolveReviewerPreset, resolveSuccessor, rollupSessionSubtree, runContinueOnBootPass, runCrashDetectPass, runEagerResumePass, runIdleReapPass, runShellLane, runStallWatchdogPass, sandboxLedgerPath, searchSessionIndexes, seedWalkForTranscript, serializeEnvelope, sessionEventsPath, sessionIndexPath, sessionPrincipal, sessionTranscriptDir, setDefaultPreset, setDefaultSessionsBaseDir, setEgressDispatcherForTests, setMcpCredentialDeps, signAttestation, signWebhook, ssrfFetch, subscriptionId, summarizeBranchGcApply, sweepStaleDaemonRegistry, sweepStaleRuntimeMetas, syncDeviceMirror, tenantScope, toMcpEvent, toWebhookEnvelope, toWorktreeStatusView, unlinkDaemonRegistryEntry, unlinkRuntimeMeta, untilForTtl, updateHarnessPreset, upsertSandboxLedger, validateAgainstInputSchema, verifyCallback, verifyInboundSignature, verifySignedAttestation, webSearchTool, webhookRequestId, wireSessionFollow, withBranchGcApplySummary, withPr, withPrStatus, writeDaemonRegistryEntry, writeSessionIndex };