agent-shim 8.6.0 → 8.7.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.
@@ -2497,6 +2497,24 @@ interface CredentialCachePort {
2497
2497
  readonly write: (store: CredentialCacheStore, owner: string, entry: CachedCredential) => void;
2498
2498
  readonly remove: (store: CredentialCacheStore, owner: string) => void;
2499
2499
  }
2500
+ /**
2501
+ * What the cache holds for one credential, without the token: whether there is an entry, how old it is, and whether it is still within the block's TTL. `expiresInMs` is absent for a block with no expiry.
2502
+ */
2503
+ type CachedCredentialState = {
2504
+ readonly store: CredentialCacheStore;
2505
+ readonly status: "empty";
2506
+ }
2507
+ /** The store cannot be read here (the keychain store configured on a platform without a Keychain): reported with its reason rather than failing the whole report. */
2508
+ | {
2509
+ readonly store: CredentialCacheStore;
2510
+ readonly status: "unreadable";
2511
+ readonly reason: string;
2512
+ } | {
2513
+ readonly store: CredentialCacheStore;
2514
+ readonly status: "fresh" | "expired";
2515
+ readonly ageMs: number;
2516
+ readonly expiresInMs?: number;
2517
+ };
2500
2518
 
2501
2519
  /** What reading one `file` source found: nothing at that path, or its contents and permission bits. `mode` is undefined on a platform with no POSIX permission bits (Windows), where the looseness check cannot apply. */
2502
2520
  type SecretFileRead = {
@@ -2850,8 +2868,11 @@ interface CredentialReport {
2850
2868
  readonly name: string;
2851
2869
  readonly credential?: CredentialSummary;
2852
2870
  readonly problem?: string;
2871
+ readonly cached?: CachedCredentialState;
2853
2872
  };
2854
2873
  readonly identity?: CredentialSummary;
2874
+ /** What the identity's own credential cache holds, when its block caches and the cache could be read. */
2875
+ readonly identityCached?: CachedCredentialState;
2855
2876
  }
2856
2877
  /** Inputs to `runCheck` — everything already loaded/injected, exactly like the resolver core and the launcher: nothing in this function touches a real filesystem, git repository, clock, or environment itself. */
2857
2878
  interface RunCheckParams {
@@ -2887,6 +2908,8 @@ interface RunCheckParams {
2887
2908
  readonly platform: string;
2888
2909
  /** The provider a launch here would route through (`launch.provider` in the cascade), when one is selected. */
2889
2910
  readonly provider?: CheckProviderInput;
2911
+ /** Where cached credentials live. Omit to skip reporting a credential cache's age; with it, a block that caches reports whether it holds an entry, how old it is and whether it has expired, never the token. */
2912
+ readonly credentialCache?: CredentialCacheEnv;
2890
2913
  }
2891
2914
  /** Everything `agent-shim check` reports about one directory/identity, without touching the farm or spawning anything. */
2892
2915
  interface CheckReport {
@@ -3021,6 +3044,8 @@ interface DoctorPathResolution {
3021
3044
  /** Everything `runDoctor` needs, all of it already loaded/injected — nothing in `runDoctor` itself reads a file, shells out, or touches the farm. */
3022
3045
  interface RunDoctorParams {
3023
3046
  readonly env: Readonly<Record<string, string | undefined>>;
3047
+ /** Where cached credentials live. Omit to leave a credential cache's age out of the identity and provider findings; with it, a block that caches reports whether it holds an entry, how old it is and whether it has expired, never the token. */
3048
+ readonly credentialCache?: CredentialCacheEnv;
3024
3049
  readonly identities: readonly DoctorIdentityInput[];
3025
3050
  readonly configProfiles: readonly DoctorConfigProfileInput[];
3026
3051
  readonly providers: readonly DoctorProviderInput[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-shim",
3
- "version": "8.6.0",
3
+ "version": "8.7.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>",