@ttfw/envoi 1.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/README.md +238 -0
- package/dist/commands/app.d.ts +2 -0
- package/dist/commands/app.d.ts.map +1 -0
- package/dist/commands/app.js +31 -0
- package/dist/commands/app.js.map +1 -0
- package/dist/commands/autonomy.d.ts +6 -0
- package/dist/commands/autonomy.d.ts.map +1 -0
- package/dist/commands/autonomy.js +89 -0
- package/dist/commands/autonomy.js.map +1 -0
- package/dist/commands/builder.d.ts +13 -0
- package/dist/commands/builder.d.ts.map +1 -0
- package/dist/commands/builder.js +142 -0
- package/dist/commands/builder.js.map +1 -0
- package/dist/commands/idea.d.ts +12 -0
- package/dist/commands/idea.d.ts.map +1 -0
- package/dist/commands/idea.js +79 -0
- package/dist/commands/idea.js.map +1 -0
- package/dist/commands/init.d.ts +18 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +423 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/mode.d.ts +13 -0
- package/dist/commands/mode.d.ts.map +1 -0
- package/dist/commands/mode.js +96 -0
- package/dist/commands/mode.js.map +1 -0
- package/dist/commands/onboard.d.ts +37 -0
- package/dist/commands/onboard.d.ts.map +1 -0
- package/dist/commands/onboard.js +743 -0
- package/dist/commands/onboard.js.map +1 -0
- package/dist/commands/pr-note.d.ts +8 -0
- package/dist/commands/pr-note.d.ts.map +1 -0
- package/dist/commands/pr-note.js +27 -0
- package/dist/commands/pr-note.js.map +1 -0
- package/dist/commands/undo.d.ts +7 -0
- package/dist/commands/undo.d.ts.map +1 -0
- package/dist/commands/undo.js +59 -0
- package/dist/commands/undo.js.map +1 -0
- package/dist/commands/update.d.ts +24 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +248 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/constants/report_codes.d.ts +29 -0
- package/dist/constants/report_codes.d.ts.map +1 -0
- package/dist/constants/report_codes.js +69 -0
- package/dist/constants/report_codes.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +675 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/autonomy.d.ts +16 -0
- package/dist/lib/autonomy.d.ts.map +1 -0
- package/dist/lib/autonomy.js +38 -0
- package/dist/lib/autonomy.js.map +1 -0
- package/dist/lib/blocked.d.ts +87 -0
- package/dist/lib/blocked.d.ts.map +1 -0
- package/dist/lib/blocked.js +134 -0
- package/dist/lib/blocked.js.map +1 -0
- package/dist/lib/branding.d.ts +13 -0
- package/dist/lib/branding.d.ts.map +1 -0
- package/dist/lib/branding.js +19 -0
- package/dist/lib/branding.js.map +1 -0
- package/dist/lib/claude.d.ts +42 -0
- package/dist/lib/claude.d.ts.map +1 -0
- package/dist/lib/claude.js +291 -0
- package/dist/lib/claude.js.map +1 -0
- package/dist/lib/config.d.ts +71 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +410 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/diff.d.ts +150 -0
- package/dist/lib/diff.d.ts.map +1 -0
- package/dist/lib/diff.js +257 -0
- package/dist/lib/diff.js.map +1 -0
- package/dist/lib/doctor.d.ts +67 -0
- package/dist/lib/doctor.d.ts.map +1 -0
- package/dist/lib/doctor.js +211 -0
- package/dist/lib/doctor.js.map +1 -0
- package/dist/lib/fingerprint.d.ts +27 -0
- package/dist/lib/fingerprint.d.ts.map +1 -0
- package/dist/lib/fingerprint.js +116 -0
- package/dist/lib/fingerprint.js.map +1 -0
- package/dist/lib/fs.d.ts +93 -0
- package/dist/lib/fs.d.ts.map +1 -0
- package/dist/lib/fs.js +179 -0
- package/dist/lib/fs.js.map +1 -0
- package/dist/lib/git.d.ts +177 -0
- package/dist/lib/git.d.ts.map +1 -0
- package/dist/lib/git.js +355 -0
- package/dist/lib/git.js.map +1 -0
- package/dist/lib/git_branching.d.ts +84 -0
- package/dist/lib/git_branching.d.ts.map +1 -0
- package/dist/lib/git_branching.js +327 -0
- package/dist/lib/git_branching.js.map +1 -0
- package/dist/lib/gitignore.d.ts +26 -0
- package/dist/lib/gitignore.d.ts.map +1 -0
- package/dist/lib/gitignore.js +119 -0
- package/dist/lib/gitignore.js.map +1 -0
- package/dist/lib/guardrails.d.ts +232 -0
- package/dist/lib/guardrails.d.ts.map +1 -0
- package/dist/lib/guardrails.js +323 -0
- package/dist/lib/guardrails.js.map +1 -0
- package/dist/lib/history.d.ts +110 -0
- package/dist/lib/history.d.ts.map +1 -0
- package/dist/lib/history.js +236 -0
- package/dist/lib/history.js.map +1 -0
- package/dist/lib/index.d.ts +29 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/index.js +29 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/json-extract.d.ts +42 -0
- package/dist/lib/json-extract.d.ts.map +1 -0
- package/dist/lib/json-extract.js +201 -0
- package/dist/lib/json-extract.js.map +1 -0
- package/dist/lib/judge.d.ts +237 -0
- package/dist/lib/judge.d.ts.map +1 -0
- package/dist/lib/judge.js +501 -0
- package/dist/lib/judge.js.map +1 -0
- package/dist/lib/lock.d.ts +79 -0
- package/dist/lib/lock.d.ts.map +1 -0
- package/dist/lib/lock.js +254 -0
- package/dist/lib/lock.js.map +1 -0
- package/dist/lib/migration.d.ts +9 -0
- package/dist/lib/migration.d.ts.map +1 -0
- package/dist/lib/migration.js +74 -0
- package/dist/lib/migration.js.map +1 -0
- package/dist/lib/paths.d.ts +18 -0
- package/dist/lib/paths.d.ts.map +1 -0
- package/dist/lib/paths.js +27 -0
- package/dist/lib/paths.js.map +1 -0
- package/dist/lib/preflight.d.ts +33 -0
- package/dist/lib/preflight.d.ts.map +1 -0
- package/dist/lib/preflight.js +177 -0
- package/dist/lib/preflight.js.map +1 -0
- package/dist/lib/prompt_budget.d.ts +18 -0
- package/dist/lib/prompt_budget.d.ts.map +1 -0
- package/dist/lib/prompt_budget.js +36 -0
- package/dist/lib/prompt_budget.js.map +1 -0
- package/dist/lib/report.d.ts +102 -0
- package/dist/lib/report.d.ts.map +1 -0
- package/dist/lib/report.js +347 -0
- package/dist/lib/report.js.map +1 -0
- package/dist/lib/reviewer-flow.d.ts +80 -0
- package/dist/lib/reviewer-flow.d.ts.map +1 -0
- package/dist/lib/reviewer-flow.js +138 -0
- package/dist/lib/reviewer-flow.js.map +1 -0
- package/dist/lib/reviewer.d.ts +53 -0
- package/dist/lib/reviewer.d.ts.map +1 -0
- package/dist/lib/reviewer.js +199 -0
- package/dist/lib/reviewer.js.map +1 -0
- package/dist/lib/risk.d.ts +127 -0
- package/dist/lib/risk.d.ts.map +1 -0
- package/dist/lib/risk.js +192 -0
- package/dist/lib/risk.js.map +1 -0
- package/dist/lib/rollback.d.ts +143 -0
- package/dist/lib/rollback.d.ts.map +1 -0
- package/dist/lib/rollback.js +244 -0
- package/dist/lib/rollback.js.map +1 -0
- package/dist/lib/schema.d.ts +47 -0
- package/dist/lib/schema.d.ts.map +1 -0
- package/dist/lib/schema.js +91 -0
- package/dist/lib/schema.js.map +1 -0
- package/dist/lib/scope.d.ts +89 -0
- package/dist/lib/scope.d.ts.map +1 -0
- package/dist/lib/scope.js +135 -0
- package/dist/lib/scope.js.map +1 -0
- package/dist/lib/self_update.d.ts +13 -0
- package/dist/lib/self_update.d.ts.map +1 -0
- package/dist/lib/self_update.js +172 -0
- package/dist/lib/self_update.js.map +1 -0
- package/dist/lib/state.d.ts +143 -0
- package/dist/lib/state.d.ts.map +1 -0
- package/dist/lib/state.js +258 -0
- package/dist/lib/state.js.map +1 -0
- package/dist/lib/tick.d.ts +310 -0
- package/dist/lib/tick.d.ts.map +1 -0
- package/dist/lib/tick.js +424 -0
- package/dist/lib/tick.js.map +1 -0
- package/dist/lib/transport.d.ts +145 -0
- package/dist/lib/transport.d.ts.map +1 -0
- package/dist/lib/transport.js +237 -0
- package/dist/lib/transport.js.map +1 -0
- package/dist/lib/verdict_labels.d.ts +5 -0
- package/dist/lib/verdict_labels.d.ts.map +1 -0
- package/dist/lib/verdict_labels.js +25 -0
- package/dist/lib/verdict_labels.js.map +1 -0
- package/dist/lib/verify-safety.d.ts +63 -0
- package/dist/lib/verify-safety.d.ts.map +1 -0
- package/dist/lib/verify-safety.js +123 -0
- package/dist/lib/verify-safety.js.map +1 -0
- package/dist/lib/verify.d.ts +139 -0
- package/dist/lib/verify.d.ts.map +1 -0
- package/dist/lib/verify.js +311 -0
- package/dist/lib/verify.js.map +1 -0
- package/dist/lib/workspace_state.d.ts +79 -0
- package/dist/lib/workspace_state.d.ts.map +1 -0
- package/dist/lib/workspace_state.js +283 -0
- package/dist/lib/workspace_state.js.map +1 -0
- package/dist/runner/builder.d.ts +58 -0
- package/dist/runner/builder.d.ts.map +1 -0
- package/dist/runner/builder.js +775 -0
- package/dist/runner/builder.js.map +1 -0
- package/dist/runner/builder_parse.d.ts +37 -0
- package/dist/runner/builder_parse.d.ts.map +1 -0
- package/dist/runner/builder_parse.js +76 -0
- package/dist/runner/builder_parse.js.map +1 -0
- package/dist/runner/index.d.ts +9 -0
- package/dist/runner/index.d.ts.map +1 -0
- package/dist/runner/index.js +7 -0
- package/dist/runner/index.js.map +1 -0
- package/dist/runner/loop.d.ts +51 -0
- package/dist/runner/loop.d.ts.map +1 -0
- package/dist/runner/loop.js +221 -0
- package/dist/runner/loop.js.map +1 -0
- package/dist/runner/orchestrator.d.ts +67 -0
- package/dist/runner/orchestrator.d.ts.map +1 -0
- package/dist/runner/orchestrator.js +376 -0
- package/dist/runner/orchestrator.js.map +1 -0
- package/dist/runner/tick.d.ts +10 -0
- package/dist/runner/tick.d.ts.map +1 -0
- package/dist/runner/tick.js +1639 -0
- package/dist/runner/tick.js.map +1 -0
- package/dist/types/blocked.d.ts +52 -0
- package/dist/types/blocked.d.ts.map +1 -0
- package/dist/types/blocked.js +8 -0
- package/dist/types/blocked.js.map +1 -0
- package/dist/types/builder.d.ts +25 -0
- package/dist/types/builder.d.ts.map +1 -0
- package/dist/types/builder.js +7 -0
- package/dist/types/builder.js.map +1 -0
- package/dist/types/claude.d.ts +86 -0
- package/dist/types/claude.d.ts.map +1 -0
- package/dist/types/claude.js +48 -0
- package/dist/types/claude.js.map +1 -0
- package/dist/types/config.d.ts +384 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +7 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/index.d.ts +18 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +8 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/lock.d.ts +21 -0
- package/dist/types/lock.d.ts.map +1 -0
- package/dist/types/lock.js +8 -0
- package/dist/types/lock.js.map +1 -0
- package/dist/types/preflight.d.ts +49 -0
- package/dist/types/preflight.d.ts.map +1 -0
- package/dist/types/preflight.js +8 -0
- package/dist/types/preflight.js.map +1 -0
- package/dist/types/report.d.ts +161 -0
- package/dist/types/report.d.ts.map +1 -0
- package/dist/types/report.js +8 -0
- package/dist/types/report.js.map +1 -0
- package/dist/types/reviewer.d.ts +66 -0
- package/dist/types/reviewer.d.ts.map +1 -0
- package/dist/types/reviewer.js +5 -0
- package/dist/types/reviewer.js.map +1 -0
- package/dist/types/state.d.ts +124 -0
- package/dist/types/state.d.ts.map +1 -0
- package/dist/types/state.js +20 -0
- package/dist/types/state.js.map +1 -0
- package/dist/types/task.d.ts +117 -0
- package/dist/types/task.d.ts.map +1 -0
- package/dist/types/task.js +7 -0
- package/dist/types/task.js.map +1 -0
- package/dist/types/workspace_state.d.ts +125 -0
- package/dist/types/workspace_state.d.ts.map +1 -0
- package/dist/types/workspace_state.js +10 -0
- package/dist/types/workspace_state.js.map +1 -0
- package/envoi.config.json +191 -0
- package/package.json +52 -0
- package/relais/prompts/.gitkeep +0 -0
- package/relais/prompts/builder.system.txt +13 -0
- package/relais/prompts/builder.user.txt +15 -0
- package/relais/prompts/orchestrator.system.txt +37 -0
- package/relais/prompts/orchestrator.user.txt +34 -0
- package/relais/prompts/reviewer.system.txt +33 -0
- package/relais/prompts/reviewer.user.txt +35 -0
- package/relais/schemas/.gitkeep +0 -0
- package/relais/schemas/builder_result.schema.json +29 -0
- package/relais/schemas/report.schema.json +195 -0
- package/relais/schemas/reviewer_result.schema.json +70 -0
- package/relais/schemas/task.schema.json +155 -0
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration loading and validation utilities.
|
|
3
|
+
*
|
|
4
|
+
* Provides functions to load, find, and validate Envoi config files.
|
|
5
|
+
*/
|
|
6
|
+
import { access } from 'node:fs/promises';
|
|
7
|
+
import { join, dirname, resolve } from 'node:path';
|
|
8
|
+
import { atomicReadJson, AtomicFsError } from './fs.js';
|
|
9
|
+
import { migrateLegacyLayoutIfNeeded } from './migration.js';
|
|
10
|
+
import { CONFIG_FILE_CANDIDATES, CONFIG_FILE_NAME as PRIMARY_CONFIG_FILE_NAME, LEGACY_CONFIG_FILE_NAME, } from './branding.js';
|
|
11
|
+
/** Default configuration file name */
|
|
12
|
+
export const CONFIG_FILE_NAME = PRIMARY_CONFIG_FILE_NAME;
|
|
13
|
+
export const LEGACY_CONFIG_NAME = LEGACY_CONFIG_FILE_NAME;
|
|
14
|
+
/**
|
|
15
|
+
* Error thrown when configuration loading or validation fails.
|
|
16
|
+
*/
|
|
17
|
+
export class ConfigError extends Error {
|
|
18
|
+
configPath;
|
|
19
|
+
cause;
|
|
20
|
+
constructor(message, configPath, cause) {
|
|
21
|
+
super(message);
|
|
22
|
+
this.configPath = configPath;
|
|
23
|
+
this.cause = cause;
|
|
24
|
+
this.name = 'ConfigError';
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Searches for a configuration file by walking upward from the current directory.
|
|
29
|
+
* Stops at the filesystem root if not found.
|
|
30
|
+
*
|
|
31
|
+
* @returns Path to the config file if found, null otherwise
|
|
32
|
+
*/
|
|
33
|
+
export async function findConfigFile() {
|
|
34
|
+
let currentDir = process.cwd();
|
|
35
|
+
const root = resolve('/');
|
|
36
|
+
while (true) {
|
|
37
|
+
for (const fileName of CONFIG_FILE_CANDIDATES) {
|
|
38
|
+
const configPath = join(currentDir, fileName);
|
|
39
|
+
try {
|
|
40
|
+
await access(configPath);
|
|
41
|
+
return configPath;
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
// Continue checking candidates.
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
// Stop if we've reached the filesystem root
|
|
48
|
+
if (currentDir === root || currentDir === dirname(currentDir)) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
// Move up one directory
|
|
52
|
+
currentDir = dirname(currentDir);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Gets the repository root directory (where the config file is located).
|
|
57
|
+
* If configPath is provided, returns its directory. Otherwise, searches upward
|
|
58
|
+
* from the current directory.
|
|
59
|
+
*
|
|
60
|
+
* @param configPath - Optional path to the config file. If provided, returns its directory.
|
|
61
|
+
* @returns Path to the repository root directory, or null if config not found
|
|
62
|
+
*/
|
|
63
|
+
export async function getRepoRoot(configPath) {
|
|
64
|
+
if (configPath) {
|
|
65
|
+
return dirname(resolve(configPath));
|
|
66
|
+
}
|
|
67
|
+
const found = await findConfigFile();
|
|
68
|
+
if (!found) {
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
return dirname(found);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Changes the current working directory to the repository root.
|
|
75
|
+
* This ensures that relative paths in config (workspace_dir, lockfile, etc.)
|
|
76
|
+
* resolve correctly regardless of where the command was invoked from.
|
|
77
|
+
*
|
|
78
|
+
* @param configPath - Optional path to the config file. If not provided, searches upward.
|
|
79
|
+
* @throws {ConfigError} If the config file cannot be found
|
|
80
|
+
*/
|
|
81
|
+
export async function chdirToRepoRoot(configPath) {
|
|
82
|
+
const repoRoot = await getRepoRoot(configPath);
|
|
83
|
+
if (!repoRoot) {
|
|
84
|
+
throw new ConfigError(`Configuration file not found. Expected ${PRIMARY_CONFIG_FILE_NAME} in current directory or parent directories.`);
|
|
85
|
+
}
|
|
86
|
+
process.chdir(repoRoot);
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Validates that an object conforms to the EnvoiConfig interface.
|
|
90
|
+
*
|
|
91
|
+
* This performs structural validation to ensure all required fields are present
|
|
92
|
+
* and have the expected types.
|
|
93
|
+
*
|
|
94
|
+
* @param config - The object to validate
|
|
95
|
+
* @returns True if the object is a valid EnvoiConfig
|
|
96
|
+
*/
|
|
97
|
+
export function validateConfig(config) {
|
|
98
|
+
if (typeof config !== 'object' || config === null) {
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
const c = config;
|
|
102
|
+
// Check top-level required fields
|
|
103
|
+
if (typeof c.version !== 'string')
|
|
104
|
+
return false;
|
|
105
|
+
if (typeof c.product_name !== 'string')
|
|
106
|
+
return false;
|
|
107
|
+
if (typeof c.workspace_dir !== 'string')
|
|
108
|
+
return false;
|
|
109
|
+
// Validate runner
|
|
110
|
+
if (typeof c.runner !== 'object' || c.runner === null)
|
|
111
|
+
return false;
|
|
112
|
+
const runner = c.runner;
|
|
113
|
+
if (typeof runner.require_git !== 'boolean')
|
|
114
|
+
return false;
|
|
115
|
+
if (typeof runner.max_tick_seconds !== 'number')
|
|
116
|
+
return false;
|
|
117
|
+
if (runner.default_loop_mode !== undefined &&
|
|
118
|
+
runner.default_loop_mode !== 'task' &&
|
|
119
|
+
runner.default_loop_mode !== 'milestone' &&
|
|
120
|
+
runner.default_loop_mode !== 'autonomous') {
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
if (typeof runner.lockfile !== 'string')
|
|
124
|
+
return false;
|
|
125
|
+
if (!Array.isArray(runner.runner_owned_globs))
|
|
126
|
+
return false;
|
|
127
|
+
// Validate runner.crash_cleanup
|
|
128
|
+
if (typeof runner.crash_cleanup !== 'object' || runner.crash_cleanup === null)
|
|
129
|
+
return false;
|
|
130
|
+
const crashCleanup = runner.crash_cleanup;
|
|
131
|
+
if (typeof crashCleanup.delete_tmp_glob !== 'string')
|
|
132
|
+
return false;
|
|
133
|
+
if (typeof crashCleanup.validate_runner_json_files !== 'boolean')
|
|
134
|
+
return false;
|
|
135
|
+
// Validate runner.render_report_md
|
|
136
|
+
if (typeof runner.render_report_md !== 'object' || runner.render_report_md === null)
|
|
137
|
+
return false;
|
|
138
|
+
const renderReportMd = runner.render_report_md;
|
|
139
|
+
if (typeof renderReportMd.enabled !== 'boolean')
|
|
140
|
+
return false;
|
|
141
|
+
if (typeof renderReportMd.max_chars !== 'number')
|
|
142
|
+
return false;
|
|
143
|
+
// Validate optional runner.autonomy
|
|
144
|
+
if (runner.autonomy !== undefined) {
|
|
145
|
+
if (typeof runner.autonomy !== 'object' || runner.autonomy === null)
|
|
146
|
+
return false;
|
|
147
|
+
const autonomy = runner.autonomy;
|
|
148
|
+
if (autonomy.profile !== 'strict' &&
|
|
149
|
+
autonomy.profile !== 'balanced' &&
|
|
150
|
+
autonomy.profile !== 'fast') {
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
if (autonomy.command_trust !== undefined) {
|
|
154
|
+
if (!Array.isArray(autonomy.command_trust))
|
|
155
|
+
return false;
|
|
156
|
+
if (!autonomy.command_trust.every((entry) => typeof entry === 'string'))
|
|
157
|
+
return false;
|
|
158
|
+
}
|
|
159
|
+
if (autonomy.fs_policy !== undefined &&
|
|
160
|
+
autonomy.fs_policy !== 'workspace_write' &&
|
|
161
|
+
autonomy.fs_policy !== 'read_only') {
|
|
162
|
+
return false;
|
|
163
|
+
}
|
|
164
|
+
if (autonomy.network_policy !== undefined &&
|
|
165
|
+
autonomy.network_policy !== 'deny' &&
|
|
166
|
+
autonomy.network_policy !== 'allow') {
|
|
167
|
+
return false;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
// Validate claude_code_cli
|
|
171
|
+
if (typeof c.claude_code_cli !== 'object' || c.claude_code_cli === null)
|
|
172
|
+
return false;
|
|
173
|
+
const cli = c.claude_code_cli;
|
|
174
|
+
if (typeof cli.command !== 'string')
|
|
175
|
+
return false;
|
|
176
|
+
if (typeof cli.output_format !== 'string')
|
|
177
|
+
return false;
|
|
178
|
+
if (typeof cli.no_session_persistence !== 'boolean')
|
|
179
|
+
return false;
|
|
180
|
+
// Validate models
|
|
181
|
+
if (typeof c.models !== 'object' || c.models === null)
|
|
182
|
+
return false;
|
|
183
|
+
const models = c.models;
|
|
184
|
+
if (typeof models.orchestrator_model !== 'string')
|
|
185
|
+
return false;
|
|
186
|
+
if (typeof models.orchestrator_fallback_model !== 'string')
|
|
187
|
+
return false;
|
|
188
|
+
if (typeof models.builder_model !== 'string')
|
|
189
|
+
return false;
|
|
190
|
+
if (typeof models.builder_fallback_model !== 'string')
|
|
191
|
+
return false;
|
|
192
|
+
// Validate orchestrator
|
|
193
|
+
if (typeof c.orchestrator !== 'object' || c.orchestrator === null)
|
|
194
|
+
return false;
|
|
195
|
+
const orchestrator = c.orchestrator;
|
|
196
|
+
if (typeof orchestrator.max_turns !== 'number')
|
|
197
|
+
return false;
|
|
198
|
+
if (typeof orchestrator.permission_mode !== 'string')
|
|
199
|
+
return false;
|
|
200
|
+
if (typeof orchestrator.allowed_tools !== 'string')
|
|
201
|
+
return false;
|
|
202
|
+
if (typeof orchestrator.system_prompt_file !== 'string')
|
|
203
|
+
return false;
|
|
204
|
+
if (typeof orchestrator.user_prompt_file !== 'string')
|
|
205
|
+
return false;
|
|
206
|
+
if (typeof orchestrator.task_schema_file !== 'string')
|
|
207
|
+
return false;
|
|
208
|
+
if (typeof orchestrator.max_parse_retries_per_tick !== 'number')
|
|
209
|
+
return false;
|
|
210
|
+
if (typeof orchestrator.max_budget_usd !== 'number')
|
|
211
|
+
return false;
|
|
212
|
+
// Validate builder
|
|
213
|
+
if (typeof c.builder !== 'object' || c.builder === null)
|
|
214
|
+
return false;
|
|
215
|
+
const builder = c.builder;
|
|
216
|
+
if (builder.default_mode !== 'claude_code' &&
|
|
217
|
+
builder.default_mode !== 'patch' &&
|
|
218
|
+
builder.default_mode !== 'cursor')
|
|
219
|
+
return false;
|
|
220
|
+
if (typeof builder.allow_patch_mode !== 'boolean')
|
|
221
|
+
return false;
|
|
222
|
+
// Validate builder.claude_code
|
|
223
|
+
if (typeof builder.claude_code !== 'object' || builder.claude_code === null)
|
|
224
|
+
return false;
|
|
225
|
+
const ccBuilder = builder.claude_code;
|
|
226
|
+
if (typeof ccBuilder.max_turns !== 'number')
|
|
227
|
+
return false;
|
|
228
|
+
if (typeof ccBuilder.permission_mode !== 'string')
|
|
229
|
+
return false;
|
|
230
|
+
if (typeof ccBuilder.allowed_tools !== 'string')
|
|
231
|
+
return false;
|
|
232
|
+
if (typeof ccBuilder.system_prompt_file !== 'string')
|
|
233
|
+
return false;
|
|
234
|
+
if (typeof ccBuilder.user_prompt_file !== 'string')
|
|
235
|
+
return false;
|
|
236
|
+
if (typeof ccBuilder.builder_result_schema_file !== 'string')
|
|
237
|
+
return false;
|
|
238
|
+
if (typeof ccBuilder.max_budget_usd !== 'number')
|
|
239
|
+
return false;
|
|
240
|
+
if (typeof ccBuilder.strict_builder_json !== 'boolean')
|
|
241
|
+
return false;
|
|
242
|
+
// Validate builder.patch
|
|
243
|
+
if (typeof builder.patch !== 'object' || builder.patch === null)
|
|
244
|
+
return false;
|
|
245
|
+
const patchBuilder = builder.patch;
|
|
246
|
+
if (typeof patchBuilder.max_patch_attempts_per_milestone !== 'number')
|
|
247
|
+
return false;
|
|
248
|
+
// When default_mode is cursor, require and validate builder.cursor (argv-only, no shell string)
|
|
249
|
+
if (builder.default_mode === 'cursor') {
|
|
250
|
+
if (typeof builder.cursor !== 'object' || builder.cursor === null) {
|
|
251
|
+
throw new ConfigError('builder.cursor is required when default_mode is cursor');
|
|
252
|
+
}
|
|
253
|
+
const cursor = builder.cursor;
|
|
254
|
+
if (cursor.driver_kind !== undefined &&
|
|
255
|
+
cursor.driver_kind !== 'external' &&
|
|
256
|
+
cursor.driver_kind !== 'cursor_agent') {
|
|
257
|
+
throw new ConfigError("builder.cursor.driver_kind must be 'external' or 'cursor_agent'");
|
|
258
|
+
}
|
|
259
|
+
if (typeof cursor.command !== 'string' || cursor.command === '') {
|
|
260
|
+
throw new ConfigError('builder.cursor.command is required');
|
|
261
|
+
}
|
|
262
|
+
if (!Array.isArray(cursor.args)) {
|
|
263
|
+
throw new ConfigError('builder.cursor.args must be an array');
|
|
264
|
+
}
|
|
265
|
+
if (typeof cursor.timeout_seconds !== 'number' ||
|
|
266
|
+
cursor.timeout_seconds <= 0 ||
|
|
267
|
+
!Number.isFinite(cursor.timeout_seconds)) {
|
|
268
|
+
throw new ConfigError('builder.cursor.timeout_seconds must be a positive number');
|
|
269
|
+
}
|
|
270
|
+
if (typeof cursor.output_file !== 'string' || cursor.output_file === '') {
|
|
271
|
+
throw new ConfigError('builder.cursor.output_file is required');
|
|
272
|
+
}
|
|
273
|
+
const shellMetachars = /[;&|`$(){}\[\]<>\n\r]/;
|
|
274
|
+
if (shellMetachars.test(cursor.command)) {
|
|
275
|
+
throw new ConfigError('builder.cursor.command contains shell metacharacters');
|
|
276
|
+
}
|
|
277
|
+
for (const arg of cursor.args) {
|
|
278
|
+
if (typeof arg !== 'string') {
|
|
279
|
+
throw new ConfigError('builder.cursor.args must contain only strings');
|
|
280
|
+
}
|
|
281
|
+
if (shellMetachars.test(arg)) {
|
|
282
|
+
throw new ConfigError(`builder.cursor.args contains shell metacharacter in: ${arg}`);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
// Validate scope
|
|
287
|
+
if (typeof c.scope !== 'object' || c.scope === null)
|
|
288
|
+
return false;
|
|
289
|
+
const scope = c.scope;
|
|
290
|
+
if (!Array.isArray(scope.default_allowed_globs))
|
|
291
|
+
return false;
|
|
292
|
+
if (!Array.isArray(scope.default_forbidden_globs))
|
|
293
|
+
return false;
|
|
294
|
+
if (typeof scope.default_allow_new_files !== 'boolean')
|
|
295
|
+
return false;
|
|
296
|
+
if (typeof scope.default_allow_lockfile_changes !== 'boolean')
|
|
297
|
+
return false;
|
|
298
|
+
if (!Array.isArray(scope.lockfiles))
|
|
299
|
+
return false;
|
|
300
|
+
// Validate diff_limits
|
|
301
|
+
if (typeof c.diff_limits !== 'object' || c.diff_limits === null)
|
|
302
|
+
return false;
|
|
303
|
+
const diffLimits = c.diff_limits;
|
|
304
|
+
if (typeof diffLimits.default_max_files_touched !== 'number')
|
|
305
|
+
return false;
|
|
306
|
+
if (typeof diffLimits.default_max_lines_changed !== 'number')
|
|
307
|
+
return false;
|
|
308
|
+
// Validate verification
|
|
309
|
+
if (typeof c.verification !== 'object' || c.verification === null)
|
|
310
|
+
return false;
|
|
311
|
+
const verification = c.verification;
|
|
312
|
+
if (verification.execution_mode !== 'argv_no_shell')
|
|
313
|
+
return false;
|
|
314
|
+
if (typeof verification.max_param_len !== 'number')
|
|
315
|
+
return false;
|
|
316
|
+
if (typeof verification.reject_whitespace_in_params !== 'boolean')
|
|
317
|
+
return false;
|
|
318
|
+
if (typeof verification.reject_dotdot !== 'boolean')
|
|
319
|
+
return false;
|
|
320
|
+
if (typeof verification.reject_metachars_regex !== 'string')
|
|
321
|
+
return false;
|
|
322
|
+
if (typeof verification.timeout_fast_seconds !== 'number')
|
|
323
|
+
return false;
|
|
324
|
+
if (typeof verification.timeout_slow_seconds !== 'number')
|
|
325
|
+
return false;
|
|
326
|
+
if (!Array.isArray(verification.templates))
|
|
327
|
+
return false;
|
|
328
|
+
// Validate budgets
|
|
329
|
+
if (typeof c.budgets !== 'object' || c.budgets === null)
|
|
330
|
+
return false;
|
|
331
|
+
const budgets = c.budgets;
|
|
332
|
+
if (typeof budgets.warn_at_fraction !== 'number')
|
|
333
|
+
return false;
|
|
334
|
+
// Validate budgets.per_milestone
|
|
335
|
+
if (typeof budgets.per_milestone !== 'object' || budgets.per_milestone === null)
|
|
336
|
+
return false;
|
|
337
|
+
const perMilestone = budgets.per_milestone;
|
|
338
|
+
if (typeof perMilestone.max_ticks !== 'number')
|
|
339
|
+
return false;
|
|
340
|
+
if (typeof perMilestone.max_orchestrator_calls !== 'number')
|
|
341
|
+
return false;
|
|
342
|
+
if (typeof perMilestone.max_builder_calls !== 'number')
|
|
343
|
+
return false;
|
|
344
|
+
if (typeof perMilestone.max_verify_runs !== 'number')
|
|
345
|
+
return false;
|
|
346
|
+
if (typeof perMilestone.max_estimated_cost_usd !== 'number')
|
|
347
|
+
return false;
|
|
348
|
+
// Validate history
|
|
349
|
+
if (typeof c.history !== 'object' || c.history === null)
|
|
350
|
+
return false;
|
|
351
|
+
const history = c.history;
|
|
352
|
+
if (typeof history.enabled !== 'boolean')
|
|
353
|
+
return false;
|
|
354
|
+
if (typeof history.dir !== 'string')
|
|
355
|
+
return false;
|
|
356
|
+
if (typeof history.max_mb !== 'number')
|
|
357
|
+
return false;
|
|
358
|
+
if (typeof history.include_diff_patch !== 'boolean')
|
|
359
|
+
return false;
|
|
360
|
+
if (typeof history.include_verify_log !== 'boolean')
|
|
361
|
+
return false;
|
|
362
|
+
return true;
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Loads and validates an Envoi configuration file.
|
|
366
|
+
*
|
|
367
|
+
* @param configPath - Optional path to the config file. If not provided,
|
|
368
|
+
* searches upward for a known config file name.
|
|
369
|
+
* @returns The validated configuration object
|
|
370
|
+
* @throws {ConfigError} If the config file cannot be found, read, or is invalid
|
|
371
|
+
*
|
|
372
|
+
* @example
|
|
373
|
+
* ```typescript
|
|
374
|
+
* // Load from default location
|
|
375
|
+
* const config = await loadConfig();
|
|
376
|
+
*
|
|
377
|
+
* // Load from specific path
|
|
378
|
+
* const config = await loadConfig('/path/to/envoi.config.json');
|
|
379
|
+
* ```
|
|
380
|
+
*/
|
|
381
|
+
export async function loadConfig(configPath) {
|
|
382
|
+
let resolvedPath;
|
|
383
|
+
if (configPath) {
|
|
384
|
+
// If --config is provided, use it directly (no search)
|
|
385
|
+
resolvedPath = resolve(configPath);
|
|
386
|
+
}
|
|
387
|
+
else {
|
|
388
|
+
const found = await findConfigFile();
|
|
389
|
+
if (!found) {
|
|
390
|
+
throw new ConfigError(`Configuration file not found. Expected ${PRIMARY_CONFIG_FILE_NAME} in current directory or parent directories.`);
|
|
391
|
+
}
|
|
392
|
+
resolvedPath = found;
|
|
393
|
+
}
|
|
394
|
+
let rawConfig;
|
|
395
|
+
try {
|
|
396
|
+
rawConfig = await atomicReadJson(resolvedPath);
|
|
397
|
+
}
|
|
398
|
+
catch (error) {
|
|
399
|
+
if (error instanceof AtomicFsError) {
|
|
400
|
+
throw new ConfigError(`Failed to read configuration file: ${error.message}`, resolvedPath, error);
|
|
401
|
+
}
|
|
402
|
+
throw error;
|
|
403
|
+
}
|
|
404
|
+
if (!validateConfig(rawConfig)) {
|
|
405
|
+
throw new ConfigError('Invalid configuration file: structure does not match expected schema', resolvedPath);
|
|
406
|
+
}
|
|
407
|
+
const migrationResult = await migrateLegacyLayoutIfNeeded(resolvedPath, rawConfig);
|
|
408
|
+
return migrationResult.config;
|
|
409
|
+
}
|
|
410
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExD,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EACL,sBAAsB,EACtB,gBAAgB,IAAI,wBAAwB,EAC5C,uBAAuB,GACxB,MAAM,eAAe,CAAC;AAEvB,sCAAsC;AACtC,MAAM,CAAC,MAAM,gBAAgB,GAAG,wBAAwB,CAAC;AACzD,MAAM,CAAC,MAA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mB;IAClD,IAAI,YAAoB,CAAC;IAEzB,IAAI,UAAU,EAAE,CAAC;QACf,uDAAuD;QACvD,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACrC,CAAC;SAAM,CAAC;QACN,MAAM,KAAK,GAAG,MAAM,cAAc,EAAE,CAAC;QACrC,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,IAAI,WAAW,CACnB,0CAA0C,wBAAwB,8CAA8C,CACjH,CAAC;QACJ,CAAC;QACD,YAAY,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,IAAI,SAAkB,CAAC;IACvB,IAAI,CAAC;QACH,SAAS,GAAG,MAAM,cAAc,CAAU,YAAY,CAAC,CAAC;IAC1D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,aAAa,EAAE,CAAC;YACnC,MAAM,IAAI,WAAW,CACnB,sCAAsC,KAAK,CAAC,OAAO,EAAE,EACrD,YAAY,EACZ,KAAK,CACN,CAAC;QACJ,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;IAED,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,CAAC;QAC/B,MAAM,IAAI,WAAW,CACnB,sEAAsE,EACtE,YAAY,CACb,CAAC;IACJ,CAAC;IAED,MAAM,eAAe,GAAG,MAAM,2BAA2B,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;IACnF,OAAO,eAAe,CAAC,MAAM,CAAC;AAChC,CAAC"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Git diff analysis functions for computing touched set.
|
|
3
|
+
*
|
|
4
|
+
* Used by Judge phase to compute the touched set (all files modified by builder)
|
|
5
|
+
* based on git reality, not builder's self-report.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Analysis result of git diff operations.
|
|
9
|
+
*/
|
|
10
|
+
export interface DiffAnalysis {
|
|
11
|
+
/** Total files in touched set */
|
|
12
|
+
files_touched: number;
|
|
13
|
+
/** Total lines added */
|
|
14
|
+
lines_added: number;
|
|
15
|
+
/** Total lines deleted */
|
|
16
|
+
lines_deleted: number;
|
|
17
|
+
/** Count of newly created files */
|
|
18
|
+
new_files: number;
|
|
19
|
+
/** All paths in touched set (tracked + untracked) */
|
|
20
|
+
touched_paths: string[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Result of checking diff limits.
|
|
24
|
+
*/
|
|
25
|
+
export interface DiffLimitCheckResult {
|
|
26
|
+
/** True if within limits, false if limits exceeded */
|
|
27
|
+
ok: boolean;
|
|
28
|
+
/** Actual files touched */
|
|
29
|
+
files_touched: number;
|
|
30
|
+
/** Actual lines changed (added + deleted) */
|
|
31
|
+
lines_changed: number;
|
|
32
|
+
/** Maximum files limit from task */
|
|
33
|
+
max_files: number;
|
|
34
|
+
/** Maximum lines limit from task */
|
|
35
|
+
max_lines: number;
|
|
36
|
+
/** Description of violation if limits exceeded, null otherwise */
|
|
37
|
+
violation: string | null;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Gets tracked files that have changed since a base commit.
|
|
41
|
+
*
|
|
42
|
+
* Uses `git diff --name-status` to get all tracked changes.
|
|
43
|
+
* Parses status codes: A=added, M=modified, D=deleted, R=renamed.
|
|
44
|
+
*
|
|
45
|
+
* @param baseCommit - The base commit SHA to diff against
|
|
46
|
+
* @returns Array of file paths that have changed
|
|
47
|
+
* @throws {Error} If the diff operation fails
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```typescript
|
|
51
|
+
* const paths = getTouchedTracked('abc123');
|
|
52
|
+
* console.log(`${paths.length} tracked files changed`);
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export declare function getTouchedTracked(baseCommit: string): string[];
|
|
56
|
+
/**
|
|
57
|
+
* Gets untracked files that are new or modified.
|
|
58
|
+
*
|
|
59
|
+
* Uses `git status --porcelain` and filters for:
|
|
60
|
+
* - Lines starting with `??` (untracked files)
|
|
61
|
+
* - Lines starting with `A` (added files in index, but also catches untracked)
|
|
62
|
+
*
|
|
63
|
+
* @returns Array of untracked file paths
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```typescript
|
|
67
|
+
* const untracked = getTouchedUntracked();
|
|
68
|
+
* console.log(`${untracked.length} untracked files`);
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
export declare function getTouchedUntracked(): string[];
|
|
72
|
+
/**
|
|
73
|
+
* Gets line statistics (added/deleted) for changes since a base commit.
|
|
74
|
+
*
|
|
75
|
+
* Uses `git diff --numstat` to get line counts.
|
|
76
|
+
* Handles binary files which show `- -` instead of numbers.
|
|
77
|
+
*
|
|
78
|
+
* @param baseCommit - The base commit SHA to diff against
|
|
79
|
+
* @returns Object with lines_added and lines_deleted totals
|
|
80
|
+
* @throws {Error} If the diff operation fails
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```typescript
|
|
84
|
+
* const stats = getDiffStats('abc123');
|
|
85
|
+
* console.log(`Added: ${stats.lines_added}, Deleted: ${stats.lines_deleted}`);
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
export declare function getDiffStats(baseCommit: string): {
|
|
89
|
+
lines_added: number;
|
|
90
|
+
lines_deleted: number;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Analyzes git diff to compute the complete touched set.
|
|
94
|
+
*
|
|
95
|
+
* Combines tracked changes, untracked files, and line statistics
|
|
96
|
+
* into a complete DiffAnalysis object.
|
|
97
|
+
*
|
|
98
|
+
* @param baseCommit - The base commit SHA to diff against
|
|
99
|
+
* @returns Complete DiffAnalysis with all metrics
|
|
100
|
+
* @throws {Error} If any git operation fails
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```typescript
|
|
104
|
+
* const analysis = analyzeDiff('abc123');
|
|
105
|
+
* console.log(`Touched ${analysis.files_touched} files`);
|
|
106
|
+
* console.log(`Added ${analysis.lines_added} lines`);
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
export declare function analyzeDiff(baseCommit: string): DiffAnalysis;
|
|
110
|
+
/**
|
|
111
|
+
* Checks if diff analysis exceeds task diff limits.
|
|
112
|
+
*
|
|
113
|
+
* Compares files_touched against max_files_touched and lines_changed
|
|
114
|
+
* (added + deleted) against max_lines_changed.
|
|
115
|
+
*
|
|
116
|
+
* @param analysis - The diff analysis result
|
|
117
|
+
* @param limits - The diff limits from the task
|
|
118
|
+
* @returns DiffLimitCheckResult with ok status and violation details
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```typescript
|
|
122
|
+
* const analysis = analyzeDiff('abc123');
|
|
123
|
+
* const limits = { max_files_touched: 10, max_lines_changed: 100 };
|
|
124
|
+
* const result = checkDiffLimits(analysis, limits);
|
|
125
|
+
* if (!result.ok) {
|
|
126
|
+
* console.error(`Violation: ${result.violation}`);
|
|
127
|
+
* }
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
export declare function checkDiffLimits(analysis: DiffAnalysis, limits: {
|
|
131
|
+
max_files_touched: number;
|
|
132
|
+
max_lines_changed: number;
|
|
133
|
+
}): DiffLimitCheckResult;
|
|
134
|
+
/**
|
|
135
|
+
* Formats blast radius summary string from diff analysis.
|
|
136
|
+
*
|
|
137
|
+
* Format: "<files_touched> files, +<lines_added>/-<lines_deleted>, <new_files> new"
|
|
138
|
+
*
|
|
139
|
+
* @param analysis - The diff analysis result
|
|
140
|
+
* @returns Formatted blast radius summary string
|
|
141
|
+
*
|
|
142
|
+
* @example
|
|
143
|
+
* ```typescript
|
|
144
|
+
* const analysis = analyzeDiff('abc123');
|
|
145
|
+
* const summary = formatBlastRadius(analysis);
|
|
146
|
+
* // "5 files, +120/-30, 2 new"
|
|
147
|
+
* ```
|
|
148
|
+
*/
|
|
149
|
+
export declare function formatBlastRadius(analysis: DiffAnalysis): string;
|
|
150
|
+
//# sourceMappingURL=diff.d.ts.map
|
|
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