claude-flow 3.73.0 → 3.74.0
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/proven-config.json +1 -1
- package/node_modules/@claude-flow/codex/dist/cli.js +0 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/bin.js +0 -0
- package/node_modules/@claude-flow/security/dist/input-validator.d.ts +138 -106
- package/node_modules/@claude-flow/security/dist/input-validator.d.ts.map +1 -1
- package/node_modules/@claude-flow/security/dist/input-validator.js +23 -26
- package/node_modules/@claude-flow/security/dist/input-validator.js.map +1 -1
- package/node_modules/@claude-flow/security/package.json +2 -2
- package/package.json +3 -3
- package/v3/@claude-flow/cli/catalog-manifest.json +2 -2
- package/v3/@claude-flow/cli/dist/src/commands/doctor.js +5 -3
- package/v3/@claude-flow/cli/dist/src/mcp-tools/memory-tools.js +17 -0
- package/v3/@claude-flow/cli/dist/src/mcp-tools/metaharness-tools.js +19 -0
- package/v3/@claude-flow/cli/dist/src/memory/memory-bridge.d.ts +2 -0
- package/v3/@claude-flow/cli/dist/src/memory/memory-bridge.js +1 -1
- package/v3/@claude-flow/cli/dist/src/memory/memory-initializer.d.ts +2 -0
- package/v3/@claude-flow/cli/dist/src/memory/memory-initializer.js +1 -1
- package/v3/@claude-flow/cli/dist/src/metaharness/darwin-lib.d.ts +68 -0
- package/v3/@claude-flow/cli/dist/src/metaharness/darwin-lib.js +150 -0
- package/v3/@claude-flow/cli/dist/src/missions/schemas.d.ts +117 -117
- package/v3/@claude-flow/cli/dist/src/mods/command-registry/schema.d.ts +121 -121
- package/v3/@claude-flow/cli/package.json +6 -6
|
File without changes
|
|
File without changes
|
|
@@ -54,7 +54,7 @@ export declare const EmailSchema: z.ZodString;
|
|
|
54
54
|
/**
|
|
55
55
|
* Password schema with complexity requirements
|
|
56
56
|
*/
|
|
57
|
-
export declare const PasswordSchema: z.
|
|
57
|
+
export declare const PasswordSchema: z.ZodString;
|
|
58
58
|
/**
|
|
59
59
|
* UUID schema
|
|
60
60
|
*/
|
|
@@ -62,7 +62,7 @@ export declare const UUIDSchema: z.ZodString;
|
|
|
62
62
|
/**
|
|
63
63
|
* URL schema with HTTPS enforcement
|
|
64
64
|
*/
|
|
65
|
-
export declare const HttpsUrlSchema: z.
|
|
65
|
+
export declare const HttpsUrlSchema: z.ZodString;
|
|
66
66
|
/**
|
|
67
67
|
* URL schema (allows HTTP for development)
|
|
68
68
|
*/
|
|
@@ -78,19 +78,40 @@ export declare const PortSchema: z.ZodNumber;
|
|
|
78
78
|
/**
|
|
79
79
|
* IP address schema (v4)
|
|
80
80
|
*/
|
|
81
|
-
export declare const IPv4Schema: z.
|
|
81
|
+
export declare const IPv4Schema: z.ZodIPv4;
|
|
82
82
|
/**
|
|
83
83
|
* IP address schema (v4 or v6)
|
|
84
84
|
*/
|
|
85
|
-
export declare const IPSchema: z.
|
|
85
|
+
export declare const IPSchema: z.ZodUnion<readonly [z.ZodIPv4, z.ZodIPv6]>;
|
|
86
86
|
/**
|
|
87
87
|
* User role schema
|
|
88
88
|
*/
|
|
89
|
-
export declare const UserRoleSchema: z.ZodEnum<
|
|
89
|
+
export declare const UserRoleSchema: z.ZodEnum<{
|
|
90
|
+
admin: "admin";
|
|
91
|
+
operator: "operator";
|
|
92
|
+
developer: "developer";
|
|
93
|
+
viewer: "viewer";
|
|
94
|
+
service: "service";
|
|
95
|
+
}>;
|
|
90
96
|
/**
|
|
91
97
|
* Permission schema
|
|
92
98
|
*/
|
|
93
|
-
export declare const PermissionSchema: z.ZodEnum<
|
|
99
|
+
export declare const PermissionSchema: z.ZodEnum<{
|
|
100
|
+
"swarm.create": "swarm.create";
|
|
101
|
+
"swarm.read": "swarm.read";
|
|
102
|
+
"swarm.update": "swarm.update";
|
|
103
|
+
"swarm.delete": "swarm.delete";
|
|
104
|
+
"swarm.scale": "swarm.scale";
|
|
105
|
+
"agent.spawn": "agent.spawn";
|
|
106
|
+
"agent.read": "agent.read";
|
|
107
|
+
"agent.terminate": "agent.terminate";
|
|
108
|
+
"task.create": "task.create";
|
|
109
|
+
"task.read": "task.read";
|
|
110
|
+
"task.cancel": "task.cancel";
|
|
111
|
+
"metrics.read": "metrics.read";
|
|
112
|
+
"system.admin": "system.admin";
|
|
113
|
+
"api.access": "api.access";
|
|
114
|
+
}>;
|
|
94
115
|
/**
|
|
95
116
|
* Login request schema
|
|
96
117
|
*/
|
|
@@ -98,106 +119,145 @@ export declare const LoginRequestSchema: z.ZodObject<{
|
|
|
98
119
|
email: z.ZodString;
|
|
99
120
|
password: z.ZodString;
|
|
100
121
|
mfaCode: z.ZodOptional<z.ZodString>;
|
|
101
|
-
},
|
|
102
|
-
email: string;
|
|
103
|
-
password: string;
|
|
104
|
-
mfaCode?: string | undefined;
|
|
105
|
-
}, {
|
|
106
|
-
email: string;
|
|
107
|
-
password: string;
|
|
108
|
-
mfaCode?: string | undefined;
|
|
109
|
-
}>;
|
|
122
|
+
}, z.core.$strip>;
|
|
110
123
|
/**
|
|
111
124
|
* User creation schema
|
|
112
125
|
*/
|
|
113
126
|
export declare const CreateUserSchema: z.ZodObject<{
|
|
114
127
|
email: z.ZodString;
|
|
115
|
-
password: z.
|
|
116
|
-
role: z.ZodEnum<
|
|
117
|
-
|
|
128
|
+
password: z.ZodString;
|
|
129
|
+
role: z.ZodEnum<{
|
|
130
|
+
admin: "admin";
|
|
131
|
+
operator: "operator";
|
|
132
|
+
developer: "developer";
|
|
133
|
+
viewer: "viewer";
|
|
134
|
+
service: "service";
|
|
135
|
+
}>;
|
|
136
|
+
permissions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
137
|
+
"swarm.create": "swarm.create";
|
|
138
|
+
"swarm.read": "swarm.read";
|
|
139
|
+
"swarm.update": "swarm.update";
|
|
140
|
+
"swarm.delete": "swarm.delete";
|
|
141
|
+
"swarm.scale": "swarm.scale";
|
|
142
|
+
"agent.spawn": "agent.spawn";
|
|
143
|
+
"agent.read": "agent.read";
|
|
144
|
+
"agent.terminate": "agent.terminate";
|
|
145
|
+
"task.create": "task.create";
|
|
146
|
+
"task.read": "task.read";
|
|
147
|
+
"task.cancel": "task.cancel";
|
|
148
|
+
"metrics.read": "metrics.read";
|
|
149
|
+
"system.admin": "system.admin";
|
|
150
|
+
"api.access": "api.access";
|
|
151
|
+
}>>>;
|
|
118
152
|
isActive: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
119
|
-
},
|
|
120
|
-
email: string;
|
|
121
|
-
password: string;
|
|
122
|
-
role: "admin" | "operator" | "developer" | "viewer" | "service";
|
|
123
|
-
isActive: boolean;
|
|
124
|
-
permissions?: ("swarm.create" | "swarm.read" | "swarm.update" | "swarm.delete" | "swarm.scale" | "agent.spawn" | "agent.read" | "agent.terminate" | "task.create" | "task.read" | "task.cancel" | "metrics.read" | "system.admin" | "api.access")[] | undefined;
|
|
125
|
-
}, {
|
|
126
|
-
email: string;
|
|
127
|
-
password: string;
|
|
128
|
-
role: "admin" | "operator" | "developer" | "viewer" | "service";
|
|
129
|
-
permissions?: ("swarm.create" | "swarm.read" | "swarm.update" | "swarm.delete" | "swarm.scale" | "agent.spawn" | "agent.read" | "agent.terminate" | "task.create" | "task.read" | "task.cancel" | "metrics.read" | "system.admin" | "api.access")[] | undefined;
|
|
130
|
-
isActive?: boolean | undefined;
|
|
131
|
-
}>;
|
|
153
|
+
}, z.core.$strip>;
|
|
132
154
|
/**
|
|
133
155
|
* API key creation schema
|
|
134
156
|
*/
|
|
135
157
|
export declare const CreateApiKeySchema: z.ZodObject<{
|
|
136
158
|
name: z.ZodString;
|
|
137
|
-
permissions: z.ZodOptional<z.ZodArray<z.ZodEnum<
|
|
159
|
+
permissions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
160
|
+
"swarm.create": "swarm.create";
|
|
161
|
+
"swarm.read": "swarm.read";
|
|
162
|
+
"swarm.update": "swarm.update";
|
|
163
|
+
"swarm.delete": "swarm.delete";
|
|
164
|
+
"swarm.scale": "swarm.scale";
|
|
165
|
+
"agent.spawn": "agent.spawn";
|
|
166
|
+
"agent.read": "agent.read";
|
|
167
|
+
"agent.terminate": "agent.terminate";
|
|
168
|
+
"task.create": "task.create";
|
|
169
|
+
"task.read": "task.read";
|
|
170
|
+
"task.cancel": "task.cancel";
|
|
171
|
+
"metrics.read": "metrics.read";
|
|
172
|
+
"system.admin": "system.admin";
|
|
173
|
+
"api.access": "api.access";
|
|
174
|
+
}>>>;
|
|
138
175
|
expiresAt: z.ZodOptional<z.ZodDate>;
|
|
139
|
-
},
|
|
140
|
-
name: string;
|
|
141
|
-
permissions?: ("swarm.create" | "swarm.read" | "swarm.update" | "swarm.delete" | "swarm.scale" | "agent.spawn" | "agent.read" | "agent.terminate" | "task.create" | "task.read" | "task.cancel" | "metrics.read" | "system.admin" | "api.access")[] | undefined;
|
|
142
|
-
expiresAt?: Date | undefined;
|
|
143
|
-
}, {
|
|
144
|
-
name: string;
|
|
145
|
-
permissions?: ("swarm.create" | "swarm.read" | "swarm.update" | "swarm.delete" | "swarm.scale" | "agent.spawn" | "agent.read" | "agent.terminate" | "task.create" | "task.read" | "task.cancel" | "metrics.read" | "system.admin" | "api.access")[] | undefined;
|
|
146
|
-
expiresAt?: Date | undefined;
|
|
147
|
-
}>;
|
|
176
|
+
}, z.core.$strip>;
|
|
148
177
|
/**
|
|
149
178
|
* Agent type schema
|
|
150
179
|
*/
|
|
151
|
-
export declare const AgentTypeSchema: z.ZodEnum<
|
|
180
|
+
export declare const AgentTypeSchema: z.ZodEnum<{
|
|
181
|
+
coder: "coder";
|
|
182
|
+
reviewer: "reviewer";
|
|
183
|
+
tester: "tester";
|
|
184
|
+
planner: "planner";
|
|
185
|
+
researcher: "researcher";
|
|
186
|
+
"security-architect": "security-architect";
|
|
187
|
+
"security-auditor": "security-auditor";
|
|
188
|
+
"memory-specialist": "memory-specialist";
|
|
189
|
+
"swarm-specialist": "swarm-specialist";
|
|
190
|
+
"integration-architect": "integration-architect";
|
|
191
|
+
"performance-engineer": "performance-engineer";
|
|
192
|
+
"core-architect": "core-architect";
|
|
193
|
+
"test-architect": "test-architect";
|
|
194
|
+
"queen-coordinator": "queen-coordinator";
|
|
195
|
+
"project-coordinator": "project-coordinator";
|
|
196
|
+
}>;
|
|
152
197
|
/**
|
|
153
198
|
* Agent spawn request schema
|
|
154
199
|
*/
|
|
155
200
|
export declare const SpawnAgentSchema: z.ZodObject<{
|
|
156
|
-
type: z.ZodEnum<
|
|
201
|
+
type: z.ZodEnum<{
|
|
202
|
+
coder: "coder";
|
|
203
|
+
reviewer: "reviewer";
|
|
204
|
+
tester: "tester";
|
|
205
|
+
planner: "planner";
|
|
206
|
+
researcher: "researcher";
|
|
207
|
+
"security-architect": "security-architect";
|
|
208
|
+
"security-auditor": "security-auditor";
|
|
209
|
+
"memory-specialist": "memory-specialist";
|
|
210
|
+
"swarm-specialist": "swarm-specialist";
|
|
211
|
+
"integration-architect": "integration-architect";
|
|
212
|
+
"performance-engineer": "performance-engineer";
|
|
213
|
+
"core-architect": "core-architect";
|
|
214
|
+
"test-architect": "test-architect";
|
|
215
|
+
"queen-coordinator": "queen-coordinator";
|
|
216
|
+
"project-coordinator": "project-coordinator";
|
|
217
|
+
}>;
|
|
157
218
|
id: z.ZodOptional<z.ZodString>;
|
|
158
219
|
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
159
220
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
160
|
-
},
|
|
161
|
-
type: "coder" | "reviewer" | "tester" | "planner" | "researcher" | "security-architect" | "security-auditor" | "memory-specialist" | "swarm-specialist" | "integration-architect" | "performance-engineer" | "core-architect" | "test-architect" | "queen-coordinator" | "project-coordinator";
|
|
162
|
-
id?: string | undefined;
|
|
163
|
-
config?: Record<string, unknown> | undefined;
|
|
164
|
-
timeout?: number | undefined;
|
|
165
|
-
}, {
|
|
166
|
-
type: "coder" | "reviewer" | "tester" | "planner" | "researcher" | "security-architect" | "security-auditor" | "memory-specialist" | "swarm-specialist" | "integration-architect" | "performance-engineer" | "core-architect" | "test-architect" | "queen-coordinator" | "project-coordinator";
|
|
167
|
-
id?: string | undefined;
|
|
168
|
-
config?: Record<string, unknown> | undefined;
|
|
169
|
-
timeout?: number | undefined;
|
|
170
|
-
}>;
|
|
221
|
+
}, z.core.$strip>;
|
|
171
222
|
/**
|
|
172
223
|
* Task input schema
|
|
173
224
|
*/
|
|
174
225
|
export declare const TaskInputSchema: z.ZodObject<{
|
|
175
226
|
taskId: z.ZodString;
|
|
176
227
|
content: z.ZodString;
|
|
177
|
-
agentType: z.ZodEnum<
|
|
178
|
-
|
|
228
|
+
agentType: z.ZodEnum<{
|
|
229
|
+
coder: "coder";
|
|
230
|
+
reviewer: "reviewer";
|
|
231
|
+
tester: "tester";
|
|
232
|
+
planner: "planner";
|
|
233
|
+
researcher: "researcher";
|
|
234
|
+
"security-architect": "security-architect";
|
|
235
|
+
"security-auditor": "security-auditor";
|
|
236
|
+
"memory-specialist": "memory-specialist";
|
|
237
|
+
"swarm-specialist": "swarm-specialist";
|
|
238
|
+
"integration-architect": "integration-architect";
|
|
239
|
+
"performance-engineer": "performance-engineer";
|
|
240
|
+
"core-architect": "core-architect";
|
|
241
|
+
"test-architect": "test-architect";
|
|
242
|
+
"queen-coordinator": "queen-coordinator";
|
|
243
|
+
"project-coordinator": "project-coordinator";
|
|
244
|
+
}>;
|
|
245
|
+
priority: z.ZodOptional<z.ZodEnum<{
|
|
246
|
+
critical: "critical";
|
|
247
|
+
high: "high";
|
|
248
|
+
medium: "medium";
|
|
249
|
+
low: "low";
|
|
250
|
+
}>>;
|
|
179
251
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
180
|
-
},
|
|
181
|
-
taskId: string;
|
|
182
|
-
content: string;
|
|
183
|
-
agentType: "coder" | "reviewer" | "tester" | "planner" | "researcher" | "security-architect" | "security-auditor" | "memory-specialist" | "swarm-specialist" | "integration-architect" | "performance-engineer" | "core-architect" | "test-architect" | "queen-coordinator" | "project-coordinator";
|
|
184
|
-
priority?: "low" | "medium" | "high" | "critical" | undefined;
|
|
185
|
-
metadata?: Record<string, unknown> | undefined;
|
|
186
|
-
}, {
|
|
187
|
-
taskId: string;
|
|
188
|
-
content: string;
|
|
189
|
-
agentType: "coder" | "reviewer" | "tester" | "planner" | "researcher" | "security-architect" | "security-auditor" | "memory-specialist" | "swarm-specialist" | "integration-architect" | "performance-engineer" | "core-architect" | "test-architect" | "queen-coordinator" | "project-coordinator";
|
|
190
|
-
priority?: "low" | "medium" | "high" | "critical" | undefined;
|
|
191
|
-
metadata?: Record<string, unknown> | undefined;
|
|
192
|
-
}>;
|
|
252
|
+
}, z.core.$strip>;
|
|
193
253
|
/**
|
|
194
254
|
* Command argument schema
|
|
195
255
|
*/
|
|
196
|
-
export declare const CommandArgumentSchema: z.
|
|
256
|
+
export declare const CommandArgumentSchema: z.ZodString;
|
|
197
257
|
/**
|
|
198
258
|
* Path schema
|
|
199
259
|
*/
|
|
200
|
-
export declare const PathSchema: z.
|
|
260
|
+
export declare const PathSchema: z.ZodString;
|
|
201
261
|
/**
|
|
202
262
|
* Security configuration schema
|
|
203
263
|
*/
|
|
@@ -208,46 +268,18 @@ export declare const SecurityConfigSchema: z.ZodObject<{
|
|
|
208
268
|
maxLoginAttempts: z.ZodDefault<z.ZodNumber>;
|
|
209
269
|
lockoutDuration: z.ZodDefault<z.ZodNumber>;
|
|
210
270
|
requireMFA: z.ZodDefault<z.ZodBoolean>;
|
|
211
|
-
},
|
|
212
|
-
bcryptRounds: number;
|
|
213
|
-
jwtExpiresIn: string;
|
|
214
|
-
sessionTimeout: number;
|
|
215
|
-
maxLoginAttempts: number;
|
|
216
|
-
lockoutDuration: number;
|
|
217
|
-
requireMFA: boolean;
|
|
218
|
-
}, {
|
|
219
|
-
bcryptRounds?: number | undefined;
|
|
220
|
-
jwtExpiresIn?: string | undefined;
|
|
221
|
-
sessionTimeout?: number | undefined;
|
|
222
|
-
maxLoginAttempts?: number | undefined;
|
|
223
|
-
lockoutDuration?: number | undefined;
|
|
224
|
-
requireMFA?: boolean | undefined;
|
|
225
|
-
}>;
|
|
271
|
+
}, z.core.$strip>;
|
|
226
272
|
/**
|
|
227
273
|
* Executor configuration schema
|
|
228
274
|
*/
|
|
229
275
|
export declare const ExecutorConfigSchema: z.ZodObject<{
|
|
230
|
-
allowedCommands: z.ZodArray<z.ZodString
|
|
231
|
-
blockedPatterns: z.ZodOptional<z.ZodArray<z.ZodString
|
|
276
|
+
allowedCommands: z.ZodArray<z.ZodString>;
|
|
277
|
+
blockedPatterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
232
278
|
timeout: z.ZodDefault<z.ZodNumber>;
|
|
233
279
|
maxBuffer: z.ZodDefault<z.ZodNumber>;
|
|
234
|
-
cwd: z.ZodOptional<z.
|
|
280
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
235
281
|
allowSudo: z.ZodDefault<z.ZodBoolean>;
|
|
236
|
-
},
|
|
237
|
-
timeout: number;
|
|
238
|
-
allowedCommands: string[];
|
|
239
|
-
maxBuffer: number;
|
|
240
|
-
allowSudo: boolean;
|
|
241
|
-
blockedPatterns?: string[] | undefined;
|
|
242
|
-
cwd?: string | undefined;
|
|
243
|
-
}, {
|
|
244
|
-
allowedCommands: string[];
|
|
245
|
-
timeout?: number | undefined;
|
|
246
|
-
blockedPatterns?: string[] | undefined;
|
|
247
|
-
maxBuffer?: number | undefined;
|
|
248
|
-
cwd?: string | undefined;
|
|
249
|
-
allowSudo?: boolean | undefined;
|
|
250
|
-
}>;
|
|
282
|
+
}, z.core.$strip>;
|
|
251
283
|
/**
|
|
252
284
|
* Sanitizes a string by removing dangerous characters
|
|
253
285
|
*/
|
|
@@ -264,11 +296,11 @@ export declare class InputValidator {
|
|
|
264
296
|
/**
|
|
265
297
|
* Validates input against a schema
|
|
266
298
|
*/
|
|
267
|
-
static validate<T>(schema: z.
|
|
299
|
+
static validate<T>(schema: z.ZodType<T>, input: unknown): T;
|
|
268
300
|
/**
|
|
269
301
|
* Safely validates input, returning result
|
|
270
302
|
*/
|
|
271
|
-
static safeParse<T>(schema: z.
|
|
303
|
+
static safeParse<T>(schema: z.ZodType<T>, input: unknown): z.ZodSafeParseResult<T>;
|
|
272
304
|
/**
|
|
273
305
|
* Validates email
|
|
274
306
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-validator.d.ts","sourceRoot":"","sources":["../src/input-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"input-validator.d.ts","sourceRoot":"","sources":["../src/input-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA0BxB;;GAEG;AACH,QAAA,MAAM,QAAQ;;;;;;CAeb,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,MAAM;;;;;;;;;CASX,CAAC;AAMF;;GAEG;AACH,eAAO,MAAM,gBAAgB,aAG0C,CAAC;AAExE;;GAEG;AACH,eAAO,MAAM,gBAAgB,aAGkC,CAAC;AAEhE;;GAEG;AACH,eAAO,MAAM,cAAc,aAGgC,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,WAAW,aAGR,CAAC;AAEjB;;GAEG;AACH,eAAO,MAAM,cAAc,aAKsC,CAAC;AAElE;;GAEG;AACH,eAAO,MAAM,UAAU,aAAyC,CAAC;AAEjE;;GAEG;AACH,eAAO,MAAM,cAAc,aAKxB,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,SAAS,aACM,CAAC;AAE7B;;GAEG;AACH,eAAO,MAAM,YAAY,aACmC,CAAC;AAE7D;;GAEG;AACH,eAAO,MAAM,UAAU,aAGoB,CAAC;AAE5C;;GAEG;AACH,eAAO,MAAM,UAAU,WAA8C,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,Q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CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAIlF;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAI3C;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAIjD;;OAEG;IACH,MAAM,CAAC,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAI7C;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAIzC;;OAEG;IACH,MAAM,CAAC,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAI9C;;OAEG;IACH,MAAM,CAAC,oBAAoB,CAAC,IAAI,EAAE,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC;IAI9E;;OAEG;IACH,MAAM,CAAC,kBAAkB,CAAC,IAAI,EAAE,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC;IAI1E;;OAEG;IACH,MAAM,CAAC,iBAAiB,CAAC,IAAI,EAAE,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC;CAGzE;AAMD,OAAO,EACL,CAAC,EACD,QAAQ,EACR,MAAM,GACP,CAAC"}
|
|
@@ -13,31 +13,30 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import { z } from 'zod';
|
|
15
15
|
/**
|
|
16
|
-
* Custom error map for security-focused messages
|
|
16
|
+
* Custom error map for security-focused messages. Messages passed to a check
|
|
17
|
+
* (e.g. `.min(1, '...')`) take precedence; returning undefined falls back to
|
|
18
|
+
* zod's default message.
|
|
17
19
|
*/
|
|
18
|
-
const securityErrorMap = (issue
|
|
20
|
+
const securityErrorMap = (issue) => {
|
|
19
21
|
switch (issue.code) {
|
|
20
|
-
case
|
|
21
|
-
return
|
|
22
|
-
case
|
|
23
|
-
return
|
|
24
|
-
case
|
|
25
|
-
if (issue.
|
|
26
|
-
return
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return { message: 'Invalid UUID format' };
|
|
33
|
-
}
|
|
34
|
-
return { message: 'Invalid string format' };
|
|
22
|
+
case 'too_big':
|
|
23
|
+
return 'Input exceeds maximum allowed size';
|
|
24
|
+
case 'too_small':
|
|
25
|
+
return 'Input below minimum required size';
|
|
26
|
+
case 'invalid_format':
|
|
27
|
+
if (issue.format === 'email')
|
|
28
|
+
return 'Invalid email format';
|
|
29
|
+
if (issue.format === 'url')
|
|
30
|
+
return 'Invalid URL format';
|
|
31
|
+
if (issue.format === 'uuid')
|
|
32
|
+
return 'Invalid UUID format';
|
|
33
|
+
return 'Invalid string format';
|
|
35
34
|
default:
|
|
36
|
-
return
|
|
35
|
+
return undefined;
|
|
37
36
|
}
|
|
38
37
|
};
|
|
39
|
-
// Apply custom error map globally
|
|
40
|
-
z.
|
|
38
|
+
// Apply custom error map globally (zod 4: z.config replaces z.setErrorMap)
|
|
39
|
+
z.config({ customError: securityErrorMap });
|
|
41
40
|
/**
|
|
42
41
|
* Common validation patterns as reusable regex
|
|
43
42
|
*/
|
|
@@ -136,13 +135,11 @@ export const PortSchema = z.number()
|
|
|
136
135
|
/**
|
|
137
136
|
* IP address schema (v4)
|
|
138
137
|
*/
|
|
139
|
-
export const IPv4Schema = z.
|
|
140
|
-
.ip({ version: 'v4', message: 'Invalid IPv4 address' });
|
|
138
|
+
export const IPv4Schema = z.ipv4({ message: 'Invalid IPv4 address' });
|
|
141
139
|
/**
|
|
142
140
|
* IP address schema (v4 or v6)
|
|
143
141
|
*/
|
|
144
|
-
export const IPSchema = z.
|
|
145
|
-
.ip({ message: 'Invalid IP address' });
|
|
142
|
+
export const IPSchema = z.union([z.ipv4(), z.ipv6()], { message: 'Invalid IP address' });
|
|
146
143
|
// ============================================================================
|
|
147
144
|
// Authentication Schemas
|
|
148
145
|
// ============================================================================
|
|
@@ -230,7 +227,7 @@ export const AgentTypeSchema = z.enum([
|
|
|
230
227
|
export const SpawnAgentSchema = z.object({
|
|
231
228
|
type: AgentTypeSchema,
|
|
232
229
|
id: IdentifierSchema.optional(),
|
|
233
|
-
config: z.record(z.unknown()).optional(),
|
|
230
|
+
config: z.record(z.string(), z.unknown()).optional(),
|
|
234
231
|
timeout: z.number().positive().optional(),
|
|
235
232
|
});
|
|
236
233
|
/**
|
|
@@ -241,7 +238,7 @@ export const TaskInputSchema = z.object({
|
|
|
241
238
|
content: SafeStringSchema.max(10000, 'Task content too long'),
|
|
242
239
|
agentType: AgentTypeSchema,
|
|
243
240
|
priority: z.enum(['low', 'medium', 'high', 'critical']).optional(),
|
|
244
|
-
metadata: z.record(z.unknown()).optional(),
|
|
241
|
+
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
245
242
|
});
|
|
246
243
|
// ============================================================================
|
|
247
244
|
// Command & Path Schemas
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-validator.js","sourceRoot":"","sources":["../src/input-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB
|
|
1
|
+
{"version":3,"file":"input-validator.js","sourceRoot":"","sources":["../src/input-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,MAAM,gBAAgB,GAAwB,CAAC,KAAK,EAAE,EAAE;IACtD,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;QACnB,KAAK,SAAS;YACZ,OAAO,oCAAoC,CAAC;QAC9C,KAAK,WAAW;YACd,OAAO,mCAAmC,CAAC;QAC7C,KAAK,gBAAgB;YACnB,IAAI,KAAK,CAAC,M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AAO,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACpC,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,IAAY;QAC9B,OAAO,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,kBAAkB,CAAC,GAAW;QACnC,OAAO,qBAAqB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC1C,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,oBAAoB,CAAC,IAAa;QACvC,OAAO,kBAAkB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,kBAAkB,CAAC,IAAa;QACrC,OAAO,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,iBAAiB,CAAC,IAAa;QACpC,OAAO,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC;CACF;AAED,+EAA+E;AAC/E,oCAAoC;AACpC,+EAA+E;AAE/E,OAAO,EACL,CAAC,EACD,QAAQ,EACR,MAAM,GACP,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claude-flow/security",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Security module - CVE fixes, input validation, path security",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@noble/ed25519": "^2.1.0",
|
|
36
36
|
"bcryptjs": "^3.0.3",
|
|
37
|
-
"zod": "^
|
|
37
|
+
"zod": "^4.6.7"
|
|
38
38
|
},
|
|
39
39
|
"optionalDependencies": {
|
|
40
40
|
"@napi-rs/keyring": "1.3.0"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-flow",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.74.0",
|
|
4
4
|
"workspaces": [
|
|
5
5
|
"v3/@claude-flow/codex",
|
|
6
6
|
"v3/@claude-flow/mcp",
|
|
@@ -69,12 +69,12 @@
|
|
|
69
69
|
"v3:security": "npm run security:audit && npm run security:test"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@claude-flow/cli-core": "3.7.
|
|
72
|
+
"@claude-flow/cli-core": "3.7.6",
|
|
73
73
|
"@claude-flow/codex": "3.0.6",
|
|
74
74
|
"@claude-flow/mcp": "3.1.6",
|
|
75
75
|
"@claude-flow/neural": "3.0.3",
|
|
76
76
|
"@claude-flow/plugin-agent-federation": "1.0.7",
|
|
77
|
-
"@claude-flow/security": "3.0.
|
|
77
|
+
"@claude-flow/security": "3.0.7",
|
|
78
78
|
"@claude-flow/shared": "3.0.7",
|
|
79
79
|
"@electron/asar": "^4.3.1",
|
|
80
80
|
"@iarna/toml": "^2.2.5",
|
|
@@ -2214,13 +2214,15 @@ async function checkMetaharnessDeclaredPackages() {
|
|
|
2214
2214
|
if (!root)
|
|
2215
2215
|
return { name: NAME, status: 'warn', message: 'could not locate the @claude-flow/cli package root' };
|
|
2216
2216
|
const pkg = JSON.parse(readFileSync(join(root, 'package.json'), 'utf-8'));
|
|
2217
|
-
|
|
2217
|
+
// ADR-526: @metaharness/darwin is a regular dependency; the rest stay optional.
|
|
2218
|
+
const declared = Object.keys({ ...(pkg.dependencies ?? {}), ...(pkg.optionalDependencies ?? {}) })
|
|
2219
|
+
.filter((n) => n === 'metaharness' || n.startsWith('@metaharness/'));
|
|
2218
2220
|
if (declared.length === 0) {
|
|
2219
2221
|
return {
|
|
2220
2222
|
name: NAME,
|
|
2221
2223
|
status: 'fail',
|
|
2222
|
-
message: 'no @metaharness/* packages declared in optionalDependencies — the dependency contract regressed (peer-only declarations are never installed)',
|
|
2223
|
-
fix: 'Restore @metaharness/darwin
|
|
2224
|
+
message: 'no @metaharness/* packages declared in dependencies or optionalDependencies — the dependency contract regressed (peer-only declarations are never installed)',
|
|
2225
|
+
fix: 'Restore @metaharness/darwin to dependencies and @metaharness/flywheel, @metaharness/radio, @metaharness/turn-credit to optionalDependencies in @claude-flow/cli',
|
|
2224
2226
|
};
|
|
2225
2227
|
}
|
|
2226
2228
|
// Node resolution: nearest node_modules wins, walking upward from the CLI root.
|
|
@@ -434,6 +434,10 @@ export const memoryTools = [
|
|
|
434
434
|
items: { type: 'string' },
|
|
435
435
|
description: 'Optional tags for filtering',
|
|
436
436
|
},
|
|
437
|
+
metadata: {
|
|
438
|
+
type: 'object',
|
|
439
|
+
description: 'Optional JSON object stored with the entry (e.g. { confidence: 0.9 }, which AutoMemoryBridge reads for sync eligibility). Replaces any existing metadata on upsert.',
|
|
440
|
+
},
|
|
437
441
|
ttl: { type: 'number', description: 'Time-to-live in seconds (optional)' },
|
|
438
442
|
upsert: { type: 'boolean', description: 'Update existing key instead of failing (default: true, matching CLI `memory store`; set false for strict-insert). #2775 parity.' },
|
|
439
443
|
provenance_type: {
|
|
@@ -465,6 +469,18 @@ export const memoryTools = [
|
|
|
465
469
|
// ADR-323: leave undefined when omitted so storeEntry's own default
|
|
466
470
|
// ('unknown') applies uniformly across the CLI, MCP tool, and other callers.
|
|
467
471
|
const provenanceType = input.provenance_type;
|
|
472
|
+
// #1426: metadata must be a plain JSON object; reject arrays, null and scalars.
|
|
473
|
+
const rawMetadata = input.metadata;
|
|
474
|
+
if (rawMetadata !== undefined && (typeof rawMetadata !== 'object' || rawMetadata === null || Array.isArray(rawMetadata))) {
|
|
475
|
+
return {
|
|
476
|
+
success: false,
|
|
477
|
+
key,
|
|
478
|
+
stored: false,
|
|
479
|
+
hasEmbedding: false,
|
|
480
|
+
error: 'metadata must be a JSON object',
|
|
481
|
+
};
|
|
482
|
+
}
|
|
483
|
+
const metadata = rawMetadata;
|
|
468
484
|
if (!value) {
|
|
469
485
|
return {
|
|
470
486
|
success: false,
|
|
@@ -488,6 +504,7 @@ export const memoryTools = [
|
|
|
488
504
|
namespace,
|
|
489
505
|
generateEmbeddingFlag: true,
|
|
490
506
|
tags,
|
|
507
|
+
metadata,
|
|
491
508
|
ttl,
|
|
492
509
|
upsert,
|
|
493
510
|
provenanceType,
|