claude-recall 0.28.5 → 0.28.6
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.
|
@@ -189,14 +189,23 @@ class HookCommands {
|
|
|
189
189
|
// `kiro --resume`d session whose cwd differs from the shell's), and
|
|
190
190
|
// capture (userPromptSubmit) and injection (agentSpawn) could even
|
|
191
191
|
// disagree. Project memories must scope to ONE deterministic project.
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
(0, shared_1.hookLog)('hook-dispatcher', `cwd scoping failed (using inherited cwd): ${(0, shared_1.safeErrorMessage)(err)}`);
|
|
192
|
+
try {
|
|
193
|
+
const { ConfigService } = await Promise.resolve().then(() => __importStar(require('../../services/config')));
|
|
194
|
+
const cfg = ConfigService.getInstance();
|
|
195
|
+
const payloadCwd = (input && typeof input.cwd === 'string' && input.cwd.trim()) ? input.cwd : null;
|
|
196
|
+
if (payloadCwd) {
|
|
197
|
+
cfg.updateConfig({ project: { rootDir: payloadCwd } });
|
|
199
198
|
}
|
|
199
|
+
// Diagnostic: record what the runtime declared vs. what this
|
|
200
|
+
// subprocess inherited, and the project we resolved. Makes "which
|
|
201
|
+
// project did this scope to, and why" answerable from the log —
|
|
202
|
+
// the definitive check for `kiro --resume` scoping questions.
|
|
203
|
+
const pin = process.env.CLAUDE_RECALL_PROJECT_ID || process.env.CLAUDE_PROJECT_ID;
|
|
204
|
+
(0, shared_1.hookLog)('hook-dispatcher', `scope [${names.join('+')}]: payload.cwd=${payloadCwd ?? '(none)'} ` +
|
|
205
|
+
`process.cwd=${process.cwd()} pin=${pin ?? '(none)'} → project=${cfg.getProjectId()}`);
|
|
206
|
+
}
|
|
207
|
+
catch (err) {
|
|
208
|
+
(0, shared_1.hookLog)('hook-dispatcher', `cwd scoping failed (using inherited cwd): ${(0, shared_1.safeErrorMessage)(err)}`);
|
|
200
209
|
}
|
|
201
210
|
for (const name of names) {
|
|
202
211
|
try {
|
package/package.json
CHANGED