agent-shim 11.27.0 → 11.29.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.
@@ -276,6 +276,8 @@ declare const LaunchSchema: z.ZodObject<{
276
276
  headroom: z.ZodOptional<z.ZodBoolean>;
277
277
  trackUsage: z.ZodOptional<z.ZodBoolean>;
278
278
  claudeVersion: z.ZodOptional<z.ZodString>;
279
+ delay: z.ZodOptional<z.ZodString>;
280
+ pause: z.ZodOptional<z.ZodBoolean>;
279
281
  }, z.core.$strict>;
280
282
  type LaunchFlags = z.infer<typeof LaunchSchema>;
281
283
  /**
@@ -857,6 +859,8 @@ declare const ConfigProfileSchema: z.ZodObject<{
857
859
  headroom: z.ZodOptional<z.ZodBoolean>;
858
860
  trackUsage: z.ZodOptional<z.ZodBoolean>;
859
861
  claudeVersion: z.ZodOptional<z.ZodString>;
862
+ delay: z.ZodOptional<z.ZodString>;
863
+ pause: z.ZodOptional<z.ZodBoolean>;
860
864
  }, z.core.$strict>>;
861
865
  }, z.core.$strict>;
862
866
  type ConfigProfile = z.infer<typeof ConfigProfileSchema>;
@@ -1063,6 +1067,8 @@ declare const DirectoryRuleSchema: z.ZodObject<{
1063
1067
  headroom: z.ZodOptional<z.ZodBoolean>;
1064
1068
  trackUsage: z.ZodOptional<z.ZodBoolean>;
1065
1069
  claudeVersion: z.ZodOptional<z.ZodString>;
1070
+ delay: z.ZodOptional<z.ZodString>;
1071
+ pause: z.ZodOptional<z.ZodBoolean>;
1066
1072
  }, z.core.$strict>>;
1067
1073
  path: z.ZodString;
1068
1074
  configProfile: z.ZodOptional<z.ZodString>;
@@ -1242,6 +1248,8 @@ declare const DirectoryRulesSchema: z.ZodObject<{
1242
1248
  headroom: z.ZodOptional<z.ZodBoolean>;
1243
1249
  trackUsage: z.ZodOptional<z.ZodBoolean>;
1244
1250
  claudeVersion: z.ZodOptional<z.ZodString>;
1251
+ delay: z.ZodOptional<z.ZodString>;
1252
+ pause: z.ZodOptional<z.ZodBoolean>;
1245
1253
  }, z.core.$strict>>;
1246
1254
  path: z.ZodString;
1247
1255
  configProfile: z.ZodOptional<z.ZodString>;
@@ -1422,6 +1430,8 @@ declare const PortableConfigSchema: z.ZodObject<{
1422
1430
  headroom: z.ZodOptional<z.ZodBoolean>;
1423
1431
  trackUsage: z.ZodOptional<z.ZodBoolean>;
1424
1432
  claudeVersion: z.ZodOptional<z.ZodString>;
1433
+ delay: z.ZodOptional<z.ZodString>;
1434
+ pause: z.ZodOptional<z.ZodBoolean>;
1425
1435
  }, z.core.$strict>>;
1426
1436
  configProfile: z.ZodOptional<z.ZodString>;
1427
1437
  identity: z.ZodOptional<z.ZodString>;
@@ -1626,6 +1636,8 @@ declare const GlobalConfigSchema: z.ZodObject<{
1626
1636
  headroom: z.ZodOptional<z.ZodBoolean>;
1627
1637
  trackUsage: z.ZodOptional<z.ZodBoolean>;
1628
1638
  claudeVersion: z.ZodOptional<z.ZodString>;
1639
+ delay: z.ZodOptional<z.ZodString>;
1640
+ pause: z.ZodOptional<z.ZodBoolean>;
1629
1641
  }, z.core.$strict>>;
1630
1642
  headroom: z.ZodOptional<z.ZodObject<{
1631
1643
  source: z.ZodOptional<z.ZodString>;
@@ -2378,9 +2390,22 @@ interface ProcPort {
2378
2390
  readonly argv: readonly string[];
2379
2391
  readonly exit: (code: number) => never;
2380
2392
  }
2393
+ /** One fact the launcher reports about the launch it is about to start. */
2394
+ interface ReportRow {
2395
+ /** What the fact is about (`identity`, `routing`), in a column of its own. */
2396
+ readonly label: string;
2397
+ /** The fact itself. */
2398
+ readonly value: string;
2399
+ /** What qualifies the value, after it and dimmed: where it came from, or how it was reached. */
2400
+ readonly detail?: string;
2401
+ /** Further lines under the row, lined up under its value and dimmed. */
2402
+ readonly notes?: readonly string[];
2403
+ }
2381
2404
  /** Where the launcher reports what it decided and why — refusals, warnings about an identity that could not be loaded, and (per the "strictly-better than the legacy script" goal) which identity/profile ended up selected. */
