From ae32e23d5beab5ad8b7ecd3b6746aef5fc2ca3ec Mon Sep 17 00:00:00 2001 From: rUv Date: Wed, 31 Dec 2025 17:40:37 +0000 Subject: [PATCH] chore: update intelligence data and version bump to v0.1.71 --- .ruvector/intelligence.json | 1635 ++++++++++++++++- .../scripts/statusline-command.ps1 | 216 +++ crates/ruvector-cli/src/cli/hooks.rs | 40 +- .../ruvector/.ruvector/intelligence.json | 91 +- npm/packages/ruvector/bin/cli.js | 95 +- npm/packages/ruvector/package.json | 2 +- 6 files changed, 2038 insertions(+), 41 deletions(-) create mode 100644 crates/ruvector-cli/scripts/statusline-command.ps1 diff --git a/.ruvector/intelligence.json b/.ruvector/intelligence.json index e34f7f530..f685b3fdf 100644 --- a/.ruvector/intelligence.json +++ b/.ruvector/intelligence.json @@ -1,5 +1,20 @@ { - "patterns": {}, + "patterns": { + "cmd_shell_general|success": { + "state": "cmd_shell_general", + "action": "success", + "q_value": 0.41736248000000004, + "visits": 7, + "last_update": 1767202829 + }, + "edit__in_project|successful-edit": { + "state": "edit__in_project", + "action": "successful-edit", + "q_value": 0.717570463519, + "visits": 12, + "last_update": 1767201510 + } + }, "memories": [ { "id": "mem_1767140899", @@ -17784,6 +17799,1466 @@ ], "metadata": {}, "timestamp": 1767193527 + }, + { + "id": "mem_1767201080", + "memory_type": "command", + "content": " succeeded", + "embedding": [ + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0.31622776601683794 + ], + "metadata": {}, + "timestamp": 1767201080 + }, + { + "id": "mem_1767201096", + "memory_type": "command", + "content": " succeeded", + "embedding": [ + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0.31622776601683794 + ], + "metadata": {}, + "timestamp": 1767201096 + }, + { + "id": "mem_1767201108", + "memory_type": "file_access", + "content": "Reading: ", + "embedding": [ + 0, + 0, + 0, + 0, + 0, + 0.30151134457776363, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.6030226891555273, + 0.30151134457776363, + 0, + 0, + 0, + 0, + 0, + 0.30151134457776363, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.30151134457776363, + 0.30151134457776363, + 0, + 0, + 0.30151134457776363, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.30151134457776363, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "metadata": {}, + "timestamp": 1767201108 + }, + { + "id": "mem_1767201108", + "memory_type": "command", + "content": " succeeded", + "embedding": [ + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0.31622776601683794 + ], + "metadata": {}, + "timestamp": 1767201108 + }, + { + "id": "mem_1767201170", + "memory_type": "command", + "content": " succeeded", + "embedding": [ + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0.31622776601683794 + ], + "metadata": {}, + "timestamp": 1767201170 + }, + { + "id": "mem_1767201188", + "memory_type": "edit", + "content": "successful edit of in project", + "embedding": [ + 0, + 0.31622776601683794, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0.31622776601683794, + 0.31622776601683794, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0.15811388300841897, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.31622776601683794, + 0, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897 + ], + "metadata": {}, + "timestamp": 1767201188 + }, + { + "id": "mem_1767201259", + "memory_type": "edit", + "content": "successful edit of in project", + "embedding": [ + 0, + 0.31622776601683794, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0.31622776601683794, + 0.31622776601683794, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0.15811388300841897, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.31622776601683794, + 0, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897 + ], + "metadata": {}, + "timestamp": 1767201259 + }, + { + "id": "mem_1767201259", + "memory_type": "edit", + "content": "successful edit of in project", + "embedding": [ + 0, + 0.31622776601683794, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0.31622776601683794, + 0.31622776601683794, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0.15811388300841897, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.31622776601683794, + 0, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897 + ], + "metadata": {}, + "timestamp": 1767201259 + }, + { + "id": "mem_1767201262", + "memory_type": "edit", + "content": "successful edit of in project", + "embedding": [ + 0, + 0.31622776601683794, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0.31622776601683794, + 0.31622776601683794, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0.15811388300841897, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.31622776601683794, + 0, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897 + ], + "metadata": {}, + "timestamp": 1767201262 + }, + { + "id": "mem_1767201349", + "memory_type": "edit", + "content": "successful edit of in project", + "embedding": [ + 0, + 0.31622776601683794, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0.31622776601683794, + 0.31622776601683794, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0.15811388300841897, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.31622776601683794, + 0, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897 + ], + "metadata": {}, + "timestamp": 1767201349 + }, + { + "id": "mem_1767201350", + "memory_type": "edit", + "content": "successful edit of in project", + "embedding": [ + 0, + 0.31622776601683794, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0.31622776601683794, + 0.31622776601683794, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0.15811388300841897, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.31622776601683794, + 0, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897 + ], + "metadata": {}, + "timestamp": 1767201350 + }, + { + "id": "mem_1767201353", + "memory_type": "edit", + "content": "successful edit of in project", + "embedding": [ + 0, + 0.31622776601683794, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0.31622776601683794, + 0.31622776601683794, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0.15811388300841897, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.31622776601683794, + 0, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897 + ], + "metadata": {}, + "timestamp": 1767201353 + }, + { + "id": "mem_1767201408", + "memory_type": "edit", + "content": "successful edit of in project", + "embedding": [ + 0, + 0.31622776601683794, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0.31622776601683794, + 0.31622776601683794, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0.15811388300841897, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.31622776601683794, + 0, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897 + ], + "metadata": {}, + "timestamp": 1767201408 + }, + { + "id": "mem_1767201409", + "memory_type": "command", + "content": " succeeded", + "embedding": [ + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0.31622776601683794 + ], + "metadata": {}, + "timestamp": 1767201409 + }, + { + "id": "mem_1767201459", + "memory_type": "edit", + "content": "successful edit of in project", + "embedding": [ + 0, + 0.31622776601683794, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0.31622776601683794, + 0.31622776601683794, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0.15811388300841897, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.31622776601683794, + 0, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897 + ], + "metadata": {}, + "timestamp": 1767201459 + }, + { + "id": "mem_1767201459", + "memory_type": "edit", + "content": "successful edit of in project", + "embedding": [ + 0, + 0.31622776601683794, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0.31622776601683794, + 0.31622776601683794, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0.15811388300841897, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.31622776601683794, + 0, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897 + ], + "metadata": {}, + "timestamp": 1767201459 + }, + { + "id": "mem_1767201462", + "memory_type": "edit", + "content": "successful edit of in project", + "embedding": [ + 0, + 0.31622776601683794, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0.31622776601683794, + 0.31622776601683794, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0.15811388300841897, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.31622776601683794, + 0, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897 + ], + "metadata": {}, + "timestamp": 1767201462 + }, + { + "id": "mem_1767201510", + "memory_type": "edit", + "content": "successful edit of in project", + "embedding": [ + 0, + 0.31622776601683794, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897, + 0, + 0, + 0.31622776601683794, + 0.31622776601683794, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0, + 0, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0, + 0.15811388300841897, + 0.15811388300841897, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.31622776601683794, + 0, + 0.15811388300841897, + 0, + 0.15811388300841897, + 0, + 0, + 0.15811388300841897 + ], + "metadata": {}, + "timestamp": 1767201510 + }, + { + "id": "mem_1767201651", + "memory_type": "command", + "content": " succeeded", + "embedding": [ + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0.31622776601683794 + ], + "metadata": {}, + "timestamp": 1767201651 + }, + { + "id": "mem_1767202829", + "memory_type": "command", + "content": " succeeded", + "embedding": [ + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0.31622776601683794 + ], + "metadata": {}, + "timestamp": 1767202829 } ], "trajectories": [ @@ -18202,6 +19677,158 @@ "outcome": "completed", "reward": 0.8, "timestamp": 1767193527 + }, + { + "id": "traj_1767201080", + "state": "cmd_shell_general", + "action": "success", + "outcome": "completed", + "reward": 0.8, + "timestamp": 1767201080 + }, + { + "id": "traj_1767201096", + "state": "cmd_shell_general", + "action": "success", + "outcome": "completed", + "reward": 0.8, + "timestamp": 1767201096 + }, + { + "id": "traj_1767201108", + "state": "cmd_shell_general", + "action": "success", + "outcome": "completed", + "reward": 0.8, + "timestamp": 1767201108 + }, + { + "id": "traj_1767201170", + "state": "cmd_shell_general", + "action": "success", + "outcome": "completed", + "reward": 0.8, + "timestamp": 1767201170 + }, + { + "id": "traj_1767201188", + "state": "edit__in_project", + "action": "successful-edit", + "outcome": "completed", + "reward": 1, + "timestamp": 1767201188 + }, + { + "id": "traj_1767201259", + "state": "edit__in_project", + "action": "successful-edit", + "outcome": "completed", + "reward": 1, + "timestamp": 1767201259 + }, + { + "id": "traj_1767201259", + "state": "edit__in_project", + "action": "successful-edit", + "outcome": "completed", + "reward": 1, + "timestamp": 1767201259 + }, + { + "id": "traj_1767201262", + "state": "edit__in_project", + "action": "successful-edit", + "outcome": "completed", + "reward": 1, + "timestamp": 1767201262 + }, + { + "id": "traj_1767201349", + "state": "edit__in_project", + "action": "successful-edit", + "outcome": "completed", + "reward": 1, + "timestamp": 1767201349 + }, + { + "id": "traj_1767201350", + "state": "edit__in_project", + "action": "successful-edit", + "outcome": "completed", + "reward": 1, + "timestamp": 1767201350 + }, + { + "id": "traj_1767201353", + "state": "edit__in_project", + "action": "successful-edit", + "outcome": "completed", + "reward": 1, + "timestamp": 1767201353 + }, + { + "id": "traj_1767201408", + "state": "edit__in_project", + "action": "successful-edit", + "outcome": "completed", + "reward": 1, + "timestamp": 1767201408 + }, + { + "id": "traj_1767201409", + "state": "cmd_shell_general", + "action": "success", + "outcome": "completed", + "reward": 0.8, + "timestamp": 1767201409 + }, + { + "id": "traj_1767201459", + "state": "edit__in_project", + "action": "successful-edit", + "outcome": "completed", + "reward": 1, + "timestamp": 1767201459 + }, + { + "id": "traj_1767201459", + "state": "edit__in_project", + "action": "successful-edit", + "outcome": "completed", + "reward": 1, + "timestamp": 1767201459 + }, + { + "id": "traj_1767201462", + "state": "edit__in_project", + "action": "successful-edit", + "outcome": "completed", + "reward": 1, + "timestamp": 1767201462 + }, + { + "id": "traj_1767201510", + "state": "edit__in_project", + "action": "successful-edit", + "outcome": "completed", + "reward": 1, + "timestamp": 1767201510 + }, + { + "id": "traj_1767201651", + "state": "cmd_shell_general", + "action": "success", + "outcome": "completed", + "reward": 0.8, + "timestamp": 1767201651 + }, + { + "id": "traj_1767202829", + "state": "cmd_shell_general", + "action": "success", + "outcome": "completed", + "reward": 0.8, + "timestamp": 1767202829 } ], "errors": {}, @@ -18209,9 +19836,9 @@ "agents": {}, "edges": [], "stats": { - "total_patterns": 0, - "total_memories": 51, - "total_trajectories": 52, + "total_patterns": 2, + "total_memories": 76, + "total_trajectories": 71, "total_errors": 0, "session_count": 5, "last_session": 1767194385 diff --git a/crates/ruvector-cli/scripts/statusline-command.ps1 b/crates/ruvector-cli/scripts/statusline-command.ps1 new file mode 100644 index 000000000..18d1dbba7 --- /dev/null +++ b/crates/ruvector-cli/scripts/statusline-command.ps1 @@ -0,0 +1,216 @@ +# RuVector Intelligence Statusline for Windows PowerShell +# Multi-line display showcasing self-learning capabilities + +$ErrorActionPreference = "SilentlyContinue" + +# Read JSON input from stdin +$input = [Console]::In.ReadToEnd() +$data = $input | ConvertFrom-Json + +$Model = if ($data.model.display_name) { $data.model.display_name } else { "Claude" } +$CWD = if ($data.workspace.current_dir) { $data.workspace.current_dir } else { $data.cwd } +$Dir = Split-Path -Leaf $CWD + +# Get git branch +$Branch = $null +Push-Location $CWD 2>$null +$Branch = git branch --show-current 2>$null +Pop-Location + +# ANSI colors (Windows Terminal supports these) +$Reset = "`e[0m" +$Bold = "`e[1m" +$Cyan = "`e[36m" +$Yellow = "`e[33m" +$Green = "`e[32m" +$Magenta = "`e[35m" +$Blue = "`e[34m" +$Red = "`e[31m" +$Dim = "`e[2m" + +# ═══════════════════════════════════════════════════════════════════════════════ +# LINE 1: Model, Directory, Git +# ═══════════════════════════════════════════════════════════════════════════════ +$Line1 = "${Bold}${Model}${Reset} in ${Cyan}${Dir}${Reset}" +if ($Branch) { + $Line1 += " on ${Yellow}⎇ ${Branch}${Reset}" +} +Write-Host $Line1 + +# ═══════════════════════════════════════════════════════════════════════════════ +# LINE 2: RuVector Intelligence Stats +# ═══════════════════════════════════════════════════════════════════════════════ +$IntelFile = $null +$IntelPaths = @( + "$CWD\.ruvector\intelligence.json", + "$CWD\npm\packages\ruvector\.ruvector\intelligence.json", + "$env:USERPROFILE\.ruvector\intelligence.json" +) + +foreach ($path in $IntelPaths) { + if (Test-Path $path) { + $IntelFile = $path + break + } +} + +if ($IntelFile) { + $Intel = Get-Content $IntelFile -Raw | ConvertFrom-Json + + # Detect schema version + $HasLearning = $Intel.PSObject.Properties.Name -contains "learning" + + if ($HasLearning) { + # v2 Schema + $PatternCount = 0 + if ($Intel.learning.qTables) { + foreach ($table in $Intel.learning.qTables.PSObject.Properties) { + $PatternCount += $table.Value.PSObject.Properties.Count + } + } + + $ActiveAlgos = 0 + $TotalAlgos = 0 + $BestAlgo = "none" + $BestScore = 0 + + if ($Intel.learning.stats) { + $stats = $Intel.learning.stats.PSObject.Properties + $TotalAlgos = $stats.Count + foreach ($stat in $stats) { + if ($stat.Value.updates -gt 0) { + $ActiveAlgos++ + if ($stat.Value.convergenceScore -gt $BestScore) { + $BestScore = $stat.Value.convergenceScore + $BestAlgo = $stat.Name + } + } + } + } + + $RoutingAlgo = if ($Intel.learning.configs.'agent-routing'.algorithm) { + $Intel.learning.configs.'agent-routing'.algorithm + } else { "double-q" } + $LearningRate = if ($Intel.learning.configs.'agent-routing'.learningRate) { + $Intel.learning.configs.'agent-routing'.learningRate + } else { 0.1 } + $Epsilon = if ($Intel.learning.configs.'agent-routing'.epsilon) { + $Intel.learning.configs.'agent-routing'.epsilon + } else { 0.1 } + $Schema = "v2" + } + else { + # v1 Schema + $PatternCount = if ($Intel.patterns) { $Intel.patterns.PSObject.Properties.Count } else { 0 } + $TrajCount = if ($Intel.trajectories) { $Intel.trajectories.Count } else { 0 } + $ActiveAlgos = 0 + $TotalAlgos = 0 + $BestAlgo = "none" + $BestScore = 0 + $RoutingAlgo = "q-learning" + $LearningRate = 0.1 + $Epsilon = 0.1 + $Schema = "v1" + } + + # Common fields + $MemoryCount = if ($Intel.memories) { $Intel.memories.Count } else { 0 } + $TrajCount = if ($Intel.trajectories) { $Intel.trajectories.Count } else { 0 } + $ErrorCount = if ($Intel.errors) { $Intel.errors.Count } else { 0 } + $SessionCount = if ($Intel.stats.session_count) { $Intel.stats.session_count } else { 0 } + + # Build Line 2 + $Line2 = "${Magenta}🧠 RuVector${Reset}" + + if ($PatternCount -gt 0) { + $Line2 += " ${Green}◆${Reset} $PatternCount patterns" + } else { + $Line2 += " ${Dim}◇ learning${Reset}" + } + + if ($ActiveAlgos -gt 0) { + $Line2 += " ${Cyan}⚙${Reset} $ActiveAlgos/$TotalAlgos algos" + } + + if ($BestAlgo -ne "none") { + $ShortAlgo = switch ($BestAlgo) { + "double-q" { "DQ" } + "q-learning" { "QL" } + "actor-critic" { "AC" } + "decision-transformer" { "DT" } + "monte-carlo" { "MC" } + "td-lambda" { "TD" } + default { $BestAlgo.Substring(0,3) } + } + $ScorePct = [math]::Round($BestScore * 100) + $ScoreColor = if ($ScorePct -ge 80) { $Green } elseif ($ScorePct -ge 50) { $Yellow } else { $Red } + $Line2 += " ${ScoreColor}★${ShortAlgo}:${ScorePct}%${Reset}" + } + + if ($MemoryCount -gt 0) { + $Line2 += " ${Blue}⬡${Reset} $MemoryCount mem" + } + + if ($TrajCount -gt 0) { + $Line2 += " ${Yellow}↝${Reset}$TrajCount" + } + + if ($ErrorCount -gt 0) { + $Line2 += " ${Red}🔧${Reset}$ErrorCount" + } + + if ($SessionCount -gt 0) { + $Line2 += " ${Dim}#$SessionCount${Reset}" + } + + Write-Host $Line2 + + # ═══════════════════════════════════════════════════════════════════════════════ + # LINE 3: Agent Routing + # ═══════════════════════════════════════════════════════════════════════════════ + $AlgoIcon = switch ($RoutingAlgo) { + "double-q" { "⚡DQ" } + "sarsa" { "🔄SA" } + "actor-critic" { "🎭AC" } + default { $RoutingAlgo } + } + + $LrPct = [math]::Round($LearningRate * 100) + $EpsPct = [math]::Round($Epsilon * 100) + + $Line3 = "${Blue}🎯 Routing${Reset} ${Cyan}${AlgoIcon}${Reset} lr:${LrPct}% ε:${EpsPct}%" + + Write-Host $Line3 +} +else { + Write-Host "${Dim}🧠 RuVector: run 'npx ruvector hooks session-start' to initialize${Reset}" +} + +# ═══════════════════════════════════════════════════════════════════════════════ +# LINE 4: Claude Flow (if available) +# ═══════════════════════════════════════════════════════════════════════════════ +$FlowDir = "$CWD\.claude-flow" +if (Test-Path $FlowDir) { + $FlowOutput = "" + + $SwarmConfig = "$FlowDir\swarm-config.json" + if (Test-Path $SwarmConfig) { + $Config = Get-Content $SwarmConfig -Raw | ConvertFrom-Json + if ($Config.defaultStrategy) { + $Topo = switch ($Config.defaultStrategy) { + "balanced" { "mesh" } + "conservative" { "hier" } + "aggressive" { "ring" } + default { $Config.defaultStrategy } + } + $FlowOutput += " ${Magenta}${Topo}${Reset}" + } + if ($Config.agentProfiles -and $Config.agentProfiles.Count -gt 0) { + $FlowOutput += " ${Cyan}🤖$($Config.agentProfiles.Count)${Reset}" + } + } + + if ($FlowOutput) { + Write-Host "${Dim}⚡ Flow:${Reset}$FlowOutput" + } +} diff --git a/crates/ruvector-cli/src/cli/hooks.rs b/crates/ruvector-cli/src/cli/hooks.rs index 01bec39a0..4de6ca155 100644 --- a/crates/ruvector-cli/src/cli/hooks.rs +++ b/crates/ruvector-cli/src/cli/hooks.rs @@ -1212,22 +1212,32 @@ pub fn init_hooks(force: bool, postgres: bool, _config: &Config) -> Result<()> { fs::create_dir_all(&claude_dir)?; - // Create statusline script - let statusline_path = claude_dir.join("statusline-command.sh"); - let statusline_script = include_str!("../../scripts/statusline-command.sh"); - fs::write(&statusline_path, statusline_script)?; + // Create platform-specific statusline script + let (statusline_path, statusline_config) = if cfg!(windows) { + // Windows: Use PowerShell script + let path = claude_dir.join("statusline-command.ps1"); + let script = include_str!("../../scripts/statusline-command.ps1"); + fs::write(&path, script)?; + (Some(path), Some(".claude/statusline-command.ps1")) + } else { + // Unix (macOS, Linux): Use bash script + let path = claude_dir.join("statusline-command.sh"); + let script = include_str!("../../scripts/statusline-command.sh"); + fs::write(&path, script)?; - // Make executable on Unix - #[cfg(unix)] - { - use std::os::unix::fs::PermissionsExt; - let mut perms = fs::metadata(&statusline_path)?.permissions(); - perms.set_mode(0o755); - fs::set_permissions(&statusline_path, perms)?; - } + // Make executable + #[cfg(unix)] + { + use std::os::unix::fs::PermissionsExt; + let mut perms = fs::metadata(&path)?.permissions(); + perms.set_mode(0o755); + fs::set_permissions(&path, perms)?; + } + (Some(path), Some(".claude/statusline-command.sh")) + }; let hooks_config = serde_json::json!({ - "statusline": ".claude/statusline-command.sh", + "statusline": statusline_config, "hooks": { // Pre-tool hooks: provide guidance before actions "PreToolUse": [{ @@ -1352,7 +1362,9 @@ pub fn init_hooks(force: bool, postgres: bool, _config: &Config) -> Result<()> { println!("{}", "✅ Hooks initialized!".green().bold()); println!(" Created: {}", settings_path.display()); - println!(" Created: {}", statusline_path.display()); + if let Some(ref path) = statusline_path { + println!(" Created: {}", path.display()); + } println!("\n{}", "Next steps:".bold()); println!(" 1. Restart Claude Code to activate hooks"); println!(" 2. Run 'npx ruvector hooks stats' to verify"); diff --git a/npm/packages/ruvector/.ruvector/intelligence.json b/npm/packages/ruvector/.ruvector/intelligence.json index 17b2aa798..b7262800d 100644 --- a/npm/packages/ruvector/.ruvector/intelligence.json +++ b/npm/packages/ruvector/.ruvector/intelligence.json @@ -3,9 +3,9 @@ "cmd_shell_general|success": { "state": "cmd_shell_general", "action": "success", - "q_value": 0.795876979834144, - "visits": 50, - "last_update": 1767196937 + "q_value": 0.7962892818507296, + "visits": 51, + "last_update": 1767196950 }, "edit_ts_in_project|successful-edit": { "state": "edit_ts_in_project", @@ -4562,6 +4562,79 @@ ], "metadata": {}, "timestamp": 1767196937 + }, + { + "id": "mem_1767196950", + "memory_type": "command", + "content": " succeeded", + "embedding": [ + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.31622776601683794, + 0, + 0.31622776601683794, + 0, + 0, + 0, + 0, + 0.31622776601683794 + ], + "metadata": {}, + "timestamp": 1767196950 } ], "trajectories": [ @@ -5020,6 +5093,14 @@ "outcome": "completed", "reward": 0.8, "timestamp": 1767196937 + }, + { + "id": "traj_1767196950", + "state": "cmd_shell_general", + "action": "success", + "outcome": "completed", + "reward": 0.8, + "timestamp": 1767196950 } ], "errors": {}, @@ -5028,8 +5109,8 @@ "edges": [], "stats": { "total_patterns": 5, - "total_memories": 62, - "total_trajectories": 57, + "total_memories": 63, + "total_trajectories": 58, "total_errors": 0, "session_count": 6, "last_session": 1767195588 diff --git a/npm/packages/ruvector/bin/cli.js b/npm/packages/ruvector/bin/cli.js index b47f6ca3a..4cc45e2a3 100755 --- a/npm/packages/ruvector/bin/cli.js +++ b/npm/packages/ruvector/bin/cli.js @@ -2836,26 +2836,87 @@ hooksCmd.command('init') // StatusLine configuration (unless --minimal or --no-statusline) if (!opts.minimal && opts.statusline !== false) { if (!settings.statusLine) { - // Create a simple statusline script - const statuslineScript = path.join(settingsDir, 'statusline.sh'); - const statuslineContent = `#!/bin/bash -# RuVector Status Line - shows intelligence stats -INTEL_FILE=".ruvector/intelligence.json" -if [ -f "$INTEL_FILE" ]; then - PATTERNS=$(jq -r '.patterns | length // 0' "$INTEL_FILE" 2>/dev/null || echo "0") - MEMORIES=$(jq -r '.memories | length // 0' "$INTEL_FILE" 2>/dev/null || echo "0") - echo "🧠 $PATTERNS patterns | 💾 $MEMORIES memories" + const isWindows = process.platform === 'win32'; + + if (isWindows) { + // Windows: PowerShell statusline + const statuslineScript = path.join(settingsDir, 'statusline-command.ps1'); + const statuslineContent = `# RuVector Intelligence Statusline for Windows PowerShell +# Compatible with PowerShell 5.1+ and PowerShell Core +$ErrorActionPreference = "SilentlyContinue" +$e = [char]27 +$inputData = [Console]::In.ReadToEnd() +$data = $inputData | ConvertFrom-Json +$Model = if ($data.model.display_name) { $data.model.display_name } else { "Claude" } +$CWD = if ($data.workspace.current_dir) { $data.workspace.current_dir } else { $data.cwd } +$Dir = Split-Path -Leaf $CWD +$Branch = $null +try { Push-Location $CWD -ErrorAction Stop; $Branch = git branch --show-current 2>$null; Pop-Location } catch {} +Write-Host "$e[1m$Model$e[0m in $e[36m$Dir$e[0m$(if($Branch){" on $e[33m$Branch$e[0m"})" +$IntelFile = Join-Path $CWD ".ruvector\intelligence.json" +if (Test-Path $IntelFile) { + $Intel = Get-Content $IntelFile -Raw | ConvertFrom-Json + $Mem = if ($Intel.memories) { $Intel.memories.Count } else { 0 } + $Traj = if ($Intel.trajectories) { $Intel.trajectories.Count } else { 0 } + $Sess = if ($Intel.stats -and $Intel.stats.session_count) { $Intel.stats.session_count } else { 0 } + $Pat = if ($Intel.patterns) { ($Intel.patterns | Get-Member -MemberType NoteProperty).Count } else { 0 } + $Line2 = "$e[35m RuVector$e[0m" + if ($Pat -gt 0) { $Line2 += " $e[32m$Pat patterns$e[0m" } else { $Line2 += " $e[2mlearning$e[0m" } + if ($Mem -gt 0) { $Line2 += " $e[34m$Mem mem$e[0m" } + if ($Traj -gt 0) { $Line2 += " $e[33m$Traj traj$e[0m" } + if ($Sess -gt 0) { $Line2 += " $e[2m#$Sess$e[0m" } + Write-Host $Line2 +} else { + Write-Host "$e[2m RuVector: run 'npx ruvector hooks session-start'$e[0m" +} +`; + fs.writeFileSync(statuslineScript, statuslineContent); + settings.statusLine = { + type: 'command', + command: 'powershell -NoProfile -ExecutionPolicy Bypass -File .claude/statusline-command.ps1' + }; + } else { + // Unix (macOS, Linux): Bash statusline + const statuslineScript = path.join(settingsDir, 'statusline-command.sh'); + const statuslineContent = `#!/bin/bash +# RuVector Intelligence Statusline - Multi-line display +INPUT=\$(cat) +MODEL=\$(echo "\$INPUT" | jq -r '.model.display_name // "Claude"') +CWD=\$(echo "\$INPUT" | jq -r '.workspace.current_dir // .cwd') +DIR=\$(basename "\$CWD") +BRANCH=\$(cd "\$CWD" 2>/dev/null && git branch --show-current 2>/dev/null) +RESET="\\033[0m"; BOLD="\\033[1m"; CYAN="\\033[36m"; YELLOW="\\033[33m"; GREEN="\\033[32m"; MAGENTA="\\033[35m"; BLUE="\\033[34m"; DIM="\\033[2m"; RED="\\033[31m" +printf "\$BOLD\$MODEL\$RESET in \$CYAN\$DIR\$RESET" +[ -n "\$BRANCH" ] && printf " on \$YELLOW⎇ \$BRANCH\$RESET" +echo +INTEL_FILE="" +for P in "\$CWD/.ruvector/intelligence.json" "\$CWD/npm/packages/ruvector/.ruvector/intelligence.json" "\$HOME/.ruvector/intelligence.json"; do + [ -f "\$P" ] && INTEL_FILE="\$P" && break +done +if [ -n "\$INTEL_FILE" ]; then + INTEL=\$(cat "\$INTEL_FILE" 2>/dev/null) + MEMORY_COUNT=\$(echo "\$INTEL" | jq -r '.memories | length // 0' 2>/dev/null) + TRAJ_COUNT=\$(echo "\$INTEL" | jq -r '.trajectories | length // 0' 2>/dev/null) + SESSION_COUNT=\$(echo "\$INTEL" | jq -r '.stats.session_count // 0' 2>/dev/null) + PATTERN_COUNT=\$(echo "\$INTEL" | jq -r '.patterns | length // 0' 2>/dev/null) + printf "\$MAGENTA🧠 RuVector\$RESET" + [ "\$PATTERN_COUNT" != "null" ] && [ "\$PATTERN_COUNT" -gt 0 ] 2>/dev/null && printf " \$GREEN◆\$RESET \$PATTERN_COUNT patterns" || printf " \$DIM◇ learning\$RESET" + [ "\$MEMORY_COUNT" != "null" ] && [ "\$MEMORY_COUNT" -gt 0 ] 2>/dev/null && printf " \$BLUE⬡\$RESET \$MEMORY_COUNT mem" + [ "\$TRAJ_COUNT" != "null" ] && [ "\$TRAJ_COUNT" -gt 0 ] 2>/dev/null && printf " \$YELLOW↝\$RESET\$TRAJ_COUNT" + [ "\$SESSION_COUNT" != "null" ] && [ "\$SESSION_COUNT" -gt 0 ] 2>/dev/null && printf " \$DIM#\$SESSION_COUNT\$RESET" + echo else - echo "🧠 RuVector" + printf "\$DIM🧠 RuVector: run 'npx ruvector hooks session-start' to initialize\$RESET\\n" fi `; - fs.writeFileSync(statuslineScript, statuslineContent); - fs.chmodSync(statuslineScript, '755'); - settings.statusLine = { - type: 'command', - command: '.claude/statusline.sh' - }; - console.log(chalk.blue(' ✓ StatusLine configured')); + fs.writeFileSync(statuslineScript, statuslineContent); + fs.chmodSync(statuslineScript, '755'); + settings.statusLine = { + type: 'command', + command: '.claude/statusline-command.sh' + }; + } + console.log(chalk.blue(` ✓ StatusLine configured (${isWindows ? 'PowerShell' : 'Bash'})`)); } } diff --git a/npm/packages/ruvector/package.json b/npm/packages/ruvector/package.json index e4ee093d7..63b681fad 100644 --- a/npm/packages/ruvector/package.json +++ b/npm/packages/ruvector/package.json @@ -1,6 +1,6 @@ { "name": "ruvector", - "version": "0.1.71", + "version": "0.1.74", "description": "High-performance vector database for Node.js with automatic native/WASM fallback", "main": "dist/index.js", "types": "dist/index.d.ts",