hippo-memory 1.61.0 → 1.62.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.
Files changed (57) hide show
  1. package/README.md +28 -53
  2. package/dist/agent-memories/apply.d.ts +1 -1
  3. package/dist/agent-memories/claude-code.d.ts +3 -1
  4. package/dist/agent-memories/claude-code.js +53 -9
  5. package/dist/agent-memories/sync.d.ts +3 -3
  6. package/dist/agent-memories/sync.js +14 -6
  7. package/dist/agent-memories/types.d.ts +0 -2
  8. package/dist/api/assemble.js +55 -54
  9. package/dist/api/context-select.d.ts +49 -0
  10. package/dist/api/context-select.js +344 -0
  11. package/dist/api/context.d.ts +2 -2
  12. package/dist/api/context.js +195 -522
  13. package/dist/api/drill-down.js +36 -33
  14. package/dist/api/promote.js +55 -66
  15. package/dist/api/recall.js +303 -438
  16. package/dist/api/sleep.js +203 -218
  17. package/dist/capture/compact.d.ts +1 -1
  18. package/dist/capture/compact.js +2 -2
  19. package/dist/cli/briefs.js +324 -306
  20. package/dist/cli/context.js +44 -34
  21. package/dist/cli/continuity.js +283 -271
  22. package/dist/cli/curate.js +35 -34
  23. package/dist/cli/decisions.js +333 -333
  24. package/dist/cli/explain.js +66 -60
  25. package/dist/cli/maintenance.js +62 -51
  26. package/dist/cli/playbooks.js +387 -370
  27. package/dist/cli/projects.js +8 -5
  28. package/dist/cli/recall.js +28 -43
  29. package/dist/cli/remember.js +113 -70
  30. package/dist/cli/session-hooks.js +100 -90
  31. package/dist/cli/setup.js +267 -246
  32. package/dist/cli/status.js +73 -64
  33. package/dist/cli/transfer.js +85 -99
  34. package/dist/compaction-record.d.ts +0 -2
  35. package/dist/compaction-record.js +1 -1
  36. package/dist/customer-notes.js +77 -68
  37. package/dist/dag.js +222 -186
  38. package/dist/decisions.js +93 -76
  39. package/dist/doctor.js +11 -7
  40. package/dist/goals.js +99 -86
  41. package/dist/incidents.js +45 -38
  42. package/dist/policies.js +85 -68
  43. package/dist/processes.js +87 -71
  44. package/dist/project-briefs.js +135 -108
  45. package/dist/project-merge.d.ts +12 -4
  46. package/dist/project-merge.js +130 -45
  47. package/dist/shared.d.ts +9 -0
  48. package/dist/shared.js +10 -8
  49. package/dist/skills.js +81 -65
  50. package/dist/store/search-rows.d.ts +2 -2
  51. package/dist/store/search-rows.js +15 -9
  52. package/dist/version.d.ts +1 -1
  53. package/dist/version.js +1 -1
  54. package/extensions/openclaw-plugin/openclaw.plugin.json +1 -1
  55. package/extensions/openclaw-plugin/package.json +1 -1
  56. package/openclaw.plugin.json +1 -1
  57. package/package.json +1 -1
@@ -465,44 +465,45 @@ export async function handleForget({ hippoRoot, args, flags }) {
465
465
  return;
466
466
  cmdForget(hippoRoot, id, flags);
467
467
  }
468
- export function handleInvalidate({ hippoRoot, args, flags }) {
469
- requireInit(hippoRoot);
470
- if (flags['churn'] === true) {
471
- if (args[0] || flags['id'] !== undefined) {
472
- printError('Usage: hippo invalidate --churn [--dry-run]');
473
- printError('--churn takes no pattern or --id.');
474
- process.exit(1);
468
+ function invalidateChurn(hippoRoot, args, flags) {
469
+ if (args[0] || flags['id'] !== undefined) {
470
+ printError('Usage: hippo invalidate --churn [--dry-run]');
471
+ printError('--churn takes no pattern or --id.');
472
+ process.exit(1);
473
+ }
474
+ if (!isGitRepo(process.cwd())) {
475
+ printError('hippo invalidate --churn must run inside a git repository.');
476
+ process.exit(1);
477
+ }
478
+ const churnDryRun = flags['dry-run'] === true;
479
+ let churnFailed = false;
480
+ for (const { root, result } of runChurnStaleForRepo(hippoRoot, churnDryRun)) {
481
+ if (result.error) {
482
+ printError(`Churn-staleness check failed for ${root}: ${result.error}`);
483
+ churnFailed = true;
484
+ continue;
475
485
  }
476
- if (!isGitRepo(process.cwd())) {
477
- printError('hippo invalidate --churn must run inside a git repository.');
478
- process.exit(1);
486
+ if (result.preview.length === 0) {
487
+ console.log(`No churn-stale candidates in ${root}.`);
479
488
  }
480
- const churnDryRun = flags['dry-run'] === true;
481
- let churnFailed = false;
482
- for (const { root, result } of runChurnStaleForRepo(hippoRoot, churnDryRun)) {
483
- if (result.error) {
484
- printError(`Churn-staleness check failed for ${root}: ${result.error}`);
485
- churnFailed = true;
486
- continue;
487
- }
488
- if (result.preview.length === 0) {
489
- console.log(`No churn-stale candidates in ${root}.`);
490
- }
491
- else if (churnDryRun) {
492
- console.log(`DRY RUN - ${result.marked} memories in ${root} WOULD be tagged churn-stale (${result.alreadyMarked} already tagged):`);
493
- }
494
- else {
495
- console.log(`Tagged ${result.marked} memories churn-stale in ${root} (${result.alreadyMarked} already tagged):`);
496
- }
497
- result.preview.forEach(p => console.log(` ${p.id} ${p.evidence} ${p.already ? '(already) ' : ''}${p.headline}`));
498
- if (result.skippedPinned.length > 0) {
499
- console.log(`Skipped ${result.skippedPinned.length} pinned: ${result.skippedPinned.join(', ')}`);
500
- }
489
+ else if (churnDryRun) {
490
+ console.log(`DRY RUN - ${result.marked} memories in ${root} WOULD be tagged churn-stale (${result.alreadyMarked} already tagged):`);
491
+ }
492
+ else {
493
+ console.log(`Tagged ${result.marked} memories churn-stale in ${root} (${result.alreadyMarked} already tagged):`);
494
+ }
495
+ result.preview.forEach(p => console.log(` ${p.id} ${p.evidence} ${p.already ? '(already) ' : ''}${p.headline}`));
496
+ if (result.skippedPinned.length > 0) {
497
+ console.log(`Skipped ${result.skippedPinned.length} pinned: ${result.skippedPinned.join(', ')}`);
501
498
  }
502
- if (churnFailed)
503
- process.exit(1);
504
- return;
505
499
  }
500
+ if (churnFailed)
501
+ process.exit(1);
502
+ }
503
+ export function handleInvalidate({ hippoRoot, args, flags }) {
504
+ requireInit(hippoRoot);
505
+ if (flags['churn'] === true)
506
+ return invalidateChurn(hippoRoot, args, flags);
506
507
  const target = args[0];
507
508
  if (flags['id'] === true) {
508
509
  // Value-less --id must never silently fall through to pattern mode