Skip to content

[FEATURE] VNext Phase 8 — general Resource/Capability adapter ecosystem #342

Description

@Joncallim

Parent: #333
Execution mode: implementation
Depends on: #341
Absorbs generic connector portions of: #42 and future external-service integration work
Spec references: SPEC-0003 (Grants, Principal types — adapter is a distinct Principal), SPEC-0004 (Operation Catalog, effect classes, retry classes, side-effect lifecycle), SPEC-0005 (credential brokering, egress), SPEC-0008 (conformance)

Problem Statement

By Phase 7, Forge will have generic Missions, Workforces, execution and Triggers, but most real Resources/Capabilities will still be implemented through coding-specific helpers or one-off connectors. If each Workforce owns SDK code, credentials, retry rules and evidence format, package installation becomes an authority bypass and external side effects become impossible to reason about consistently.

Forge needs a reviewed adapter plane beneath Workforces.

Desired Outcome

Forge has one versioned Resource/Capability adapter contract for reads and consequential actions. Workforces request Capabilities; Forge binds Resources, brokers credentials, enforces Grants/budgets/egress, executes trusted adapter code and records idempotency/reconciliation/evidence. Multiple Workforces can reuse one adapter without owning its credentials or implementation.

User Story

As the Forge operator,
I want external services and data sources exposed through one governed adapter layer,
So that installing a Workforce never implicitly installs trusted credentialed code or invents a new side-effect model.

Requirements

A. Adapter definition

Each adapter/capability version declares protected metadata for at least:

  • stable adapter id/version;
  • Resource types it can bind;
  • Capability/Operation ids and read/write/action risk class;
  • input/output schemas and hard limits;
  • supported mutation/concurrency semantics;
  • credential mechanism/required scopes;
  • network/egress destinations;
  • rate/quota/readiness signals;
  • timeout/cancellation behavior;
  • idempotency-key support;
  • read-after-write/reconciliation strategy;
  • evidence/redaction/retention rules;
  • supported host/runtime prerequisites.

Security-critical semantics live in reviewed adapter/Core definitions, not normal Workforce package data.

B. Resource binding

A Resource binding identifies a particular account/service/repository/mailbox/database/document corpus/etc. with classification, version/snapshot semantics and operator policy. A Capability Grant applies to explicit Resource scope/object selectors and expiry; connector availability alone grants nothing.

C. Credential broker

  • Workforce packages store no credentials.
  • Models/prompts receive no raw broad credential by default.
  • Forge resolves an operator-configured credential to the narrow trusted adapter boundary only after Principal/Grant/Resource admission.
  • Credential identity/scope/version metadata is auditable without copying secret values into ordinary evidence.
  • Revocation/rotation is visible to readiness and blocks new Operations immediately.

D. Adapter execution boundary

Adapter executable code is distinct from declarative Workforce packages. In-process adapters are allowed only where reviewed risk/architecture permits; higher-risk adapters should use the #336 confined/process/RPC boundary. Package content cannot dynamically import arbitrary adapter code.

E. Generic side-effect semantics

All write/action adapters consume #336's Operation identity + idempotency/reconciliation lifecycle. An adapter that cannot prove safe retry after uncertain submission must return/hold an uncertain outcome and require reconciliation/operator policy.

F. Readiness/rate/quota

Normalize actionable adapter health without model calls:

  • configured/credential missing;
  • auth failure/permission denied;
  • quota/rate limited;
  • unreachable/degraded;
  • Resource not found/revoked;
  • ready;
  • unknown/stale.

Retry/backoff honors adapter/provider policy and Mission budgets.

G. Network/data egress

Adapter network access is restricted to its reviewed destination policy. Model worker network access is not widened merely because an adapter needs a destination. Resource classification/provider egress from #335 remains a separate pre-context decision.

H. Evidence and observability

Every adapter Operation records safe structured identity, input fingerprint where appropriate, Resource scope, adapter version, credential identity metadata, outcome, external reference/idempotency/reconciliation state, timing and redaction/retention status. Raw response bodies/secrets are not default audit logs.

I. Initial migration/proof families

