[PR #126] [MERGED] feat(mcp): land policy, resources, and typed contracts #1849

Closed
opened 2026-10-16 21:11:46 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/126
Author: @morluto
Created: 7/14/2026
Status: ✅ Merged
Merged: 7/14/2026
Merged by: @morluto

Base: main ← Head: feat/mcp-contract-roadmap


📝 Commits (5)

  • 190efca feat(core): add typed policy and integrity contracts
  • da59299 feat(mcp): expose progress resources and availability
  • d092d4c fix(workspace): migrate legacy integrity identities
  • 4149472 fix(mcp): preserve migrated revisions and valid links
  • cf8e5cf fix(ci): preserve stacked integration changes

📊 Changes

80 files changed (+6536 additions, -403 deletions)

View changed files

➕ docs/error-contract.schema.json (+831 -0)
➕ docs/mcp-contracts.md (+116 -0)
📝 package.json (+2 -1)
➕ scripts/generate-error-schema.mjs (+13 -0)
📝 src/application/AnalysisProvider.ts (+3 -1)
📝 src/application/ArtifactGraphConstruction.ts (+2 -1)
📝 src/application/ArtifactInventory.ts (+156 -23)
📝 src/application/AuthorizedArtifactInventory.ts (+9 -1)
📝 src/application/BinarySession.ts (+113 -0)
📝 src/application/BinarySessionPort.ts (+10 -0)
📝 src/application/CrossVersionInventory.ts (+20 -9)
📝 src/application/CrossVersionInvestigation.ts (+76 -2)
📝 src/application/DirectAnalysis.ts (+140 -10)
➕ src/application/PermissionAuthority.ts (+278 -0)
➕ src/application/PermissionConfiguration.ts (+52 -0)
📝 src/application/ProcessCaptureError.ts (+19 -0)
📝 src/application/ProcessCaptureLifecycle.ts (+3 -1)
📝 src/application/ProcessCli.ts (+32 -1)
📝 src/application/ProcessHarness.ts (+4 -1)
➕ src/application/ProgressReporter.ts (+55 -0)

...and 60 more files

📄 Description

Description

Land the #124 and #125 changes on main. Those PRs were merged into the former stack branch instead of the default branch, so only #123 reached main.

This catch-up keeps the reviewed aggregate behavior: typed operational errors, integrity record-and-continue, reloadable permission grants, workspace migration, MCP progress and cancellation, evidence resources, capability availability, and stale-server identity reporting. It also restores generated error-schema commands lost during the stacked merge resolution.

Two final review findings are fixed here: legacy workspace migration preserves the caller-observed CAS revision, and fixed-target servers no longer emit resource links they cannot serve.

Type of Change

  • Bug fix
  • New feature
  • Tool contract change (MCP schema modification)

Testing Performed

  • Unit tests added or updated
  • TypeScript typecheck passes (npm run typecheck)
  • Linting passes (npm run lint)
  • Full test suite passed before the two final focused corrections: 78 files, 524 tests
  • Final focused validation passes: 5 files, 30 tests
  • Real Hopper verification performed
  • Linux real Hopper verification performed
  • Package verification performed on the reviewed aggregate

Real Hopper verification was unavailable. No provider-specific Hopper behavior changed.

Tool Contract Impact

The 68-tool inventory is preserved. The MCP surface adds typed error details, live identity and availability metadata, bounded progress and cancellation, evidence/workspace resources, resource links only when resolvable, and permission preflight.

Suggested Review Order

  1. src/domain/errors.ts, src/contracts/errorSchemas.ts, and generated schema documentation.
  2. src/domain/permissionPolicy.ts and permission authority/storage adapters.
  3. Integrity continuation and workspace migration.
  4. MCP progress, resources, identity, and availability wiring.
  5. Regression and contract tests.

Closes #100
Closes #115

Relates to #98
Relates to #99
Relates to #101
Relates to #112
Relates to #114

MCP Tasks from #97 remain intentionally excluded.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/126 **Author:** [@morluto](https://github.com/morluto) **Created:** 7/14/2026 **Status:** ✅ Merged **Merged:** 7/14/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `feat/mcp-contract-roadmap` --- ### 📝 Commits (5) - [`190efca`](https://github.com/morluto/rea/commit/190efcaf1728743a02fb65a35319abdc14ea2227) feat(core): add typed policy and integrity contracts - [`da59299`](https://github.com/morluto/rea/commit/da59299a8a83241e6912a062cf8d5744993cad9e) feat(mcp): expose progress resources and availability - [`d092d4c`](https://github.com/morluto/rea/commit/d092d4c97a51882f7cdbc0e3dd167cea309b8adf) fix(workspace): migrate legacy integrity identities - [`4149472`](https://github.com/morluto/rea/commit/414947243963fed5f769a124758424dda371dcd7) fix(mcp): preserve migrated revisions and valid links - [`cf8e5cf`](https://github.com/morluto/rea/commit/cf8e5cf5e61fe00731768107790e715958a96fc8) fix(ci): preserve stacked integration changes ### 📊 Changes **80 files changed** (+6536 additions, -403 deletions) <details> <summary>View changed files</summary> ➕ `docs/error-contract.schema.json` (+831 -0) ➕ `docs/mcp-contracts.md` (+116 -0) 📝 `package.json` (+2 -1) ➕ `scripts/generate-error-schema.mjs` (+13 -0) 📝 `src/application/AnalysisProvider.ts` (+3 -1) 📝 `src/application/ArtifactGraphConstruction.ts` (+2 -1) 📝 `src/application/ArtifactInventory.ts` (+156 -23) 📝 `src/application/AuthorizedArtifactInventory.ts` (+9 -1) 📝 `src/application/BinarySession.ts` (+113 -0) 📝 `src/application/BinarySessionPort.ts` (+10 -0) 📝 `src/application/CrossVersionInventory.ts` (+20 -9) 📝 `src/application/CrossVersionInvestigation.ts` (+76 -2) 📝 `src/application/DirectAnalysis.ts` (+140 -10) ➕ `src/application/PermissionAuthority.ts` (+278 -0) ➕ `src/application/PermissionConfiguration.ts` (+52 -0) 📝 `src/application/ProcessCaptureError.ts` (+19 -0) 📝 `src/application/ProcessCaptureLifecycle.ts` (+3 -1) 📝 `src/application/ProcessCli.ts` (+32 -1) 📝 `src/application/ProcessHarness.ts` (+4 -1) ➕ `src/application/ProgressReporter.ts` (+55 -0) _...and 60 more files_ </details> ### 📄 Description ## Description Land the #124 and #125 changes on `main`. Those PRs were merged into the former stack branch instead of the default branch, so only #123 reached `main`. This catch-up keeps the reviewed aggregate behavior: typed operational errors, integrity record-and-continue, reloadable permission grants, workspace migration, MCP progress and cancellation, evidence resources, capability availability, and stale-server identity reporting. It also restores generated error-schema commands lost during the stacked merge resolution. Two final review findings are fixed here: legacy workspace migration preserves the caller-observed CAS revision, and fixed-target servers no longer emit resource links they cannot serve. ## Type of Change - [x] Bug fix - [x] New feature - [x] Tool contract change (MCP schema modification) ## Testing Performed - [x] Unit tests added or updated - [x] TypeScript typecheck passes (`npm run typecheck`) - [x] Linting passes (`npm run lint`) - [x] Full test suite passed before the two final focused corrections: 78 files, 524 tests - [x] Final focused validation passes: 5 files, 30 tests - [ ] Real Hopper verification performed - [ ] Linux real Hopper verification performed - [x] Package verification performed on the reviewed aggregate Real Hopper verification was unavailable. No provider-specific Hopper behavior changed. ## Tool Contract Impact The 68-tool inventory is preserved. The MCP surface adds typed error details, live identity and availability metadata, bounded progress and cancellation, evidence/workspace resources, resource links only when resolvable, and permission preflight. ## Suggested Review Order 1. `src/domain/errors.ts`, `src/contracts/errorSchemas.ts`, and generated schema documentation. 2. `src/domain/permissionPolicy.ts` and permission authority/storage adapters. 3. Integrity continuation and workspace migration. 4. MCP progress, resources, identity, and availability wiring. 5. Regression and contract tests. ## Related Issues Closes #100 Closes #115 Relates to #98 Relates to #99 Relates to #101 Relates to #112 Relates to #114 MCP Tasks from #97 remain intentionally excluded. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:11:46 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#1849
No description provided.