@appchy/jarvis 0.1.88 → 0.1.90
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/bin.js +23 -6
- package/dist/bin.js.map +1 -1
- package/dist/data/mcp.mjs +22 -5
- package/package.json +3 -3
package/dist/data/mcp.mjs
CHANGED
|
@@ -1651,22 +1651,37 @@ function planScope(ctx, req) {
|
|
|
1651
1651
|
anticipated,
|
|
1652
1652
|
editCodeNodes,
|
|
1653
1653
|
governance,
|
|
1654
|
-
obligations: toObligations(governance),
|
|
1654
|
+
obligations: toObligations(governance, anticipated, testsCovering),
|
|
1655
1655
|
references,
|
|
1656
1656
|
testsCovering,
|
|
1657
1657
|
blastRadius,
|
|
1658
1658
|
lowConfidence
|
|
1659
1659
|
};
|
|
1660
1660
|
}
|
|
1661
|
-
function toObligations(governance) {
|
|
1662
|
-
|
|
1661
|
+
function toObligations(governance, existing = [], keep = []) {
|
|
1662
|
+
const rules = governance.map((g) => {
|
|
1663
1663
|
const full = g.body !== void 0;
|
|
1664
1664
|
return {
|
|
1665
|
+
type: "governance",
|
|
1665
1666
|
id: g.id,
|
|
1666
1667
|
full,
|
|
1667
1668
|
statement: full ? `Its full text is here. Say how the plan satisfies it, or why it does not apply.` : `Not read yet \u2014 only its title arrived. Read it, then say how the plan satisfies it.`
|
|
1668
1669
|
};
|
|
1669
1670
|
});
|
|
1671
|
+
const preserved = keep.map((c) => ({
|
|
1672
|
+
type: "keep",
|
|
1673
|
+
id: c.line === void 0 ? c.file : `${c.file}:${c.line}`,
|
|
1674
|
+
statement: `Passes over this code today. It must still pass \u2014 and it must not be the thing the plan changes to make it.`
|
|
1675
|
+
}));
|
|
1676
|
+
return [
|
|
1677
|
+
...rules,
|
|
1678
|
+
...existing.map((e) => ({
|
|
1679
|
+
type: "existing",
|
|
1680
|
+
id: e.line === void 0 ? e.file : `${e.file}:${e.line}`,
|
|
1681
|
+
statement: `Already in the tree and close to what was described. Reuse it, or say why the plan builds alongside it.`
|
|
1682
|
+
})),
|
|
1683
|
+
...preserved
|
|
1684
|
+
];
|
|
1670
1685
|
}
|
|
1671
1686
|
function isCodeHit(hit) {
|
|
1672
1687
|
return hit.file !== void 0 && hit.id === void 0;
|
|
@@ -2293,8 +2308,10 @@ async function scope(ctx, req) {
|
|
|
2293
2308
|
const rules = await readRules(ctx, plan.governance, req.rules);
|
|
2294
2309
|
const topFiles = plan.editSet.slice(0, 3).map((e) => e.file).join(", ");
|
|
2295
2310
|
const topGov = plan.governance.filter((g) => g.body === void 0).slice(0, 3).map((g) => g.id).join(", ");
|
|
2296
|
-
const unread = plan.obligations.filter((o) => !o.full).length;
|
|
2297
|
-
const
|
|
2311
|
+
const unread = plan.obligations.filter((o) => o.type === "governance" && !o.full).length;
|
|
2312
|
+
const reuse = plan.obligations.filter((o) => o.type === "existing").length;
|
|
2313
|
+
const keep = plan.obligations.filter((o) => o.type === "keep").length;
|
|
2314
|
+
const summary = plan.lowConfidence ? `Low-confidence (build-new) scope for "${req.task}": no code strongly matched \u2014 ${plan.anticipated.length} integration point(s) to READ, not edit; ${plan.governance.length} concept-matched governance. Lead with search + read.` : `Scoped "${req.task}": ${plan.editSet.length} edit target(s), ${plan.governance.length} governance, ${plan.testsCovering.length} covering test(s), blast radius ${plan.blastRadius.total} (${confidence})${topFiles ? ` \u2014 ${topFiles}` : ""}.${rules.ids > 0 && topGov ? ` ${rules.full} rule(s) came back in full; NEXT: read ${topGov} for the ${rules.ids} that did not,` : rules.full > 0 ? ` All ${rules.full} governing rule(s) came back in FULL \u2014 read them here, not with map_read;` : " NEXT:"} then check the edit-set with map_scope {edits} before you commit.${plan.obligations.length > 0 ? ` ${plan.obligations.length} obligation(s) outstanding${unread > 0 ? `, ${unread} rule(s) not yet read` : ""}${reuse > 0 ? `, ${reuse} thing(s) that already exist` : ""}${keep > 0 ? `, ${keep} that must keep passing` : ""} \u2014 see \`obligations\`.` : ""}`;
|
|
2298
2315
|
return {
|
|
2299
2316
|
summary,
|
|
2300
2317
|
task: req.task,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appchy/jarvis",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.90",
|
|
4
4
|
"description": "Jarvis — local AI coding assistant CLI",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
"@jarvis/errors": "1.0.0",
|
|
64
64
|
"@jarvis/logger": "1.0.0",
|
|
65
65
|
"@jarvis/rpc": "1.0.0",
|
|
66
|
-
"@jarvis/types": "1.0.0",
|
|
67
66
|
"@jarvis/typescript-config": "1.0.0",
|
|
67
|
+
"@jarvis/vitest-config": "1.0.0",
|
|
68
68
|
"@jarvis/ui": "0.1.0",
|
|
69
|
-
"@jarvis/
|
|
69
|
+
"@jarvis/types": "1.0.0"
|
|
70
70
|
},
|
|
71
71
|
"scripts": {
|
|
72
72
|
"dev": "tsx watch src/bin.ts start --foreground",
|