@link-assistant/hive-mind 1.78.0 → 1.78.2

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 (58) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/package.json +1 -1
  3. package/src/agent.lib.mjs +2 -1
  4. package/src/claude.lib.mjs +2 -2
  5. package/src/claude.runtime-switch.lib.mjs +2 -1
  6. package/src/codex.lib.mjs +2 -1
  7. package/src/config.lib.mjs +2 -1
  8. package/src/contributing-guidelines.lib.mjs +2 -1
  9. package/src/gemini.lib.mjs +2 -1
  10. package/src/github-entity-validation.lib.mjs +2 -1
  11. package/src/github-error-reporter.lib.mjs +2 -1
  12. package/src/github.batch.lib.mjs +2 -1
  13. package/src/github.lib.mjs +2 -1
  14. package/src/handoff-skill.lib.mjs +2 -1
  15. package/src/hive.mjs +11 -10
  16. package/src/interactive-codex-events.lib.mjs +167 -0
  17. package/src/interactive-mode.lib.mjs +62 -152
  18. package/src/interactive-mode.shared.lib.mjs +1 -0
  19. package/src/interactive-system-events.lib.mjs +224 -0
  20. package/src/isolation-runner.lib.mjs +2 -1
  21. package/src/lenv-reader.lib.mjs +2 -1
  22. package/src/lib.mjs +2 -1
  23. package/src/lino.lib.mjs +2 -1
  24. package/src/local-ci-checks.lib.mjs +2 -1
  25. package/src/log-upload.lib.mjs +2 -1
  26. package/src/memory-check.mjs +2 -1
  27. package/src/models/index.mjs +2 -1
  28. package/src/npm-global-prefix.lib.mjs +160 -0
  29. package/src/opencode.lib.mjs +2 -1
  30. package/src/playwright-mcp.lib.mjs +2 -1
  31. package/src/protect-branch.mjs +2 -1
  32. package/src/queue-config.lib.mjs +2 -1
  33. package/src/qwen.lib.mjs +2 -1
  34. package/src/review.mjs +2 -1
  35. package/src/reviewers-hive.mjs +2 -1
  36. package/src/session-monitor.lib.mjs +82 -22
  37. package/src/solve.auto-continue.lib.mjs +2 -1
  38. package/src/solve.auto-ensure.lib.mjs +2 -1
  39. package/src/solve.auto-merge-helpers.lib.mjs +2 -1
  40. package/src/solve.auto-merge.lib.mjs +2 -1
  41. package/src/solve.bootstrap.lib.mjs +2 -1
  42. package/src/solve.escalate.lib.mjs +2 -1
  43. package/src/solve.execution.lib.mjs +2 -1
  44. package/src/solve.fork-detection.lib.mjs +2 -1
  45. package/src/solve.fork-sync.lib.mjs +2 -1
  46. package/src/solve.keep-working.lib.mjs +2 -1
  47. package/src/solve.mjs +2 -2
  48. package/src/solve.repository.lib.mjs +2 -1
  49. package/src/solve.restart-shared.lib.mjs +2 -1
  50. package/src/solve.results.lib.mjs +2 -1
  51. package/src/solve.validation.lib.mjs +2 -1
  52. package/src/solve.watch.lib.mjs +2 -1
  53. package/src/telegram-bot.mjs +2 -1
  54. package/src/token-sanitization.lib.mjs +2 -1
  55. package/src/tool-comments.lib.mjs +2 -1
  56. package/src/use-m-bootstrap.lib.mjs +23 -0
  57. package/src/useless-tools.lib.mjs +2 -1
  58. package/src/youtrack/youtrack.lib.mjs +2 -1
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ import { ensureUseM } from './use-m-bootstrap.lib.mjs';
2
3
  // Early exit for --version (issue #1318: avoid dotenvx MISSING_ENV_FILE warnings)
3
4
  if (process.argv.includes('--version')) {
4
5
  const v = await import('./version.lib.mjs').then(m => m.getVersion()).catch(() => 'unknown');
@@ -7,7 +8,7 @@ if (process.argv.includes('--version')) {
7
8
  }
8
9
 
9
10
  if (typeof use === 'undefined') {
10
- globalThis.use = (await eval(await (await fetch('https://unpkg.com/use-m/use.js')).text())).use;
11
+ await ensureUseM();
11
12
  }
12
13
 
13
14
  const { lino } = await import('./lino.lib.mjs');
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ import { ensureUseM } from './use-m-bootstrap.lib.mjs';
2
3
  /**
3
4
  * Token sanitization utilities for log content
4
5
  * Dual approach: Uses both secretlint AND custom patterns for comprehensive coverage
@@ -240,7 +241,7 @@ export const getGitHubTokensFromFiles = async () => {
240
241
  */
241
242
  export const getGitHubTokensFromCommand = async () => {
242
243
  if (typeof globalThis.use === 'undefined') {
243
- globalThis.use = (await eval(await (await fetch('https://unpkg.com/use-m/use.js')).text())).use;
244
+ await ensureUseM();
244
245
  }
245
246
  const { $ } = await globalThis.use('command-stream');
246
247
  const tokens = [];
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ import { ensureUseM } from './use-m-bootstrap.lib.mjs';
2
3
 
3
4
  /**
4
5
  * Centralized definitions for GitHub comments posted by solve.mjs itself
@@ -290,7 +291,7 @@ export const postTrackedCommentFromFile = async ({ $, owner, repo, targetNumber,
290
291
  throw new Error('postTrackedCommentFromFile requires a command-stream $ helper');
291
292
  }
292
293
  if (typeof globalThis.use === 'undefined') {
293
- globalThis.use = (await eval(await (await fetch('https://unpkg.com/use-m/use.js')).text())).use;
294
+ await ensureUseM();
294
295
  }
295
296
  const fs = (await globalThis.use('fs')).promises;
296
297
  let body;
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { ensureWritableNpmGlobalPrefix } from './npm-global-prefix.lib.mjs';
4
+
5
+ const defaultFetchUseMCode = async () => (await fetch('https://unpkg.com/use-m/use.js')).text();
6
+
7
+ /**
8
+ * Load the use-m bootstrap after npm's global prefix has been made safe for
9
+ * use-m's Node resolver.
10
+ *
11
+ * @param {object} [options]
12
+ * @param {(message: string) => void} [options.log]
13
+ * @param {() => Promise<string>} [options.fetchUseMCode]
14
+ * @returns {Promise<Function>} The global use-m `use` function.
15
+ */
16
+ export const ensureUseM = async (options = {}) => {
17
+ const { log = message => console.log(message), fetchUseMCode = defaultFetchUseMCode } = options;
18
+ await ensureWritableNpmGlobalPrefix({ log });
19
+ if (typeof globalThis.use === 'undefined') {
20
+ globalThis.use = (await eval(await fetchUseMCode())).use;
21
+ }
22
+ return globalThis.use;
23
+ };
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ import { ensureUseM } from './use-m-bootstrap.lib.mjs';
2
3
  // Useless Claude Code tools and MCP servers for autonomous headless workflows.
3
4
  //
4
5
  // Hive-mind runs `claude` inside Docker with `--print --dangerously-skip-permissions`
@@ -17,7 +18,7 @@
17
18
  // Related issue: https://github.com/link-assistant/hive-mind/issues/1627
18
19
 
19
20
  if (typeof globalThis.use === 'undefined') {
20
- globalThis.use = (await eval(await (await fetch('https://unpkg.com/use-m/use.js')).text())).use;
21
+ await ensureUseM();
21
22
  }
22
23
  const fs = (await use('fs')).promises;
23
24
  const os = await use('os');
@@ -1,10 +1,11 @@
1
1
  #!/usr/bin/env node
2
+ import { ensureUseM } from '../use-m-bootstrap.lib.mjs';
2
3
  // YouTrack-related utility functions
3
4
 
4
5
  // Check if use is already defined (when imported from other modules)
5
6
  // If not, fetch it (when running standalone)
6
7
  if (typeof use === 'undefined') {
7
- globalThis.use = (await eval(await (await fetch('https://unpkg.com/use-m/use.js')).text())).use;
8
+ await ensureUseM();
8
9
  }
9
10
 
10
11
  // Import log and other utilities from general lib