claude-use 9.14.0 → 9.15.1

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.cjs CHANGED
@@ -236,7 +236,7 @@ function isTimeZone(name) {
236
236
  return false;
237
237
  }
238
238
  }
239
- var import_node_path2, import_zod, import_trilean, CATEGORY_NAMES, OVERRIDABLE_CATEGORIES, CategoryMapSchema, DURATION_RE, DurationSchema, WhenConditionObjectSchema, WhenSchema, EntryValueSchema, ENTRY_KEY_RE, EntriesSchema, LaunchSchema, CREDENTIAL_TARGETS, PROVIDER_CREDENTIAL_TARGETS, CREDENTIAL_TARGET_VARS, ArgvSchema, CommandSourceOptions, EnvCredentialSourceSchema, FileCredentialSourceSchema, CommandCredentialSourceSchema, OpCredentialSourceSchema, KeychainCredentialSourceSchema, LiteralCredentialSourceSchema, CredentialSourceSchema, RemoteCredentialSourceSchema, CREDENTIAL_CACHE_STORES, CredentialCacheSchema, CredentialSchema, ProviderCredentialSchema, RESERVED_PROVIDER_ENV_KEYS, ProviderEnvSchema, PROVIDER_KINDS, CODEX_EFFORTS, CODEX_LOGINS, CODEX_DEFAULT_TIER_MODELS, CodexProviderConfigSchema, ProviderRouteSchema, HttpProviderSchema, CodexProviderSchema, ProviderSchema, ConfigProfileSchema, POOL_SELECTOR_PREFIX, POOL_NAME_PATTERN, IDENTITY_NAME_PATTERN, PoolNameSchema, SELECTOR_RE, IdentitySelectorSchema, PoolMemberSchema, POOL_PREFERENCES, PoolPreferenceSchema, PoolSchema, DirectoryRuleSchema, DirectoryRulesSchema, PortableConfigSchema, HEADROOM_MODES, HEADROOM_CCR_MODES, HEADROOM_ROLLOUT_CHANNELS, INTERCEPT_CHANNELS, READ_MATURATION_CHANNELS, HeadroomGlobalConfigObjectSchema, HeadroomGlobalConfigSchema, HEADROOM_DEFAULT_SOURCE, HEADROOM_DEFAULT_IDLE_SHUTDOWN_MINUTES, FrontDoorGlobalConfigSchema, UPDATE_MODES, UpdateGlobalConfigSchema, GlobalConfigSchema, WEEKDAYS, AnchorSchema, IdentitySchema, CategoryClassificationSchema, CategoryClassificationOverlaySchema, SHIPPED_CATEGORY_DEFAULTS;
239
+ var import_node_path2, import_zod, import_trilean, CATEGORY_NAMES, OVERRIDABLE_CATEGORIES, CategoryMapSchema, DURATION_RE, DurationSchema, WhenConditionObjectSchema, WhenSchema, EntryValueSchema, ENTRY_KEY_RE, EntriesSchema, LaunchSchema, CREDENTIAL_TARGETS, PROVIDER_CREDENTIAL_TARGETS, CREDENTIAL_TARGET_VARS, ArgvSchema, CommandSourceOptions, EnvCredentialSourceSchema, FileCredentialSourceSchema, CommandCredentialSourceSchema, OpCredentialSourceSchema, KeychainCredentialSourceSchema, LiteralCredentialSourceSchema, CredentialSourceSchema, RemoteCredentialSourceSchema, CREDENTIAL_CACHE_STORES, CredentialCacheSchema, CredentialSchema, ProviderCredentialSchema, RESERVED_PROVIDER_ENV_KEYS, ProviderEnvSchema, PROVIDER_KINDS, CODEX_EFFORTS, CODEX_LOGINS, CODEX_DEFAULT_TIER_MODELS, CodexProviderConfigSchema, ProviderRouteSchema, HttpProviderSchema, CodexProviderSchema, ProviderSchema, ConfigProfileSchema, POOL_SELECTOR_PREFIX, POOL_NAME_PATTERN, IDENTITY_NAME_PATTERN, PoolNameSchema, SELECTOR_RE, IdentitySelectorSchema, PoolMemberSchema, POOL_PREFERENCES, PoolPreferenceSchema, PoolSchema, WEEKDAYS, AnchorSchema, JOB_WINDOWS, JobTriggerSchema, JobTargetSchema, JobSchema, DirectoryRuleSchema, DirectoryRulesSchema, PortableConfigSchema, HEADROOM_MODES, HEADROOM_CCR_MODES, HEADROOM_ROLLOUT_CHANNELS, INTERCEPT_CHANNELS, READ_MATURATION_CHANNELS, HeadroomGlobalConfigObjectSchema, HeadroomGlobalConfigSchema, HEADROOM_DEFAULT_SOURCE, HEADROOM_DEFAULT_IDLE_SHUTDOWN_MINUTES, FrontDoorGlobalConfigSchema, UPDATE_MODES, UpdateGlobalConfigSchema, GlobalConfigSchema, IdentitySchema, CategoryClassificationSchema, CategoryClassificationOverlaySchema, SHIPPED_CATEGORY_DEFAULTS;
240
240
  var init_schema = __esm({
241
241
  "src/config/schema.ts"() {
242
242
  "use strict";
@@ -407,6 +407,25 @@ var init_schema = __esm({
407
407
  identities: import_zod.z.array(PoolMemberSchema).min(1).refine((members) => new Set(members.map(poolMemberIdentity)).size === members.length, { message: "pool members must be unique" }),
408
408
  preference: PoolPreferenceSchema.optional()
409
409
  });
410
+ WEEKDAYS = ["mon", "tue", "wed", "thu", "fri", "sat", "sun"];
411
+ AnchorSchema = import_zod.z.strictObject({
412
+ days: import_zod.z.array(import_zod.z.enum(WEEKDAYS)).min(1).refine((days) => new Set(days).size === days.length, "an anchor names each weekday at most once"),
413
+ time: import_zod.z.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/, "a 24-hour time such as 06:00"),
414
+ timeZone: import_zod.z.string().refine(isTimeZone, "an IANA time zone such as Europe/London").optional()
415
+ });
416
+ JOB_WINDOWS = ["fiveHour", "sevenDay"];
417
+ JobTriggerSchema = import_zod.z.union([import_zod.z.strictObject({ at: import_zod.z.array(AnchorSchema).min(1) }), import_zod.z.strictObject({ beforeReset: import_zod.z.enum(JOB_WINDOWS), lead: import_zod.z.string().regex(DURATION_RE) })]);
418
+ JobTargetSchema = import_zod.z.union([import_zod.z.strictObject({ identity: IdentitySelectorSchema }), import_zod.z.strictObject({ pool: PoolNameSchema })]);
419
+ JobSchema = import_zod.z.strictObject({
420
+ target: JobTargetSchema,
421
+ trigger: JobTriggerSchema,
422
+ prompt: import_zod.z.string().min(1),
423
+ /** The absolute directory the run works in. */
424
+ cwd: import_zod.z.string().min(1),
425
+ timeout: import_zod.z.string().regex(DURATION_RE),
426
+ model: import_zod.z.string().min(1).optional(),
427
+ allowedTools: import_zod.z.array(import_zod.z.string().min(1)).min(1).optional()
428
+ });
410
429
  DirectoryRuleSchema = ConfigProfileSchema.omit({ description: true }).extend({
411
430
  path: import_zod.z.string().min(1),
412
431
  configProfile: import_zod.z.string().min(1).optional(),
@@ -474,13 +493,8 @@ var init_schema = __esm({
474
493
  headroom: HeadroomGlobalConfigSchema.optional(),
475
494
  frontdoor: FrontDoorGlobalConfigSchema.optional(),
476
495
  update: UpdateGlobalConfigSchema.optional(),
477
- pools: import_zod.z.record(PoolNameSchema, PoolSchema).optional()
478
- });
479
- WEEKDAYS = ["mon", "tue", "wed", "thu", "fri", "sat", "sun"];
480
- AnchorSchema = import_zod.z.strictObject({
481
- days: import_zod.z.array(import_zod.z.enum(WEEKDAYS)).min(1).refine((days) => new Set(days).size === days.length, "an anchor names each weekday at most once"),
482
- time: import_zod.z.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/, "a 24-hour time such as 06:00"),
483
- timeZone: import_zod.z.string().refine(isTimeZone, "an IANA time zone such as Europe/London").optional()
496
+ pools: import_zod.z.record(PoolNameSchema, PoolSchema).optional(),
497
+ jobs: import_zod.z.record(PoolNameSchema, JobSchema).optional()
484
498
  });
485
499
  IdentitySchema = import_zod.z.strictObject({
486
500
  $schema: import_zod.z.string().optional(),
@@ -2679,7 +2693,7 @@ var init_package = __esm({
2679
2693
  "package.json"() {
2680
2694
  package_default = {
2681
2695
  name: "claude-use",
2682
- version: "9.14.0",
2696
+ version: "9.15.1",
2683
2697
  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.",
2684
2698
  license: "MIT",
2685
2699
  author: "Joseph Mearman <joseph@mearman.co.uk>",
@@ -5324,6 +5338,8 @@ function buildLayoutPaths(root) {
5324
5338
  usageSnapshotsDir: import_node_path22.default.join(root, "usage", "snapshots"),
5325
5339
  usagePicksFile: import_node_path22.default.join(root, "usage", "picks.json"),
5326
5340
  usageAnchorsFile: import_node_path22.default.join(root, "usage", "anchors.json"),
5341
+ usageJobsFile: import_node_path22.default.join(root, "usage", "jobs.json"),
5342
+ jobLogsDir: import_node_path22.default.join(root, "logs", "jobs"),
5327
5343
  mcpPermissionsFile: import_node_path22.default.join(root, "mcp", "permissions.json")
5328
5344
  };
5329
5345
  }
package/dist/index.mjs CHANGED
@@ -217,7 +217,7 @@ function isTimeZone(name) {
217
217
  return false;
218
218
  }
219
219
  }
220
- var CATEGORY_NAMES, OVERRIDABLE_CATEGORIES, CategoryMapSchema, DURATION_RE, DurationSchema, WhenConditionObjectSchema, WhenSchema, EntryValueSchema, ENTRY_KEY_RE, EntriesSchema, LaunchSchema, CREDENTIAL_TARGETS, PROVIDER_CREDENTIAL_TARGETS, CREDENTIAL_TARGET_VARS, ArgvSchema, CommandSourceOptions, EnvCredentialSourceSchema, FileCredentialSourceSchema, CommandCredentialSourceSchema, OpCredentialSourceSchema, KeychainCredentialSourceSchema, LiteralCredentialSourceSchema, CredentialSourceSchema, RemoteCredentialSourceSchema, CREDENTIAL_CACHE_STORES, CredentialCacheSchema, CredentialSchema, ProviderCredentialSchema, RESERVED_PROVIDER_ENV_KEYS, ProviderEnvSchema, PROVIDER_KINDS, CODEX_EFFORTS, CODEX_LOGINS, CODEX_DEFAULT_TIER_MODELS, CodexProviderConfigSchema, ProviderRouteSchema, HttpProviderSchema, CodexProviderSchema, ProviderSchema, ConfigProfileSchema, POOL_SELECTOR_PREFIX, POOL_NAME_PATTERN, IDENTITY_NAME_PATTERN, PoolNameSchema, SELECTOR_RE, IdentitySelectorSchema, PoolMemberSchema, POOL_PREFERENCES, PoolPreferenceSchema, PoolSchema, DirectoryRuleSchema, DirectoryRulesSchema, PortableConfigSchema, HEADROOM_MODES, HEADROOM_CCR_MODES, HEADROOM_ROLLOUT_CHANNELS, INTERCEPT_CHANNELS, READ_MATURATION_CHANNELS, HeadroomGlobalConfigObjectSchema, HeadroomGlobalConfigSchema, HEADROOM_DEFAULT_SOURCE, HEADROOM_DEFAULT_IDLE_SHUTDOWN_MINUTES, FrontDoorGlobalConfigSchema, UPDATE_MODES, UpdateGlobalConfigSchema, GlobalConfigSchema, WEEKDAYS, AnchorSchema, IdentitySchema, CategoryClassificationSchema, CategoryClassificationOverlaySchema, SHIPPED_CATEGORY_DEFAULTS;
220
+ var CATEGORY_NAMES, OVERRIDABLE_CATEGORIES, CategoryMapSchema, DURATION_RE, DurationSchema, WhenConditionObjectSchema, WhenSchema, EntryValueSchema, ENTRY_KEY_RE, EntriesSchema, LaunchSchema, CREDENTIAL_TARGETS, PROVIDER_CREDENTIAL_TARGETS, CREDENTIAL_TARGET_VARS, ArgvSchema, CommandSourceOptions, EnvCredentialSourceSchema, FileCredentialSourceSchema, CommandCredentialSourceSchema, OpCredentialSourceSchema, KeychainCredentialSourceSchema, LiteralCredentialSourceSchema, CredentialSourceSchema, RemoteCredentialSourceSchema, CREDENTIAL_CACHE_STORES, CredentialCacheSchema, CredentialSchema, ProviderCredentialSchema, RESERVED_PROVIDER_ENV_KEYS, ProviderEnvSchema, PROVIDER_KINDS, CODEX_EFFORTS, CODEX_LOGINS, CODEX_DEFAULT_TIER_MODELS, CodexProviderConfigSchema, ProviderRouteSchema, HttpProviderSchema, CodexProviderSchema, ProviderSchema, ConfigProfileSchema, POOL_SELECTOR_PREFIX, POOL_NAME_PATTERN, IDENTITY_NAME_PATTERN, PoolNameSchema, SELECTOR_RE, IdentitySelectorSchema, PoolMemberSchema, POOL_PREFERENCES, PoolPreferenceSchema, PoolSchema, WEEKDAYS, AnchorSchema, JOB_WINDOWS, JobTriggerSchema, JobTargetSchema, JobSchema, DirectoryRuleSchema, DirectoryRulesSchema, PortableConfigSchema, HEADROOM_MODES, HEADROOM_CCR_MODES, HEADROOM_ROLLOUT_CHANNELS, INTERCEPT_CHANNELS, READ_MATURATION_CHANNELS, HeadroomGlobalConfigObjectSchema, HeadroomGlobalConfigSchema, HEADROOM_DEFAULT_SOURCE, HEADROOM_DEFAULT_IDLE_SHUTDOWN_MINUTES, FrontDoorGlobalConfigSchema, UPDATE_MODES, UpdateGlobalConfigSchema, GlobalConfigSchema, IdentitySchema, CategoryClassificationSchema, CategoryClassificationOverlaySchema, SHIPPED_CATEGORY_DEFAULTS;
221
221
  var init_schema = __esm({
222
222
  "src/config/schema.ts"() {
223
223
  "use strict";
@@ -385,6 +385,25 @@ var init_schema = __esm({
385
385
  identities: z.array(PoolMemberSchema).min(1).refine((members) => new Set(members.map(poolMemberIdentity)).size === members.length, { message: "pool members must be unique" }),
386
386
  preference: PoolPreferenceSchema.optional()
387
387
  });
388
+ WEEKDAYS = ["mon", "tue", "wed", "thu", "fri", "sat", "sun"];
389
+ AnchorSchema = z.strictObject({
390
+ days: z.array(z.enum(WEEKDAYS)).min(1).refine((days) => new Set(days).size === days.length, "an anchor names each weekday at most once"),
391
+ time: z.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/, "a 24-hour time such as 06:00"),
392
+ timeZone: z.string().refine(isTimeZone, "an IANA time zone such as Europe/London").optional()
393
+ });
394
+ JOB_WINDOWS = ["fiveHour", "sevenDay"];
395
+ JobTriggerSchema = z.union([z.strictObject({ at: z.array(AnchorSchema).min(1) }), z.strictObject({ beforeReset: z.enum(JOB_WINDOWS), lead: z.string().regex(DURATION_RE) })]);
396
+ JobTargetSchema = z.union([z.strictObject({ identity: IdentitySelectorSchema }), z.strictObject({ pool: PoolNameSchema })]);
397
+ JobSchema = z.strictObject({
398
+ target: JobTargetSchema,
399
+ trigger: JobTriggerSchema,
400
+ prompt: z.string().min(1),
401
+ /** The absolute directory the run works in. */
402
+ cwd: z.string().min(1),
403
+ timeout: z.string().regex(DURATION_RE),
404
+ model: z.string().min(1).optional(),
405
+ allowedTools: z.array(z.string().min(1)).min(1).optional()
406
+ });
388
407
  DirectoryRuleSchema = ConfigProfileSchema.omit({ description: true }).extend({
389
408
  path: z.string().min(1),
390
409
  configProfile: z.string().min(1).optional(),
@@ -452,13 +471,8 @@ var init_schema = __esm({
452
471
  headroom: HeadroomGlobalConfigSchema.optional(),
453
472
  frontdoor: FrontDoorGlobalConfigSchema.optional(),
454
473
  update: UpdateGlobalConfigSchema.optional(),
455
- pools: z.record(PoolNameSchema, PoolSchema).optional()
456
- });
457
- WEEKDAYS = ["mon", "tue", "wed", "thu", "fri", "sat", "sun"];
458
- AnchorSchema = z.strictObject({
459
- days: z.array(z.enum(WEEKDAYS)).min(1).refine((days) => new Set(days).size === days.length, "an anchor names each weekday at most once"),
460
- time: z.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/, "a 24-hour time such as 06:00"),
461
- timeZone: z.string().refine(isTimeZone, "an IANA time zone such as Europe/London").optional()
474
+ pools: z.record(PoolNameSchema, PoolSchema).optional(),
475
+ jobs: z.record(PoolNameSchema, JobSchema).optional()
462
476
  });
463
477
  IdentitySchema = z.strictObject({
464
478
  $schema: z.string().optional(),
@@ -2655,7 +2669,7 @@ var init_package = __esm({
2655
2669
  "package.json"() {
2656
2670
  package_default = {
2657
2671
  name: "claude-use",
2658
- version: "9.14.0",
2672
+ version: "9.15.1",
2659
2673
  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.",
2660
2674
  license: "MIT",
2661
2675
  author: "Joseph Mearman <joseph@mearman.co.uk>",
@@ -5301,6 +5315,8 @@ function buildLayoutPaths(root) {
5301
5315
  usageSnapshotsDir: path22.join(root, "usage", "snapshots"),
5302
5316
  usagePicksFile: path22.join(root, "usage", "picks.json"),
5303
5317
  usageAnchorsFile: path22.join(root, "usage", "anchors.json"),
5318
+ usageJobsFile: path22.join(root, "usage", "jobs.json"),
5319
+ jobLogsDir: path22.join(root, "logs", "jobs"),
5304
5320
  mcpPermissionsFile: path22.join(root, "mcp", "permissions.json")
5305
5321
  };
5306
5322
  }
@@ -1562,6 +1562,39 @@ declare const GlobalConfigSchema: z.ZodObject<{
1562
1562
  listed: "listed";
1563
1563
  }>>;
1564
1564
  }, z.core.$strict>>>;
1565
+ jobs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1566
+ target: z.ZodUnion<readonly [z.ZodObject<{
1567
+ identity: z.ZodString;
1568
+ }, z.core.$strict>, z.ZodObject<{
1569
+ pool: z.ZodString;
1570
+ }, z.core.$strict>]>;
1571
+ trigger: z.ZodUnion<readonly [z.ZodObject<{
1572
+ at: z.ZodArray<z.ZodObject<{
1573
+ days: z.ZodArray<z.ZodEnum<{
1574
+ mon: "mon";
1575
+ tue: "tue";
1576
+ wed: "wed";
1577
+ thu: "thu";
1578
+ fri: "fri";
1579
+ sat: "sat";
1580
+ sun: "sun";
1581
+ }>>;
1582
+ time: z.ZodString;
1583
+ timeZone: z.ZodOptional<z.ZodString>;
1584
+ }, z.core.$strict>>;
1585
+ }, z.core.$strict>, z.ZodObject<{
1586
+ beforeReset: z.ZodEnum<{
1587
+ fiveHour: "fiveHour";
1588
+ sevenDay: "sevenDay";
1589
+ }>;
1590
+ lead: z.ZodString;
1591
+ }, z.core.$strict>]>;
1592
+ prompt: z.ZodString;
1593
+ cwd: z.ZodString;
1594
+ timeout: z.ZodString;
1595
+ model: z.ZodOptional<z.ZodString>;
1596
+ allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1597
+ }, z.core.$strict>>>;
1565
1598
  }, z.core.$strict>;
1566
1599
  type GlobalConfig = z.infer<typeof GlobalConfigSchema>;
1567
1600
  /**
@@ -1726,6 +1759,10 @@ interface LayoutPaths {
1726
1759
  readonly usagePicksFile: string;
1727
1760
  /** The last anchor the front door's window keeper handled for each identity, so a restart neither replays an anchor nor skips one. */
1728
1761
  readonly usageAnchorsFile: string;
1762
+ /** The last trigger instance the front door's job keeper handled for each job, so a restart neither repeats nor skips a run. */
1763
+ readonly usageJobsFile: string;
1764
+ /** Directory of one append-only `<job>.log` per job: the result of each unattended run. */
1765
+ readonly jobLogsDir: string;
1729
1766
  }
1730
1767
  /**
1731
1768
  * Resolves the state root: `AGENT_SHIM_HOME` when set to a non-empty string (an empty string counts as unset, consistent with how this project treats empty-string environment variables elsewhere, see the ambient-credential guard), otherwise `~/.agent-shim`, or the former `~/.claude-use` when only that exists.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-use",
3
- "version": "9.14.0",
3
+ "version": "9.15.1",
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>",