@agentproto/runtime 3.1.0 → 3.3.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
@@ -2993,6 +2993,14 @@ interface InboundMessage {
2993
2993
  contactRef: string;
2994
2994
  /** Rendered user-turn text. */
2995
2995
  text: string;
2996
+ /** Human-readable name of the sender, when the ingress knows one.
2997
+ * Present => the routed turn is prefixed so the agent can tell senders
2998
+ * apart. Absent => the text is enqueued exactly as before. */
2999
+ displayName?: string;
3000
+ /** The surface the message came in on (`telegram`, `whatsapp`, `email`).
3001
+ * Distinct from `source`, which is a routing key, not something to show
3002
+ * an agent. */
3003
+ surface?: string;
2996
3004
  /** Raw agentpush events, forwarded to the spawn fallback template. */
2997
3005
  messages?: unknown[];
2998
3006
  }
@@ -3001,6 +3009,7 @@ interface InboundMessage {
3001
3009
  * method in directly. */
3002
3010
  type InboundEnqueuePrompt = (sessionId: string, text: string, opts?: {
3003
3011
  interrupt?: boolean;
3012
+ queue?: boolean;
3004
3013
  }) => Promise<void> | void;
3005
3014
  /** Whether `sessionId` is currently live enough to route into without a
3006
3015
  * restart first. */
@@ -3608,6 +3617,10 @@ interface SessionAppServeInfo {
3608
3617
  * window. False means the URL is the right address but the server had
3609
3618
  * not answered yet — retry the fetch rather than re-spawning. */
3610
3619
  ready: boolean;
3620
+ /** Error text from the in-box serve log when `ready` is false (e.g. the
3621
+ * server exited immediately because the UI root is missing). Absent when
3622
+ * the log holds no recognizable error or could not be read. */
3623
+ message?: string;
3611
3624
  }
3612
3625
 
3613
3626
  /**
@@ -3655,15 +3668,28 @@ type WorktreeField = boolean | {
3655
3668
  interface WorktreeRequest {
3656
3669
  slug?: string;
3657
3670
  base?: string;
3658
- /** Opt-in: return a real, registered session as soon as it's minted,
3659
- * provisioning the worktree in the BACKGROUND instead of blocking
3660
- * `agent_start`'s response on `git worktree add` + the repo's setup
3661
- * hooks (which can run minutes — see `session-spawn.ts`'s async-provision
3662
- * branch). Deliberately opt-in, not the default: existing callers that
3663
- * built on a synchronous ok/fail result (this package's own
3664
- * `worktree_provision_failed` test coverage among them) keep exactly
3665
- * today's behaviour unless they ask for the early return. Default
3666
- * false. */
3671
+ /** Return a real, registered session as soon as it's minted, provisioning
3672
+ * the worktree in the BACKGROUND instead of blocking `agent_start`'s
3673
+ * response on `git worktree add` + the repo's setup hooks (which can run
3674
+ * minutes — see `session-spawn.ts`'s async-provision branch).
3675
+ *
3676
+ * DEFAULTS TO TRUE for any spawn that provisions a worktree, UNLESS this
3677
+ * spawn also carries `wait` (which needs a first turn to block on — see
3678
+ * `worktree_async_wait_conflict` so the presence of `wait` alone falls
3679
+ * back to the synchronous path rather than conflicting by default). That
3680
+ * default is applied by `session-spawn.ts` itself (WP-H), not by this
3681
+ * field or `normalizeWorktreeField` — the normalizer leaves `async`
3682
+ * exactly as the caller sent it (`undefined` when omitted; see its own
3683
+ * test), so a caller inspecting the normalized request never sees a
3684
+ * value it didn't write. WP-H incident: the synchronous contract this
3685
+ * field opts OUT of — hold the RPC open for however long setup hooks
3686
+ * take, routinely minutes — is exactly what let a client's own request
3687
+ * timeout retry into a second live agent sharing the first one's
3688
+ * worktree (closed on the other side too — see `session-spawn.ts`'s
3689
+ * `findWorktreeLabelCwdCollision`, which now refuses that retry outright
3690
+ * rather than merely warning). Pass `false` explicitly to keep the old
3691
+ * blocking ok/fail contract (this package's own `worktree_provision_failed`
3692
+ * test coverage exercises it deliberately synchronous). */
3667
3693
  async?: boolean;
3668
3694
  }
