sync: update from private repo (dfadcd5f)
CI / build-and-test (push) Has been cancelled

This commit is contained in:
oss-sync
2026-06-23 06:38:48 +00:00
parent 6a2f2cc736
commit 29ccaf1e92
377 changed files with 31028 additions and 8994 deletions
+12
View File
@@ -58,6 +58,18 @@ function validatePiece(piece: any): string | null {
if (typeof piece.max_movements !== 'number' || !Number.isFinite(piece.max_movements) || piece.max_movements <= 0) {
return 'max_movements is required (positive integer, e.g. 50 for short tasks, 999 for open-ended ones)';
}
// Piece-level shared tools (union into every movement). Optional; when
// present must be an array of non-empty strings. Kept in sync with the
// HTTP-layer validator in src/bridge/pieces-api.ts.
if (piece.shared_tools !== undefined) {
if (!Array.isArray(piece.shared_tools)) return 'shared_tools must be an array';
for (let i = 0; i < piece.shared_tools.length; i++) {
const t = piece.shared_tools[i];
if (typeof t !== 'string' || t.trim().length === 0) {
return `shared_tools[${i}] must be a non-empty string`;
}
}
}
const names = new Set(piece.movements.map((m: any) => m.name));
if (!names.has(piece.initial_movement)) return 'initial_movement must reference an existing movement';
// Phase 6b: rules[].next only accepts existing movement names + WAIT_SUBTASKS.