Skip to content

Rewrite alignment: contract v1, evidence, session lifecycle, stealth, validation harness#34

Merged
vercel[bot] merged 3 commits intomainfrom
rewrite-and-implement-changes
Apr 20, 2026
Merged

Rewrite alignment: contract v1, evidence, session lifecycle, stealth, validation harness#34
vercel[bot] merged 3 commits intomainfrom
rewrite-and-implement-changes

Conversation

@Delqhi
Copy link
Copy Markdown
Member

@Delqhi Delqhi commented Apr 20, 2026

Implements the OpenSIN-Bridge counterparts of worker issues #68-#76
(parent tracker OpenSIN-AI/A2A-SIN-Worker-heypiggy#67).

Scope

  • Contract v1 (#69) - extension/src/contract/v1/index.js with method
    registry, error codes, retry hints, idempotency table. Exposed through
    bridge.contract* tools and the bridge_contract legacy alias.
  • Observability / evidence (#70) - drivers/trace.js +
    drivers/evidence.js + tools/evidence.js. New methods:
    bridge.evidenceBundle, bridge.traces.
  • Session lifecycle (#71) - drivers/session-lifecycle.js with
    manifest / TTL / last-known-good / health. New methods:
    session.manifest, session.invalidate, session.lastKnownGood,
    session.health, session.list, session.drop.
  • Stealth assessment (#74) - tools/stealth.js with
    stealth.assess (coherence score) and stealth.detectChallenge
    (Cloudflare / Turnstile / reCAPTCHA / hCaptcha / DataDome).
  • Validation harness (#76) - scripts/validate-bridge-contract.mjs
    plus tests under test/contract/, test/session/, test/evidence/.
  • Legacy flat aliases in tools/aliases.js so existing callers keep
    working during the worker rollout.
  • server.js TOOL_DEFINITIONS extended with the new methods.
  • Docs: docs/BRIDGE_CONTRACT_V1.md, docs/REWRITE_TRACKER.md.

Tests

node --test test/contract test/session test/evidence test/stealth
# 60 tests, all passing
node scripts/validate-bridge-contract.mjs
# contract v1 valid

Compatibility

  • No breaking changes. All existing flat tool names still route to the
    canonical dotted handlers via tools/aliases.js.
  • session.save / session.restore are preserved unchanged; the new
    manifest layer wraps them.

Co-authored-by: v0[bot] <v0[bot]@users.noreply.github.com>

Add new session lifecycle methods and wire tools into registry.

Co-authored-by: Jeremy Schulze <197647907+Delqhi@users.noreply.github.com>
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
opensin-bridge Ready Ready Preview, Comment, Open in v0 Apr 20, 2026 1:32am

Extend content script, rewrite worker, add tests, and migrate call sites.

Co-authored-by: Jeremy Schulze <197647907+Delqhi@users.noreply.github.com>
Update error message handling and add tests for new interaction primitives.

Co-authored-by: Jeremy Schulze <197647907+Delqhi@users.noreply.github.com>
@vercel vercel Bot merged commit 4e85b3e into main Apr 20, 2026
6 checks passed
@vercel vercel Bot deleted the rewrite-and-implement-changes branch April 20, 2026 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant