@appchy/jarvis 0.1.87 → 0.1.89

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/data/mcp.mjs CHANGED
@@ -1651,12 +1651,32 @@ function planScope(ctx, req) {
1651
1651
  anticipated,
1652
1652
  editCodeNodes,
1653
1653
  governance,
1654
+ obligations: toObligations(governance, anticipated),
1654
1655
  references,
1655
1656
  testsCovering,
1656
1657
  blastRadius,
1657
1658
  lowConfidence
1658
1659
  };
1659
1660
  }
1661
+ function toObligations(governance, existing = []) {
1662
+ const rules = governance.map((g) => {
1663
+ const full = g.body !== void 0;
1664
+ return {
1665
+ type: "governance",
1666
+ id: g.id,
1667
+ full,
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.`
1669
+ };
1670
+ });
1671
+ return [
1672
+ ...rules,
1673
+ ...existing.map((e) => ({
1674
+ type: "existing",
1675
+ id: e.line === void 0 ? e.file : `${e.file}:${e.line}`,
1676
+ statement: `Already in the tree and close to what was described. Reuse it, or say why the plan builds alongside it.`
1677
+ }))
1678
+ ];
1679
+ }
1660
1680
  function isCodeHit(hit) {
1661
1681
  return hit.file !== void 0 && hit.id === void 0;
1662
1682
  }
@@ -2173,6 +2193,7 @@ async function scope(ctx, req) {
2173
2193
  editSet: [],
2174
2194
  anticipatedIntegrationPoints: [],
2175
2195
  governance: [],
2196
+ obligations: [],
2176
2197
  references: [],
2177
2198
  testsCovering: [],
2178
2199
  blastRadius: { total: 0, byType: {} },
@@ -2281,13 +2302,16 @@ async function scope(ctx, req) {
2281
2302
  const rules = await readRules(ctx, plan.governance, req.rules);
2282
2303
  const topFiles = plan.editSet.slice(0, 3).map((e) => e.file).join(", ");
2283
2304
  const topGov = plan.governance.filter((g) => g.body === void 0).slice(0, 3).map((g) => g.id).join(", ");
2284
- 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.`;
2305
+ const unread = plan.obligations.filter((o) => o.type === "governance" && !o.full).length;
2306
+ const reuse = plan.obligations.filter((o) => o.type === "existing").length;
2307
+ 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` : ""} \u2014 see \`obligations\`.` : ""}`;
2285
2308
  return {
2286
2309
  summary,
2287
2310
  task: req.task,
2288
2311
  editSet: plan.editSet,
2289
2312
  anticipatedIntegrationPoints: plan.anticipated,
2290
2313
  governance: plan.governance,
2314
+ obligations: plan.obligations,
2291
2315
  rules,
2292
2316
  references: plan.references,
2293
2317
  testsCovering: plan.testsCovering,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appchy/jarvis",
3
- "version": "0.1.87",
3
+ "version": "0.1.89",
4
4
  "description": "Jarvis — local AI coding assistant CLI",
5
5
  "private": false,
6
6
  "type": "module",
@@ -57,16 +57,16 @@
57
57
  "typescript": "^5.7.0",
58
58
  "vitest": "^2.1.0",
59
59
  "@jarvis/anthropic": "1.0.0",
60
+ "@jarvis/agents": "1.0.0",
60
61
  "@jarvis/board": "0.1.0",
61
62
  "@jarvis/data": "0.1.0",
62
- "@jarvis/logger": "1.0.0",
63
63
  "@jarvis/errors": "1.0.0",
64
- "@jarvis/rpc": "1.0.0",
64
+ "@jarvis/logger": "1.0.0",
65
65
  "@jarvis/types": "1.0.0",
66
+ "@jarvis/rpc": "1.0.0",
66
67
  "@jarvis/typescript-config": "1.0.0",
67
- "@jarvis/ui": "0.1.0",
68
68
  "@jarvis/vitest-config": "1.0.0",
69
- "@jarvis/agents": "1.0.0"
69
+ "@jarvis/ui": "0.1.0"
70
70
  },
71
71
  "scripts": {
72
72
  "dev": "tsx watch src/bin.ts start --foreground",