mirror of
https://github.com/harivansh-afk/betterNAS.git
synced 2026-04-16 19:04:37 +00:00
prepare runtime loop
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
parent
e75b3f98a6
commit
f754a217f4
12 changed files with 386 additions and 44 deletions
56
docs/agents/control-plane-agent.md
Normal file
56
docs/agents/control-plane-agent.md
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
# Control Plane Agent Prompt
|
||||
|
||||
```text
|
||||
You are working in /home/rathi/Documents/GitHub/betterNAS/betterNAS-control.
|
||||
|
||||
Goal:
|
||||
Make the Go control plane implement the current first-loop contracts for node registration, export inventory, heartbeat, mount profile issuance, and cloud profile issuance.
|
||||
|
||||
Primary scope:
|
||||
- apps/control-plane/**
|
||||
|
||||
Read-only references:
|
||||
- packages/contracts/**
|
||||
- docs/architecture.md
|
||||
- control.md
|
||||
- TODO.md
|
||||
|
||||
Do not change:
|
||||
- packages/contracts/**
|
||||
- docs/architecture.md
|
||||
- runtime scripts
|
||||
- node-agent code
|
||||
|
||||
Use the existing contracts as fixed for this task.
|
||||
|
||||
Implement cleanly:
|
||||
- POST /api/v1/nodes/register
|
||||
- store or update a node
|
||||
- store or update its exports
|
||||
- POST /api/v1/nodes/{nodeId}/heartbeat
|
||||
- update status and lastSeenAt
|
||||
- GET /api/v1/exports
|
||||
- return registered exports
|
||||
- POST /api/v1/mount-profiles/issue
|
||||
- validate that the export exists
|
||||
- return a mount profile for that export
|
||||
- POST /api/v1/cloud-profiles/issue
|
||||
- validate that the export exists
|
||||
- return a Nextcloud cloud profile for that export
|
||||
|
||||
Constraints:
|
||||
- simplest correct implementation first
|
||||
- in-memory storage is acceptable for this slice
|
||||
- add tests
|
||||
- do not invent new request or response shapes
|
||||
- if you discover a real contract gap, stop and report the exact required contract change instead of patching around it
|
||||
|
||||
Acceptance criteria:
|
||||
1. pnpm agent:bootstrap succeeds.
|
||||
2. pnpm verify succeeds.
|
||||
3. control-plane tests cover the implemented API behavior.
|
||||
4. If the runtime loop is already green on this machine, pnpm stack:up and pnpm stack:verify also stays green in this clone.
|
||||
|
||||
Deliverable:
|
||||
A real contract-backed control plane for the first mount loop, without contract drift.
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue