hyperclaw 5.0.6 → 5.0.7

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 (107) hide show
  1. package/dist/chat-C7Jwz6dG.js +261 -0
  2. package/dist/chat-CjZKt5Sa.js +261 -0
  3. package/dist/clawhub-DRzu1zgW.js +1 -1
  4. package/dist/daemon-CckW3svB.js +318 -0
  5. package/dist/daemon-pjlxpq7e.js +5 -0
  6. package/dist/developer-keys-B9VmWyj7.js +1 -1
  7. package/dist/developer-keys-BHt_R-yo.js +1 -1
  8. package/dist/developer-keys-BNo6wlFV.js +1 -1
  9. package/dist/developer-keys-Cnd1kswV.js +1 -1
  10. package/dist/developer-keys-DrrcUqFa.js +1 -1
  11. package/dist/developer-keys-JaJK3T27.js +1 -1
  12. package/dist/doctor-BvCe8BBk.js +1 -1
  13. package/dist/doctor-Dgjoc3DG.js +1 -1
  14. package/dist/engine-CdINNSpU.js +7 -0
  15. package/dist/engine-hWJ1H1iP.js +305 -0
  16. package/dist/health-DVfkpUQW.js +1 -1
  17. package/dist/health-Ds2YlpTB.js +1 -1
  18. package/dist/hub-BO6bj8Yj.js +2 -2
  19. package/dist/hub-CfwUz9YW.js +2 -2
  20. package/dist/hub-D0XwdjM-.js +2 -2
  21. package/dist/hub-FrPTA33j.js +2 -2
  22. package/dist/hyperclawbot-m7N4LcRP.js +505 -0
  23. package/dist/logger-BFZSSq02.js +84 -0
  24. package/dist/manager-B2Gls5RG.js +1 -1
  25. package/dist/manager-BGLjW-ua.js +1 -1
  26. package/dist/manager-Bc4MAD-u.js +1 -1
  27. package/dist/manager-Biz9ixWJ.js +1 -1
  28. package/dist/manager-BnEDrLmB.js +1 -1
  29. package/dist/manager-CGFXv_Wl.js +1 -1
  30. package/dist/manager-CHROwzvH.js +1 -1
  31. package/dist/manager-CVLLaKmq.js +1 -1
  32. package/dist/manager-ClSlbh9E.js +1 -1
  33. package/dist/manager-DOWs9lLX.js +1 -1
  34. package/dist/manager-DWQSp1oL.js +1 -1
  35. package/dist/manager-DgyF52mg.js +1 -1
  36. package/dist/manager-Dm8nrMFx.js +1 -1
  37. package/dist/manager-DmpD4AaH.js +1 -1
  38. package/dist/manager-FCgF1plu.js +1 -1
  39. package/dist/manager-rgCsaWT1.js +1 -1
  40. package/dist/mcp-loader-BnxhSR9g.js +94 -0
  41. package/dist/memory-integration-B8RSN4pr.js +1 -1
  42. package/dist/memory-integration-BvgKnc-3.js +1 -1
  43. package/dist/memory-integration-CBPtFFjO.js +1 -1
  44. package/dist/memory-integration-DZExqWr4.js +1 -1
  45. package/dist/memory-integration-HTZzDjPr.js +1 -1
  46. package/dist/memory-integration-PZuznyp9.js +1 -1
  47. package/dist/memory-integration-cSYkZyEo.js +1 -1
  48. package/dist/memory-integration-g2vxwgoE.js +1 -1
  49. package/dist/memory-integration-lAXNUc7y.js +1 -1
  50. package/dist/onboard-B963fZXV.js +1 -1
  51. package/dist/onboard-BI5-egZB.js +11 -0
  52. package/dist/onboard-BKfMt31e.js +1 -1
  53. package/dist/onboard-BUmfBWVq.js +4123 -0
  54. package/dist/onboard-BVG2PEum.js +1 -1
  55. package/dist/onboard-BVOtKQdh.js +1 -1
  56. package/dist/onboard-BXNXCQp4.js +1 -1
  57. package/dist/onboard-Bd_wsYdi.js +1 -1
  58. package/dist/onboard-Bw28IRQ3.js +1 -1
  59. package/dist/onboard-CAN7x3me.js +1 -1
  60. package/dist/onboard-CLABoNKG.js +4099 -0
  61. package/dist/onboard-CVI5lUsf.js +1 -1
  62. package/dist/onboard-CdJCHc1l.js +1 -1
  63. package/dist/onboard-ChdCrzG4.js +1 -1
  64. package/dist/onboard-CrxmSiy9.js +1 -1
  65. package/dist/onboard-DAqvQwwu.js +11 -0
  66. package/dist/onboard-DTFz_Whz.js +1 -1
  67. package/dist/onboard-DVgH7paw.js +11 -0
  68. package/dist/onboard-DgMPC9Qt.js +4123 -0
  69. package/dist/onboard-DnegOHMh.js +1 -1
  70. package/dist/onboard-DzXbFS1o.js +1 -1
  71. package/dist/orchestrator-79HXXDdP.js +6 -0
  72. package/dist/orchestrator-TGesUBGZ.js +189 -0
  73. package/dist/paths-BAyP6TbW.js +1 -1
  74. package/dist/paths-D-QecARF.js +1 -1
  75. package/dist/paths-DPovhojT.js +1 -1
  76. package/dist/pc-access-560pyOsu.js +1 -1
  77. package/dist/run-main.js +36 -29
  78. package/dist/runner-BHRSOPEU.js +1 -1
  79. package/dist/runner-Bu--_RXw.js +1 -1
  80. package/dist/runner-C-mmfhY7.js +1 -1
  81. package/dist/runner-CJFJUtPm.js +1 -1
  82. package/dist/runner-CuO6TMFT.js +1 -1
  83. package/dist/runner-D0ca-Lzi.js +1 -1
  84. package/dist/runner-D1rjuMTJ.js +1 -1
  85. package/dist/runner-D2Q8YvHW.js +1 -1
  86. package/dist/runner-DIefAdtj.js +1 -1
  87. package/dist/runner-DatMMYYE.js +1 -1
  88. package/dist/runner-Dh65wta9.js +1 -1
  89. package/dist/runner-FhyE2VNa.js +1 -1
  90. package/dist/server-BoGCZCf2.js +4 -0
  91. package/dist/server-DB6PQzNR.js +1 -1
  92. package/dist/server-DaBgrB4W.js +1255 -0
  93. package/dist/skill-runtime-CYtCaHxf.js +5 -0
  94. package/dist/skill-runtime-Z8OhW4eX.js +102 -0
  95. package/dist/src-0nY9IATM.js +63 -0
  96. package/dist/src-3S81Pvdb.js +458 -0
  97. package/dist/src-BeacbqsZ.js +1 -1
  98. package/dist/src-C3_9DBLN.js +1 -1
  99. package/dist/src-CDnzzbzf.js +1 -1
  100. package/dist/src-CGQjRI4N.js +1 -1
  101. package/dist/src-CVxp9DM-.js +1 -1
  102. package/dist/src-DIc-L2IG.js +1 -1
  103. package/dist/src-DWCUhnD4.js +1 -1
  104. package/dist/sub-agent-tools-DpGd5o7N.js +39 -0
  105. package/package.json +2 -1
  106. package/scripts/fix-init-paths.mjs +44 -0
  107. package/scripts/postinstall.js +1 -1