3669
3695
  /** What the runtime hands the provisioner. `cwd` is where the session would
@@ -3873,8 +3899,12 @@ type WorktreeGcClass = "reclaim" | "salvage" | "hold";
3873
3899
  * `orphan` is set on an entry/outcome the orphan scan found — a directory
3874
3900
  * physically present under the repo's worktree pool with no `git worktree
3875
3901
  * list` entry at all (see `WorktreeGcPlanEntryView.orphan`).
3902
+ * `prunable` is set on an entry/outcome `git worktree list --porcelain`
3903
+ * itself already reported dead — the mirror image of `orphan`: the
3904
+ * registration is still there, but the working directory is gone (see
3905
+ * `WorktreeGcPlanEntryView.prunable`).
3876
3906
  */
3877
- type WorktreeGcReclaimReason = "dep-bump" | "orphan";
3907
+ type WorktreeGcReclaimReason = "dep-bump" | "orphan" | "prunable";
3878
3908
  /**
3879
3909
  * One entry of the dry-run plan — a runtime-local projection of a
3880
3910
  * `GcPlanEntry`. `tree` / `integration` / `liveness` are flattened to their
@@ -3886,7 +3916,7 @@ interface WorktreeGcPlanEntryView {
3886
3916
  branch: string | null;
3887
3917
  head: string;
3888
3918
  class: WorktreeGcClass;
3889
- /** Set only when `class === "reclaim"` via the dep-bump exemption or the orphan scan. */
3919
+ /** Set only when `class === "reclaim"` via the dep-bump exemption, the orphan scan, or the prunable signal. */
3890
3920
  reclaimReason?: WorktreeGcReclaimReason;
3891
3921
  /**
3892
3922
  * `true` only for an orphan-scan entry: a directory physically present
@@ -3897,6 +3927,13 @@ interface WorktreeGcPlanEntryView {
3897
3927
  * literal `"orphan"` placeholder below rather than a fabricated value.
3898
3928
  */
3899
3929
  orphan?: boolean;
3930
+ /**
3931
+ * `true` only for a linked worktree `git worktree list --porcelain` itself
3932
+ * already marked `prunable`. Same reasoning as `orphan` above — no
3933
+ * tree/integration/liveness axis was ever read for a working directory
3934
+ * that's gone — projected as the literal `"prunable"` placeholder below.
3935
+ */
3936
+ prunable?: boolean;
3900
3937
  tree: string;
