agent-shim 8.2.0 → 8.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.
@@ -692,6 +692,10 @@ interface LayoutPaths {
692
692
  readonly frontdoorStateFile: string;
693
693
  /** Path to the exclusive-create marker guarding "who spawns the front-door supervisor" so concurrent launches start at most one. */
694
694
  readonly frontdoorLockFile: string;
695
+ /**
696
+ * Path to the serving door's control token, mode 0600: the random bearer capability this generation's Remote Control control routes demand, rewritten on every door start. Only its owner can read it, which is what authenticates a CLI invocation to the door that minted it.
697
+ */
698
+ readonly frontdoorControlTokenFile: string;
695
699
  /** Directory holding one `<launcher-pid>.json` session-registry entry per live launch routed through the front door. */
696
700
  readonly frontdoorSessionsDir: string;
697
701
  /** Path to the front door's log: one line per lifecycle event and routed failure, never a token. */
@@ -1594,8 +1598,233 @@ declare function realConnectCertStore(paths: {
1594
1598
  readonly frontdoorCaKeyFile: string;
1595
1599
  }): ConnectCertStore;
1596
1600
 
1601
+ /** What the identity step learned about one request from the launcher-injected headers. */
1602
+ interface SessionIdentity {
1603
+ /** The identity name the launch resolved, when it resolved one. */
1604
+ readonly identity: string | undefined;
1605
+ /** The per-launch session id, when the launcher injected one. */
1606
+ readonly sessionId: string | undefined;
1607
+ /** Whether this launch resolved headroom on, so its requests must pass through the headroom hop before their route. */
1608
+ readonly headroom: boolean;
1609
+ /** The project identity headroom scopes memory to, re-set on the headroom hop and sent nowhere else. */
1610
+ readonly projectId: string | undefined;
1611
+ }
1612
+ /** One request as a route sees it: the transport's own request and abort signal, plus what the identity step resolved. */
1613
+ interface RoutedRequest {
1614
+ readonly method: string;
1615
+ /** The request target exactly as received, path and query together. */
1616
+ readonly url: string;
1617
+ /** The request's headers with every internal header already stripped: exactly what a route may forward onwards. */
1618
+ readonly headers: IncomingHttpHeaders;
1619
+ /** The request's body stream: a route either pipes it onward untouched or reads it whole, never both. */
1620
+ readonly body: IncomingMessage;
1621
+ /** Aborted the moment the client goes away; a route aborts its own upstream work with it. */
1622
+ readonly signal: AbortSignal;
1623
+ readonly session: SessionIdentity;
1624
+ }
1625
+ /** The response half a route writes through, so the pipeline can run response middleware at the head and apply backpressure uniformly. */
1626
+ interface RoutedResponse {
1627
+ /** Whether the head has already been written. */
1628
+ readonly headersSent: boolean;
1629
+ /** Writes the response head, running every response observer first. Must be called exactly once, before any write. */
1630
+ readonly start: (status: number, headers: Readonly<Record<string, string>>) => void;
1631
+ /** Sends the head on its way before any body chunk exists: a streaming response's client should see its headers the moment they are known. */
1632
+ readonly flush: () => void;
1633
+ /**
1634
+ * Writes one body chunk, waiting for the socket to take it when the client is slow (backpressure: a slow client slows the route, and its upstream, instead of growing a buffer without bound). Resolves early, without writing, once the client is gone.
1635
+ */
1636
+ readonly write: (chunk: string | Uint8Array) => Promise<void>;
1637
+ /** Ends the response. */
1638
+ readonly end: () => void;
1639
+ /** Drops the connection: an upstream failure after the head went out, where no status can be sent any more. */
1640
+ readonly destroy: () => void;
1641
+ }
1642
+ /** One pluggable destination the front door routes a request to. */
1643
+ interface FrontDoorRoute {
1644
+ /** The route's name, for logs and for response middleware context. */
1645
+ readonly name: string;
1646
+ /**
1647
+ * Whether the headroom hop may sit in front of this route. Headroom needs the Anthropic-shaped request, so a protocol translator built on an Anthropic-compatible surface opts in, and a route whose request shape headroom could not understand opts out.
1648
+ */
1649
+ readonly headroomEligible: boolean;
1650
+ /**
1651
+ * The upstream headroom is told to use (its per-request base URL header) when the hop sits in front of this route. When defined it is always this door's direct listener, which is what lets the hop keep the route's credential in custody and the direct listener restore it; a route must never name any other address here. Undefined leaves headroom's own default upstream in charge, which is Claude Code's API.
1652
+ */
1653
+ readonly headroomUpstream: string | undefined;
1654
+ /**
1655
+ * Serves the request directly: headroom has already been applied, or does not apply to this route. Writes the response through `response` and resolves once the response has ended.
1656
+ */
1657
+ readonly serve: (request: RoutedRequest, response: RoutedResponse) => Promise<void>;
1658
+ }
1659
+
1660
+ /**
1661
+ * Remote Control session tracking and prompt injection: the front door's record of the `cse_` sessions whose traffic crosses its terminated API-host session, and the client-half write that delivers a prompt to one of them.
1662
+ *
1663
+ * The tracker is observational: the door already terminates the API host's TLS, so it sees the CLI's own `POST /v1/code/sessions` (whose answer carries the new session's `cse_` id) and every recurring `/v1/code/sessions/...` call (heartbeat, presence), each carrying the session's Authorization bearer and the protocol headers a client-half replay needs. Per session the tracker retains the latest of each, because those calls recur and the freshest value is the live one. Everything is held in this process's memory only: nothing here is written to a log, to the capture, or to disk, and the summary the control surface lists never includes the credential. The capture's existing redaction is untouched; a capture and this tracker observe the same exchanges through entirely separate paths.
1664
+ *
1665
+ * Injection replays the protocol's documented client half rather than splicing frames into any relayed stream: `POST /v1/code/sessions/{id}/events` with one user-message payload event, authenticated by the observed bearer and the observed protocol headers, sent from the door over its own interception-proof dials. Sequence numbers therefore come from the real service and the event is mirrored to every attached client, exactly as a message typed into claude.ai would be.
1666
+ */
1667
+ /** Every Remote Control exchange on the API host sits under this path prefix. */
1668
+ declare const RC_SESSIONS_PATH_PREFIX = "/v1/code/sessions";
1669
+ /**
1670
+ * How long an entry survives without any observed exchange for its session. Derived from the protocol's own liveness, not chosen: the worker heartbeats every 20 s (the `current_interval_seconds` our own captured heartbeat body carries), so a live session produces observable traffic at least that often, and the transport's documented liveness bound is the 45 s stream timeout, which outlasts two missed heartbeat intervals (40 s) precisely so a momentarily quiet session is not dropped. An entry idle past 45 s therefore names a session the protocol itself has given up on, which makes 45 s the exact bound where retaining it stops describing anything live.
1671
+ */
1672
+ declare const RC_IDLE_EXPIRY_MS = 45000;
1673
+ /** One observed session as the control surface lists it: the identification and timing only, never the credential. */
1674
+ interface RcSessionSummary {
1675
+ readonly id: string;
1676
+ /** When the session's create exchange completed, in epoch milliseconds from the injected clock. */
1677
+ readonly createdAt: number;
1678
+ /** When traffic for this session was last observed, in epoch milliseconds from the injected clock. */
1679
+ readonly lastSeenAt: number;
1680
+ }
1681
+ /** The request facts one observed exchange arrives with. */
1682
+ interface RcObservedRequest {
1683
+ readonly method?: string;
1684
+ readonly url?: string;
1685
+ readonly headers: Readonly<IncomingHttpHeaders>;
1686
+ }
1687
+ /** What one observed exchange's response drives, in arrival order: the head, each body chunk, then the end exactly once. */
1688
+ interface RcExchangeObserver {
1689
+ readonly onResponse: (status: number, headers: Readonly<IncomingHttpHeaders>) => void;
1690
+ readonly onBodyChunk: (chunk: Uint8Array) => void;
1691
+ readonly onEnd: () => void;
1692
+ }
1693
+ /** Everything the tracker needs, injected so its decisions and lifecycle run against fakes in unit tests. */
1694
+ interface RcSessionTrackerDeps {
1695
+ readonly now: () => number;
1696
+ /** How long an entry may sit unobserved before it is expired; production passes `RC_IDLE_EXPIRY_MS`, tests pass small values so a deadline is reached in milliseconds. */
1697
+ readonly idleMs: number;
1698
+ }
1699
+ /** The live record of observed Remote Control sessions. */
1700
+ interface RcSessionTracker {
1701
+ /** Feeds one request/response exchange in: returns the observer its response drives when the request belongs to the Remote Control surface, or undefined when it does not, in which case nothing is retained and the response needs no observing. */
1702
+ readonly observeExchange: (request: RcObservedRequest) => RcExchangeObserver | undefined;
1703
+ /** Every live entry, idle ones expired first, sorted oldest-created first. */
1704
+ readonly list: () => readonly RcSessionSummary[];
1705
+ /** The observed credential and protocol headers for one session, the inject path's accessor: present only while the session is tracked, and never surfaced anywhere a summary, log or capture goes. */
1706
+ readonly credentialOf: (sessionId: string) => RcObservedCredential | undefined;
1707
+ /** Stops the idle sweep timer. The entries themselves are unreachable the moment the door drops them. */
1708
+ readonly close: () => void;
1709
+ }
1710
+ /** Creates the tracker. One per door process; everything it holds dies with it. */
1711
+ declare function createRcSessionTracker(deps: RcSessionTrackerDeps): RcSessionTracker;
1712
+ /**
1713
+ * Wraps one route so the tracker sees every exchange the route serves: the request's facts are handed over first, and when they are Remote Control facts the response the route writes is teed to the tracker's observer while flowing on unchanged. Used on the door's route resolution, so the bare `/v1/` pass-through an OAuth session's Remote Control calls ride is where observation happens.
1714
+ */
1715
+ declare function observingRoutedRoute(route: FrontDoorRoute, tracker: RcSessionTracker): FrontDoorRoute;
1716
+ /** Adapts the tracker's exchange observer to the passthrough forwarding's observer shape, so the connect test world (which forwards rather than routes) observes through the same tracker. */
1717
+ declare function rcObserverAsPassthrough(observer: RcExchangeObserver): PassthroughObserver;
1718
+ /**
1719
+ * Builds the user-message payload event for one injected prompt: the Agent SDK stream-json `user` message shape (`type`, `uuid`, `session_id`, `parent_tool_use_id`, `message` with a `user` role), the same envelope a claude.ai client sends as a turn. The content is the plain string form, which is the shape validated end to end against the real API by the third-party client survey that settled this protocol.
1720
+ */
1721
+ declare function buildRcUserMessagePayload(uuid: string, sessionId: string, text: string): Record<string, unknown>;
1722
+ /** Wraps payload event(s) in the write body the endpoint takes: `{"events": [{"payload": {...}}]}`. */
1723
+ declare function buildRcEventWriteBody(payload: Record<string, unknown>): Record<string, unknown>;
1724
+ /** The headers injection sends: the observed credential and protocol values, replayed verbatim, never invented. */
1725
+ interface RcInjectHeaders {
1726
+ readonly authorization: string | undefined;
1727
+ readonly anthropicVersion: string | undefined;
1728
+ readonly anthropicClientPlatform: string | undefined;
1729
+ }
1730
+ /** One answer from the API host the inject path dials: the status and the whole body. This dial only ever reads small JSON answers, never a stream, so the body needs no cap of its own. */
1731
+ interface RcDialAnswer {
1732
+ readonly status: number;
1733
+ readonly body: string;
1734
+ }
1735
+ /** The one network effect injection performs, injected so the pure logic runs against fakes: POST the write body to the session's events endpoint. Production dials the real API host over the door's interception-proof agent; tests redirect to a local stand-in. */
1736
+ interface RcEventDial {
1737
+ readonly writeEvents: (sessionId: string, headers: Readonly<Record<string, string>>, body: string) => Promise<RcDialAnswer>;
1738
+ }
1739
+ /** What one injection attempt produced: the sequence numbers the real service assigned, or a verbose failure message ready to show a user. */
1740
+ type RcInjectResult = {
1741
+ readonly ok: true;
1742
+ readonly sequenceNums: readonly number[];
1743
+ } | {
1744
+ readonly ok: false;
1745
+ readonly message: string;
1746
+ };
1747
+ /** Maps one dial answer to the inject result: an accepted write yields its sequence numbers; anything else yields a verbose message, with the 401 case naming the stale observed bearer as the cause. */
1748
+ declare function rcInjectResultFromAnswer(answer: RcDialAnswer): RcInjectResult;
1749
+ /** The credential and protocol headers the tracker holds for one session, the inject path's accessor: present only while the session is tracked, and never surfaced anywhere a summary, log or capture goes. */
1750
+ type RcObservedCredential = RcInjectHeaders;
1751
+ /** Everything one injection needs, injected so the decision logic runs against fakes in unit tests. */
1752
+ interface RcInjectDeps {
1753
+ /** Reads the observed credential for a session: the tracker's accessor, in production. */
1754
+ readonly credentialOf: (sessionId: string) => RcObservedCredential | undefined;
1755
+ /** The dial to the real API host. */
1756
+ readonly dial: RcEventDial;
1757
+ /** Mints the payload event's uuid: a v4 UUID or better in production. */
1758
+ readonly newUuid: () => string;
1759
+ }
1760
+ /**
1761
+ * Injects one user-message prompt into an observed session: the documented client-half write, `POST /v1/code/sessions/{id}/events`, authenticated by the observed bearer and carrying the observed protocol headers. The result is the sequence numbers the real service assigned, or a verbose failure. A dial that cannot reach the API host is reported rather than thrown, so a caller with no exception handling still shows the user exactly what failed.
1762
+ */
1763
+ declare function injectRcUserMessage(deps: RcInjectDeps, sessionId: string, text: string): Promise<RcInjectResult>;
1764
+
1765
+ /** Where the Remote Control inject path dials: the API host's own address by default, over TLS with the door's interception-proof agent (real-name DNS resolution and the pf-exempt source-port range), so an injected event cannot be looped back into the door's own transparent surface. A test redirects the dial at a local stand-in presenting the host's name, exactly as the forwarding targets are redirected. */
1766
+ interface RcDialTarget {
1767
+ readonly host: string;
1768
+ readonly port: number;
1769
+ /** The SNI name to present; defaults to `host`. */
1770
+ readonly servername?: string;
1771
+ /** Extra trust anchors for a stand-in's certificate, when it is not system-trusted. */
1772
+ readonly ca?: readonly string[];
1773
+ /** Overrides certificate verification; production leaves it at the Node default. */
1774
+ readonly rejectUnauthorized?: boolean;
1775
+ }
1776
+ /**
1777
+ * The real `RcEventDial`: one keep-alive TLS agent of the door's own exempt kind, so every injected event rides the same interception-proof dials the door's forwarded traffic does. The dial only ever reads small JSON answers (an event write's result, or an error), never a stream.
1778
+ */
1779
+ declare function realRcEventDial(target?: RcDialTarget): RcEventDial;
1597
1780
  declare function realConnectEffects(): ConnectEffects;
1598
1781
 
1782
+ /**
1783
+ * The Remote Control control surface: the small HTTP namespace the serving door answers on its provider listener, next to `/healthz`, through which `agent-shim frontdoor rc` lists the observed sessions and injects a prompt into one.
1784
+ *
1785
+ * This rides the listener `frontdoor status` already knows the door by (its address comes from the same state file, its trust anchor from the same CA path) rather than any second channel. The routes sit under one prefix the routed pipeline never serves, and every request must present the serving generation's control token as a Bearer credential: a fresh random value per door start, written owner-only under the front door's state directory so only this user's CLI can read it, and checked in constant time like every other capability the door accepts. An inject request is carried out by the door itself over its interception-proof dials, which is the whole point: the CLI never dials the API host directly, so nothing about the injection depends on the caller's own network path.
1786
+ */
1787
+ /** The one path prefix every Remote Control control route sits under, answered before the routed pipeline like `/healthz` is. */
1788
+ declare const CONTROL_PATH_PREFIX = "/__agent-shim/rc";
1789
+ /** Everything the control handler needs, injected so it serves against fakes in unit tests. */
1790
+ interface RcControlHandlerDeps {
1791
+ /** This generation's control token: the value the door wrote owner-only for its CLI to present. */
1792
+ readonly expectedToken: string;
1793
+ /** The observed sessions as the tracker lists them. */
1794
+ readonly list: () => readonly RcSessionSummary[];
1795
+ /** The inject operation, already wired to the tracker and the door's API-host dial. */
1796
+ readonly inject: (sessionId: string, text: string) => Promise<RcInjectResult>;
1797
+ }
1798
+ /**
1799
+ * Builds the control handler the provider listener serves under `CONTROL_PATH_PREFIX`. Every route demands the generation's control token first, so nothing about the sessions (their ids, their timing, and most of all the prompts injected into them) is reachable by a process that did not read the owner-only token file.
1800
+ */
1801
+ declare function createRcControlHandler(deps: RcControlHandlerDeps): (request: IncomingMessage, response: ServerResponse) => void;
1802
+ /** One answer from the door's control listener. */
1803
+ interface RcControlAnswer {
1804
+ readonly status: number;
1805
+ readonly body: string;
1806
+ }
1807
+ /** The one transport the control client needs, injected so the client runs against a local plain-HTTP server in tests and the door's real TLS listener in production. */
1808
+ interface RcControlTransport {
1809
+ readonly request: (options: {
1810
+ readonly method: "GET" | "POST";
1811
+ readonly path: string;
1812
+ readonly headers: Readonly<Record<string, string>>;
1813
+ readonly body?: string;
1814
+ }) => Promise<RcControlAnswer>;
1815
+ }
1816
+ /** The real transport: HTTPS to the door's provider listener on loopback, trusting only the CA file the door's own state names, so a process merely holding the port cannot answer as the door. */
1817
+ declare function realRcControlTransport(port: number, ca: string): RcControlTransport;
1818
+ /** The door-facing client the `frontdoor rc` verbs use: the session list and the inject operation, over the injected transport. */
1819
+ interface FrontDoorRcControl {
1820
+ /** The observed sessions, oldest-created first. Throws with the door's verbose reason when the list cannot be had. */
1821
+ readonly listSessions: () => Promise<readonly RcSessionSummary[]>;
1822
+ /** Injects one prompt, returning the sequence numbers the real service assigned or the verbose failure. */
1823
+ readonly sendPrompt: (sessionId: string, text: string) => Promise<RcInjectResult>;
1824
+ }
1825
+ /** Builds the control client: every request presents the control token, and a non-2xx answer becomes the verbose message the door sent with it. */
1826
+ declare function frontDoorRcControl(transport: RcControlTransport, token: string): FrontDoorRcControl;
1827
+
1599
1828
  /** The filesystem operations headroom coordination needs: the same shape as `FarmFs`, injected so every decision over state, sessions, and the start lock runs against an in-memory fake in tests. */
1600
1829
  type HeadroomFs = Pick<FarmFs, "mkdirp" | "mkdirPrivate" | "readFileUtf8" | "writeFileUtf8" | "writeFilePrivate" | "writeFileExclusive" | "readdir" | "removeRecursive">;
1601
1830
 
@@ -2813,5 +3042,5 @@ interface PrepareClaudeLaunchOptions {
2813
3042
  */
2814
3043
  declare function prepareClaudeLaunch(options: PrepareClaudeLaunchOptions): LaunchPlan;
2815
3044
 
2816
- export { AMBIENT_CREDENTIAL_VARS, CONNECT_INTERCEPT_HOST, CONNECT_INTERCEPT_HOSTS, CONNECT_LIMITS, CategoryClassificationOverlaySchema, CategoryClassificationSchema, CategoryMapSchema, CliError, ConfigProfileSchema, CredentialCacheSchema, CredentialSchema, CredentialSourceSchema, DirectoryRuleAlreadyExistsError, DirectoryRuleMissingTargetError, DirectoryRuleNotFoundError, DirectoryRuleSchema, DirectoryRulesSchema, EXIT_FAILURE, EXIT_USAGE, EntryValueSchema, FARM_MANIFEST_FILENAME, FrontDoorStartError, GlobalConfigSchema, HeadroomStartError, IdentityAlreadyExistsError, IdentityNotFoundError, IdentitySchema, InvalidCategoryNameError, InvalidIdentityNameError, InvalidProviderNameError, LaunchRefusedError, LegacyProviderFileError, PoolNameSchema, PoolNotFoundError, PoolSchema, PortableConfigSchema, ProfileAlreadyExistsError, ProfileNotFoundError, ProviderAlreadyExistsError, ProviderKindMismatchError, ProviderNotFoundError, ProviderSchema, ROUTED_PATH_PREFIX, UsageError, UsageSnapshotError, UsageSnapshotSchema, WhenSchema, addDirectoryRule, addIdentity, addPool, addProvider, buildEntryFacts, buildLayoutPaths, carryOver, checkReportHasWarnings, checkReportToJson, collectCheckReport, collectDoctorReport, createLeafCache, createProfile, describeProviderEndpoint, detectAmbientCredential, ensureCa, ensureFrontDoor, ensureHeadroom, evaluateAmbientCredentialGuard, formatAmbientCredentialGuardMessage, formatCheckReport, formatDoctorReport, forwardableHeaders, generateCa, identityExists, isIdentityDirectoryName, isInterceptedHost, listDirectoryRules, listIdentities, listProfiles, listProviders, listUsageSnapshots, mintLeaf, parseConnectTarget, prepareClaudeLaunch, prepareLaunch, profileExists, providerExists, readActiveIdentity, readDirectoryRules, readFarmManifest, readGlobalConfig, readIdentity, readPools, readProfile, readProvider, readUsageSnapshot, realConnectCertStore, realConnectEffects, recoverFarm, recoveryDiagnostics, removeDirectoryRule, removeIdentity, removePool, removeProfile, removeProvider, requirePool, resolveAgentShimHome, resolveClaudeHome, resolveDecisions, resolveLayoutPaths, resolveSupervisorConfig, resyncFarm, runCheck, runDoctor, runFrontDoorSupervisor, runSupervisor, servedByPipeline, setAllowAmbientCredential, setDefaultConfigProfile, setGlobalDefaultProfile, setIdentityCredential, setPool, setProfileCategories, setProfileEntries, setProfileLaunchFlags, setProfileMetadata, snapshotPath, startConnectServer, topLevelNames, updateDirectoryRule, updateProvider, useIdentity, writeDirectoryRules };
2817
- export type { AddDirectoryRuleOptions, AddProviderInput, AmbientCredentialDetection, AmbientCredentialGuardResult, AmbientCredentialVar, BuildEntryFactsParams, CaMaterial, CarryOverParams, CarryOverResult, CategoryMap, CheckReport, CollectCheckReportParams, CollectDoctorReportParams, CompiledRule, ConfigProfile, ConnectCertStore, ConnectEffects, ConnectLimits, ConnectServerConfig, ConnectServerHandle, ConnectTarget, Credential, CredentialSource, Decision, Diagnostic, DirectoryRule, DirectoryRules, DoctorReport, EliminatedRule, EnsureFrontDoorPorts, EnsureHeadroomPorts, EntryFact, EntryFacts, EntryValue, EvaluateAmbientCredentialGuardParams, FlattenedCascade, FrontDoorSupervisorPorts, GlobalConfig, HeadroomSupervisorConfig, Identity, IdentityCredentialChange, IdentityListEntry, IdentityListing, InjectedCredential, LaunchPlan, Layer, LayerId, LayoutPaths, LeafCert, Pool, PortableConfig, PrepareClaudeLaunchOptions, PrepareLaunchParams, ProfileListEntry, Provider, ProviderListEntry, RecoverFarmParams, RecoveryResult, ResolveDecisionsInput, ResolvedState, ResyncFarmParams, ResyncFarmResult, RunCheckParams, RunDoctorParams, RunFrontDoorSupervisorOptions, RunSupervisorOptions, SupervisorPorts, UnreadableIdentityListEntry, UpdateDirectoryRuleOptions, UpdateProviderInput, UsageReadFs, UsageSnapshot, WhenCondition };
3045
+ export { AMBIENT_CREDENTIAL_VARS, CONNECT_INTERCEPT_HOST, CONNECT_INTERCEPT_HOSTS, CONNECT_LIMITS, CONTROL_PATH_PREFIX, CategoryClassificationOverlaySchema, CategoryClassificationSchema, CategoryMapSchema, CliError, ConfigProfileSchema, CredentialCacheSchema, CredentialSchema, CredentialSourceSchema, DirectoryRuleAlreadyExistsError, DirectoryRuleMissingTargetError, DirectoryRuleNotFoundError, DirectoryRuleSchema, DirectoryRulesSchema, EXIT_FAILURE, EXIT_USAGE, EntryValueSchema, FARM_MANIFEST_FILENAME, FrontDoorStartError, GlobalConfigSchema, HeadroomStartError, IdentityAlreadyExistsError, IdentityNotFoundError, IdentitySchema, InvalidCategoryNameError, InvalidIdentityNameError, InvalidProviderNameError, LaunchRefusedError, LegacyProviderFileError, PoolNameSchema, PoolNotFoundError, PoolSchema, PortableConfigSchema, ProfileAlreadyExistsError, ProfileNotFoundError, ProviderAlreadyExistsError, ProviderKindMismatchError, ProviderNotFoundError, ProviderSchema, RC_IDLE_EXPIRY_MS, RC_SESSIONS_PATH_PREFIX, ROUTED_PATH_PREFIX, UsageError, UsageSnapshotError, UsageSnapshotSchema, WhenSchema, addDirectoryRule, addIdentity, addPool, addProvider, buildEntryFacts, buildLayoutPaths, buildRcEventWriteBody, buildRcUserMessagePayload, carryOver, checkReportHasWarnings, checkReportToJson, collectCheckReport, collectDoctorReport, createLeafCache, createProfile, createRcControlHandler, createRcSessionTracker, describeProviderEndpoint, detectAmbientCredential, ensureCa, ensureFrontDoor, ensureHeadroom, evaluateAmbientCredentialGuard, formatAmbientCredentialGuardMessage, formatCheckReport, formatDoctorReport, forwardableHeaders, frontDoorRcControl, generateCa, identityExists, injectRcUserMessage, isIdentityDirectoryName, isInterceptedHost, listDirectoryRules, listIdentities, listProfiles, listProviders, listUsageSnapshots, mintLeaf, observingRoutedRoute, parseConnectTarget, prepareClaudeLaunch, prepareLaunch, profileExists, providerExists, rcInjectResultFromAnswer, rcObserverAsPassthrough, readActiveIdentity, readDirectoryRules, readFarmManifest, readGlobalConfig, readIdentity, readPools, readProfile, readProvider, readUsageSnapshot, realConnectCertStore, realConnectEffects, realRcControlTransport, realRcEventDial, recoverFarm, recoveryDiagnostics, removeDirectoryRule, removeIdentity, removePool, removeProfile, removeProvider, requirePool, resolveAgentShimHome, resolveClaudeHome, resolveDecisions, resolveLayoutPaths, resolveSupervisorConfig, resyncFarm, runCheck, runDoctor, runFrontDoorSupervisor, runSupervisor, servedByPipeline, setAllowAmbientCredential, setDefaultConfigProfile, setGlobalDefaultProfile, setIdentityCredential, setPool, setProfileCategories, setProfileEntries, setProfileLaunchFlags, setProfileMetadata, snapshotPath, startConnectServer, topLevelNames, updateDirectoryRule, updateProvider, useIdentity, writeDirectoryRules };
3046
+ export type { AddDirectoryRuleOptions, AddProviderInput, AmbientCredentialDetection, AmbientCredentialGuardResult, AmbientCredentialVar, BuildEntryFactsParams, CaMaterial, CarryOverParams, CarryOverResult, CategoryMap, CheckReport, CollectCheckReportParams, CollectDoctorReportParams, CompiledRule, ConfigProfile, ConnectCertStore, ConnectEffects, ConnectLimits, ConnectServerConfig, ConnectServerHandle, ConnectTarget, Credential, CredentialSource, Decision, Diagnostic, DirectoryRule, DirectoryRules, DoctorReport, EliminatedRule, EnsureFrontDoorPorts, EnsureHeadroomPorts, EntryFact, EntryFacts, EntryValue, EvaluateAmbientCredentialGuardParams, FlattenedCascade, FrontDoorRcControl, FrontDoorSupervisorPorts, GlobalConfig, HeadroomSupervisorConfig, Identity, IdentityCredentialChange, IdentityListEntry, IdentityListing, InjectedCredential, LaunchPlan, Layer, LayerId, LayoutPaths, LeafCert, Pool, PortableConfig, PrepareClaudeLaunchOptions, PrepareLaunchParams, ProfileListEntry, Provider, ProviderListEntry, RcControlAnswer, RcControlHandlerDeps, RcControlTransport, RcDialAnswer, RcDialTarget, RcEventDial, RcExchangeObserver, RcInjectDeps, RcInjectHeaders, RcInjectResult, RcObservedCredential, RcObservedRequest, RcSessionSummary, RcSessionTracker, RcSessionTrackerDeps, RecoverFarmParams, RecoveryResult, ResolveDecisionsInput, ResolvedState, ResyncFarmParams, ResyncFarmResult, RunCheckParams, RunDoctorParams, RunFrontDoorSupervisorOptions, RunSupervisorOptions, SupervisorPorts, UnreadableIdentityListEntry, UpdateDirectoryRuleOptions, UpdateProviderInput, UsageReadFs, UsageSnapshot, WhenCondition };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-shim",
3
- "version": "8.2.0",
3
+ "version": "8.3.0",
4
4
  "description": "A profile manager and launcher for Claude Code that lets one person run multiple logins from one machine while controlling what gets shared between them.",
5
5
  "license": "MIT",
6
6
  "author": "Joseph Mearman <joseph@mearman.co.uk>",