@@ -7,7 +7,7 @@ var init_types = require_chunk.__esm({ "packages/shared/src/types.ts"() {} });
7
7
  //#endregion
8
8
  //#region packages/shared/src/index.ts
9
9
  var init_src = require_chunk.__esm({ "packages/shared/src/index.ts"() {
10
- init_paths();
10
+ require_paths.require_paths.require_paths.require_paths.require_paths.require_paths.require_paths.require_paths.init_paths();
11
11
  init_types();
12
12
  } });
13
13
 
@@ -7,7 +7,7 @@ var init_types = require_chunk.__esm({ "packages/shared/src/types.ts"() {} });
7
7
  //#endregion
8
8
  //#region packages/shared/src/index.ts
9
9
  var init_src = require_chunk.__esm({ "packages/shared/src/index.ts"() {
10
- init_paths();
10
+ require_paths.require_paths.require_paths.require_paths.require_paths.require_paths.require_paths.require_paths.init_paths();
11
11
  init_types();
12
12
  } });
13
13
 
@@ -0,0 +1,39 @@
1
+ const require_chunk = require('./chunk-jS-bbMI5.js');
2
+
3
+ //#region packages/core/src/agent/sub-agent-tools.ts
4
+ /** Tool: spawn a sub-agent to accomplish a focused goal. Returns the sub-agent's response. */
5
+ function getSubAgentTools() {
6
+ return [{
7
+ name: "spawn_sub_agent",
8
+ description: "Delegate a focused subtask to a sub-agent. Use when you need specialized work (research, coding, summarization) that benefits from a fresh context. Provide a clear, self-contained goal.",
9
+ input_schema: {
10
+ type: "object",
11
+ properties: {
12
+ goal: {
13
+ type: "string",
14
+ description: "Clear, self-contained goal for the sub-agent (e.g. \"Summarize the key points of X\", \"Write a function that does Y\")"
15
+ },
16
+ context: {
17
+ type: "string",
18
+ description: "Optional context the sub-agent needs (paste relevant excerpts)"
19
+ }
20
+ },
21
+ required: ["goal"]
22
+ },
23
+ handler: async (input) => {
24
+ const goal = String(input.goal || "").trim();
25
+ const context = String(input.context || "").trim();
26
+ if (!goal) return "Error: goal is required.";
27
+ const prompt = context ? `Context:\n${context}\n\nTask: ${goal}` : goal;
28
+ const { runAgentEngine } = await Promise.resolve().then(() => require("./engine-CdINNSpU.js"));
29
+ const result = await runAgentEngine(prompt, {});
30
+ if (result.error) return `Sub-agent error: ${result.text}`;
31
+ return result.text;
32
+ }
33
+ }];
34
+ }
35
+ var init_sub_agent_tools = require_chunk.__esm({ "packages/core/src/agent/sub-agent-tools.ts"() {} });
36
+
37
+ //#endregion
38
+ init_sub_agent_tools();
39
+ exports.getSubAgentTools = getSubAgentTools;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hyperclaw",
3
- "version": "5.0.6",
3
+ "version": "5.0.7",
4
4
  "description": "⚡ HyperClaw — AI Gateway Platform. The Lobster Evolution 🦅",
