openvibe 0.63.2 → 0.63.3

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 (158) hide show
  1. package/CHANGELOG.md +81 -0
  2. package/README.md +39 -0
  3. package/README_CN.md +1 -1
  4. package/dist/cli/args.d.ts +3 -1
  5. package/dist/cli/args.d.ts.map +1 -1
  6. package/dist/cli/args.js +22 -2
  7. package/dist/cli/args.js.map +1 -1
  8. package/dist/core/agent-session.d.ts.map +1 -1
  9. package/dist/core/agent-session.js +5 -3
  10. package/dist/core/agent-session.js.map +1 -1
  11. package/dist/core/companion/executor/bash-executor.d.ts +30 -0
  12. package/dist/core/companion/executor/bash-executor.d.ts.map +1 -0
  13. package/dist/core/companion/executor/bash-executor.js +105 -0
  14. package/dist/core/companion/executor/bash-executor.js.map +1 -0
  15. package/dist/core/companion/executor/code-executor.d.ts +33 -0
  16. package/dist/core/companion/executor/code-executor.d.ts.map +1 -0
  17. package/dist/core/companion/executor/code-executor.js +144 -0
  18. package/dist/core/companion/executor/code-executor.js.map +1 -0
  19. package/dist/core/companion/executor/resource-monitor.d.ts +55 -0
  20. package/dist/core/companion/executor/resource-monitor.d.ts.map +1 -0
  21. package/dist/core/companion/executor/resource-monitor.js +141 -0
  22. package/dist/core/companion/executor/resource-monitor.js.map +1 -0
  23. package/dist/core/companion/http-server.d.ts +92 -0
  24. package/dist/core/companion/http-server.d.ts.map +1 -0
  25. package/dist/core/companion/http-server.js +229 -0
  26. package/dist/core/companion/http-server.js.map +1 -0
  27. package/dist/core/companion/index.d.ts +29 -0
  28. package/dist/core/companion/index.d.ts.map +1 -0
  29. package/dist/core/companion/index.js +48 -0
  30. package/dist/core/companion/index.js.map +1 -0
  31. package/dist/core/companion/scheduler/resource-scheduler.d.ts +82 -0
  32. package/dist/core/companion/scheduler/resource-scheduler.d.ts.map +1 -0
  33. package/dist/core/companion/scheduler/resource-scheduler.js +333 -0
  34. package/dist/core/companion/scheduler/resource-scheduler.js.map +1 -0
  35. package/dist/core/companion/scheduler/workers/base-worker.d.ts +87 -0
  36. package/dist/core/companion/scheduler/workers/base-worker.d.ts.map +1 -0
  37. package/dist/core/companion/scheduler/workers/base-worker.js +70 -0
  38. package/dist/core/companion/scheduler/workers/base-worker.js.map +1 -0
  39. package/dist/core/companion/scheduler/workers/cpu-worker.d.ts +12 -0
  40. package/dist/core/companion/scheduler/workers/cpu-worker.d.ts.map +1 -0
  41. package/dist/core/companion/scheduler/workers/cpu-worker.js +134 -0
  42. package/dist/core/companion/scheduler/workers/cpu-worker.js.map +1 -0
  43. package/dist/core/companion/scheduler/workers/gpu-worker.d.ts +16 -0
  44. package/dist/core/companion/scheduler/workers/gpu-worker.d.ts.map +1 -0
  45. package/dist/core/companion/scheduler/workers/gpu-worker.js +167 -0
  46. package/dist/core/companion/scheduler/workers/gpu-worker.js.map +1 -0
  47. package/dist/core/companion/scheduler/workers/index.d.ts +6 -0
  48. package/dist/core/companion/scheduler/workers/index.d.ts.map +1 -0
  49. package/dist/core/companion/scheduler/workers/index.js +6 -0
  50. package/dist/core/companion/scheduler/workers/index.js.map +1 -0
  51. package/dist/core/companion/scheduler/workers/io-worker.d.ts +17 -0
  52. package/dist/core/companion/scheduler/workers/io-worker.d.ts.map +1 -0
  53. package/dist/core/companion/scheduler/workers/io-worker.js +197 -0
  54. package/dist/core/companion/scheduler/workers/io-worker.js.map +1 -0
  55. package/dist/core/companion/scheduler/workers/network-worker.d.ts +13 -0
  56. package/dist/core/companion/scheduler/workers/network-worker.d.ts.map +1 -0
  57. package/dist/core/companion/scheduler/workers/network-worker.js +167 -0
  58. package/dist/core/companion/scheduler/workers/network-worker.js.map +1 -0
  59. package/dist/core/companion/security/security-manager.d.ts +50 -0
  60. package/dist/core/companion/security/security-manager.d.ts.map +1 -0
  61. package/dist/core/companion/security/security-manager.js +102 -0
  62. package/dist/core/companion/security/security-manager.js.map +1 -0
  63. package/dist/core/hybrid-cloud/extension.d.ts +8 -0
  64. package/dist/core/hybrid-cloud/extension.d.ts.map +1 -0
  65. package/dist/core/hybrid-cloud/extension.js +64 -0
  66. package/dist/core/hybrid-cloud/extension.js.map +1 -0
  67. package/dist/core/hybrid-cloud/index.d.ts +98 -0
  68. package/dist/core/hybrid-cloud/index.d.ts.map +1 -0
  69. package/dist/core/hybrid-cloud/index.js +211 -0
  70. package/dist/core/hybrid-cloud/index.js.map +1 -0
  71. package/dist/core/keybindings.d.ts +1 -1
  72. package/dist/core/keybindings.d.ts.map +1 -1
  73. package/dist/core/keybindings.js +3 -1
  74. package/dist/core/keybindings.js.map +1 -1
  75. package/dist/core/package-manager.d.ts.map +1 -1
  76. package/dist/core/package-manager.js +6 -1
  77. package/dist/core/package-manager.js.map +1 -1
  78. package/dist/core/settings-manager.d.ts +13 -0
  79. package/dist/core/settings-manager.d.ts.map +1 -1
  80. package/dist/core/settings-manager.js +35 -0
  81. package/dist/core/settings-manager.js.map +1 -1
  82. package/dist/core/slash-commands.d.ts.map +1 -1
  83. package/dist/core/slash-commands.js +7 -0
  84. package/dist/core/slash-commands.js.map +1 -1
  85. package/dist/core/system-prompt.d.ts.map +1 -1
  86. package/dist/core/system-prompt.js +46 -0
  87. package/dist/core/system-prompt.js.map +1 -1
  88. package/dist/core/todo-manager.d.ts +32 -0
  89. package/dist/core/todo-manager.d.ts.map +1 -0
  90. package/dist/core/todo-manager.js +117 -0
  91. package/dist/core/todo-manager.js.map +1 -0
  92. package/dist/core/tools/batch-write.d.ts +42 -0
  93. package/dist/core/tools/batch-write.d.ts.map +1 -0
  94. package/dist/core/tools/batch-write.js +267 -0
  95. package/dist/core/tools/batch-write.js.map +1 -0
  96. package/dist/core/tools/edit.d.ts.map +1 -1
  97. package/dist/core/tools/edit.js +10 -2
  98. package/dist/core/tools/edit.js.map +1 -1
  99. package/dist/core/tools/fast-executor.d.ts +6 -1
  100. package/dist/core/tools/fast-executor.d.ts.map +1 -1
  101. package/dist/core/tools/fast-executor.js +83 -4
  102. package/dist/core/tools/fast-executor.js.map +1 -1
  103. package/dist/core/tools/index.d.ts +141 -0
  104. package/dist/core/tools/index.d.ts.map +1 -1
  105. package/dist/core/tools/index.js +30 -0
  106. package/dist/core/tools/index.js.map +1 -1
  107. package/dist/core/tools/todo.d.ts +47 -0
  108. package/dist/core/tools/todo.d.ts.map +1 -0
  109. package/dist/core/tools/todo.js +212 -0
  110. package/dist/core/tools/todo.js.map +1 -0
  111. package/dist/core/tools/unified.d.ts +121 -0
  112. package/dist/core/tools/unified.d.ts.map +1 -0
  113. package/dist/core/tools/unified.js +481 -0
  114. package/dist/core/tools/unified.js.map +1 -0
  115. package/dist/core/tools/write.d.ts +1 -1
  116. package/dist/core/tools/write.d.ts.map +1 -1
  117. package/dist/core/tools/write.js +20 -5
  118. package/dist/core/tools/write.js.map +1 -1
  119. package/dist/main.d.ts.map +1 -1
  120. package/dist/main.js +63 -1
  121. package/dist/main.js.map +1 -1
  122. package/dist/modes/index.d.ts +2 -0
  123. package/dist/modes/index.d.ts.map +1 -1
  124. package/dist/modes/index.js +2 -0
  125. package/dist/modes/index.js.map +1 -1
  126. package/dist/modes/interactive/components/index.d.ts +1 -0
  127. package/dist/modes/interactive/components/index.d.ts.map +1 -1
  128. package/dist/modes/interactive/components/index.js +1 -0
  129. package/dist/modes/interactive/components/index.js.map +1 -1
  130. package/dist/modes/interactive/components/todo-display.d.ts +9 -0
  131. package/dist/modes/interactive/components/todo-display.d.ts.map +1 -0
  132. package/dist/modes/interactive/components/todo-display.js +60 -0
  133. package/dist/modes/interactive/components/todo-display.js.map +1 -0
  134. package/dist/modes/interactive/interactive-mode.d.ts +8 -0
  135. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  136. package/dist/modes/interactive/interactive-mode.js +151 -0
  137. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  138. package/dist/modes/plan-mode.d.ts +14 -0
  139. package/dist/modes/plan-mode.d.ts.map +1 -0
  140. package/dist/modes/plan-mode.js +107 -0
  141. package/dist/modes/plan-mode.js.map +1 -0
  142. package/dist/modes/spec-mode.d.ts +16 -0
  143. package/dist/modes/spec-mode.d.ts.map +1 -0
  144. package/dist/modes/spec-mode.js +186 -0
  145. package/dist/modes/spec-mode.js.map +1 -0
  146. package/dist/utils/version-check.d.ts.map +1 -1
  147. package/dist/utils/version-check.js +2 -2
  148. package/dist/utils/version-check.js.map +1 -1
  149. package/docs/HYBRID_CLOUD_README.md +188 -0
  150. package/docs/hybrid-architecture-design.md +317 -0
  151. package/docs/todo.md +71 -0
  152. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  153. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  154. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  155. package/examples/extensions/custom-provider-qwen-cli/package.json +1 -1
  156. package/examples/extensions/with-deps/package-lock.json +2 -2
  157. package/examples/extensions/with-deps/package.json +1 -1
  158. package/package.json +4 -4