3901
3938
  integration: {
3902
3939
  state: string;
@@ -4712,6 +4749,16 @@ interface SessionDescriptor {
4712
4749
  command: string;
4713
4750
  pid: number | null;
4714
4751
  status: SessionStatus;
4752
+ /** Unambiguous liveness signal, stamped at read time (list()/get()/
4753
+ * findByIdOrName) — true iff `status` is "running" or "starting", the
4754
+ * same test the daemon uses internally (validateAgentTurn). Ephemeral:
4755
+ * never persisted, always recomputed from the row's status. Exists
4756
+ * because `status` alone is NOT liveness: a terminal row ("killed",
4757
+ * "exited", "error") is a record that exists, and HTTP 200 on
4758
+ * GET /sessions/:id only means the record exists — consumers that
4759
+ * treat res.ok as liveness must read `alive` (or GET /sessions/:id/alive)
4760
+ * instead. */
4761
+ alive?: boolean;
4715
4762
  startedAt: string;
4716
4763
  endedAt?: string;
4717
4764
  exitCode?: number;
@@ -5533,6 +5580,11 @@ interface SessionDescriptor {
5533
5580
  remote?: boolean;
5534
5581
  /** Provider-assigned sandbox id (`BootedSandbox.sandboxId`), when `remote` is true. */
5535
5582
  sandboxId?: string;
5583
+ /** Sandbox provider slug (`agent_start.sandbox`'s provider, e.g. `"e2b"`,
5584
+ * `"local"`), when `remote` is true. Identifies WHERE the box lives, not
5585
+ * just THAT one exists — the VS Code panel's sandbox chip names it in its
5586
+ * tooltip alongside `sandboxId`. */
5587
+ sandboxProvider?: string;
5536
5588
  /** What session close does to the box (PR3 lifecycle) — `"kill"` (the
5537
5589
  * default, ephemeral) or `"pause"` (keeps `sandboxId` reconnectable via
5538
5590
  * `agent_start.sandbox.reuse`). Only set when `remote` is true. */
@@ -5546,6 +5598,16 @@ interface SessionDescriptor {
5546
5598
  * serve port, and the provider-resolved public URL. See
5547
5599
  * `sandbox-app-serve.ts`. */
5548
5600
  appServe?: SessionAppServeInfo;
5601
+ /** Last PROVIDER liveness verdict for this session's box (`sandboxId`'s
5602
+ * ledger row, stamped by `recordSandboxLiveness` — the route / the CLI /
5603
+ * a reconnect-not-found). Ephemeral read-time projection of the sandbox
5604
+ * ledger, same convention as `processAlive`: a remote session has no
5605
+ * local PID, so this is the only box-death signal the descriptor can
5606
+ * carry. Absent when the box was never probed (or the provider can't) —
5607
+ * and absent is NOT "alive". */
5608
+ sandboxAlive?: boolean;
5609
+ /** ISO instant `sandboxAlive` was computed (see its doc). */
5610
+ sandboxCheckedAt?: string;
5549
5611
  }
5550
5612
  /**
5551
5613
  * Lightweight panel projection of SessionDescriptor for the VS Code Sessions
@@ -5652,6 +5714,10 @@ interface SessionSummary {
5652
5714
  sandboxTeardown?: "kill" | "pause";
5653
5715
  sandboxPorts?: Record<number, string>;
5654
5716
  appServe?: SessionAppServeInfo;
5717
+ /** Read-time projection of the box's ledger liveness verdict — see
5718
+ * `SessionDescriptor.sandboxAlive`. */
5719
+ sandboxAlive?: boolean;
5720
+ sandboxCheckedAt?: string;
5655
5721
  }
5656
5722
  /** Bracketed-paste mode as last observed in a PTY's OUTPUT stream.
5657
5723
  * `"unknown"` means neither `\x1b[?2004h` nor `\x1b[?2004l` has been seen
@@ -6649,6 +6715,9 @@ interface SpawnAgentInput {
6649
6715
  remote?: boolean;
6650
6716
  /** Provider-assigned sandbox id, when `remote` is true. */
6651
6717
  sandboxId?: string;
6718
+ /** Sandbox provider slug, when `remote` is true — see
6719
+ * `SessionDescriptor.sandboxProvider`. */
6720
+ sandboxProvider?: string;
6652
6721
  /** What session close does to the box, when `remote` is true — see
6653
6722
  * `SessionDescriptor.sandboxTeardown`. */
6654
6723
  sandboxTeardown?: "kill" | "pause";
@@ -7716,8 +7785,12 @@ declare function registerSandboxAttachTool(server: McpServer, opts?: RegisterSan
7716
7785
  * tmp path (the pid-only suffix is not unique within one process — see the
7717
7786
  * 2026-08-14 registry-wipe write-up in `workspace-buckets.ts`).
7718
7787
  */
7719
- /** Lifecycle states a ledger row can carry. */
7720
- type SandboxLedgerState = "booted" | "paused" | "connected" | "stopped";
7788
+ /** Lifecycle states a ledger row can carry. `"gone"` is stamped when the
7789
+ * PROVIDER answers the box no longer exists (liveness probe 404 / a
7790
+ * reconnect failing with the provider's not-found error) — distinct from
7791
+ * `"stopped"` (WE tore it down) and from `"paused"` (the last thing WE
7792
+ * did, which a vanished box makes a lie). */
7793
+ type SandboxLedgerState = "booted" | "paused" | "connected" | "stopped" | "gone";
7721
7794
  interface SandboxLedgerEntry {
7722
7795
  sandboxId: string;
7723
7796
  provider: string;
@@ -7731,6 +7804,13 @@ interface SandboxLedgerEntry {
7731
7804
  /** ISO instant the box is expected to idle-expire — stamped only when the
7732
7805
  * boot knew a window (`lifecycle.pause_after_idle`). */
7733
7806
  expiresAt?: string;
7807
+ /** Last PROVIDER liveness probe verdict (`SandboxProvider.probe`) — the
7808
+ * only signal that distinguishes box death from session death. Absent
7809
+ * when never probed (or the provider can't probe): the ledger's `state`
7810
+ * alone is NOT trustworthy — a dead box looks paused until probed. */
7811
+ sandboxAlive?: boolean;
7812
+ /** ISO instant `sandboxAlive` was computed. */
7813
+ sandboxCheckedAt?: string;
7734
7814
  }
7735
7815
  /** `~/.agentproto/sandboxes.json`. `AGENTPROTO_SANDBOX_LEDGER` overrides
7736
7816
  * the path (tests, and a caller that wants a workspace-scoped ledger). */
@@ -7739,9 +7819,43 @@ declare const sandboxLedgerPath: () => string;
7739
7819
  * "degrade to nothing rather than throw" contract as every other store
7740
7820
  * reader in this daemon. Never throws. */
7741
7821
  declare function readSandboxLedger(path?: string): SandboxLedgerEntry[];
7822
+ /**
7823
+ * Upsert (dedup by `sandboxId`) and persist. Sync + best-effort: the
7824
+ * lifecycle hooks that call this run inside teardown/finally paths where
7825
+ * Node won't await, and a failure here is a lost index row, never a lost
7826
+ * box. Swallows every error.
7827
+ */
7828
+ declare function upsertSandboxLedger(entry: SandboxLedgerEntry, path?: string): void;
7742
7829
  /** Remove a row by sandboxId. Returns whether a row was actually dropped
7743
7830
  * (read from the PRE-call disk state). Never throws. */
7744
7831
  declare function removeSandboxLedgerEntry(sandboxId: string, path?: string): boolean;
7832
+ /**
7833
+ * Stamp a boot or reconnect into the ledger — the spawn path's hook.
7834
+ * `state` is "booted" for a fresh boot, "connected" for a reuse/attach.
7835
+ * Best-effort: never throws, whatever happens.
7836
+ */
7837
+ declare function recordSandboxBoot(opts: {
7838
+ sandboxId: string;
7839
+ provider: string;
7840
+ state: "booted" | "connected";
7841
+ label?: string;
7842
+ cwd?: string;
7843
+ originSessionId?: string;
7844
+ expiresAt?: string;
7845
+ path?: string;
7846
+ }): void;
7847
+ /** Stamp a state transition ("paused"/"stopped"/"gone") for an existing row.
7848
+ * Best-effort: never throws. */
7849
+ declare function recordSandboxState(sandboxId: string, state: "paused" | "stopped" | "gone", path?: string): void;
7850
+ /** Stamp a PROVIDER liveness verdict onto an existing row — `sandboxAlive`
7851
+ * + `sandboxCheckedAt`, and when the verdict is death ALSO flip the row to
7852
+ * `"gone"` (the state alone was never evidence of death; the probe is).
7853
+ * Best-effort: never throws. */
7854
+ declare function recordSandboxLiveness(sandboxId: string, alive: boolean, path?: string): void;
7855
+ /** Backfill `originSessionId` once the HOST registry has minted the session
7856
+ * id the box was spawned for (the boot hook runs before that id exists).
7857
+ * Best-effort: never throws. */
7858
+ declare function recordSandboxOrigin(sandboxId: string, originSessionId: string, path?: string): void;
7745
7859
  type ReuseResolution = {
7746
7860
  kind: "resolved";
7747
7861
  sandboxId: string;
@@ -7765,6 +7879,62 @@ type ReuseResolution = {
7765
7879
  */
7766
7880
  declare function resolveReuseFromLedger(reuse: string, entries: readonly SandboxLedgerEntry[]): ReuseResolution;
7767
7881
 
7882
+ /** Host session statuses after which a session can never use its box again. */
7883
+ declare const DEAD_SESSION_STATUSES: ReadonlySet<string>;
7884
+ /** One ledger row selected for gc, with the observed origin-session status. */
7885
+ interface SandboxGcCandidate {
7886
+ entry: SandboxLedgerEntry;
7887
+ sessionStatus: string;
7888
+ }
7889
+ /**
7890
+ * Select ledger entries whose origin session is error/killed/exited.
7891
+ * Rows already marked "stopped" are skipped (nothing left to tear down);
7892
+ * rows with no `originSessionId` are skipped too — their owning session
7893
+ * is unknown, so "orphan" cannot be established from this surface.
7894
+ */
7895
+ declare function collectGcCandidates(entries: readonly SandboxLedgerEntry[], sessionStatuses: ReadonlyMap<string, string>): SandboxGcCandidate[];
7896
+ /** Provider resolution + ledger targeting for the reaper — injectable so
7897
+ * tests can hand a fake provider and a tmp ledger path. */
7898
+ interface SandboxGcReapDeps {
7899
+ resolveProvider: (slug: string) => Promise<SandboxGcProviderHandle | null>;
7900
+ ledgerPath?: string;
7901
+ }
7902
+ /** The slice of `SandboxProviderHandle` the reaper needs. */
7903
+ interface SandboxGcProviderHandle {
7904
+ provider: {
7905
+ connect(sandboxId: string, spec: {
7906
+ provider: string;
7907
+ config: Record<string, unknown>;
7908
+ }, opts: {
7909
+ env: Record<string, string>;
7910
+ }): Promise<{
7911
+ sandboxId: string;
7912
+ stop(): Promise<void>;
7913
+ pause?(): Promise<void>;
7914
+ }>;
7915
+ };
7916
+ }
7917
+ type SandboxGcReapResult = {
7918
+ ok: true;
7919
+ action: "paused" | "stopped";
7920
+ } | {
7921
+ ok: false;
7922
+ error: string;
7923
+ };
7924
+ /**
7925
+ * Tear one ledger entry's box down on its provider and stamp the ledger.
7926
+ * `pause` keeps the box (pausing when the provider supports it, falling
7927
+ * back to a kill otherwise); the default kills. A connect failure that
7928
+ * reads as "box doesn't exist anymore" still stamps the row "stopped" so
7929
+ * the candidate stops re-appearing; other failures leave the row alone
7930
+ * (transient network must not mark a live box as reaped).
7931
+ */
7932
+ declare function reapGcEntry(entry: SandboxLedgerEntry, opts: {
7933
+ pause?: boolean;
7934
+ } & SandboxGcReapDeps): Promise<SandboxGcReapResult>;
7935
+ /** States that still name a box the gc might act on. */
7936
+ declare const GC_REAPABLE_STATES: readonly SandboxLedgerState[];
7937
+
7768
7938
  /**
7769
7939
  * Idle agent-session reaper (PR-6).
7770
7940
  *
@@ -9442,4 +9612,4 @@ interface GatewayHandle {
9442
9612
  */
9443
9613
  declare function createGateway(opts: CreateGatewayOptions): Promise<GatewayHandle>;
9444
9614
 
9445
- export { type ActivityKind, type ActivityListFilter, type ActivityPolicyLister, type ActivityProjector, type ActivityProjectorRegistry, type ActivityProjectorSession, type ActivityRecord, type ActivitySource, type ActivityState, type ActivityWaitingOn, type ActivityWorkflowLister, AdapterAuthDescriptor, type AdapterCapabilitiesLister, type AdapterInstallResult, type AdapterListEntry, type AgentAdapterInstaller, type AgentAdapterLister, type AgentAdapterResolver, type AgentSessionLike, type AgentStreamEvent, type AnthropicReaderConfig, AnthropicRemainingQuotaReader, type AttachPolicyInput, type AttachSandboxOpts, type AttachSandboxResult, AuthMethod, BUCKETS_ROOT, type BrowserAdapterHandle, type BrowserAdapterInfo, type BrowserAdapterLister, type BrowserAdapterResolver, BuildHeartbeatAgent, CanonicalPosture, type CatalogModelsLister, CatalogModelsQuery, CatalogModelsResponse, type CatalogProviderModel, type CatalogProviderModelsQuery, type CatalogProviderModelsResponse, type CatalogProviderPricing, type ClaudeNativeRef, type CommitSpec, type CompletionPolicySupervisor, ContextProfile, type ConversationIndexRecord, type ConversationNativeRef, type CostBudgetDecision, type CrashDetectSummary, type CrashReaperRegistry, type CreateGatewayOptions, type CreateOfferInput, type CreatedOffer, DEFAULT_BUCKET, DEFAULT_ORCHESTRATOR_TOOLS, DEFAULT_WORKTREE_ISOLATION, DeclaredAdapterOption, type DeclaredAdapterPreset, type EagerResumeFailReason, type EagerResumeOutcome, type EagerResumeSkipReason, type EagerResumeSummary, EffortLevel, type GateSpec, type GatewayHandle, type HarnessPreset, type HarnessPresetValidationDeps, HarnessPresetValidationError, type HarnessPresetsFile, type HermesNativeRef, INBOUND_PROVIDERS, 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 JudgeGateSpec, LEGACY_SESSIONS_FILE, type LocatedConversation, type LocatedConversationByPath, type McpCredentialDeps, type MigrationMarker, type NormalizeInboundResult, type OnFailSpec, type OpenPrResolver, type OrchestratorGatewayDeps, type OrchestratorInjection, type OrchestratorInjector, type OrchestratorInjectorDeps, type OrchestratorMcpServerFactory, type OrchestratorScope, type OrphanReaperRegistry, PAIRINGS_VERSION, POSTURE_NATIVE_ALIASES, POSTURE_PREAMBLES, type PairingChannelContext, type PairingChannelHandle, type PairingChannelMode, type PairingRecord, type PairingRegistry, type PairingRegistryDeps, type PendingPermission, type PermissionRespondInput, type PermissionRespondResult, type PolicyRunState, type PolicyRunStatus, Posture, type PostureResolution, type PrResolvedState, type PrStateResolver, type PresetInfo, type PricingResolver, type QuotaReadableProfile, type QuotaStoreFile, type QuotaStoreOptions, type ReconnectLogGate, type RegisterBrainToolsOptions, type RegisterBrowserInput, type RegisterPairingToolsOptions, type RegisterSessionInput, type RegisterWebSearchToolsOptions, type RemainingQuota, type RemainingQuotaReader, type ResolveNativeLinkInput, ResolvedAuthSpec, ResumeDisabledError, type ReuseResolution, type RouteAwareLaunchConfig, type RouteAwareLaunchConfigInput, RouteSpec, type RuntimeMeta, SESSION_ID_ENV, type SandboxAdapterInfo, type SandboxConnectionDescriptor, type SandboxLedgerEntry, type SandboxLedgerState, type SandboxProviderCapabilities, type SandboxProviderHandle, type SandboxProviderLister, type SandboxProviderResolver, type ScopeTokenRegistry, SessionConfig, type SessionCurrentPhase, type SessionDescriptor, type SessionKind, type SessionObserver, type SessionSnapshots, type SessionStatus, type SessionUsage, type SessionWaitEvent, type SessionWaitResult, type SessionsRegistry, type ShellGateSpec, type SpawnAgentInput, type SpawnSessionInput, type StallWatchdogRegistry, type StallWatchdogSummary, type StoredProfileQuota, TASK_STATUSES, type TaskCaller, type TaskChangedEvent, type TaskClaimInput, type TaskCreateInput, type TaskGateOutcome, type TaskGateRunner, type TaskLedger, type TaskLedgerRegistry, type TaskLedgerSessionSlice, type TaskListFilter, type TaskRecord, type TaskStatus, type TaskUpdateInput, type TaskVerification, type TaskVerifySupervisor, type TaskWriteResult, type TokenPricing, type TransmitterBinding, type TransmitterBindingStore, type TunnelDescriptor, type TunnelProvider, type TunnelStatus, type UsageBucket, type UsageComputeInput, type UsageRollup, type UsageSnapshotRecord, type UsageSource, WORKSPACE_SLUG_ENV, WORKTREE_ISOLATION_ENV, type WatcherDescriptor, type WatcherStartInput, type WebSearchInput, type WebSearchOutput, type WebSearchResult, type WorkspaceBrainSubscriber, type WorkspaceBrainSubscriberOptions, type WorkspaceBrains, WorkspaceFs, type WorktreeAutoReclaimer, type WorktreeDecision, type WorktreeField, type WorktreeGcClass, type WorktreeGcOutcomeView, type WorktreeGcPlanEntryView, type WorktreeGcReclaimReason, type WorktreeGcResult, type WorktreeGcRunInput, type WorktreeGcRunner, WorktreeIsolationMode, type WorktreeProvisionOutcome, type WorktreeProvisionRequest, type WorktreeProvisioner, type WorktreeRequest, type WorktreeStatusLister, type WorktreeStatusView, activityCounts, addHarnessPreset, appendConversationRecord, attachSandbox, bucketDir, bucketSessionsFile, bucketTranscriptDir, buildCatalogProviderModels, buildMcpConfigSnippet, buildRouteAwareLaunchConfig, canonicalForModeId, claudeProjectSlug, composeSessionObservers, conversationIndexPath, createActivityProjector, createFileStepCache, createGateway, createInboundEndpointStore, createOrchestratorInjector, createOrchestratorMcpServerFactory, createPairingRegistry, createPrProvenanceReconciler, createReconnectLogGate, createScopeTokenRegistry, createSupervisorTaskGateRunner, createTaskLedger, createWorkspaceBrainSubscriber, createWorkspaceBrains, daemonRegistryDir, decideWorktreeIsolation, declaredPresetToProviderPreset, defineBraveSearchHttpDriver, defineSerperHttpDriver, deriveSessionUsage, enrichRollupWithProviderQuota, enrichWithRemainingQuota, evaluateCostBudget, filterActivities, findConversationRecord, findNativeMode, formatToolCall, formatToolResult, getDefaultHarnessPreset, getHarnessPreset, getMcpCredentialDeps, harnessPresetsPath, isAgentCliAuthConfigured, isClosedTaskStatus, isSafeBucketSlug, isTerminalActivityState, listBuckets, listHarnessPresets, listPresets, loadHarnessPresets, loadQuotaStore, loadWorktreeIsolation, locateConversationByNativePath, locateConversationBySessionId, makeBrowserAdapterLister, makeSandboxCredsStore, makeSandboxResolver, migrateLegacySessionsFile, migrationMarkerPath, monitorPolicyWait, monitorSessionWait, narrowOrchestratorTools, normalizeInbound, normalizeModeId, normalizeWorktreeField, parseAnthropicRateLimitHeaders, parseTaskStatus, parseWindow, parseWorktreeIsolationMode, policyToActivities, policyWatchesSession, prToActivities, projectSessionUsage, readConversationIndex, readDaemonRegistry, readProfileQuota, readRegisteredSlugs, readRuntimeMeta, readSandboxLedger, readSessionForBrain, readUsageSnapshots, reapOrphanedDescendants, recordProfileQuota, registerBrainTools, registerBuiltinRoutes, registerPairingTools, registerSandboxAttachTool, registerWebSearchTools, removeHarnessPreset, removeSandboxLedgerEntry, resolveBucketSlug, resolveNativeLink, resolvePosture, resolveReuseFromLedger, rollupUsage, runCrashDetectPass, runEagerResumePass, runIdleReapPass, runStallWatchdogPass, sandboxLedgerPath, setDefaultPreset, setMcpCredentialDeps, sweepStaleDaemonRegistry, sweepStaleRuntimeMetas, toWorktreeStatusView, turnToActivities, unlinkDaemonRegistryEntry, unlinkRuntimeMeta, updateHarnessPreset, verifyInboundSignature, webSearchTool, workflowToActivities, writeDaemonRegistryEntry };
9615
+ export { type ActivityKind, type ActivityListFilter, type ActivityPolicyLister, type ActivityProjector, type ActivityProjectorRegistry, type ActivityProjectorSession, type ActivityRecord, type ActivitySource, type ActivityState, type ActivityWaitingOn, type ActivityWorkflowLister, AdapterAuthDescriptor, type AdapterCapabilitiesLister, type AdapterInstallResult, type AdapterListEntry, type AgentAdapterInstaller, type AgentAdapterLister, type AgentAdapterResolver, type AgentSessionLike, type AgentStreamEvent, type AnthropicReaderConfig, AnthropicRemainingQuotaReader, type AttachPolicyInput, type AttachSandboxOpts, type AttachSandboxResult, AuthMethod, BUCKETS_ROOT, type BrowserAdapterHandle, type BrowserAdapterInfo, type BrowserAdapterLister, type BrowserAdapterResolver, BuildHeartbeatAgent, CanonicalPosture, type CatalogModelsLister, CatalogModelsQuery, CatalogModelsResponse, type CatalogProviderModel, type CatalogProviderModelsQuery, type CatalogProviderModelsResponse, type CatalogProviderPricing, type ClaudeNativeRef, type CommitSpec, type CompletionPolicySupervisor, ContextProfile, type ConversationIndexRecord, type ConversationNativeRef, type CostBudgetDecision, type CrashDetectSummary, type CrashReaperRegistry, type CreateGatewayOptions, type CreateOfferInput, type CreatedOffer, DEAD_SESSION_STATUSES, DEFAULT_BUCKET, DEFAULT_ORCHESTRATOR_TOOLS, DEFAULT_WORKTREE_ISOLATION, DeclaredAdapterOption, type DeclaredAdapterPreset, type EagerResumeFailReason, type EagerResumeOutcome, type EagerResumeSkipReason, type EagerResumeSummary, EffortLevel, GC_REAPABLE_STATES, type GateSpec, type GatewayHandle, type HarnessPreset, type HarnessPresetValidationDeps, HarnessPresetValidationError, type HarnessPresetsFile, type HermesNativeRef, INBOUND_PROVIDERS, 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 JudgeGateSpec, LEGACY_SESSIONS_FILE, type LocatedConversation, type LocatedConversationByPath, type McpCredentialDeps, type MigrationMarker, type NormalizeInboundResult, type OnFailSpec, type OpenPrResolver, type OrchestratorGatewayDeps, type OrchestratorInjection, type OrchestratorInjector, type OrchestratorInjectorDeps, type OrchestratorMcpServerFactory, type OrchestratorScope, type OrphanReaperRegistry, PAIRINGS_VERSION, POSTURE_NATIVE_ALIASES, POSTURE_PREAMBLES, type PairingChannelContext, type PairingChannelHandle, type PairingChannelMode, type PairingRecord, type PairingRegistry, type PairingRegistryDeps, type PendingPermission, type PermissionRespondInput, type PermissionRespondResult, type PolicyRunState, type PolicyRunStatus, Posture, type PostureResolution, type PrResolvedState, type PrStateResolver, type PresetInfo, type PricingResolver, type QuotaReadableProfile, type QuotaStoreFile, type QuotaStoreOptions, type ReconnectLogGate, type RegisterBrainToolsOptions, type RegisterBrowserInput, type RegisterPairingToolsOptions, type RegisterSessionInput, type RegisterWebSearchToolsOptions, type RemainingQuota, type RemainingQuotaReader, type ResolveNativeLinkInput, ResolvedAuthSpec, ResumeDisabledError, type ReuseResolution, type RouteAwareLaunchConfig, type RouteAwareLaunchConfigInput, RouteSpec, type RuntimeMeta, SESSION_ID_ENV, 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 ScopeTokenRegistry, SessionConfig, type SessionCurrentPhase, type SessionDescriptor, type SessionKind, type SessionObserver, type SessionSnapshots, type SessionStatus, type SessionUsage, type SessionWaitEvent, type SessionWaitResult, type SessionsRegistry, type ShellGateSpec, type SpawnAgentInput, type SpawnSessionInput, type StallWatchdogRegistry, type StallWatchdogSummary, type StoredProfileQuota, TASK_STATUSES, type TaskCaller, type TaskChangedEvent, type TaskClaimInput, type TaskCreateInput, type TaskGateOutcome, type TaskGateRunner, type TaskLedger, type TaskLedgerRegistry, type TaskLedgerSessionSlice, type TaskListFilter, type TaskRecord, type TaskStatus, type TaskUpdateInput, type TaskVerification, type TaskVerifySupervisor, type TaskWriteResult, type TokenPricing, type TransmitterBinding, type TransmitterBindingStore, type TunnelDescriptor, type TunnelProvider, type TunnelStatus, type UsageBucket, type UsageComputeInput, type UsageRollup, type UsageSnapshotRecord, type UsageSource, WORKSPACE_SLUG_ENV, WORKTREE_ISOLATION_ENV, type WatcherDescriptor, type WatcherStartInput, type WebSearchInput, type WebSearchOutput, type WebSearchResult, type WorkspaceBrainSubscriber, type WorkspaceBrainSubscriberOptions, type WorkspaceBrains, WorkspaceFs, type WorktreeAutoReclaimer, type WorktreeDecision, type WorktreeField, type WorktreeGcClass, type WorktreeGcOutcomeView, type WorktreeGcPlanEntryView, type WorktreeGcReclaimReason, type WorktreeGcResult, type WorktreeGcRunInput, type WorktreeGcRunner, WorktreeIsolationMode, type WorktreeProvisionOutcome, type WorktreeProvisionRequest, type WorktreeProvisioner, type WorktreeRequest, type WorktreeStatusLister, type WorktreeStatusView, activityCounts, addHarnessPreset, appendConversationRecord, attachSandbox, bucketDir, bucketSessionsFile, bucketTranscriptDir, buildCatalogProviderModels, buildMcpConfigSnippet, buildRouteAwareLaunchConfig, canonicalForModeId, claudeProjectSlug, collectGcCandidates, composeSessionObservers, conversationIndexPath, createActivityProjector, createFileStepCache, createGateway, createInboundEndpointStore, createOrchestratorInjector, createOrchestratorMcpServerFactory, createPairingRegistry, createPrProvenanceReconciler, createReconnectLogGate, createScopeTokenRegistry, createSupervisorTaskGateRunner, createTaskLedger, createWorkspaceBrainSubscriber, createWorkspaceBrains, daemonRegistryDir, decideWorktreeIsolation, declaredPresetToProviderPreset, defineBraveSearchHttpDriver, defineSerperHttpDriver, deriveSessionUsage, enrichRollupWithProviderQuota, enrichWithRemainingQuota, evaluateCostBudget, filterActivities, findConversationRecord, findNativeMode, formatToolCall, formatToolResult, getDefaultHarnessPreset, getHarnessPreset, getMcpCredentialDeps, harnessPresetsPath, isAgentCliAuthConfigured, isClosedTaskStatus, isSafeBucketSlug, isTerminalActivityState, listBuckets, listHarnessPresets, listPresets, loadHarnessPresets, loadQuotaStore, loadWorktreeIsolation, locateConversationByNativePath, locateConversationBySessionId, makeBrowserAdapterLister, makeSandboxCredsStore, makeSandboxResolver, migrateLegacySessionsFile, migrationMarkerPath, monitorPolicyWait, monitorSessionWait, narrowOrchestratorTools, normalizeInbound, normalizeModeId, normalizeWorktreeField, parseAnthropicRateLimitHeaders, parseTaskStatus, parseWindow, parseWorktreeIsolationMode, policyToActivities, policyWatchesSession, prToActivities, projectSessionUsage, readConversationIndex, readDaemonRegistry, readProfileQuota, readRegisteredSlugs, readRuntimeMeta, readSandboxLedger, readSessionForBrain, readUsageSnapshots, reapGcEntry, reapOrphanedDescendants, recordProfileQuota, recordSandboxBoot, recordSandboxLiveness, recordSandboxOrigin, recordSandboxState, registerBrainTools, registerBuiltinRoutes, registerPairingTools, registerSandboxAttachTool, registerWebSearchTools, removeHarnessPreset, removeSandboxLedgerEntry, resolveBucketSlug, resolveNativeLink, resolvePosture, resolveReuseFromLedger, rollupUsage, runCrashDetectPass, runEagerResumePass, runIdleReapPass, runStallWatchdogPass, sandboxLedgerPath, setDefaultPreset, setMcpCredentialDeps, sweepStaleDaemonRegistry, sweepStaleRuntimeMetas, toWorktreeStatusView, turnToActivities, unlinkDaemonRegistryEntry, unlinkRuntimeMeta, updateHarnessPreset, upsertSandboxLedger, verifyInboundSignature, webSearchTool, workflowToActivities, writeDaemonRegistryEntry };