2382
2405
  interface LogPort {
2383
2406
  readonly info: (message: string) => void;
2407
+ /** Prints the facts a launch reports about itself as one block, with the formatting the output takes. */
2408
+ readonly report: (rows: readonly ReportRow[]) => void;
2384
2409
  readonly warn: (message: string) => void;
2385
2410
  readonly error: (message: string) => void;
2386
2411
  }
@@ -5963,6 +5988,8 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
5963
5988
  headroom: zod.ZodOptional<zod.ZodBoolean>;
5964
5989
  trackUsage: zod.ZodOptional<zod.ZodBoolean>;
5965
5990
  claudeVersion: zod.ZodOptional<zod.ZodString>;
5991
+ delay: zod.ZodOptional<zod.ZodString>;
5992
+ pause: zod.ZodOptional<zod.ZodBoolean>;
5966
5993
  }, zod_v4_core.$strict>>;
5967
5994
  }, zod_v4_core.$strict>;
5968
5995
  }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
@@ -5979,6 +6006,8 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
5979
6006
  trackUsage: zod.ZodOptional<zod.ZodBoolean>;
5980
6007
  provider: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodLiteral<false>]>>;
5981
6008
  claudeVersion: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodLiteral<false>]>>;
6009
+ delay: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodLiteral<false>]>>;
6010
+ pause: zod.ZodOptional<zod.ZodBoolean>;
5982
6011
  }, zod_v4_core.$strict>>;
5983
6012
  }, zod_v4_core.$strict>, zod.ZodObject<{
5984
6013
  action: zod.ZodLiteral<"updated">;
@@ -6082,6 +6111,8 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
6082
6111
  headroom: zod.ZodOptional<zod.ZodBoolean>;
6083
6112
  trackUsage: zod.ZodOptional<zod.ZodBoolean>;
6084
6113
  claudeVersion: zod.ZodOptional<zod.ZodString>;
6114
+ delay: zod.ZodOptional<zod.ZodString>;
6115
+ pause: zod.ZodOptional<zod.ZodBoolean>;
6085
6116
  }, zod_v4_core.$strict>>;
6086
6117
  }, zod_v4_core.$strict>;
6087
6118
  }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
@@ -6682,6 +6713,8 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
6682
6713
  headroom: zod.ZodOptional<zod.ZodBoolean>;
6683
6714
  trackUsage: zod.ZodOptional<zod.ZodBoolean>;
6684
6715
  claudeVersion: zod.ZodOptional<zod.ZodString>;
6716
+ delay: zod.ZodOptional<zod.ZodString>;
6717
+ pause: zod.ZodOptional<zod.ZodBoolean>;
6685
6718
  }, zod_v4_core.$strict>>;
6686
6719
  path: zod.ZodString;
6687
6720
  configProfile: zod.ZodOptional<zod.ZodString>;
@@ -6866,6 +6899,8 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
6866
6899
  headroom: zod.ZodOptional<zod.ZodBoolean>;
6867
6900
  trackUsage: zod.ZodOptional<zod.ZodBoolean>;
6868
6901
  claudeVersion: zod.ZodOptional<zod.ZodString>;
6902
+ delay: zod.ZodOptional<zod.ZodString>;
6903
+ pause: zod.ZodOptional<zod.ZodBoolean>;
6869
6904
  }, zod_v4_core.$strict>>;
6870
6905
  path: zod.ZodString;
