@c-d-cc/reap 0.15.16 → 0.15.17
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/RELEASE_NOTICE.md +6 -0
- package/dist/cli.js +7 -7
- package/dist/templates/hooks/session-start.cjs +64 -3
- package/package.json +1 -1
package/RELEASE_NOTICE.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Release Notices
|
|
2
2
|
|
|
3
|
+
## v0.15.17
|
|
4
|
+
### en
|
|
5
|
+
Session-start hook now shows release notes after auto-update. Breaking change blocked message improved with user-friendly guidance.
|
|
6
|
+
### ko
|
|
7
|
+
세션 시작 hook에서 auto-update 후 릴리스 노트 표시. Breaking change blocked 메시지를 유저 친화적으로 개선.
|
|
8
|
+
|
|
3
9
|
## v0.15.16
|
|
4
10
|
### en
|
|
5
11
|
Upgrade hand-off: `reap update` now delegates to the new binary after self-upgrade, ensuring seamless v0.16.0 migration. Config now tracks `lastCliVersion`.
|
package/dist/cli.js
CHANGED
|
@@ -7180,7 +7180,7 @@ function checkLatestVersion() {
|
|
|
7180
7180
|
}
|
|
7181
7181
|
}
|
|
7182
7182
|
function getCurrentVersion() {
|
|
7183
|
-
return "0.15.
|
|
7183
|
+
return "0.15.17";
|
|
7184
7184
|
}
|
|
7185
7185
|
function formatVersionLine(current, skipCheck) {
|
|
7186
7186
|
if (skipCheck) {
|
|
@@ -10610,7 +10610,7 @@ async function execute17(paths) {
|
|
|
10610
10610
|
const gm = new GenerationManager(paths);
|
|
10611
10611
|
const state = await gm.current();
|
|
10612
10612
|
const configContent = await readTextFile(paths.config);
|
|
10613
|
-
const installedVersion = "0.15.
|
|
10613
|
+
const installedVersion = "0.15.17";
|
|
10614
10614
|
const autoUpdate = configContent?.match(/autoUpdate:\s*(true|false)/)?.[1] === "true";
|
|
10615
10615
|
const versionDisplay = formatVersionLine(installedVersion, !autoUpdate);
|
|
10616
10616
|
const rawLang = detectLanguage(configContent);
|
|
@@ -12338,7 +12338,7 @@ async function execute30(paths) {
|
|
|
12338
12338
|
const lines = [
|
|
12339
12339
|
`REAP Configuration (${paths.config})`,
|
|
12340
12340
|
"",
|
|
12341
|
-
` version: ${"0.15.
|
|
12341
|
+
` version: ${"0.15.17"} (package)`,
|
|
12342
12342
|
` project: ${config.project}`,
|
|
12343
12343
|
` entryMode: ${config.entryMode}`,
|
|
12344
12344
|
` strict: ${config.strict ?? false}`,
|
|
@@ -12644,7 +12644,7 @@ async function runCommand(command, phase, argv = []) {
|
|
|
12644
12644
|
try {
|
|
12645
12645
|
const config = await ConfigManager.read(paths);
|
|
12646
12646
|
if (config.autoIssueReport) {
|
|
12647
|
-
const version = "0.15.
|
|
12647
|
+
const version = "0.15.17";
|
|
12648
12648
|
const errMsg = err instanceof Error ? err.message : String(err);
|
|
12649
12649
|
const title = `[auto] reap run ${command}: ${errMsg.slice(0, 80)}`;
|
|
12650
12650
|
const body = [
|
|
@@ -15320,7 +15320,7 @@ async function getStatus(projectRoot) {
|
|
|
15320
15320
|
const totalCompleted = await mgr.countAllCompleted();
|
|
15321
15321
|
const integrityResult = await checkIntegrity(paths);
|
|
15322
15322
|
return {
|
|
15323
|
-
version: "0.15.
|
|
15323
|
+
version: "0.15.17",
|
|
15324
15324
|
project: config.project,
|
|
15325
15325
|
entryMode: config.entryMode,
|
|
15326
15326
|
lastSyncedGeneration: config.lastSyncedGeneration,
|
|
@@ -15643,7 +15643,7 @@ init_fs();
|
|
|
15643
15643
|
init_version();
|
|
15644
15644
|
init_config();
|
|
15645
15645
|
import { join as join34 } from "path";
|
|
15646
|
-
program.name("reap").description("REAP — Recursive Evolutionary Autonomous Pipeline").version("0.15.
|
|
15646
|
+
program.name("reap").description("REAP — Recursive Evolutionary Autonomous Pipeline").version("0.15.17");
|
|
15647
15647
|
program.command("init").description("Initialize a new REAP project (Genesis)").argument("[project-name]", "Project name (defaults to current directory name)").option("-m, --mode <mode>", "Entry mode: greenfield, migration, adoption", "greenfield").option("-p, --preset <preset>", "Bootstrap with a genome preset (e.g., bun-hono-react)").action(async (projectName, options) => {
|
|
15648
15648
|
try {
|
|
15649
15649
|
const cwd = process.cwd();
|
|
@@ -15700,7 +15700,7 @@ program.command("status").description("Show current project and Generation statu
|
|
|
15700
15700
|
const paths = new ReapPaths(cwd);
|
|
15701
15701
|
const config = await ConfigManager.read(paths);
|
|
15702
15702
|
const skipCheck = config.autoUpdate === false;
|
|
15703
|
-
const installedVersion = "0.15.
|
|
15703
|
+
const installedVersion = "0.15.17";
|
|
15704
15704
|
const versionLine = formatVersionLine(installedVersion, skipCheck);
|
|
15705
15705
|
console.log(`${versionLine} | Project: ${status.project} (${status.entryMode})`);
|
|
15706
15706
|
console.log(`Completed Generations: ${status.totalGenerations}`);
|
|
@@ -128,6 +128,51 @@ function semverGte(a, b) {
|
|
|
128
128
|
return true;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
+
// Inline CJS version of fetchReleaseNotice (ported from src/core/notice.ts)
|
|
132
|
+
function fetchReleaseNoticeCJS(version, lang) {
|
|
133
|
+
try {
|
|
134
|
+
const pkgRoot = path.dirname(require.resolve('@c-d-cc/reap/package.json'));
|
|
135
|
+
const noticePath = path.join(pkgRoot, 'RELEASE_NOTICE.md');
|
|
136
|
+
const content = fs.readFileSync(noticePath, 'utf-8');
|
|
137
|
+
const versionTag = version.startsWith('v') ? version : `v${version}`;
|
|
138
|
+
|
|
139
|
+
// Find version section: ## vX.Y.Z
|
|
140
|
+
const versionPattern = new RegExp(`^## ${versionTag.replace(/\./g, '\\.')}\\s*$`, 'm');
|
|
141
|
+
const versionMatch = versionPattern.exec(content);
|
|
142
|
+
if (!versionMatch) return null;
|
|
143
|
+
|
|
144
|
+
const start = versionMatch.index + versionMatch[0].length;
|
|
145
|
+
const rest = content.slice(start);
|
|
146
|
+
const nextVersion = rest.search(/^## v/m);
|
|
147
|
+
const section = nextVersion === -1 ? rest : rest.slice(0, nextVersion);
|
|
148
|
+
|
|
149
|
+
// Language mapping
|
|
150
|
+
const LANG_MAP = {
|
|
151
|
+
korean: 'ko', english: 'en', japanese: 'ja',
|
|
152
|
+
'chinese': 'zh-cn', spanish: 'es', french: 'fr',
|
|
153
|
+
german: 'de', portuguese: 'pt',
|
|
154
|
+
};
|
|
155
|
+
const rawLang = (lang || 'en').toLowerCase();
|
|
156
|
+
const mappedLang = LANG_MAP[rawLang] || rawLang;
|
|
157
|
+
const langPattern = new RegExp(`^### ${mappedLang}\\s*$`, 'im');
|
|
158
|
+
const langMatch = langPattern.exec(section);
|
|
159
|
+
if (!langMatch) {
|
|
160
|
+
const trimmed = section.trim();
|
|
161
|
+
return trimmed ? `\n--- Release Notes (${versionTag}) ---\n${trimmed}\n` : null;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const langStart = langMatch.index + langMatch[0].length;
|
|
165
|
+
const langRest = section.slice(langStart);
|
|
166
|
+
const nextLang = langRest.search(/^### /m);
|
|
167
|
+
const langSection = (nextLang === -1 ? langRest : langRest.slice(0, nextLang)).trim();
|
|
168
|
+
if (!langSection) return null;
|
|
169
|
+
|
|
170
|
+
return `\n--- Release Notes (${versionTag}) ---\n${langSection}\n`;
|
|
171
|
+
} catch {
|
|
172
|
+
return null;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
131
176
|
// Step 1: Version check + Auto-update
|
|
132
177
|
log('Checking for updates...');
|
|
133
178
|
let autoUpdateMessage = '';
|
|
@@ -144,7 +189,7 @@ if (installed && installed.includes('+dev')) {
|
|
|
144
189
|
const minVersion = gl.exec('npm view @c-d-cc/reap reap.autoUpdateMinVersion');
|
|
145
190
|
if (minVersion && !semverGte(installed, minVersion)) {
|
|
146
191
|
// Breaking change detected — block auto-update
|
|
147
|
-
autoUpdateMessage = `[BREAKING] Auto-update blocked: v${installed} → v${latest} contains breaking changes.
|
|
192
|
+
autoUpdateMessage = `[BREAKING] Auto-update blocked: v${installed} → v${latest} contains breaking changes. Run '/reap.update' to upgrade manually.`;
|
|
148
193
|
} else {
|
|
149
194
|
const updated = gl.exec('npm update -g @c-d-cc/reap');
|
|
150
195
|
if (updated !== null) {
|
|
@@ -197,15 +242,31 @@ if (genomeStaleWarning) {
|
|
|
197
242
|
let updateSection = '';
|
|
198
243
|
if (autoUpdateMessage) {
|
|
199
244
|
if (autoUpdateMessage.startsWith('[BREAKING]')) {
|
|
200
|
-
updateSection = `\n\n## Auto-Update (Breaking Change Detected)\n${autoUpdateMessage}\n\nIMPORTANT:
|
|
245
|
+
updateSection = `\n\n## Auto-Update (Breaking Change Detected)\n${autoUpdateMessage}\n\nIMPORTANT: You MUST inform the user about this on your FIRST response — do NOT skip or delay this.\n1. Explain that REAP v${latest} is available but contains breaking changes that prevent auto-update.\n2. Show the release notes link: https://reap.cc/docs/release-notes\n3. Tell them to run \`/reap.update\` when they are ready to upgrade manually.\n4. Do NOT proceed with any other task until you have communicated this to the user.`;
|
|
201
246
|
} else {
|
|
202
247
|
updateSection = `\n\n## Auto-Update\n${autoUpdateMessage}. Tell the user: "${autoUpdateMessage}"`;
|
|
203
248
|
}
|
|
204
249
|
}
|
|
205
250
|
|
|
251
|
+
// Fetch release notice for auto-updated version (language is now available)
|
|
252
|
+
let autoUpdateNotice = '';
|
|
253
|
+
if (autoUpdateMessage && !autoUpdateMessage.startsWith('[BREAKING]')) {
|
|
254
|
+
try {
|
|
255
|
+
const notice = fetchReleaseNoticeCJS(latest, language || 'en');
|
|
256
|
+
if (notice) autoUpdateNotice = notice.trim();
|
|
257
|
+
} catch { /* best effort */ }
|
|
258
|
+
}
|
|
259
|
+
|
|
206
260
|
// Build session init display
|
|
207
261
|
const initLines = [];
|
|
208
|
-
if (autoUpdateMessage)
|
|
262
|
+
if (autoUpdateMessage) {
|
|
263
|
+
if (autoUpdateMessage.startsWith('[BREAKING]')) {
|
|
264
|
+
initLines.push(`⚠️ REAP v${latest} available (breaking change). Run /reap.update to upgrade manually.`);
|
|
265
|
+
} else {
|
|
266
|
+
initLines.push(`🟢 ${autoUpdateMessage}`);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
if (autoUpdateNotice) initLines.push(autoUpdateNotice);
|
|
209
270
|
|
|
210
271
|
// Genome health
|
|
211
272
|
const health = gl.buildGenomeHealth({ l1Lines, genomeDir, configFile, genomeStaleWarning, commitsSince, neverSynced });
|