Feature/product platform foundation v0.62 #1

Merged
robbond merged 683 commits from feature/product-platform-foundation-v0.62 into feature/emergent-unknowns-v0.5 2026-09-09 07:58:20 +01:00
Showing only changes of commit 4687226bd8 - Show all commits
@@ -389,20 +389,12 @@ async function executeLive() {
console.log(`Model response received in ${elapsedMs}ms`);
// Parse the JSON output
let parsedResult;
try {
const jsonMatch = raw.match(/\{[\s\S]*\}/);
if (jsonMatch) {
parsedResult = JSON.parse(jsonMatch[0]);
} else {
throw new Error("No JSON object found in response");
}
} catch (e) {
console.error("Failed to parse model output as JSON:", e.message);
console.error("Raw response:\n", raw);
// Provider returns a parsed JavaScript object via recoverJson().
// Do NOT regex-extract — the result is already structured.
const parsedResult = typeof raw === "object" && raw !== null ? raw : (() => {
console.error("Provider returned unexpected type (expected parsed object):", typeof raw);
process.exit(1);
}
})();
// Validate output contract
const errors = validateRelationshipOutput(parsedResult);