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
- if (input && typeof input.cwd === 'string' && input.cwd.trim()) {
193
- try {
194
- const { ConfigService } = await Promise.resolve().then(() => __importStar(require('../../services/config')));
195
- ConfigService.getInstance().updateConfig({ project: { rootDir: input.cwd } });
196
- }
197
- catch (err) {
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-recall",
3
- "version": "0.28.5",
3
+ "version": "0.28.6",
4
4
  "description": "Persistent memory for Claude Code and Pi with native Skills integration, automatic capture, failure learning, and project scoping",
5
5
  "main": "dist/index.js",
6
6
  "bin": {