@claude-flow/cli 3.66.0 → 3.66.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/helpers/helpers.manifest.json +2 -2
- package/catalog-manifest.json +2 -2
- package/dist/src/mcp-tools/memory-tools.js +14 -0
- package/dist/src/mcp-tools/terminal-tools.js +3 -2
- package/dist/src/memory/memory-bridge.js +21 -1
- package/dist/src/missions/schemas.d.ts +134 -134
- package/dist/src/mods/command-registry/schema.d.ts +189 -189
- package/node_modules/@claude-flow/mcp/dist/transport/guard.d.ts +10 -0
- package/node_modules/@claude-flow/mcp/dist/transport/guard.d.ts.map +1 -1
- package/node_modules/@claude-flow/mcp/dist/transport/guard.js +17 -0
- package/node_modules/@claude-flow/mcp/dist/transport/guard.js.map +1 -1
- package/node_modules/@claude-flow/mcp/dist/transport/http.d.ts.map +1 -1
- package/node_modules/@claude-flow/mcp/dist/transport/http.js +4 -8
- package/node_modules/@claude-flow/mcp/dist/transport/http.js.map +1 -1
- package/node_modules/@claude-flow/mcp/dist/transport/websocket.d.ts.map +1 -1
- package/node_modules/@claude-flow/mcp/dist/transport/websocket.js +2 -3
- package/node_modules/@claude-flow/mcp/dist/transport/websocket.js.map +1 -1
- package/node_modules/@claude-flow/mcp/package.json +1 -1
- package/node_modules/@claude-flow/plugin-agent-federation/dist/application/policy-engine.d.ts.map +1 -1
- package/node_modules/@claude-flow/plugin-agent-federation/dist/application/policy-engine.js +31 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/application/policy-engine.js.map +1 -1
- package/node_modules/@claude-flow/plugin-agent-federation/package.json +1 -1
- package/node_modules/@claude-flow/security/dist/input-validator.d.ts.map +1 -1
- package/node_modules/@claude-flow/security/dist/input-validator.js +10 -5
- package/node_modules/@claude-flow/security/dist/input-validator.js.map +1 -1
- package/node_modules/@claude-flow/security/dist/token-generator.d.ts.map +1 -1
- package/node_modules/@claude-flow/security/dist/token-generator.js +4 -3
- package/node_modules/@claude-flow/security/dist/token-generator.js.map +1 -1
- package/node_modules/@claude-flow/security/package.json +1 -1
- package/package.json +6 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest": {
|
|
3
|
-
"version": "3.66.
|
|
3
|
+
"version": "3.66.2",
|
|
4
4
|
"files": {
|
|
5
5
|
"auto-memory-hook.mjs": "631fac9d518835e2852a406888316bbbddddb49e7ed8e406d2e971f46833df9a",
|
|
6
6
|
"hook-handler.cjs": "0ce70981aa33f76d008b6f49626effaf4269918c4094f1a28c1ef6fceb097d6f",
|
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
"learning-loop.cjs": "d046cd6f8efb7dd40e1d2451516c181fc8b26477aefb1124c0df5f52a23f9190"
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
|
-
"signature": "
|
|
13
|
+
"signature": "if1ToBugZK6ce9z+01Bfo3otxr+WTji2wwDw5u13NQjm0g2pKboaTUOQ9t/LRV1Gq52NPX9abgU3/KEQn6AeAw==",
|
|
14
14
|
"algorithm": "ed25519"
|
|
15
15
|
}
|
package/catalog-manifest.json
CHANGED
|
@@ -878,6 +878,19 @@ export const memoryTools = [
|
|
|
878
878
|
offset,
|
|
879
879
|
dbPath,
|
|
880
880
|
});
|
|
881
|
+
// #4622: a failed query is not an empty store. Without this, a
|
|
882
|
+
// listing that could not read the database came back as a
|
|
883
|
+
// successful, empty inventory.
|
|
884
|
+
if (result.success === false) {
|
|
885
|
+
return {
|
|
886
|
+
success: false,
|
|
887
|
+
entries: [],
|
|
888
|
+
total: 0,
|
|
889
|
+
limit,
|
|
890
|
+
offset,
|
|
891
|
+
error: result.error || 'listEntries reported failure',
|
|
892
|
+
};
|
|
893
|
+
}
|
|
881
894
|
const entries = result.entries.map(e => ({
|
|
882
895
|
key: e.key,
|
|
883
896
|
namespace: e.namespace,
|
|
@@ -898,6 +911,7 @@ export const memoryTools = [
|
|
|
898
911
|
}
|
|
899
912
|
catch (error) {
|
|
900
913
|
return {
|
|
914
|
+
success: false,
|
|
901
915
|
entries: [],
|
|
902
916
|
total: 0,
|
|
903
917
|
limit,
|
|
@@ -9,6 +9,7 @@ import { mkdirRestricted, readFileMaybeEncrypted, writeFileRestricted, } from '.
|
|
|
9
9
|
import { validateEnv, validateIdentifier, validatePath, validateText } from './validate-input.js';
|
|
10
10
|
import { join } from 'node:path';
|
|
11
11
|
import { execSync } from 'node:child_process';
|
|
12
|
+
import { randomBytes } from 'node:crypto';
|
|
12
13
|
// Storage paths
|
|
13
14
|
const STORAGE_DIR = '.claude-flow';
|
|
14
15
|
const TERMINAL_DIR = 'terminals';
|
|
@@ -81,7 +82,7 @@ export const terminalTools = [
|
|
|
81
82
|
if (!vEnv.valid)
|
|
82
83
|
return { success: false, error: vEnv.error };
|
|
83
84
|
const store = loadTerminalStore();
|
|
84
|
-
const id = `term-${Date.now()}-${
|
|
85
|
+
const id = `term-${Date.now()}-${randomBytes(4).toString('hex')}`;
|
|
85
86
|
const session = {
|
|
86
87
|
id,
|
|
87
88
|
name: input.name || `Terminal ${Object.keys(store.sessions).length + 1}`,
|
|
@@ -135,7 +136,7 @@ export const terminalTools = [
|
|
|
135
136
|
let session = sessionId ? store.sessions[sessionId] : Object.values(store.sessions).find(s => s.status === 'active');
|
|
136
137
|
if (!session) {
|
|
137
138
|
// Create default session
|
|
138
|
-
const id = `term-${Date.now()}-${
|
|
139
|
+
const id = `term-${Date.now()}-${randomBytes(4).toString('hex')}`;
|
|
139
140
|
session = {
|
|
140
141
|
id,
|
|
141
142
|
name: 'Default Terminal',
|
|
@@ -238,6 +238,17 @@ export function shouldSuppressInitLog(msg) {
|
|
|
238
238
|
* Lazily initialize the ControllerRegistry singleton.
|
|
239
239
|
* Returns null if @claude-flow/memory is not available.
|
|
240
240
|
*/
|
|
241
|
+
/**
|
|
242
|
+
* Why the registry's AgentDB did not open, or null when it did (#4622).
|
|
243
|
+
* Read from the registry's own record (@claude-flow/memory >= 3.2.0); an
|
|
244
|
+
* older registry has none, and nothing changes for it.
|
|
245
|
+
*/
|
|
246
|
+
function agentdbInitFailure(registry, resolvedPath) {
|
|
247
|
+
if (typeof registry?.getAgentDBInitError !== 'function')
|
|
248
|
+
return null;
|
|
249
|
+
const reason = registry.getAgentDBInitError();
|
|
250
|
+
return typeof reason === 'string' && reason ? `AgentDB did not open ${resolvedPath}: ${reason}` : null;
|
|
251
|
+
}
|
|
241
252
|
async function getRegistry(dbPath) {
|
|
242
253
|
if (shouldDisableNativeBridge())
|
|
243
254
|
return null;
|
|
@@ -527,6 +538,12 @@ async function getRegistry(dbPath) {
|
|
|
527
538
|
}
|
|
528
539
|
registryInstances.set(resolvedPath, registry);
|
|
529
540
|
bridgeFailureReasons.delete(resolvedPath);
|
|
541
|
+
// #4622: the registry survives an AgentDB open failure (its other
|
|
542
|
+
// controllers still work), but every database operation then falls
|
|
543
|
+
// back to sql.js. Record why, so the fallback's own refusal names it.
|
|
544
|
+
const agentdbFailure = agentdbInitFailure(registry, resolvedPath);
|
|
545
|
+
if (agentdbFailure)
|
|
546
|
+
bridgeFailureReasons.set(resolvedPath, agentdbFailure);
|
|
530
547
|
return registry;
|
|
531
548
|
}
|
|
532
549
|
catch (err) {
|
|
@@ -2188,7 +2205,10 @@ export async function isBridgeAvailable(dbPath) {
|
|
|
2188
2205
|
if (!operationContext.getStore()?.active)
|
|
2189
2206
|
return withBridgeOperation(() => isBridgeAvailable(dbPath));
|
|
2190
2207
|
const registry = await getRegistry(dbPath);
|
|
2191
|
-
|
|
2208
|
+
if (registry === null)
|
|
2209
|
+
return false;
|
|
2210
|
+
// #4622: a registry whose AgentDB failed to open serves no stored memory.
|
|
2211
|
+
return agentdbInitFailure(registry, canonicalDbPath(dbPath)) === null;
|
|
2192
2212
|
}
|
|
2193
2213
|
/**
|
|
2194
2214
|
* Get the ControllerRegistry instance (for advanced consumers).
|