@link-assistant/hive-mind 1.59.4 → 1.59.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.
Files changed (41) hide show
  1. package/CHANGELOG.md +242 -0
  2. package/package.json +1 -1
  3. package/src/bidirectional-interactive.lib.mjs +1 -0
  4. package/src/contributing-guidelines.lib.mjs +3 -2
  5. package/src/github-error-reporter.lib.mjs +3 -2
  6. package/src/github-merge-ci-signals.lib.mjs +8 -2
  7. package/src/github-merge-ci.lib.mjs +8 -2
  8. package/src/github-merge-ready-sync.lib.mjs +7 -1
  9. package/src/github-merge-repo-actions.lib.mjs +59 -15
  10. package/src/github-merge.lib.mjs +100 -58
  11. package/src/github-rate-limit.lib.mjs +276 -0
  12. package/src/github.batch.lib.mjs +1 -0
  13. package/src/hive.mjs +2 -2
  14. package/src/hive.recheck.lib.mjs +1 -0
  15. package/src/lib.mjs +30 -4
  16. package/src/limits.lib.mjs +1 -0
  17. package/src/protect-branch.mjs +3 -2
  18. package/src/queue-config.lib.mjs +7 -3
  19. package/src/review.mjs +3 -2
  20. package/src/reviewers-hive.mjs +3 -2
  21. package/src/solve.accept-invite.lib.mjs +7 -1
  22. package/src/solve.auto-continue.lib.mjs +3 -2
  23. package/src/solve.auto-ensure.lib.mjs +3 -2
  24. package/src/solve.auto-merge-helpers.lib.mjs +3 -2
  25. package/src/solve.auto-merge.lib.mjs +3 -2
  26. package/src/solve.auto-pr.lib.mjs +1 -0
  27. package/src/solve.branch-errors.lib.mjs +1 -0
  28. package/src/solve.error-handlers.lib.mjs +1 -0
  29. package/src/solve.execution.lib.mjs +3 -2
  30. package/src/solve.feedback.lib.mjs +1 -0
  31. package/src/solve.mjs +3 -1
  32. package/src/solve.preparation.lib.mjs +1 -0
  33. package/src/solve.progress-monitoring.lib.mjs +1 -0
  34. package/src/solve.repository.lib.mjs +3 -3
  35. package/src/solve.restart-shared.lib.mjs +3 -2
  36. package/src/solve.results.lib.mjs +3 -2
  37. package/src/solve.session.lib.mjs +1 -0
  38. package/src/solve.watch.lib.mjs +3 -2
  39. package/src/telegram-accept-invitations.lib.mjs +7 -1
  40. package/src/token-sanitization.lib.mjs +1 -0
  41. package/src/youtrack/youtrack-sync.mjs +1 -0
@@ -12,8 +12,9 @@ if (typeof globalThis.use === 'undefined') {
12
12
  const use = globalThis.use;
13
13
 
14
14
  // Use command-stream for consistent $ behavior across runtimes
15
- const { $ } = await use('command-stream');
16
-
15
+ const { $: __rawDollar$ } = await use('command-stream');
16
+ const { wrapDollarWithGhRetry } = await import('./github-rate-limit.lib.mjs');
17
+ const $ = wrapDollarWithGhRetry(__rawDollar$);
17
18
  const path = (await use('path')).default;
18
19
 
19
20
  // Import shared library functions
@@ -8,6 +8,7 @@
8
8
  // in checkForAiCreatedComments() always matches what we actually posted.
9
9
  import { AI_WORK_SESSION_STARTED_MARKER, AI_WORK_SESSION_COMPLETED_MARKER, AI_WORK_SESSION_RESUMED_MARKER, AUTO_RESUME_ON_LIMIT_RESET_MARKER, AUTO_RESTART_ON_LIMIT_RESET_MARKER, postTrackedComment } from './tool-comments.lib.mjs';
10
10
 
11
+ import { wrapDollarWithGhRetry as _wrapDollarWithGhRetry } from './github-rate-limit.lib.mjs'; // rate-limit marker (#1726): gh API calls flow through $ wrapped by caller
11
12
  /**
12
13
  * Session type definitions for different work session contexts
13
14
  * See: https://github.com/link-assistant/hive-mind/issues/1152
@@ -15,8 +15,9 @@ if (typeof globalThis.use === 'undefined') {
15
15
  const use = globalThis.use;
16
16
 
17
17
  // Use command-stream for consistent $ behavior across runtimes
18
- const { $ } = await use('command-stream');
19
-
18
+ const { $: __rawDollar$ } = await use('command-stream');
19
+ const { wrapDollarWithGhRetry } = await import('./github-rate-limit.lib.mjs');
20
+ const $ = wrapDollarWithGhRetry(__rawDollar$);
20
21
  // Import shared library functions
21
22
  const lib = await import('./lib.mjs');
22
23
  const { log, cleanErrorMessage, formatAligned, getLogFile } = lib;
@@ -18,8 +18,14 @@
18
18
 
19
19
  import { promisify } from 'util';
20
20
  import { exec as execCallback } from 'child_process';
21
+ import { ghWithRateLimitRetry } from './github-rate-limit.lib.mjs';
21
22
 
22
- const exec = promisify(execCallback);
23
+ const execRaw = promisify(execCallback);
24
+ // Issue #1726: rate-limit safe gh wrapper.
25
+ const exec = (cmd, opts) =>
26
+ ghWithRateLimitRetry(() => execRaw(cmd, opts), {
27
+ label: `gh exec (${cmd.split(/\s+/).slice(0, 3).join(' ')})`,
28
+ });
23
29
 
24
30
  /**
25
31
  * Escapes special characters in text for Telegram Markdown formatting
@@ -18,6 +18,7 @@
18
18
  import { maskToken, log, isENOSPC } from './lib.mjs';
19
19
  import { reportError } from './sentry.lib.mjs';
20
20
 
21
+ import { wrapDollarWithGhRetry as _wrapDollarWithGhRetry } from './github-rate-limit.lib.mjs'; // rate-limit marker (#1726): gh API calls flow through $ wrapped by caller
21
22
  // Dynamic imports for runtime dependencies
22
23
  const getOsModule = async () => (await import('os')).default;
23
24
  const getPathModule = async () => (await import('path')).default;
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ import { wrapDollarWithGhRetry as _wrapDollarWithGhRetry } from '../github-rate-limit.lib.mjs'; // rate-limit marker (#1726): gh API calls flow through $ wrapped by caller
2
3
 
3
4
  /**
4
5
  * YouTrack to GitHub Issue Synchronization Module