Do not build every connector. Migrate/prove a representative set:

  1. repository/filesystem/Git/GitHub Operations from Software Engineering;
  2. web/document read adapters from Deep Research;
  3. one existing MCP/ACP integration represented through the generic boundary where semantically applicable;
  4. one authenticated external service fixture/adapter with an idempotent write (mock/test service acceptable for conformance).

After the contract is proven, add connectors only in response to a Workforce requirement. Email/calendar/Notion/database/infrastructure families are candidates, not mandatory ceremony.

J. GitHub issue/backlog compatibility

If Forge exposes GitHub Issue create/update/read for Software Engineering/backlog workflows, implement it as typed GitHub adapter Operations with idempotency/conflict evidence. Do not recreate #42's separate work_items orchestration truth; Mission/Execution remains Forge runtime truth and GitHub remains implementation/backlog record where configured.

Implementation Sequence

  1. Adapter/capability schema + registry — protected definitions and versioning.
  2. Resource binding service — scope/classification/version + Grant selectors.
  3. Credential broker abstraction — secret injection, rotation/revocation and metadata evidence.
  4. Adapter conformance harness — read/write fixtures, timeout/cancel, secret sentinel, egress, idempotency, uncertain submission.
  5. Migrate repository/Git/GitHub adapters — prove no behavior/security regression from Phase 3.
  6. Migrate web/document adapters — prove read-only Research flow remains intact.
  7. MCP/ACP representation pass — reuse existing trust boundaries; do not force a semantic mismatch just for uniform naming.
  8. Authenticated write fixture adapter — idempotent submit + reconciliation under injected network faults.
  9. Operator configuration/readiness APIs — Resource, credential identity, grants, health, recovery.
  10. Documentation/conformance contract — exact checklist for every future adapter.

Primary Code Seams To Inspect First

Orthogonal Checkpoints

  1. Capability authority: package declaration, missing Grant, Resource substitution, scope widening, read-vs-write confusion.
  2. Secrets: sentinel credentials in prompts/logs/artifacts/errors/crash output, rotation/revocation races.
  3. Network: unauthorized host/LAN/redirect destination, DNS/URL normalization where relevant.
  4. Side effects: duplicate/replay, ambiguous transport, idempotency-key collision, reconciliation failure.
  5. Rate/quota/recovery: 401/403/404/409/429/5xx/timeouts, bounded backoff and Mission budget.
  6. Migration: Software Engineering/Research behavior and evidence remain green behind the adapter interface.
  7. Package isolation: hostile Workforce content cannot load code/credentials or redefine adapter risk.

Acceptance Criteria

  • Two Workforces can use the same adapter without owning its credentials or implementation.
  • Capability Grants scope Operations to explicit Resources/object sets/expiry and distinguish reads from writes.
  • Package installation cannot obtain a credential or execute adapter code merely by declaring a capability.
  • Protected adapter/Operation security semantics cannot be weakened by editable package/config metadata.
  • Readiness exposes actionable auth/quota/rate/resource/transport states without LLM probing.
  • Duplicate/replayed supported writes are idempotent or enter reconciliation rather than silently duplicating.
  • Adapter logs/evidence redact credentials/sensitive payload according to policy.
  • Adapter egress is narrower than model-worker network authority and cannot widen it implicitly.
  • Revoking a Grant/credential prevents new Operations without uninstalling the Workforce.
  • Repository/Git/GitHub and web/document Phase-3/5 release gates remain green after migration.
  • One authenticated write fixture passes fault-injection/idempotency/reconciliation conformance.
  • GitHub issue integration, if included, does not create a second Forge orchestration database.

Out of Scope

  • Public app/plugin marketplace.
  • Arbitrary executable connector code bundled inside Workforce packages.
  • Implementing every candidate connector family in this phase.
  • Broad automatic credential acquisition.
  • Model ensembles.

Implementation Scope

Very Large - generic adapter/credential/conformance layer plus representative migrations, expected as 7-10 small PRs.

Technical Notes

Do not force all existing MCP/ACP concepts into one abstraction if doing so would weaken their proven security model. The adapter plane should provide common admission/evidence semantics while allowing specialized protected implementations behind it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependency-blockedREADINESS PROJECTION — Issue is blocked by unresolved dependencies. This label is a cache.enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions