@kl-c/matrixos 0.3.43 → 0.3.45
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/dist/cli/index.js +39 -11
- package/dist/cli-node/index.js +39 -11
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -2163,7 +2163,7 @@ var package_default;
|
|
|
2163
2163
|
var init_package = __esm(() => {
|
|
2164
2164
|
package_default = {
|
|
2165
2165
|
name: "@kl-c/matrixos",
|
|
2166
|
-
version: "0.3.
|
|
2166
|
+
version: "0.3.45",
|
|
2167
2167
|
description: "MaTrixOS \u2014 Agentic OS for OpenCode. Personalizable, communicating, self-improving, resilient.",
|
|
2168
2168
|
main: "./dist/index.js",
|
|
2169
2169
|
types: "dist/index.d.ts",
|
|
@@ -187517,6 +187517,41 @@ ${row.description ? `Description: ${row.description}
|
|
|
187517
187517
|
if (!db)
|
|
187518
187518
|
return { ok: false, error: "database unavailable" };
|
|
187519
187519
|
try {
|
|
187520
|
+
let extractTasks = function(text) {
|
|
187521
|
+
const summaryMatch = text.match(/"summary"\s*:\s*"([\s\S]*?)"\s*[},]/);
|
|
187522
|
+
if (summaryMatch) {
|
|
187523
|
+
try {
|
|
187524
|
+
let inner = summaryMatch[1].replace(/\\"/g, '"').replace(/\\n/g, `
|
|
187525
|
+
`).replace(/\\\//g, "/").replace(/`{3}(?:json)?\n?/g, "");
|
|
187526
|
+
const arrayMatch = inner.match(/\[[\s\S]*?\]/);
|
|
187527
|
+
if (arrayMatch) {
|
|
187528
|
+
const parsed = JSON.parse(arrayMatch[0]);
|
|
187529
|
+
if (Array.isArray(parsed))
|
|
187530
|
+
return parsed;
|
|
187531
|
+
}
|
|
187532
|
+
} catch {}
|
|
187533
|
+
}
|
|
187534
|
+
const fenceMatch = text.match(/```(?:json)?\n?([\s\S]*?)```/);
|
|
187535
|
+
if (fenceMatch) {
|
|
187536
|
+
try {
|
|
187537
|
+
const arrayMatch = fenceMatch[1].match(/\[[\s\S]*?\]/);
|
|
187538
|
+
if (arrayMatch) {
|
|
187539
|
+
const parsed = JSON.parse(arrayMatch[0]);
|
|
187540
|
+
if (Array.isArray(parsed))
|
|
187541
|
+
return parsed;
|
|
187542
|
+
}
|
|
187543
|
+
} catch {}
|
|
187544
|
+
}
|
|
187545
|
+
const rawMatch = text.match(/\[[\s\S]*?\]/);
|
|
187546
|
+
if (rawMatch) {
|
|
187547
|
+
try {
|
|
187548
|
+
const parsed = JSON.parse(rawMatch[0]);
|
|
187549
|
+
if (Array.isArray(parsed))
|
|
187550
|
+
return parsed;
|
|
187551
|
+
} catch {}
|
|
187552
|
+
}
|
|
187553
|
+
return null;
|
|
187554
|
+
};
|
|
187520
187555
|
ensureGoalsTable(db);
|
|
187521
187556
|
ensureKanbanTable(db);
|
|
187522
187557
|
const row = db.query("SELECT title, description, status FROM matrixos_goals WHERE id = ?").get(id);
|
|
@@ -187542,17 +187577,10 @@ ${row.description ? `Description: ${row.description}
|
|
|
187542
187577
|
db.query("UPDATE matrixos_goals SET status = ?, updated_at = ? WHERE id = ?").run("active", Date.now(), id);
|
|
187543
187578
|
return { ok: false, error: "decomposition failed", output: combined, status: "active" };
|
|
187544
187579
|
}
|
|
187545
|
-
const
|
|
187546
|
-
if (!
|
|
187547
|
-
db.query("UPDATE matrixos_goals SET status = ?, updated_at = ? WHERE id = ?").run("active", Date.now(), id);
|
|
187548
|
-
return { ok: false, error: "no task JSON in response", output: combined, status: "active" };
|
|
187549
|
-
}
|
|
187550
|
-
let tasks = [];
|
|
187551
|
-
try {
|
|
187552
|
-
tasks = JSON.parse(jsonMatch[0]);
|
|
187553
|
-
} catch {
|
|
187580
|
+
const tasks = extractTasks(combined);
|
|
187581
|
+
if (!tasks) {
|
|
187554
187582
|
db.query("UPDATE matrixos_goals SET status = ?, updated_at = ? WHERE id = ?").run("active", Date.now(), id);
|
|
187555
|
-
return { ok: false, error: "
|
|
187583
|
+
return { ok: false, error: "no valid task JSON in response", output: combined, status: "active" };
|
|
187556
187584
|
}
|
|
187557
187585
|
let created = 0;
|
|
187558
187586
|
for (const t2 of tasks) {
|
package/dist/cli-node/index.js
CHANGED
|
@@ -2163,7 +2163,7 @@ var package_default;
|
|
|
2163
2163
|
var init_package = __esm(() => {
|
|
2164
2164
|
package_default = {
|
|
2165
2165
|
name: "@kl-c/matrixos",
|
|
2166
|
-
version: "0.3.
|
|
2166
|
+
version: "0.3.45",
|
|
2167
2167
|
description: "MaTrixOS \u2014 Agentic OS for OpenCode. Personalizable, communicating, self-improving, resilient.",
|
|
2168
2168
|
main: "./dist/index.js",
|
|
2169
2169
|
types: "dist/index.d.ts",
|
|
@@ -187572,6 +187572,41 @@ ${row.description ? `Description: ${row.description}
|
|
|
187572
187572
|
if (!db)
|
|
187573
187573
|
return { ok: false, error: "database unavailable" };
|
|
187574
187574
|
try {
|
|
187575
|
+
let extractTasks = function(text) {
|
|
187576
|
+
const summaryMatch = text.match(/"summary"\s*:\s*"([\s\S]*?)"\s*[},]/);
|
|
187577
|
+
if (summaryMatch) {
|
|
187578
|
+
try {
|
|
187579
|
+
let inner = summaryMatch[1].replace(/\\"/g, '"').replace(/\\n/g, `
|
|
187580
|
+
`).replace(/\\\//g, "/").replace(/`{3}(?:json)?\n?/g, "");
|
|
187581
|
+
const arrayMatch = inner.match(/\[[\s\S]*?\]/);
|
|
187582
|
+
if (arrayMatch) {
|
|
187583
|
+
const parsed = JSON.parse(arrayMatch[0]);
|
|
187584
|
+
if (Array.isArray(parsed))
|
|
187585
|
+
return parsed;
|
|
187586
|
+
}
|
|
187587
|
+
} catch {}
|
|
187588
|
+
}
|
|
187589
|
+
const fenceMatch = text.match(/```(?:json)?\n?([\s\S]*?)```/);
|
|
187590
|
+
if (fenceMatch) {
|
|
187591
|
+
try {
|
|
187592
|
+
const arrayMatch = fenceMatch[1].match(/\[[\s\S]*?\]/);
|
|
187593
|
+
if (arrayMatch) {
|
|
187594
|
+
const parsed = JSON.parse(arrayMatch[0]);
|
|
187595
|
+
if (Array.isArray(parsed))
|
|
187596
|
+
return parsed;
|
|
187597
|
+
}
|
|
187598
|
+
} catch {}
|
|
187599
|
+
}
|
|
187600
|
+
const rawMatch = text.match(/\[[\s\S]*?\]/);
|
|
187601
|
+
if (rawMatch) {
|
|
187602
|
+
try {
|
|
187603
|
+
const parsed = JSON.parse(rawMatch[0]);
|
|
187604
|
+
if (Array.isArray(parsed))
|
|
187605
|
+
return parsed;
|
|
187606
|
+
} catch {}
|
|
187607
|
+
}
|
|
187608
|
+
return null;
|
|
187609
|
+
};
|
|
187575
187610
|
ensureGoalsTable(db);
|
|
187576
187611
|
ensureKanbanTable(db);
|
|
187577
187612
|
const row = db.query("SELECT title, description, status FROM matrixos_goals WHERE id = ?").get(id);
|
|
@@ -187597,17 +187632,10 @@ ${row.description ? `Description: ${row.description}
|
|
|
187597
187632
|
db.query("UPDATE matrixos_goals SET status = ?, updated_at = ? WHERE id = ?").run("active", Date.now(), id);
|
|
187598
187633
|
return { ok: false, error: "decomposition failed", output: combined, status: "active" };
|
|
187599
187634
|
}
|
|
187600
|
-
const
|
|
187601
|
-
if (!
|
|
187602
|
-
db.query("UPDATE matrixos_goals SET status = ?, updated_at = ? WHERE id = ?").run("active", Date.now(), id);
|
|
187603
|
-
return { ok: false, error: "no task JSON in response", output: combined, status: "active" };
|
|
187604
|
-
}
|
|
187605
|
-
let tasks = [];
|
|
187606
|
-
try {
|
|
187607
|
-
tasks = JSON.parse(jsonMatch[0]);
|
|
187608
|
-
} catch {
|
|
187635
|
+
const tasks = extractTasks(combined);
|
|
187636
|
+
if (!tasks) {
|
|
187609
187637
|
db.query("UPDATE matrixos_goals SET status = ?, updated_at = ? WHERE id = ?").run("active", Date.now(), id);
|
|
187610
|
-
return { ok: false, error: "
|
|
187638
|
+
return { ok: false, error: "no valid task JSON in response", output: combined, status: "active" };
|
|
187611
187639
|
}
|
|
187612
187640
|
let created = 0;
|
|
187613
187641
|
for (const t2 of tasks) {
|
package/dist/index.js
CHANGED
|
@@ -368086,7 +368086,7 @@ function getCachedVersion(options = {}) {
|
|
|
368086
368086
|
// package.json
|
|
368087
368087
|
var package_default = {
|
|
368088
368088
|
name: "@kl-c/matrixos",
|
|
368089
|
-
version: "0.3.
|
|
368089
|
+
version: "0.3.45",
|
|
368090
368090
|
description: "MaTrixOS \u2014 Agentic OS for OpenCode. Personalizable, communicating, self-improving, resilient.",
|
|
368091
368091
|
main: "./dist/index.js",
|
|
368092
368092
|
types: "dist/index.d.ts",
|
package/package.json
CHANGED