@@ -13,6 +13,7 @@ import { createCompactionSummaryMessage } from "../../core/messages.js";
13
13
  import { hasConfiguredModels, runOnboarding } from "../../core/onboarding.js";
14
14
  import { SessionManager } from "../../core/session-manager.js";
15
15
  import { BUILTIN_SLASH_COMMANDS } from "../../core/slash-commands.js";
16
+ import { addTodo, clearAll, clearCompleted, completeTodo, getStats, listTodos, removeTodo, uncompleteTodo, } from "../../core/todo-manager.js";
16
17
  import { getChangelogPath, getNewEntries, parseChangelog } from "../../utils/changelog.js";
17
18
  import { copyToClipboard } from "../../utils/clipboard.js";
18
19
  import { extensionForImageMimeType, readClipboardImage } from "../../utils/clipboard-image.js";
@@ -35,6 +36,7 @@ import { SessionSelectorComponent } from "./components/session-selector.js";
35
36
  import { SettingsSelectorComponent } from "./components/settings-selector.js";
36
37
  import { SkillInvocationMessageComponent } from "./components/skill-invocation-message.js";
37
38
  import { SkillsSelectorComponent } from "./components/skills-selector.js";
39
+ import { createTodoDisplay } from "./components/todo-display.js";
38
40
  import { ToolExecutionComponent } from "./components/tool-execution.js";