5
5
  "main": "dist/run-main.js",
6
6
  "bin": {
@@ -26,6 +26,7 @@
26
26
  },
27
27
  "scripts": {
28
28
  "build": "tsdown --config tsdown.config.mjs",
29
+ "postbuild": "node scripts/fix-init-paths.mjs",
29
30
  "build:tsc": "tsc --outDir dist",
30
31
  "start": "node dist/run-main.js",
31
32
  "dev": "ts-node src/cli/run-main.ts",
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Post-build fix: patch bundler-generated chunks where init_paths() is called
3
+ * as a bare variable inside __esm closures, but is only available via require_paths.
4
+ *
5
+ * Root cause: tsdown/Rollup splits @hyperclaw/shared into its own chunk, breaking
6
+ * the ESM lazy-init pattern when consumed as CJS.
7
+ */
8
+
9
+ import { readFileSync, writeFileSync, readdirSync } from 'fs';
10
+ import { join, dirname } from 'path';
11
+ import { fileURLToPath } from 'url';
12
+
13
+ const __dirname = dirname(fileURLToPath(import.meta.url));
14
+ const distDir = join(__dirname, '..', 'dist');
15
+
16
+ let fixed = 0;
17
+
18
+ for (const file of readdirSync(distDir)) {
19
+ if (!file.endsWith('.js')) continue;
20
+
21
+ const filePath = join(distDir, file);
22
+ const content = readFileSync(filePath, 'utf8');
23
+
24
+ // Only process files that have the broken pattern:
25
+ // a require_paths = require('./paths-*.js') AND a bare init_paths() call
26
+ if (!content.includes('init_paths();') || !content.includes('require_paths')) continue;
27
+
28
+ // Find the require_paths variable name (may vary across chunks)
29
+ const requireMatch = content.match(/const (\w+) = require\('\.\/paths-[^']+\.js'\)/);
30
+ if (!requireMatch) continue;
31
+
32
+ const requireVar = requireMatch[1];
33
+
34
+ // Replace bare init_paths() with requireVar.init_paths() inside __esm closures
35
+ const patched = content.replace(/\binit_paths\(\);/g, `${requireVar}.init_paths();`);
36
+
37
+ if (patched !== content) {
38
+ writeFileSync(filePath, patched, 'utf8');
39
+ console.log(` fixed: ${file}`);
40
+ fixed++;
41
+ }
42
+ }
43
+
44
+ console.log(`\nfix-init-paths: patched ${fixed} file(s).`);
@@ -15,7 +15,7 @@ try {
15
15
  var bold = function(s) { return '\x1b[1m' + s + '\x1b[0m'; };
16
16
  var gray = function(s) { return '\x1b[90m' + s + '\x1b[0m'; };
17
17
 
18
- var version = '5.0.6';
18
+ var version = '5.0.7';
19
19
  try {
20
20
  var path = require('path');
21
21
  var fs = require('fs');