Skip to the content.

Task 98 — CheckIn/CheckOut protocol

Phase: 8 Status: done Owner: — Slug: checkin-checkout-protocol Studio Stage: 1

Goal

Реализовать CheckIn/CheckOut протокол: пока одна Studio подключена (contribute key), агент “Checked Out”, второе подключение невозможно. System key может подключаться параллельно (read-only monitor). См. ADR-0005.

Acceptance criteria

Sub-tasks

Dependencies

Scope / Likely files

src/agent/Hercules.WebApi/Controllers/SystemController.cs (new), src/agent/CheckIn/CheckInService.cs (new), src/agent/Hercules.WebApi/Program.cs

Implementation notes

Round 1 (this tick) — completed

Реализован CheckIn/CheckOut протокол для Studio (ADR-0005).

Service (src/agent/CheckIn/CheckInService.cs):

Role-изоляция (CheckInRole enum):

Controller (src/agent/Hercules.WebApi/Controllers/SystemController.cs):

Program.cs wiring:

Тесты (tests/Hercules.Agent.Tests/CheckIn/CheckInServiceTests.cs) — 25 unit-tests, все passing:

Build & test validation:

Notes