@vaubaan/harness 1.3.2 → 2.0.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.
package/dist/init.d.ts CHANGED
@@ -1,42 +1,51 @@
1
- import { E as Engine, c as RenderOutput, d as RenderedFile } from './render-B9_kNtQc.js';
1
+ import { E as Engine, c as RenderOutput, d as RenderedFile } from './render-C-FWmUfX.js';
2
2
  import './parser/index.js';
3
3
  import 'zod';
4
4
 
5
+ interface RenderPlanArgs {
6
+ targetDir: string;
7
+ engines: ReadonlyArray<string>;
8
+ overridesDir?: string;
9
+ packageDir?: string;
10
+ }
11
+ declare function planInit(args: RenderPlanArgs): {
12
+ engines: Engine[];
13
+ output: RenderOutput;
14
+ };
15
+
5
16
  interface InitArgs {
6
17
  targetDir: string;
7
- engines?: ReadonlyArray<string>;
18
+ /** Engines to render for. Mandatory: nothing is rendered for a tool the project does not use. */
19
+ engines: ReadonlyArray<string>;
8
20
  overridesDir?: string;
9
21
  /**
10
- * Directory containing the harness content (agents/, skills/, commands/,
22
+ * Directory containing the harness content (skills/, commands/,
11
23
  * templates/). Defaults to the harness package's own `dist/` (resolved
12
24
  * via `import.meta.url`), so programmatic callers usually omit it.
13
25
  */
14
26
  packageDir?: string;
15
- mcpServers?: ReadonlyArray<string>;
16
- /**
17
- * Stop-hook installation. Default `true`. When enabled, each engine
18
- * receives a hook config that calls `vaubaan-harness stop-hook
19
- * --engine <engine>` and injects the lint report (with skill
20
- * suggestions) into the running session whenever the worktree is
21
- * dirty and lint fails at end-of-turn. Pass `false` to skip the
22
- * hook configs entirely (runtime kill-switch remains available via
23
- * `HARNESS_LINT_DISABLE=1`).
24
- */
25
- withStopHook?: boolean;
27
+ /** Generated files to leave to the project instead of rendering them. */
28
+ preserveFiles?: ReadonlyArray<string>;
29
+ /** Exact new backup directory, outside the project. Defaults to private user state. */
30
+ backupDir?: string;
26
31
  }
27
32
  interface InitResult {
33
+ /** Generated files the harness owns after this run. */
28
34
  filesWritten: string[];
29
35
  /** Files a previous `init` rendered that this one no longer does (layout change, engine dropped). */
30
36
  staleFilesRemoved: string[];
31
37
  warnings: string[];
32
- stopHookInstalled: boolean;
33
- }
34
- declare function planInit(args: InitArgs): {
35
38
  engines: Engine[];
36
- output: RenderOutput;
37
- stopHookInstalled: boolean;
38
- };
39
+ /** Set when existing project files were changed; holds their previous contents. */
40
+ backupDir?: string;
41
+ }
39
42
  declare function writeFilesToTarget(files: ReadonlyArray<RenderedFile>, targetDir: string): string[];
43
+ /**
44
+ * Installs or re-renders the harness. Shares the planner of `update`: files
45
+ * the harness does not own are never overwritten, merged or deleted, and
46
+ * changes are applied in one transaction (see docs/decisions/safe-init.md
47
+ * and docs/decisions/no-mcp-no-code-merge.md).
48
+ */
40
49
  declare function initCommand(args: InitArgs): InitResult;
41
50
 
42
51
  export { type InitArgs, type InitResult, initCommand, planInit, writeFilesToTarget };