Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/added-17058-auto-memory-review.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Drained CLI-memory drafts (`cli-memory` tag) never reach an agent while they are drafts: not through the kick primer or knowledge advisor, not through any `?agent=` TOC or entry read, and not through curator auto-promotion, even when `include_states` admits drafts. The dashboard's knowledge view gains an **Auto-memory drafts** filter that shows each draft's `agent:` tags with owner-only Approve and Discard actions. A new owner-only command, `hivectl knowledge drain-memory --legacy [--truncate]`, drains the shared `/data/home/.claude/projects/*/memory` store into drafts tagged `agent:shared` (#17058).
95 changes: 95 additions & 0 deletions dashboard/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -15099,6 +15099,101 @@
}
}
},
"/api/knowledge/cli-memory/drain-legacy": {
"post": {
"tags": [
"Knowledge"
],
"summary": "Drain the shared home's legacy Claude memory into draft knowledge",
"description": "Owner-only, one-shot drain of every `/data/home/.claude/projects/*/memory` store that the per-agent CLI homes (#17039) left behind. Each memory fact becomes a `state: draft` entry in the `bead-synth-wiki` vault tagged `cli-memory` and `agent:shared`, deduplicated by content hash against every entry already in the vault. Drafts are never primed until approved through `PUT /api/knowledge/entry/{id}/state`. The memory files are emptied only when `truncate` is true, and only files whose every fact is now in the vault. The run is written to the audit log.",
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"truncate": {
"type": "boolean",
"description": "Empty each memory file whose facts are all stored (default false)"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Drain result",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"store": {
"type": "string"
},
"agent": {
"type": "string"
},
"sources": {
"type": "integer"
},
"drained": {
"type": "integer"
},
"dupes": {
"type": "integer"
},
"skipped": {
"type": "integer",
"description": "Facts over the 200-per-drain cap; run again to drain them"
},
"truncate": {
"type": "boolean"
},
"truncated": {
"type": "array",
"items": {
"type": "string"
}
},
"kept": {
"type": "array",
"items": {
"type": "string"
},
"description": "Files left in place because a fact in them is not stored yet"
},
"errors": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"400": {
"description": "Invalid request body"
},
"403": {
"description": "Caller is not an owner"
},
"409": {
"description": "The bead-synth-wiki vault is not connected"
},
"500": {
"description": "The legacy project tree could not be listed"
},
"503": {
"description": "Knowledge not enabled"
}
}
}
},
"/api/knowledge/stats": {
"get": {
"tags": [
Expand Down
16 changes: 10 additions & 6 deletions src/docs/agent-knowledge-and-memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,16 +235,20 @@ Do not treat the following as current behaviour; follow the links.
[PR #17039](https://github.com/hivecommons/hive/pull/17039) (per-agent
`.claude`/`.gemini`/`.bob`, described above). Hives upgraded from before it
still hold the old shared store under `/data/home/.claude/projects`; it is
left in place and logged once, remove or drain it by hand.
left in place and logged once. Drain it with
`hivectl knowledge drain-memory --legacy` (see
[Auto-memory drafts](knowledge-lifecycle.md#auto-memory-drafts)) or remove
it by hand.
- [#17032](https://github.com/hivecommons/hive/issues/17032) — done:
`agents.cli_memory.auto_memory` (default off) and
`agents.cli_memory.clear_on_kick`, described above.
- [#17033](https://github.com/hivecommons/hive/issues/17033) — done for the
kick-time drain: `agents.cli_memory.drain_to_knowledge`, described above.
Still open: a Claude Code `SessionEnd` hook that drains without waiting
for the next kick, and a one-shot drain of a pre-#17031 shared store
(sub-issues [#17057](https://github.com/hivecommons/hive/issues/17057),
[#17058](https://github.com/hivecommons/hive/issues/17058)).
kick-time drain (`agents.cli_memory.drain_to_knowledge`, described above),
the review flow, the hard exclusion of drained drafts from every agent read
and the one-shot legacy drain
([#17058](https://github.com/hivecommons/hive/issues/17058)). Still open: a
Claude Code `SessionEnd` hook that drains without waiting for the next kick
([#17057](https://github.com/hivecommons/hive/issues/17057)).
- Repo `AGENTS.md` injection still requires `project.checkouts_dir`; nearest-
file (`ParseNearest`) targeting is deferred ([agents-md.md](agents-md.md)).

Expand Down
16 changes: 8 additions & 8 deletions src/docs/api-reference/agents-and-controls.md

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions src/docs/api-reference/beads.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Part of the [Dashboard REST API reference](../api-reference.md); see that page f

| Method | Path | Auth | Purpose | Source |
|---|---|---|---|---|
| `GET` | `/api/beads` | Dashboard auth/session | Beads List | `pkg/dashboard/api.go:491` |
| `GET` | `/api/beads/{agent}` | Dashboard auth/session | Beads List | `pkg/dashboard/api.go:492` |
| `POST` | `/api/beads/{agent}` | Owner only | Beads Create | `pkg/dashboard/api.go:493` |
| `POST` | `/api/beads/reset` | Owner only | Beads Reset | `pkg/dashboard/api.go:494` |
| `POST` | `/api/beads/reset/{agent}` | Owner only | Beads Reset Agent | `pkg/dashboard/api.go:495` |
| `GET` | `/api/beads` | Dashboard auth/session | Beads List | `pkg/dashboard/api.go:492` |
| `GET` | `/api/beads/{agent}` | Dashboard auth/session | Beads List | `pkg/dashboard/api.go:493` |
| `POST` | `/api/beads/{agent}` | Owner only | Beads Create | `pkg/dashboard/api.go:494` |
| `POST` | `/api/beads/reset` | Owner only | Beads Reset | `pkg/dashboard/api.go:495` |
| `POST` | `/api/beads/reset/{agent}` | Owner only | Beads Reset Agent | `pkg/dashboard/api.go:496` |
6 changes: 3 additions & 3 deletions src/docs/api-reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Part of the [Dashboard REST API reference](../api-reference.md); see that page f
| `GET` | `/api/compliance/export` | Owner only | Evidence download for `?since=`/`?until=`: `kind=controls` (`json`/`md`), `posture` (`json`/`csv`), `audit` (`json`), `config` (redacted effective config + sha256, `json`), `attestations` (`json`/`csv`) or `bundle` (`json`). Every format includes source, period, generator, selected profile versions, attesters, retention and a per-section SHA-256 manifest; audited as `compliance_export` with the SHA-256 of the delivered bytes ([#11081](https://github.com/hivecommons/hive/issues/11081), [#13582](https://github.com/hivecommons/hive/issues/13582)) | `pkg/dashboard/api.go:362` |
| `GET` | `/api/compliance/attestations` | Owner only | Owner attestations, newest first (`?framework=` filters) ([#11081](https://github.com/hivecommons/hive/issues/11081)) | `pkg/dashboard/api.go:363` |
| `POST` | `/api/compliance/attestations` | Owner only | Record `{"framework", "reviewed_on", "note"}` for the signed-in owner; audited as `compliance_attestation`; `201` with the attestation, `400` for an unknown framework, a bad or future date, or a note over 2000 characters ([#11081](https://github.com/hivecommons/hive/issues/11081)) | `pkg/dashboard/api.go:364` |
| `PUT` | `/api/config/governor/compliance` | Owner only | Settings → Compliance framework picker: `{"frameworks": [...]}` sets `compliance.frameworks` (empty list deselects all, absent key leaves it unchanged; unknown/duplicate ids are a `400` before any change); audited as `config_compliance`; returns the re-evaluated `compliance.Report` ([#11080](https://github.com/hivecommons/hive/issues/11080)) | `pkg/dashboard/api.go:532` |
| `PUT` | `/api/config/governor/compliance` | Owner only | Settings → Compliance framework picker: `{"frameworks": [...]}` sets `compliance.frameworks` (empty list deselects all, absent key leaves it unchanged; unknown/duplicate ids are a `400` before any change); audited as `config_compliance`; returns the re-evaluated `compliance.Report` ([#11080](https://github.com/hivecommons/hive/issues/11080)) | `pkg/dashboard/api.go:533` |

| `GET` | `/api/config/governor/threshold-scaling` | Owner only | Governor Threshold Scaling Get | `pkg/dashboard/api.go:219` |
| `PUT` | `/api/config/governor/threshold-scaling` | Owner only | Governor Threshold Scaling Set | `pkg/dashboard/api.go:220` |
Expand All @@ -94,8 +94,8 @@ Part of the [Dashboard REST API reference](../api-reference.md); see that page f
| `PUT` | `/api/config/governor/watchdog` | Owner only | Governor Watchdog | `pkg/dashboard/api.go:229` |
| `GET` | `/api/config/escalation` | Owner only | Escalation Config Get | `pkg/dashboard/api.go:232` |
| `PUT` | `/api/config/escalation` | Owner only | Escalation Config Set | `pkg/dashboard/api.go:233` |
| `GET` | `/api/config/write-surface` | Owner only | Lane write allowlist (`write_surface.allowlist`, [#9587](https://github.com/hivecommons/hive/issues/9587)): `allowlist`, `ops`, `warnings` | `pkg/dashboard/api.go:528` |
| `PUT` | `/api/config/write-surface` | Owner only | Replace the lane write allowlist; `{"allowlist": {}}` clears it; unknown operation or bad lane name is a 400 with nothing changed | `pkg/dashboard/api.go:529` |
| `GET` | `/api/config/write-surface` | Owner only | Lane write allowlist (`write_surface.allowlist`, [#9587](https://github.com/hivecommons/hive/issues/9587)): `allowlist`, `ops`, `warnings` | `pkg/dashboard/api.go:529` |
| `PUT` | `/api/config/write-surface` | Owner only | Replace the lane write allowlist; `{"allowlist": {}}` clears it; unknown operation or bad lane name is a 400 with nothing changed | `pkg/dashboard/api.go:530` |
| `GET` | `/api/config/review` | Dashboard auth/session | Review Config Get | `pkg/dashboard/api.go:236` |
| `PUT` | `/api/config/review` | Owner only | Review Config Set | `pkg/dashboard/api.go:239` |
| `PUT` | `/api/config/governor/features` | Owner only | Governor Features | `pkg/dashboard/api.go:245` |
Expand Down
Loading
Loading