monomind 1.15.5 → 1.15.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.
- package/.claude/agents/github/repo-architect.md +1 -1
- package/.claude/agents/specialists/integration-architect.md +6 -6
- package/.claude/commands/hive-mind/hive-mind-init.md +1 -1
- package/.claude/commands/hive-mind/hive-mind-memory.md +1 -1
- package/.claude/commands/mastermind/brain.md +11 -11
- package/.claude/commands/mastermind/master.md +4 -4
- package/.claude/commands/mastermind/memory.md +6 -6
- package/.claude/commands/memory/README.md +4 -4
- package/.claude/commands/truth/start.md +3 -3
- package/.claude/helpers/extras-registry.json +2 -2
- package/.claude/helpers/skill-registry.json +26 -26
- package/.claude/helpers/statusline.cjs +8 -8
- package/.claude/skills/agentic-jujutsu/SKILL.md +3 -3
- package/.claude/skills/mastermind/_protocol.md +8 -8
- package/README.md +6 -6
- package/package.json +2 -2
- package/packages/@monomind/cli/README.md +6 -6
- package/packages/@monomind/cli/dist/src/__tests__/browse-analyzer.test.js +18 -1
- package/packages/@monomind/cli/dist/src/commands/agent.js +2 -2
- package/packages/@monomind/cli/dist/src/commands/autopilot.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/completions.js +2 -21
- package/packages/@monomind/cli/dist/src/commands/config.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/hive-mind.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-commands.js +31 -31
- package/packages/@monomind/cli/dist/src/commands/hooks-routing-commands.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/hooks.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/index.d.ts +0 -1
- package/packages/@monomind/cli/dist/src/commands/index.js +0 -4
- package/packages/@monomind/cli/dist/src/commands/init.js +8 -8
- package/packages/@monomind/cli/dist/src/commands/memory.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/memory.js +25 -25
- package/packages/@monomind/cli/dist/src/commands/migrate.js +2 -2
- package/packages/@monomind/cli/dist/src/commands/neural.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/swarm.js +1 -1
- package/packages/@monomind/cli/dist/src/config-adapter.js +8 -8
- package/packages/@monomind/cli/dist/src/index.js +1 -1
- package/packages/@monomind/cli/dist/src/init/claudemd-generator.js +2 -2
- package/packages/@monomind/cli/dist/src/init/executor.js +16 -16
- package/packages/@monomind/cli/dist/src/init/shared-instructions-generator.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/init/shared-instructions-generator.js +1 -1
- package/packages/@monomind/cli/dist/src/init/statusline-generator.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/init/statusline-generator.js +8 -8
- package/packages/@monomind/cli/dist/src/init/types.d.ts +3 -3
- package/packages/@monomind/cli/dist/src/init/types.js +3 -3
- package/packages/@monomind/cli/dist/src/mcp-client.js +4 -11
- package/packages/@monomind/cli/dist/src/mcp-tools/autopilot-tools.js +3 -3
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence-tools.d.ts +2 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence-tools.js +2 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/daa-tools.js +13 -13
- package/packages/@monomind/cli/dist/src/mcp-tools/guidance-tools.js +4 -4
- package/packages/@monomind/cli/dist/src/mcp-tools/hive-mind-tools.js +4 -4
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-intelligence.js +1 -0
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-routing.js +23 -23
- package/packages/@monomind/cli/dist/src/mcp-tools/index.d.ts +0 -1
- package/packages/@monomind/cli/dist/src/mcp-tools/index.js +0 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/memory-tools.d.ts +22 -6
- package/packages/@monomind/cli/dist/src/mcp-tools/memory-tools.js +553 -505
- package/packages/@monomind/cli/dist/src/mcp-tools/progress-tools.js +1 -1
- package/packages/@monomind/cli/dist/src/mcp-tools/quality-tools.d.ts +2 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/quality-tools.js +3 -3
- package/packages/@monomind/cli/dist/src/mcp-tools/system-tools.js +5 -5
- package/packages/@monomind/cli/dist/src/mcp-tools/transfer-tools.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/mcp-tools/transfer-tools.js +1 -156
- package/packages/@monomind/cli/dist/src/memory/embedding-operations.js +3 -3
- package/packages/@monomind/cli/dist/src/memory/hnsw-operations.js +5 -5
- package/packages/@monomind/cli/dist/src/memory/intelligence.js +2 -2
- package/packages/@monomind/cli/dist/src/memory/memory-bridge.d.ts +86 -234
- package/packages/@monomind/cli/dist/src/memory/memory-bridge.js +455 -1702
- package/packages/@monomind/cli/dist/src/memory/memory-crud.js +3 -3
- package/packages/@monomind/cli/dist/src/memory/memory-initializer.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/memory/memory-initializer.js +5 -5
- package/packages/@monomind/cli/dist/src/memory/memory-read.js +4 -4
- package/packages/@monomind/cli/dist/src/suggest.js +0 -1
- package/packages/@monomind/cli/dist/src/types.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/ui/dashboard.html +41 -5
- package/packages/@monomind/cli/dist/src/ui/orgs.html +91 -5
- package/packages/@monomind/cli/dist/src/ui/server.mjs +44 -0
- package/packages/@monomind/cli/dist/src/update/validator.js +1 -3
- package/packages/@monomind/cli/package.json +4 -4
- package/scripts/verify-appliance.sh +1 -1
- package/packages/@monomind/cli/dist/src/commands/plugins.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/plugins.js +0 -799
- package/packages/@monomind/cli/dist/src/plugins/manager.d.ts +0 -133
- package/packages/@monomind/cli/dist/src/plugins/manager.js +0 -498
- package/packages/@monomind/cli/dist/src/plugins/store/discovery.d.ts +0 -88
- package/packages/@monomind/cli/dist/src/plugins/store/discovery.js +0 -770
- package/packages/@monomind/cli/dist/src/plugins/store/index.d.ts +0 -76
- package/packages/@monomind/cli/dist/src/plugins/store/index.js +0 -141
- package/packages/@monomind/cli/dist/src/plugins/store/search.d.ts +0 -46
- package/packages/@monomind/cli/dist/src/plugins/store/search.js +0 -231
- package/packages/@monomind/cli/dist/src/plugins/store/types.d.ts +0 -274
- package/packages/@monomind/cli/dist/src/plugins/store/types.js +0 -7
- package/packages/@monomind/cli/dist/src/plugins/tests/demo-plugin-store.d.ts +0 -7
- package/packages/@monomind/cli/dist/src/plugins/tests/demo-plugin-store.js +0 -126
- package/packages/@monomind/cli/dist/src/plugins/tests/standalone-test.d.ts +0 -12
- package/packages/@monomind/cli/dist/src/plugins/tests/standalone-test.js +0 -188
- package/packages/@monomind/cli/dist/src/plugins/tests/test-plugin-store.d.ts +0 -7
- package/packages/@monomind/cli/dist/src/plugins/tests/test-plugin-store.js +0 -206
- package/packages/@monomind/cli/dist/src/services/registry-api.d.ts +0 -58
- package/packages/@monomind/cli/dist/src/services/registry-api.js +0 -199
|
@@ -15,7 +15,7 @@ import { addToHNSWIndex, rebuildSearchIndex } from './hnsw-operations.js';
|
|
|
15
15
|
export { searchEntries, listEntries, getEntry } from './memory-read.js';
|
|
16
16
|
/** Maximum SQLite database file size accepted before read (256 MB). */
|
|
17
17
|
const MAX_DB_FILE_BYTES = 256 * 1024 * 1024;
|
|
18
|
-
// ADR-053: Lazy import of
|
|
18
|
+
// ADR-053: Lazy import of memory bridge
|
|
19
19
|
let _bridge;
|
|
20
20
|
async function getBridge() {
|
|
21
21
|
if (_bridge === null)
|
|
@@ -214,7 +214,7 @@ export async function verifyMemoryInit(dbPath, options) {
|
|
|
214
214
|
* This bypasses MCP and writes directly to the database
|
|
215
215
|
*/
|
|
216
216
|
export async function storeEntry(options) {
|
|
217
|
-
// ADR-053: Try
|
|
217
|
+
// ADR-053: Try LanceDB memory bridge first
|
|
218
218
|
const bridge = await getBridge();
|
|
219
219
|
if (bridge) {
|
|
220
220
|
const bridgeResult = await bridge.bridgeStoreEntry(options);
|
|
@@ -311,7 +311,7 @@ export async function storeEntry(options) {
|
|
|
311
311
|
* Issue #980: Properly supports namespaced entries
|
|
312
312
|
*/
|
|
313
313
|
export async function deleteEntry(options) {
|
|
314
|
-
// ADR-053: Try
|
|
314
|
+
// ADR-053: Try LanceDB memory bridge first
|
|
315
315
|
const bridge = await getBridge();
|
|
316
316
|
if (bridge) {
|
|
317
317
|
const bridgeResult = await bridge.bridgeDeleteEntry(options);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Properly initializes the memory database with sql.js (WASM SQLite)
|
|
4
4
|
* Includes pattern tables, vector embeddings, migration state tracking
|
|
5
5
|
*
|
|
6
|
-
* ADR-053: Routes through ControllerRegistry →
|
|
6
|
+
* ADR-053: Routes through ControllerRegistry → LanceDB when available,
|
|
7
7
|
* falls back to raw sql.js for backwards compatibility.
|
|
8
8
|
*
|
|
9
9
|
* @module v1/cli/memory-initializer
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Properly initializes the memory database with sql.js (WASM SQLite)
|
|
4
4
|
* Includes pattern tables, vector embeddings, migration state tracking
|
|
5
5
|
*
|
|
6
|
-
* ADR-053: Routes through ControllerRegistry →
|
|
6
|
+
* ADR-053: Routes through ControllerRegistry → LanceDB when available,
|
|
7
7
|
* falls back to raw sql.js for backwards compatibility.
|
|
8
8
|
*
|
|
9
9
|
* @module v1/cli/memory-initializer
|
|
@@ -12,7 +12,7 @@ import * as fs from 'fs';
|
|
|
12
12
|
import * as path from 'path';
|
|
13
13
|
/** Maximum SQLite database file size accepted before read (256 MB). */
|
|
14
14
|
const MAX_DB_FILE_BYTES = 256 * 1024 * 1024;
|
|
15
|
-
// ADR-053: Lazy import of
|
|
15
|
+
// ADR-053: Lazy import of LanceDB memory bridge
|
|
16
16
|
let _bridge;
|
|
17
17
|
async function getBridge() {
|
|
18
18
|
if (_bridge === null)
|
|
@@ -66,21 +66,21 @@ INSERT OR REPLACE INTO metadata (key, value) VALUES
|
|
|
66
66
|
-- Create default vector index configuration
|
|
67
67
|
-- Dimensions match BRIDGE_EMBEDDING_DIMS=384 (Xenova/all-MiniLM-L6-v2).
|
|
68
68
|
-- 768 was a legacy value from the agentic-flow era; 384 is the actual
|
|
69
|
-
-- embedding size used by memory-bridge.ts and
|
|
69
|
+
-- embedding size used by memory-bridge.ts and LanceDB.
|
|
70
70
|
INSERT OR IGNORE INTO vector_indexes (id, name, dimensions) VALUES
|
|
71
71
|
('default', 'default', 384),
|
|
72
72
|
('patterns', 'patterns', 384);
|
|
73
73
|
`;
|
|
74
74
|
}
|
|
75
75
|
/**
|
|
76
|
-
* ADR-053: Activate ControllerRegistry so
|
|
76
|
+
* ADR-053: Activate ControllerRegistry so LanceDB controllers
|
|
77
77
|
* (ReasoningBank, SkillLibrary, ExplainableRecall, etc.) are instantiated.
|
|
78
78
|
*
|
|
79
79
|
* Uses the memory-bridge's getControllerRegistry() which lazily creates
|
|
80
80
|
* a singleton ControllerRegistry and initializes it with the given dbPath.
|
|
81
81
|
* After this call, all enabled controllers are ready for immediate use.
|
|
82
82
|
*
|
|
83
|
-
* Failures are isolated: if @monomind/memory or
|
|
83
|
+
* Failures are isolated: if @monomind/memory or LanceDB is not available,
|
|
84
84
|
* this returns an empty result without throwing.
|
|
85
85
|
*/
|
|
86
86
|
async function activateControllerRegistry(dbPath, verbose) {
|
|
@@ -13,7 +13,7 @@ import { generateEmbedding } from './embedding-operations.js';
|
|
|
13
13
|
import { searchHNSWIndex } from './hnsw-operations.js';
|
|
14
14
|
/** Maximum SQLite database file size accepted before read (256 MB). */
|
|
15
15
|
const MAX_DB_FILE_BYTES = 256 * 1024 * 1024;
|
|
16
|
-
// ADR-053: Lazy import of
|
|
16
|
+
// ADR-053: Lazy import of LanceDB memory bridge
|
|
17
17
|
let _bridge;
|
|
18
18
|
async function getBridge() {
|
|
19
19
|
if (_bridge === null)
|
|
@@ -53,7 +53,7 @@ function cosineSim(a, b) {
|
|
|
53
53
|
* Uses HNSW index for 150x faster search when available
|
|
54
54
|
*/
|
|
55
55
|
export async function searchEntries(options) {
|
|
56
|
-
// ADR-053: Try
|
|
56
|
+
// ADR-053: Try LanceDB memory bridge first
|
|
57
57
|
const bridge = await getBridge();
|
|
58
58
|
if (bridge) {
|
|
59
59
|
const bridgeResult = await bridge.bridgeSearchEntries(options);
|
|
@@ -161,7 +161,7 @@ export async function searchEntries(options) {
|
|
|
161
161
|
* List all entries from the memory database
|
|
162
162
|
*/
|
|
163
163
|
export async function listEntries(options) {
|
|
164
|
-
// ADR-053: Try
|
|
164
|
+
// ADR-053: Try LanceDB memory bridge first
|
|
165
165
|
const bridge = await getBridge();
|
|
166
166
|
if (bridge) {
|
|
167
167
|
const bridgeResult = await bridge.bridgeListEntries(options);
|
|
@@ -250,7 +250,7 @@ export async function listEntries(options) {
|
|
|
250
250
|
* Get a specific entry from the memory database
|
|
251
251
|
*/
|
|
252
252
|
export async function getEntry(options) {
|
|
253
|
-
// ADR-053: Try
|
|
253
|
+
// ADR-053: Try LanceDB memory bridge first
|
|
254
254
|
const bridge = await getBridge();
|
|
255
255
|
if (bridge) {
|
|
256
256
|
const bridgeResult = await bridge.bridgeGetEntry(options);
|
|
@@ -84,7 +84,7 @@ export interface SwarmConfig {
|
|
|
84
84
|
healthCheckInterval: number;
|
|
85
85
|
}
|
|
86
86
|
export interface MemoryConfig {
|
|
87
|
-
backend: '
|
|
87
|
+
backend: 'lancedb' | 'sqlite' | 'memory' | 'hybrid';
|
|
88
88
|
persistPath: string;
|
|
89
89
|
cacheSize: number;
|
|
90
90
|
enableHNSW: boolean;
|
|
@@ -340,6 +340,14 @@ html, body { height: 100%; background: var(--bg); color: var(--text-hi); font-fa
|
|
|
340
340
|
#odt-chat-feed::-webkit-scrollbar { width:4px; }
|
|
341
341
|
#odt-chat-feed::-webkit-scrollbar-thumb { background:var(--border); border-radius:2px; }
|
|
342
342
|
#odt-chat-empty { font-size:11px; color:var(--text-lo); text-align:center; padding:32px 0; line-height:2; }
|
|
343
|
+
#odt-chat-compose { display:flex; gap:6px; padding:8px 12px; border-top:1px solid var(--border); flex-shrink:0; }
|
|
344
|
+
#odt-chat-input { flex:1; background:var(--surface); color:var(--text); border:1px solid var(--border); border-radius:4px; font-size:11px; font-family:var(--mono); padding:5px 8px; resize:none; min-height:28px; max-height:80px; line-height:1.4; }
|
|
345
|
+
#odt-chat-input:focus { outline:none; border-color:var(--accent); }
|
|
346
|
+
#odt-chat-send-btn { font-size:8px; letter-spacing:1.5px; padding:4px 10px; border-radius:3px; border:1px solid oklch(62% 0.2 186 / 0.4); color:oklch(62% 0.2 186); background:transparent; cursor:pointer; font-family:inherit; flex-shrink:0; align-self:flex-end; }
|
|
347
|
+
#odt-chat-send-btn:hover:not(:disabled) { background:oklch(62% 0.2 186 / 0.12); }
|
|
348
|
+
#odt-chat-send-btn:disabled { opacity:0.3; cursor:default; }
|
|
349
|
+
.cv-user-msg { align-self:flex-end; }
|
|
350
|
+
.cv-user-msg .cv-bub { background:oklch(20% 0.06 220); border-left:none; border-right:2px solid oklch(62% 0.2 186); }
|
|
343
351
|
.odt-mode-btn {
|
|
344
352
|
font-family: inherit; font-size: 7px; letter-spacing: 1.5px;
|
|
345
353
|
padding: 2px 7px; border-radius: 3px; cursor: pointer;
|
|
@@ -7246,6 +7254,10 @@ async function v2RenderOrgChat() {
|
|
|
7246
7254
|
<div id="odt-chat-excerpt" class="cv-excerpt-banner"></div>
|
|
7247
7255
|
<div id="odt-chat-feed">
|
|
7248
7256
|
<div id="odt-chat-empty">Select a session to see agent communications.<br><span style="font-size:10px;opacity:0.5">Sessions appear after the first /mastermind:runorg</span></div>
|
|
7257
|
+
</div>
|
|
7258
|
+
<div id="odt-chat-compose">
|
|
7259
|
+
<textarea id="odt-chat-input" rows="1" placeholder="Send a message to the org…" onkeydown="if(event.key==='Enter'&&!event.shiftKey){event.preventDefault();odtSendChatMessage();}"></textarea>
|
|
7260
|
+
<button id="odt-chat-send-btn" onclick="odtSendChatMessage()" disabled>SEND</button>
|
|
7249
7261
|
</div>`;
|
|
7250
7262
|
}
|
|
7251
7263
|
|
|
@@ -7627,18 +7639,39 @@ function _odtPopulateChatSel() {
|
|
|
7627
7639
|
}
|
|
7628
7640
|
}
|
|
7629
7641
|
|
|
7642
|
+
window.odtSendChatMessage = async function() {
|
|
7643
|
+
const inp = document.getElementById('odt-chat-input');
|
|
7644
|
+
const btn = document.getElementById('odt-chat-send-btn');
|
|
7645
|
+
if (!inp || !_v2SelOrg) return;
|
|
7646
|
+
const text = inp.value.trim();
|
|
7647
|
+
if (!text) return;
|
|
7648
|
+
inp.value = '';
|
|
7649
|
+
btn.disabled = true;
|
|
7650
|
+
try {
|
|
7651
|
+
await fetch('/api/orgs/'+encodeURIComponent(_v2SelOrg)+'/chat', { method:'POST', headers:{'Content-Type':'application/json'}, body: JSON.stringify({ text, runId: _odtChatCurrentId || null }) });
|
|
7652
|
+
} catch(e) {
|
|
7653
|
+
inp.value = text;
|
|
7654
|
+
} finally {
|
|
7655
|
+
btn.disabled = false;
|
|
7656
|
+
inp.focus();
|
|
7657
|
+
}
|
|
7658
|
+
};
|
|
7659
|
+
|
|
7630
7660
|
window.odtChatSelectSession = async function(id) {
|
|
7631
7661
|
_odtChatCurrentId = id;
|
|
7632
7662
|
_odtChatCurrentAgent = 'all';
|
|
7633
7663
|
const feed = document.getElementById('odt-chat-feed');
|
|
7634
7664
|
const emptyEl = document.getElementById('odt-chat-empty');
|
|
7635
7665
|
const bar = document.getElementById('odt-chat-agent-bar');
|
|
7666
|
+
const sendBtn = document.getElementById('odt-chat-send-btn');
|
|
7636
7667
|
feed.querySelectorAll('.cv-msg, .cv-session-hdr').forEach(e => e.remove());
|
|
7637
7668
|
if (!id) {
|
|
7638
7669
|
if (emptyEl) emptyEl.style.display = 'block';
|
|
7639
7670
|
if (bar) bar.style.display = 'none';
|
|
7671
|
+
if (sendBtn) sendBtn.disabled = true;
|
|
7640
7672
|
return;
|
|
7641
7673
|
}
|
|
7674
|
+
if (sendBtn) sendBtn.disabled = false;
|
|
7642
7675
|
|
|
7643
7676
|
// ── Run group path: render merged events from all runs in the group ──
|
|
7644
7677
|
if (id.startsWith('rgrp:') && _odtRunGroups[id]) {
|
|
@@ -7991,12 +8024,12 @@ function _odtAppendEvent(ev, animate) {
|
|
|
7991
8024
|
const _isSummaryType = _evType === 'agent:spawn' || _evType === 'agent:complete' ||
|
|
7992
8025
|
_evType === 'agent:edit' || _evType === 'org:comms' || _evType === 'org:error' ||
|
|
7993
8026
|
_evType === 'run:start' || _evType === 'run:complete' || _evType === 'org:start' ||
|
|
7994
|
-
_evType === 'org:checkpoint' || _evType === 'run:cycle:complete' || _evType === 'org:complete' || _evType === 'org:stop'
|
|
7995
|
-
|
|
7996
|
-
|
|
7997
|
-
|
|
8027
|
+
_evType === 'org:checkpoint' || _evType === 'run:cycle:complete' || _evType === 'org:complete' || _evType === 'org:stop' ||
|
|
8028
|
+
_evType === 'user:message';
|
|
8029
|
+
// detailed: show all except pure noise (inverted — new event types auto-visible)
|
|
8030
|
+
const _isNoiseType = _evType === 'agent:usage' || _evType === 'loop:tick';
|
|
7998
8031
|
if (_odtChatMode === 'summary' && !_isSummaryType) return;
|
|
7999
|
-
if (_odtChatMode === 'detailed' &&
|
|
8032
|
+
if (_odtChatMode === 'detailed' && _isNoiseType) return;
|
|
8000
8033
|
// raw: show everything
|
|
8001
8034
|
const feed = document.getElementById('odt-chat-feed');
|
|
8002
8035
|
if (!feed) return;
|
|
@@ -8073,6 +8106,9 @@ function _odtAppendEvent(ev, animate) {
|
|
|
8073
8106
|
el.classList.add('cv-err');
|
|
8074
8107
|
} else if (ev.type === 'org:agent:offline') {
|
|
8075
8108
|
el = mkCVSys('◌ ' + esc(ev.title || ev.role || '?') + ' offline', ts);
|
|
8109
|
+
} else if (ev.type === 'user:message') {
|
|
8110
|
+
el = mkCVAgent('you', ev.text || ev.msg || ev.message || '', ts, 'user:message');
|
|
8111
|
+
el.classList.add('cv-user-msg');
|
|
8076
8112
|
} else {
|
|
8077
8113
|
el = mkCVSys(esc(ev.type || 'event'), ts);
|
|
8078
8114
|
}
|
|
@@ -254,12 +254,15 @@ html, body {
|
|
|
254
254
|
.tab-btn:hover { color: var(--muted); }
|
|
255
255
|
.tab-btn.active { color: var(--teal); border-bottom-color: var(--teal); }
|
|
256
256
|
|
|
257
|
-
#main-body { flex: 1; overflow-y: auto; overflow-x: hidden; }
|
|
257
|
+
#main-body { flex: 1; overflow-y: auto; overflow-x: hidden; min-height: 0; }
|
|
258
258
|
#main-body::-webkit-scrollbar { width: 4px; }
|
|
259
259
|
#main-body::-webkit-scrollbar-thumb { background: var(--teal-dim); border-radius: 2px; }
|
|
260
|
+
/* Chat tab needs a non-scrolling bounded container so compose stays visible */
|
|
261
|
+
#main-body.chat-active { overflow: hidden; display: flex; flex-direction: column; }
|
|
260
262
|
|
|
261
263
|
.tab-pane { display: none; }
|
|
262
264
|
.tab-pane.active { display: block; }
|
|
265
|
+
#main-body.chat-active #tab-chat { display: flex; flex-direction: column; flex: 1; min-height: 0; }
|
|
263
266
|
|
|
264
267
|
/* ── Empty / no-selection state ─────────────────────────────────── */
|
|
265
268
|
#no-org-state {
|
|
@@ -421,7 +424,7 @@ html, body {
|
|
|
421
424
|
|
|
422
425
|
/* ── Chat tab ───────────────────────────────────────────────────── */
|
|
423
426
|
#chat-pane {
|
|
424
|
-
display: flex; flex-direction: column; height:
|
|
427
|
+
display: flex; flex-direction: column; flex: 1; min-height: 0;
|
|
425
428
|
overflow: hidden;
|
|
426
429
|
}
|
|
427
430
|
#chat-session-bar {
|
|
@@ -491,6 +494,39 @@ html, body {
|
|
|
491
494
|
.cmsg.csys { align-self: center; max-width: 100%; }
|
|
492
495
|
.cmsg.cagent { align-self: flex-start; }
|
|
493
496
|
.cmsg.cic { align-self: flex-start; }
|
|
497
|
+
.cmsg.cuser { align-self: flex-end; }
|
|
498
|
+
.cmsg.cuser .cbubble {
|
|
499
|
+
background: oklch(14% 0.022 250);
|
|
500
|
+
border: 1px solid oklch(68% 0.18 250 / 0.28);
|
|
501
|
+
border-radius: 8px 2px 8px 8px;
|
|
502
|
+
padding: 7px 11px; color: oklch(80% 0.010 250);
|
|
503
|
+
font-size: 11px; line-height: 1.6;
|
|
504
|
+
word-break: break-word; white-space: pre-wrap;
|
|
505
|
+
}
|
|
506
|
+
#chat-compose {
|
|
507
|
+
display: flex; gap: 6px; align-items: flex-end;
|
|
508
|
+
padding: 8px 20px 12px;
|
|
509
|
+
border-top: 1px solid var(--border);
|
|
510
|
+
flex-shrink: 0;
|
|
511
|
+
}
|
|
512
|
+
#chat-compose-input {
|
|
513
|
+
flex: 1; background: oklch(10% 0.012 186);
|
|
514
|
+
border: 1px solid var(--border); border-radius: 4px;
|
|
515
|
+
color: var(--text); font-family: var(--mono); font-size: 11px;
|
|
516
|
+
padding: 6px 9px; resize: none; min-height: 32px; max-height: 120px;
|
|
517
|
+
line-height: 1.5; outline: none;
|
|
518
|
+
}
|
|
519
|
+
#chat-compose-input:focus { border-color: var(--teal-dim); }
|
|
520
|
+
#chat-compose-input::placeholder { color: var(--dim); }
|
|
521
|
+
#chat-send-btn {
|
|
522
|
+
background: oklch(14% 0.022 186); border: 1px solid var(--teal-dim);
|
|
523
|
+
color: var(--teal); border-radius: 4px; padding: 5px 12px;
|
|
524
|
+
font-family: var(--mono); font-size: 9px; letter-spacing: 1px;
|
|
525
|
+
cursor: pointer; flex-shrink: 0; align-self: flex-end;
|
|
526
|
+
transition: background 0.15s, border-color 0.15s;
|
|
527
|
+
}
|
|
528
|
+
#chat-send-btn:hover { background: oklch(62% 0.20 186 / 0.12); border-color: var(--teal); }
|
|
529
|
+
#chat-send-btn:disabled { opacity: 0.35; cursor: default; }
|
|
494
530
|
|
|
495
531
|
@keyframes cmsg-in { from{opacity:0;transform:translateY(3px)} to{opacity:1;transform:none} }
|
|
496
532
|
.cmsg.new { animation: cmsg-in 0.18s ease-out; }
|
|
@@ -914,6 +950,10 @@ html, body {
|
|
|
914
950
|
<div id="chat-feed-wrap">
|
|
915
951
|
<div id="chat-feed-empty">Select a session above to see agent communications.</div>
|
|
916
952
|
</div>
|
|
953
|
+
<div id="chat-compose">
|
|
954
|
+
<textarea id="chat-compose-input" rows="1" placeholder="Send a message to the org…" onkeydown="chatComposeKey(event)"></textarea>
|
|
955
|
+
<button id="chat-send-btn" onclick="sendChatMessage()" disabled>SEND</button>
|
|
956
|
+
</div>
|
|
917
957
|
</div>
|
|
918
958
|
</div>
|
|
919
959
|
|
|
@@ -956,7 +996,7 @@ let currentTab = 'chart';
|
|
|
956
996
|
let chatRenderMode = localStorage.getItem('chatRenderMode') || 'summary';
|
|
957
997
|
|
|
958
998
|
// Phase 3: Chat render mode — Summary / Detailed / Raw
|
|
959
|
-
const CHAT_SUMMARY_TYPES = new Set(['session:start','session:complete','domain:dispatch','domain:complete','agent:spawn','agent:complete','agent:edit','org:comms','loop:start','loop:complete','org:artifact','agent:message','intercom']);
|
|
999
|
+
const CHAT_SUMMARY_TYPES = new Set(['session:start','session:complete','domain:dispatch','domain:complete','agent:spawn','agent:complete','agent:edit','org:comms','loop:start','loop:complete','org:artifact','agent:message','intercom','user:message']);
|
|
960
1000
|
const CHAT_DETAILED_TYPES = new Set([...CHAT_SUMMARY_TYPES,'agent:bash','agent:bash:result','agent:browse','agent:read','agent:read:batch']);
|
|
961
1001
|
function setChatMode(mode) {
|
|
962
1002
|
chatRenderMode = mode;
|
|
@@ -1029,6 +1069,8 @@ window.switchTab = function(tab) {
|
|
|
1029
1069
|
document.querySelectorAll('.tab-pane').forEach(p => p.classList.remove('active'));
|
|
1030
1070
|
const pane = document.getElementById('tab-' + tab);
|
|
1031
1071
|
if (pane) pane.classList.add('active');
|
|
1072
|
+
const mainBody = document.getElementById('main-body');
|
|
1073
|
+
if (mainBody) mainBody.classList.toggle('chat-active', tab === 'chat');
|
|
1032
1074
|
if (tab === 'chat') renderChatTab();
|
|
1033
1075
|
else if (orgDetailData) renderTab(tab);
|
|
1034
1076
|
};
|
|
@@ -1638,12 +1680,15 @@ window.selectChatSession = function(id) {
|
|
|
1638
1680
|
const feed = document.getElementById('chat-feed-wrap');
|
|
1639
1681
|
const empty = document.getElementById('chat-feed-empty');
|
|
1640
1682
|
const bar = document.getElementById('chat-agent-bar');
|
|
1683
|
+
const sendBtn = document.getElementById('chat-send-btn');
|
|
1641
1684
|
if (!id) {
|
|
1642
1685
|
feed.querySelectorAll('.cmsg').forEach(e=>e.remove());
|
|
1643
1686
|
if (empty) empty.style.display = 'block';
|
|
1644
1687
|
if (bar) bar.style.display = 'none';
|
|
1688
|
+
if (sendBtn) sendBtn.disabled = true;
|
|
1645
1689
|
return;
|
|
1646
1690
|
}
|
|
1691
|
+
if (sendBtn) sendBtn.disabled = false;
|
|
1647
1692
|
const sess = chatSessions.find(s => s.id === id);
|
|
1648
1693
|
if (!sess) return;
|
|
1649
1694
|
feed.querySelectorAll('.cmsg').forEach(e=>e.remove());
|
|
@@ -1748,12 +1793,16 @@ function appendChatEvent(ev, animate) {
|
|
|
1748
1793
|
el = mkAgent(ev.agent||'agent', esc(ev.text||''), ts, dc(ev.domain), null);
|
|
1749
1794
|
} else if (ev.type === 'intercom') {
|
|
1750
1795
|
el = mkIntercom(ev.from, ev.to, esc(ev.msg||''), ts);
|
|
1796
|
+
} else if (ev.type === 'user:message') {
|
|
1797
|
+
el = mkUser(esc(ev.text||ev.msg||''), ts);
|
|
1751
1798
|
} else if (ev.type === 'loop:start') {
|
|
1752
1799
|
el = mkSys(`🔁 Loop: ${esc(ev.command||'')} (${ev.repeat||'?'} runs)`, ts);
|
|
1753
1800
|
} else if (ev.type === 'loop:complete') {
|
|
1754
1801
|
el = mkSys(`🔁 Loop done: ${esc(ev.command||'')} — ${ev.ranReps||'?'} run(s)`, ts);
|
|
1755
|
-
} else if (ev.type === 'org:artifact'
|
|
1756
|
-
|
|
1802
|
+
} else if (ev.type === 'org:artifact') {
|
|
1803
|
+
const _art = ev.artifact || (ev.path ? { path: ev.path, label: ev.label, mimeType: ev.mimeType } : null);
|
|
1804
|
+
if (_art) el = mkArtifact(_art, ts);
|
|
1805
|
+
else el = mkSys(`📄 artifact: ${esc(ev.label||ev.path||'file')}`, ts);
|
|
1757
1806
|
} else {
|
|
1758
1807
|
el = mkSys(`<span style="opacity:0.4">${esc(ev.type)}${ev.domain?' ['+esc(ev.domain)+']':''}</span>`, ts);
|
|
1759
1808
|
}
|
|
@@ -1795,6 +1844,43 @@ function mkArtifact(art, ts) {
|
|
|
1795
1844
|
return el;
|
|
1796
1845
|
}
|
|
1797
1846
|
|
|
1847
|
+
function mkUser(text, ts) {
|
|
1848
|
+
const el = document.createElement('div');
|
|
1849
|
+
el.className = 'cmsg cuser';
|
|
1850
|
+
el.innerHTML = `<div class="cmsg-meta" style="justify-content:flex-end"><span class="cts">${ts}</span><span class="ctag" style="border-color:oklch(68% 0.18 250 / 0.35);color:oklch(68% 0.14 250)">you</span></div><div class="cbubble">${text}</div>`;
|
|
1851
|
+
return el;
|
|
1852
|
+
}
|
|
1853
|
+
|
|
1854
|
+
async function sendChatMessage() {
|
|
1855
|
+
const input = document.getElementById('chat-compose-input');
|
|
1856
|
+
const btn = document.getElementById('chat-send-btn');
|
|
1857
|
+
const text = (input?.value || '').trim();
|
|
1858
|
+
if (!text || !selectedOrg) return;
|
|
1859
|
+
btn.disabled = true;
|
|
1860
|
+
input.value = '';
|
|
1861
|
+
input.style.height = '';
|
|
1862
|
+
try {
|
|
1863
|
+
await fetch(`/api/orgs/${encodeURIComponent(selectedOrg)}/chat`, {
|
|
1864
|
+
method: 'POST',
|
|
1865
|
+
headers: { 'Content-Type': 'application/json' },
|
|
1866
|
+
body: JSON.stringify({ text }),
|
|
1867
|
+
});
|
|
1868
|
+
} catch(_) {}
|
|
1869
|
+
btn.disabled = false;
|
|
1870
|
+
input.focus();
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1873
|
+
function chatComposeKey(e) {
|
|
1874
|
+
if (e.key === 'Enter' && !e.shiftKey) {
|
|
1875
|
+
e.preventDefault();
|
|
1876
|
+
sendChatMessage();
|
|
1877
|
+
}
|
|
1878
|
+
// Auto-resize
|
|
1879
|
+
const ta = e.target;
|
|
1880
|
+
ta.style.height = 'auto';
|
|
1881
|
+
ta.style.height = Math.min(ta.scrollHeight, 120) + 'px';
|
|
1882
|
+
}
|
|
1883
|
+
|
|
1798
1884
|
async function viewArtifact(filePath, label) {
|
|
1799
1885
|
const orgName = selectedOrg;
|
|
1800
1886
|
if (!orgName || !filePath) return;
|
|
@@ -5745,6 +5745,50 @@ export async function startServer({ port = 4242, projectDir, openBrowser = true
|
|
|
5745
5745
|
return;
|
|
5746
5746
|
}
|
|
5747
5747
|
|
|
5748
|
+
// ---- POST /api/orgs/:name/chat — user sends a message to a running org ----
|
|
5749
|
+
if (req.method === 'POST' && /^\/api\/orgs\/[a-z0-9][a-z0-9_-]{0,63}\/chat$/i.test(url)) {
|
|
5750
|
+
let _chBody = '';
|
|
5751
|
+
for await (const chunk of req) { _chBody += chunk; if (_chBody.length > 65536) { req.destroy(); break; } }
|
|
5752
|
+
try {
|
|
5753
|
+
const _chOrgName = decodeURIComponent(url.split('/')[3]);
|
|
5754
|
+
if (_chOrgName.length > 64 || !/^[a-z0-9][a-z0-9_-]*$/i.test(_chOrgName)) {
|
|
5755
|
+
res.writeHead(400, { 'Content-Type': 'application/json' }); res.end(JSON.stringify({ error: 'Invalid org name' })); return;
|
|
5756
|
+
}
|
|
5757
|
+
let _chPayload = {};
|
|
5758
|
+
try { _chPayload = JSON.parse(_chBody); } catch(_) {}
|
|
5759
|
+
const _chText = String(_chPayload.text || '').trim().slice(0, 4096);
|
|
5760
|
+
if (!_chText) { res.writeHead(400, { 'Content-Type': 'application/json' }); res.end(JSON.stringify({ error: 'text is required' })); return; }
|
|
5761
|
+
const _chRoot = projectDir || process.cwd();
|
|
5762
|
+
const _chMonoDir = _getGitMonomindDir(_chRoot) || path.join(_chRoot, '.monomind');
|
|
5763
|
+
const _chRunId = activeOrgRuns.get(_chOrgName) || _getActiveRunId(_chOrgName, _chRoot);
|
|
5764
|
+
const _chEvent = { type: 'user:message', org: _chOrgName, runId: _chRunId || null, text: _chText, ts: Date.now() };
|
|
5765
|
+
// Write to run JSONL if active run exists
|
|
5766
|
+
if (_chRunId) {
|
|
5767
|
+
const _chRunFile = path.join(_chMonoDir, 'orgs', _chOrgName, 'runs', `${_chRunId}.jsonl`);
|
|
5768
|
+
if (fs.existsSync(_chRunFile)) await appendToFile(_chRunFile, JSON.stringify(_chEvent) + '\n');
|
|
5769
|
+
}
|
|
5770
|
+
// Write to mailbox file so boss agent can pick up on next cycle
|
|
5771
|
+
const _chMailbox = path.join(_chRoot, '.monomind', 'orgs', `${_chOrgName}-threads.json`);
|
|
5772
|
+
try {
|
|
5773
|
+
let _chThreads = { messages: [] };
|
|
5774
|
+
if (fs.existsSync(_chMailbox)) { try { _chThreads = JSON.parse(fs.readFileSync(_chMailbox, 'utf8')); } catch(_) {} }
|
|
5775
|
+
if (!Array.isArray(_chThreads.messages)) _chThreads.messages = [];
|
|
5776
|
+
_chThreads.messages.push({ text: _chText, ts: _chEvent.ts, status: 'pending' });
|
|
5777
|
+
fs.writeFileSync(_chMailbox, JSON.stringify(_chThreads, null, 2));
|
|
5778
|
+
} catch(_) {}
|
|
5779
|
+
// Broadcast to SSE stream clients
|
|
5780
|
+
broadcastMm(_chEvent);
|
|
5781
|
+
const _chFwdClients = runStreamClients.get(_chOrgName);
|
|
5782
|
+
if (_chFwdClients && _chFwdClients.size > 0) {
|
|
5783
|
+
const _chLine = `data: ${JSON.stringify(_chEvent)}\n\n`;
|
|
5784
|
+
for (const _cl of _chFwdClients) { try { _cl.write(_chLine); } catch(_) { _chFwdClients.delete(_cl); } }
|
|
5785
|
+
}
|
|
5786
|
+
res.writeHead(200, { 'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*' });
|
|
5787
|
+
res.end(JSON.stringify({ ok: true }));
|
|
5788
|
+
} catch (e) { res.writeHead(500, { 'Content-Type': 'application/json' }); res.end(JSON.stringify({ error: e.message })); }
|
|
5789
|
+
return;
|
|
5790
|
+
}
|
|
5791
|
+
|
|
5748
5792
|
// ------------------------------------------------------------------ 404
|
|
5749
5793
|
res.writeHead(404, { 'Content-Type': 'text/plain' });
|
|
5750
5794
|
res.end('Not found');
|
|
@@ -35,9 +35,7 @@ function isSafePackageName(p) {
|
|
|
35
35
|
}
|
|
36
36
|
// Known compatibility matrix between monomind packages
|
|
37
37
|
const COMPATIBILITY_MATRIX = {
|
|
38
|
-
'@monomind/cli': {
|
|
39
|
-
'@monomind/security': { minVersion: '3.0.0-alpha.1' },
|
|
40
|
-
},
|
|
38
|
+
'@monomind/cli': {},
|
|
41
39
|
'@monoes/monomindcli': {
|
|
42
40
|
'monofence-ai': { minVersion: '1.0.0' },
|
|
43
41
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monoes/monomindcli",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Monomind CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -74,7 +74,6 @@
|
|
|
74
74
|
"scripts": {
|
|
75
75
|
"build": "tsc --noEmitOnError false || true && mkdir -p dist/src/browser/dashboard && cp node_modules/@monoes/monobrowse/dist/src/browser/dashboard/ui.html dist/src/browser/dashboard/ui.html",
|
|
76
76
|
"test": "vitest run",
|
|
77
|
-
"test:plugin-store": "npx tsx src/plugins/tests/standalone-test.ts",
|
|
78
77
|
"test:pattern-store": "npx tsx src/transfer/store/tests/standalone-test.ts",
|
|
79
78
|
"prepublishOnly": "cp ../../../README.md ./README.md && bash ./scripts/sync-claude-assets.sh",
|
|
80
79
|
"release": "npm version prerelease --preid=alpha && npm run publish:all",
|
|
@@ -89,7 +88,8 @@
|
|
|
89
88
|
"ws": "^8.21.0",
|
|
90
89
|
"@noble/ed25519": "^2.1.0",
|
|
91
90
|
"@monoes/monograph": "^1.2.1",
|
|
92
|
-
"@monoes/monobrowse": "^1.0.1"
|
|
91
|
+
"@monoes/monobrowse": "^1.0.1",
|
|
92
|
+
"@monomind/security": "workspace:*"
|
|
93
93
|
},
|
|
94
94
|
"optionalDependencies": {
|
|
95
95
|
"sql.js": "^1.14.1",
|
|
@@ -106,4 +106,4 @@
|
|
|
106
106
|
"access": "public",
|
|
107
107
|
"tag": "latest"
|
|
108
108
|
}
|
|
109
|
-
}
|
|
109
|
+
}
|
|
@@ -185,7 +185,7 @@ fi
|
|
|
185
185
|
|
|
186
186
|
# ── 4. Memory Operations ─────────────────────────────────────
|
|
187
187
|
if should_run "memory"; then
|
|
188
|
-
section 4 "Memory Operations (
|
|
188
|
+
section 4 "Memory Operations (LanceDB + RVF)"
|
|
189
189
|
check "memory init" $MONOMIND_CMD memory init --force
|
|
190
190
|
check "memory store key-1" $MONOMIND_CMD memory store --key "verify-1" --value "Capability verification entry one" --namespace verify
|
|
191
191
|
check "memory store key-2" $MONOMIND_CMD memory store --key "verify-2" --value "Vector search verification entry" --namespace verify
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CLI Plugins Command
|
|
3
|
-
* Plugin management, installation, and lifecycle
|
|
4
|
-
* Now uses IPFS-based decentralized registry for discovery
|
|
5
|
-
*
|
|
6
|
-
* github.com/monoes/monomind
|
|
7
|
-
*/
|
|
8
|
-
import type { Command } from '../types.js';
|
|
9
|
-
export declare const pluginsCommand: Command;
|
|
10
|
-
export default pluginsCommand;
|
|
11
|
-
//# sourceMappingURL=plugins.d.ts.map
|