39
41
  import { TreeSelectorComponent } from "./components/tree-selector.js";
40
42
  import { UserMessageComponent } from "./components/user-message.js";
@@ -1240,6 +1242,7 @@ export class InteractiveMode {
1240
1242
  this.defaultEditor.onCtrlD = () => this.handleCtrlD();
1241
1243
  this.defaultEditor.onAction("suspend", () => this.handleCtrlZ());
1242
1244
  this.defaultEditor.onAction("cycleThinkingLevel", () => this.cycleThinkingLevel());
1245
+ this.defaultEditor.onAction("cycleMode", () => this.cycleMode());
1243
1246
  this.ui.onDebug = () => this.handleDebugCommand();
1244
1247
  this.defaultEditor.onAction("expandTools", () => this.toggleToolOutputExpansion());
1245
1248
  this.defaultEditor.onAction("toggleThinking", () => this.toggleThinkingBlockVisibility());
@@ -1373,6 +1376,45 @@ export class InteractiveMode {
1373
1376
  this.editor.setText("");
1374
1377
  return;
1375
1378
  }
1379
+ if (text === "/todo") {
1380
+ this.handleTodoCommand();
1381
+ this.editor.setText("");
1382
+ return;
1383
+ }
1384
+ if (text === "/todo:add" || text.startsWith("/todo:add ")) {
1385
+ const todoText = text.startsWith("/todo:add ") ? text.slice(10).trim() : "";
1386
+ this.handleTodoAddCommand(todoText);
1387
+ this.editor.setText("");
1388
+ return;
1389
+ }
1390
+ if (text === "/todo:done" || text.startsWith("/todo:done ")) {
1391
+ const todoText = text.startsWith("/todo:done ") ? text.slice(11).trim() : "";
1392
+ this.handleTodoDoneCommand(todoText);
1393
+ this.editor.setText("");
1394
+ return;
1395
+ }
1396
+ if (text === "/todo:undo" || text.startsWith("/todo:undo ")) {
1397
+ const todoText = text.startsWith("/todo:undo ") ? text.slice(11).trim() : "";
1398
+ this.handleTodoUndoCommand(todoText);
1399
+ this.editor.setText("");
1400
+ return;
1401
+ }
1402
+ if (text === "/todo:remove" || text.startsWith("/todo:remove ")) {
1403
+ const todoText = text.startsWith("/todo:remove ") ? text.slice(13).trim() : "";
1404
+ this.handleTodoRemoveCommand(todoText);
1405
+ this.editor.setText("");
1406
+ return;
1407
+ }
1408
+ if (text === "/todo:clear") {
1409
+ this.handleTodoClearCommand();
1410
+ this.editor.setText("");
1411
+ return;
1412
+ }
1413
+ if (text === "/todo:clear-all") {
1414
+ this.handleTodoClearAllCommand();
1415
+ this.editor.setText("");
1416
+ return;
1417
+ }
1376
1418
  if (text === "/quit") {
1377
1419
  this.editor.setText("");
1378
1420
  await this.shutdown();
@@ -1924,6 +1966,18 @@ export class InteractiveMode {
1924
1966
  this.showStatus(`Thinking level: ${newLevel}`);
1925
1967
  }
1926
1968
  }
1969
+ cycleMode() {
1970
+ const newMode = this.session.cycleMode();
1971
+ const modeNames = {
1972
+ default: "Agent",
1973
+ plan: "Plan",
1974
+ spec: "Spec",
1975
+ };
1976
+ const modeName = modeNames[newMode];
1977
+ this.footer.invalidate();
1978
+ this.updateEditorBorderColor();
1979
+ this.showStatus(`Mode switched to: ${modeName}`);
1980
+ }
1927
1981
  toggleToolOutputExpansion() {
1928
1982
  this.setToolsExpanded(!this.toolOutputExpanded);
1929
1983
  }
@@ -2716,6 +2770,7 @@ export class InteractiveMode {
2716
2770
  const clear = this.getAppKeyDisplay("clear");
2717
2771
  const exit = this.getAppKeyDisplay("exit");
2718
2772
  const suspend = this.getAppKeyDisplay("suspend");
2773
+ const cycleMode = this.getAppKeyDisplay("cycleMode");
2719
2774
  const cycleThinkingLevel = this.getAppKeyDisplay("cycleThinkingLevel");
2720
2775
  const expandTools = this.getAppKeyDisplay("expandTools");
2721
2776
  const toggleThinking = this.getAppKeyDisplay("toggleThinking");
@@ -2753,6 +2808,7 @@ export class InteractiveMode {
2753
2808
  | \`${clear}\` | Clear editor (first) / exit (second) |
2754
2809
  | \`${exit}\` | Exit (when editor is empty) |
2755
2810
  | \`${suspend}\` | Suspend to background |
2811
+ | \`${cycleMode}\` | Cycle mode (Agent/Plan/Spec) |
2756
2812
  | \`${cycleThinkingLevel}\` | Cycle thinking level |
2757
2813
  | \`${expandTools}\` | Toggle tool output expansion |
2758
2814
  | \`${toggleThinking}\` | Toggle thinking block visibility |
@@ -2872,6 +2928,101 @@ export class InteractiveMode {
2872
2928
  this.updateEditorBorderColor();
2873
2929
  this.showStatus(`Thinking level set to: ${normalizedLevel}`);
2874
2930
  }
2931
+ handleTodoCommand() {
2932
+ const items = listTodos();
2933
+ const _stats = getStats();
2934
+ if (items.length === 0) {
2935
+ this.chatContainer.addChild(new Spacer(1));
2936
+ this.chatContainer.addChild(new Text(theme.fg("dim", "No todos yet. Use /todo:add <text> to add one."), 1, 0));
2937
+ this.ui.requestRender();
2938
+ return;
2939
+ }
2940
+ const todoDisplay = createTodoDisplay(this.ui, {
2941
+ items,
2942
+ showCompleted: true,
2943
+ title: "Your Tasks",
2944
+ });
2945
+ this.chatContainer.addChild(new Spacer(1));
2946
+ this.chatContainer.addChild(todoDisplay);
2947
+ this.ui.requestRender();
2948
+ }
2949
+ handleTodoAddCommand(text) {
2950
+ if (!text) {
2951
+ this.chatContainer.addChild(new Spacer(1));
2952
+ this.chatContainer.addChild(new Text(theme.fg("warning", "Usage: /todo:add <text>"), 1, 0));
2953
+ this.ui.requestRender();
2954
+ return;
2955
+ }
2956
+ const item = addTodo(text);
2957
+ this.chatContainer.addChild(new Spacer(1));
2958
+ this.chatContainer.addChild(new Text(theme.fg("success", `✓ Added: ${item.text}`), 1, 0));
2959
+ this.ui.requestRender();
2960
+ }
2961
+ handleTodoDoneCommand(idOrText) {
2962
+ if (!idOrText) {
2963
+ const items = listTodos("active");
2964
+ if (items.length === 0) {
2965
+ this.showWarning("No active todos to complete");
2966
+ return;
2967
+ }
2968
+ // Show the list so user can see IDs
2969
+ this.handleTodoCommand();
2970
+ return;
2971
+ }
2972
+ const item = completeTodo(idOrText);
2973
+ if (!item) {
2974
+ this.showError(`Could not find active todo matching "${idOrText}"`);
2975
+ return;
2976
+ }
2977
+ this.chatContainer.addChild(new Spacer(1));
2978
+ this.chatContainer.addChild(new Text(theme.fg("success", `✓ Completed: ${item.text}`), 1, 0));
2979
+ this.ui.requestRender();
2980
+ }
2981
+ handleTodoUndoCommand(idOrText) {
2982
+ if (!idOrText) {
2983
+ this.showWarning("Usage: /todo:undo <id or text>");
2984
+ return;
2985
+ }
2986
+ const item = uncompleteTodo(idOrText);
2987
+ if (!item) {
2988
+ this.showError(`Could not find completed todo matching "${idOrText}"`);
2989
+ return;
2990
+ }
2991
+ this.chatContainer.addChild(new Spacer(1));
2992
+ this.chatContainer.addChild(new Text(theme.fg("dim", `↺ Reopened: ${item.text}`), 1, 0));
2993
+ this.ui.requestRender();
2994
+ }
2995
+ handleTodoRemoveCommand(idOrText) {
2996
+ if (!idOrText) {
2997
+ this.showWarning("Usage: /todo:remove <id or text>");
2998
+ return;
2999
+ }
3000
+ const item = removeTodo(idOrText);
3001
+ if (!item) {
3002
+ this.showError(`Could not find todo matching "${idOrText}"`);
3003
+ return;
3004
+ }
3005
+ this.chatContainer.addChild(new Spacer(1));
3006
+ this.chatContainer.addChild(new Text(theme.fg("dim", `✗ Removed: ${item.text}`), 1, 0));
3007
+ this.ui.requestRender();
3008
+ }
3009
+ handleTodoClearCommand() {
3010
+ const count = clearCompleted();
3011
+ this.chatContainer.addChild(new Spacer(1));
3012
+ if (count > 0) {
3013
+ this.chatContainer.addChild(new Text(theme.fg("success", `Cleared ${count} completed todo(s)`), 1, 0));
3014
+ }
3015
+ else {
3016
+ this.chatContainer.addChild(new Text(theme.fg("dim", "No completed todos to clear"), 1, 0));
3017
+ }
3018
+ this.ui.requestRender();
3019
+ }
3020
+ handleTodoClearAllCommand() {
3021
+ clearAll();
3022
+ this.chatContainer.addChild(new Spacer(1));
3023
+ this.chatContainer.addChild(new Text(theme.fg("dim", "All todos cleared"), 1, 0));
3024
+ this.ui.requestRender();
3025
+ }
2875
3026
  async handleBashCommand(command, excludeFromContext = false) {
2876
3027
  const extensionRunner = this.session.extensionRunner;
2877
3028
  const eventResult = extensionRunner