6871
6906
  configProfile: zod.ZodOptional<zod.ZodString>;
@@ -7195,6 +7230,10 @@ interface ResolvedLaunchFlags {
7195
7230
  readonly headroom: boolean;
7196
7231
  /** Whether the launch routes through the front door so its requests are recorded, even with no provider and no headroom. */
7197
7232
  readonly trackUsage: boolean;
7233
+ /** Whether the launcher waits for a key press after its own output before it starts claude. */
7234
+ readonly pause: boolean;
7235
+ /** How long the launcher waits after its own output before it starts claude, in milliseconds; zero for no wait. */
7236
+ readonly delayMs: number;
7198
7237
  }
7199
7238
 
7200
7239
  /** How a supervised launch names its conversation to claude: `start` begins one under the launch's id, `resume` continues the one with that id, `as-given` leaves the caller's own `--resume <id>` as written. */
@@ -7210,6 +7249,18 @@ interface SupervisedLaunch {
7210
7249
  readonly settings?: string;
7211
7250
  }
7212
7251
 
7252
+ /** The effects a hold needs, so it runs against fakes in tests. */
7253
+ interface HoldPort {
7254
+ /** Whether a person is watching: standard input and standard output are both terminals. A launch nobody watches is never held. */
7255
+ readonly attended: () => boolean;
7256
+ /** Blocks for `ms` milliseconds. */
7257
+ readonly sleep: (ms: number) => void;
7258
+ /** Blocks until one key is pressed, and says whether it was the interrupt key (Ctrl-C), which a terminal in the mode this reads in delivers as a byte and not as a signal. */
7259
+ readonly waitForKey: () => "key" | "interrupt";
7260
+ }
7261
+ /** What a hold decided: carry on with the launch, or the person cancelled it. */
7262
+ type HoldOutcome = "go" | "cancelled";
7263
+
7213
7264
  /**
7214
7265
  * Everything the launch-time update check needs from its host, injected so tests run it against scripted answers and no launch ever reaches GitHub by accident. Deliberately narrower than `UpdatePorts`: the launch path never downloads anything (the detached `agent-shim update` does), so only the release check, the cooldown stamp, the clock, the background spawn and the terminal are wired.
7215
7266
  */
@@ -7294,6 +7345,8 @@ interface PrepareLaunchParams {
7294
7345
  readonly supervised?: SupervisedLaunch;
7295
7346
  /** Wires the launch-time update check behind `update.mode`. Omitted by a caller that cannot resolve releases, re-invoke this binary, or write to the terminal; a mode of `notify` or `auto` with no port wired simply checks nothing. */
7296
7347
  readonly update?: UpdateLaunchPort;
7348
+ /** Waits for the person where the launch's `delay` and `pause` settings ask. Omitted by a caller that has no terminal to wait on, and then the launch is never held. */
7349
+ readonly hold?: HoldPort;
7297
7350
  /** Whether an identity has a stored login Claude Code can use (a Keychain item or a credentials file). Absent when the caller cannot ask, in which case a launch assumes it does. */
7298
7351
  readonly hasStoredLogin?: (identity: string) => boolean;
7299
7352
  }
@@ -7345,10 +7398,12 @@ interface LaunchPlan {
7345
7398
  readonly sessionId: string;
7346
7399
  /** Releases the daemon session registrations this launch holds. Call it when the child has exited; it is safe to call more than once. */
7347
7400
  readonly release: () => void;
7348
- /** What the launch resolved to, as data: the facts the launcher's decision line reports. */
7401
+ /** What the launch resolved to, as data: the facts the launcher's report states. */
7349
7402
  readonly decision: LaunchDecision;
7350
7403
  /** Marks the moment this plan's child is spawned: the launch-time update check suppresses its notify line from then on, since a line printed after the child took over the terminal would land mid-session. Call it immediately before spawning; it is safe to call more than once. */
7351
7404
  readonly markChildStarted: () => void;
7405
+ /** Holds the launch as its `delay` and `pause` settings say, once the launcher has printed everything it will: call it just before spawning the child. `cancelled` means the person pressed Ctrl-C at the pause, and the child must not start. A launch with no hold port, or nobody watching, goes at once. */
7406
+ readonly hold: () => HoldOutcome;
7352
7407
  }
