@ai-dossier/worktree-pool 0.4.0 → 0.5.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/types.d.ts CHANGED
@@ -1,4 +1,31 @@
1
1
  export type WorktreeStatus = 'creating' | 'warming' | 'warm' | 'assigned' | 'recycling' | 'destroying';
2
+ /** Supported JavaScript package managers. */
3
+ export type PackageManager = 'pnpm' | 'yarn' | 'bun' | 'npm';
4
+ /** Package-manager-specific facts about a project directory. */
5
+ export interface ProjectEnv {
6
+ /** Detected package manager. */
7
+ pm: PackageManager;
8
+ /** Lockfile name (the one found on disk, or the canonical one for `pm`). */
9
+ lockfile: string;
10
+ /** Install command, as argv. */
11
+ installCmd: string[];
12
+ /** Build command as argv, or `null` when the project defines no build script. */
13
+ buildCmd: string[] | null;
14
+ }
15
+ /**
16
+ * Contents of `.worktree-pool.json` at the repo root. All fields are optional
17
+ * in the file; `base_ref` is defaulted on read.
18
+ */
19
+ export interface PoolFileConfig {
20
+ /** Absolute path to the directory holding pool worktrees. */
21
+ pool_dir?: string;
22
+ /** Package root relative to the worktree root, for nested monorepos. */
23
+ project_subdir?: string;
24
+ /** Explicit warm-up commands (argv arrays). Wins over auto-detection. */
25
+ warm_commands?: string[][];
26
+ /** Git ref that pool worktrees are created from and reset to. */
27
+ base_ref: string;
28
+ }
2
29
  export interface PoolConfig {
3
30
  target_spares: number;
4
31
  max_pool_size: number;
@@ -20,6 +47,7 @@ export interface PoolState {
20
47
  worktrees: PoolWorktree[];
21
48
  }
22
49
  export declare const DEFAULT_CONFIG: PoolConfig;
50
+ export declare const DEFAULT_BASE_REF = "origin/main";
23
51
  export declare const SCHEMA_VERSION: "1.0.0";
24
52
  export declare function generateId(): string;
25
53
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GACtB,UAA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,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,yEAAyE;IACzE,aAAa,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC;IAC3B,iEAAiE;IACjE,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,UAAU;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,cAAc,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,MAAM,WAAW,SAAS;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,MAAM,EAAE,UAAU,CAAC;IACnB,SAAS,EAAE,YAAY,EAAE,CAAC;CAC3B;AAED,eAAO,MAAM,cAAc,EAAE,UAI5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,gBAAgB,CAAC;AAE9C,eAAO,MAAM,cAAc,EAAG,OAAgB,CAAC;AAE/C,wBAAgB,UAAU,IAAI,MAAM,CAEnC"}
package/dist/types.js CHANGED
@@ -1,12 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SCHEMA_VERSION = exports.DEFAULT_CONFIG = void 0;
3
+ exports.SCHEMA_VERSION = exports.DEFAULT_BASE_REF = exports.DEFAULT_CONFIG = void 0;
4
4
  exports.generateId = generateId;
5
5
  exports.DEFAULT_CONFIG = {
6
6
  target_spares: 5,
7
7
  max_pool_size: 10,
8
8
  stale_after_hours: 72,
9
9
  };
10
+ exports.DEFAULT_BASE_REF = 'origin/main';
10
11
  exports.SCHEMA_VERSION = '1.0.0';
11
12
  function generateId() {
12
13
  return `pool-${Date.now()}-${process.pid}`;
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAuCA,gCAEC;AAVY,QAAA,cAAc,GAAe;IACxC,aAAa,EAAE,CAAC;IAChB,aAAa,EAAE,EAAE;IACjB,iBAAiB,EAAE,EAAE;CACtB,CAAC;AAEW,QAAA,cAAc,GAAG,OAAgB,CAAC;AAE/C,SAAgB,UAAU;IACxB,OAAO,QAAQ,IAAI,CAAC,GAAG,EAAE,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;AAC7C,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAuEA,gCAEC;AAZY,QAAA,cAAc,GAAe;IACxC,aAAa,EAAE,CAAC;IAChB,aAAa,EAAE,EAAE;IACjB,iBAAiB,EAAE,EAAE;CACtB,CAAC;AAEW,QAAA,gBAAgB,GAAG,aAAa,CAAC;AAEjC,QAAA,cAAc,GAAG,OAAgB,CAAC;AAE/C,SAAgB,UAAU;IACxB,OAAO,QAAQ,IAAI,CAAC,GAAG,EAAE,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;AAC7C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-dossier/worktree-pool",
3
- "version": "0.4.0",
3
+ "version": "0.5.1",
4
4
  "description": "Pre-warmed git worktree pool for instant issue setup",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",