7353
7408
  /**
7354
7409
  * Prepares one `claude` launch, in order:
@@ -7468,6 +7523,8 @@ declare function createLaunchApiRouter(deps: LaunchApiDeps): {
7468
7523
  remoteControl: zod.ZodBoolean;
7469
7524
  headroom: zod.ZodBoolean;
7470
7525
  trackUsage: zod.ZodBoolean;
7526
+ pause: zod.ZodBoolean;
7527
+ delayMs: zod.ZodNumber;
7471
7528
  }, zod_v4_core.$strict>;
7472
7529
  claudeVersion: zod.ZodOptional<zod.ZodObject<{
7473
7530
  version: zod.ZodString;
@@ -8584,6 +8641,8 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
8584
8641
  remoteControl: zod.ZodBoolean;
8585
8642
  headroom: zod.ZodBoolean;
8586
8643
  trackUsage: zod.ZodBoolean;
8644
+ pause: zod.ZodBoolean;
8645
+ delayMs: zod.ZodNumber;
8587
8646
  }, zod_v4_core.$strict>;
8588
8647
  claudeVersion: zod.ZodOptional<zod.ZodObject<{
8589
8648
  version: zod.ZodString;
@@ -8951,6 +9010,8 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
8951
9010
  headroom: zod.ZodOptional<zod.ZodBoolean>;
8952
9011
  trackUsage: zod.ZodOptional<zod.ZodBoolean>;
8953
9012
  claudeVersion: zod.ZodOptional<zod.ZodString>;
9013
+ delay: zod.ZodOptional<zod.ZodString>;
9014
+ pause: zod.ZodOptional<zod.ZodBoolean>;
8954
9015
  }, zod_v4_core.$strict>>;
8955
9016
  }, zod_v4_core.$strict>;
8956
9017
  }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
@@ -8967,6 +9028,8 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
8967
9028
  trackUsage: zod.ZodOptional<zod.ZodBoolean>;
8968
9029
  provider: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodLiteral<false>]>>;
8969
9030
  claudeVersion: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodLiteral<false>]>>;
9031
+ delay: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodLiteral<false>]>>;
9032
+ pause: zod.ZodOptional<zod.ZodBoolean>;
8970
9033
  }, zod_v4_core.$strict>>;
8971
9034
  }, zod_v4_core.$strict>, zod.ZodObject<{
8972
9035
  action: zod.ZodLiteral<"updated">;
@@ -9070,6 +9133,8 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
9070
9133
  headroom: zod.ZodOptional<zod.ZodBoolean>;
9071
9134
  trackUsage: zod.ZodOptional<zod.ZodBoolean>;
9072
9135
  claudeVersion: zod.ZodOptional<zod.ZodString>;
9136
+ delay: zod.ZodOptional<zod.ZodString>;
9137
+ pause: zod.ZodOptional<zod.ZodBoolean>;
9073
9138
  }, zod_v4_core.$strict>>;
9074
9139
  }, zod_v4_core.$strict>;
9075
9140
  }, zod_v4_core.$strict>, MergedErrorMap<$ErrorMap, TErrorMap>>;
@@ -9670,6 +9735,8 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
9670
9735
  headroom: zod.ZodOptional<zod.ZodBoolean>;
9671
9736
  trackUsage: zod.ZodOptional<zod.ZodBoolean>;
9672
9737
  claudeVersion: zod.ZodOptional<zod.ZodString>;
9738
+ delay: zod.ZodOptional<zod.ZodString>;
9739
+ pause: zod.ZodOptional<zod.ZodBoolean>;
9673
9740
  }, zod_v4_core.$strict>>;
9674
9741
  path: zod.ZodString;
9675
9742
  configProfile: zod.ZodOptional<zod.ZodString>;
@@ -9854,6 +9921,8 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
9854
9921
  headroom: zod.ZodOptional<zod.ZodBoolean>;
9855
9922
  trackUsage: zod.ZodOptional<zod.ZodBoolean>;
9856
9923
  claudeVersion: zod.ZodOptional<zod.ZodString>;
9924
+ delay: zod.ZodOptional<zod.ZodString>;
9925
+ pause: zod.ZodOptional<zod.ZodBoolean>;
9857
9926
  }, zod_v4_core.$strict>>;
9858
9927
  path: zod.ZodString;
9859
9928
  configProfile: zod.ZodOptional<zod.ZodString>;
@@ -11078,6 +11147,8 @@ declare const ConfigProfileAddOutputSchema: z.ZodObject<{
11078
11147
  headroom: z.ZodOptional<z.ZodBoolean>;
11079
11148
  trackUsage: z.ZodOptional<z.ZodBoolean>;
11080
11149
  claudeVersion: z.ZodOptional<z.ZodString>;
11150
+ delay: z.ZodOptional<z.ZodString>;
11151
+ pause: z.ZodOptional<z.ZodBoolean>;
11081
11152
  }, z.core.$strict>>;
11082
11153
  }, z.core.$strict>;
11083
11154
  }, z.core.$strict>;
@@ -11095,6 +11166,8 @@ declare const ConfigProfileSetInputSchema: z.ZodObject<{
11095
11166
  trackUsage: z.ZodOptional<z.ZodBoolean>;
11096
11167
  provider: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
11097
11168
  claudeVersion: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
11169
+ delay: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
11170
+ pause: z.ZodOptional<z.ZodBoolean>;
11098
11171
  }, z.core.$strict>>;
11099
11172
  }, z.core.$strict>;
11100
11173
  declare const ConfigProfileSetOutputSchema: z.ZodObject<{
@@ -11199,6 +11272,8 @@ declare const ConfigProfileSetOutputSchema: z.ZodObject<{
11199
11272
  headroom: z.ZodOptional<z.ZodBoolean>;
11200
11273
  trackUsage: z.ZodOptional<z.ZodBoolean>;
11201
11274
  claudeVersion: z.ZodOptional<z.ZodString>;
11275
+ delay: z.ZodOptional<z.ZodString>;
11276
+ pause: z.ZodOptional<z.ZodBoolean>;
11202
11277
  }, z.core.$strict>>;
11203
11278
  }, z.core.$strict>;
11204
11279
  }, z.core.$strict>;
@@ -11801,6 +11876,8 @@ declare const ConfigRuleAddOutputSchema: z.ZodObject<{
11801
11876
  headroom: z.ZodOptional<z.ZodBoolean>;
11802
11877
  trackUsage: z.ZodOptional<z.ZodBoolean>;
11803
11878
  claudeVersion: z.ZodOptional<z.ZodString>;
11879
+ delay: z.ZodOptional<z.ZodString>;
11880
+ pause: z.ZodOptional<z.ZodBoolean>;
11804
11881
  }, z.core.$strict>>;
11805
11882
  path: z.ZodString;
11806
11883
  configProfile: z.ZodOptional<z.ZodString>;
@@ -11987,6 +12064,8 @@ declare const ConfigRuleSetOutputSchema: z.ZodObject<{
11987
12064
  headroom: z.ZodOptional<z.ZodBoolean>;
11988
12065
  trackUsage: z.ZodOptional<z.ZodBoolean>;
11989
12066
  claudeVersion: z.ZodOptional<z.ZodString>;
12067
+ delay: z.ZodOptional<z.ZodString>;
12068
+ pause: z.ZodOptional<z.ZodBoolean>;
11990
12069
  }, z.core.$strict>>;
11991
12070
  path: z.ZodString;
11992
12071
  configProfile: z.ZodOptional<z.ZodString>;
@@ -12473,6 +12552,8 @@ declare const LaunchResolveOutputSchema: z.ZodObject<{
12473
12552
  remoteControl: z.ZodBoolean;
12474
12553
  headroom: z.ZodBoolean;
12475
12554
  trackUsage: z.ZodBoolean;
12555
+ pause: z.ZodBoolean;
12556
+ delayMs: z.ZodNumber;
12476
12557
  }, z.core.$strict>;
12477
12558
  claudeVersion: z.ZodOptional<z.ZodObject<{
12478
12559
  version: z.ZodString;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-shim",
3
- "version": "11.27.0",
3
+ "version": "11.29.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>",