Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aaac939cb2 | ||
|
|
63c7c4ae2c | ||
|
|
b7b8aae8e8 |
5 changed files with 12 additions and 11 deletions
|
|
@ -15,11 +15,12 @@ future reader won't think to look).
|
||||||
- **Pure fire-and-forget notification, no reply expected** - a
|
- **Pure fire-and-forget notification, no reply expected** - a
|
||||||
dashboard-visible one-way message is fine. Don't reach for a
|
dashboard-visible one-way message is fine. Don't reach for a
|
||||||
conversational channel just to say something that needs no response.
|
conversational channel just to say something that needs no response.
|
||||||
- **A specific decision you need recorded, that threads an answer back
|
- **A specific decision you need recorded** (a gated approval, a
|
||||||
to you** - use a mechanism built for exactly that (queues cleanly,
|
go/no-go call) - if it's issue-shaped, it's really the next bullet
|
||||||
the answer comes back attached to the question). This matters for
|
(post it where the context lives and it stays that thread's own
|
||||||
anything you'll need to point back to later - a gated approval, a
|
back-and-forth); otherwise use a real conversational channel and
|
||||||
go/no-go call.
|
write the outcome down somewhere a future reader will actually find
|
||||||
|
it - no tool threads that bookkeeping back to you automatically.
|
||||||
- **An issue-shaped question or decision** - post it where the
|
- **An issue-shaped question or decision** - post it where the
|
||||||
surrounding context already lives (the tracked item itself), not in
|
surrounding context already lives (the tracked item itself), not in
|
||||||
a side channel. A future reader looking at that item should find the
|
a side channel. A future reader looking at that item should find the
|
||||||
|
|
|
||||||
|
|
@ -391,8 +391,8 @@ impl AgentServer {
|
||||||
};
|
};
|
||||||
let kind_label = loose_end_kind_label(kind);
|
let kind_label = loose_end_kind_label(kind);
|
||||||
// Reminders are harness-local — dial the in-agent socket
|
// Reminders are harness-local — dial the in-agent socket
|
||||||
// directly instead of the broker; every other kind
|
// directly instead of the broker; the other kind (approval)
|
||||||
// (question/approval) still lives in c0re.
|
// still lives in c0re.
|
||||||
if kind == hive_sh4re::inbox::CancelLooseEndKind::Reminder {
|
if kind == hive_sh4re::inbox::CancelLooseEndKind::Reminder {
|
||||||
return match dial_agent_socket(&hive_agent_sock::Request::CancelReminder { id })
|
return match dial_agent_socket(&hive_agent_sock::Request::CancelReminder { id })
|
||||||
.await
|
.await
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,8 @@ pub const MESSAGE_MAX_BYTES: usize = 4096;
|
||||||
/// `Response::Err`) on failure.
|
/// `Response::Err`) on failure.
|
||||||
///
|
///
|
||||||
/// `label` shows up in the error message verbatim — pass a short
|
/// `label` shows up in the error message verbatim — pass a short
|
||||||
/// noun like `"send"`, `"question"`, `"broadcast"` so the model can
|
/// noun like `"send"` or `"broadcast"` so the model can tell which
|
||||||
/// tell which call got rejected.
|
/// call got rejected.
|
||||||
pub fn check_size(label: &str, body: &str) -> Result<(), String> {
|
pub fn check_size(label: &str, body: &str) -> Result<(), String> {
|
||||||
if body.len() > MESSAGE_MAX_BYTES {
|
if body.len() > MESSAGE_MAX_BYTES {
|
||||||
Err(format!(
|
Err(format!(
|
||||||
|
|
|
||||||
|
|
@ -173,7 +173,7 @@ pub struct Coordinator {
|
||||||
/// Unified wire-facing event channel feeding the dashboard SSE
|
/// Unified wire-facing event channel feeding the dashboard SSE
|
||||||
/// stream. Carries broker messages (mirrored from `broker.subscribe`
|
/// stream. Carries broker messages (mirrored from `broker.subscribe`
|
||||||
/// by the forwarder task in `main.rs`) and dashboard-only mutation
|
/// by the forwarder task in `main.rs`) and dashboard-only mutation
|
||||||
/// events (approval added/resolved, question added/answered, etc.).
|
/// events (approval added/resolved, etc.).
|
||||||
/// Snapshot endpoints capture `event_seq` before reading state so
|
/// Snapshot endpoints capture `event_seq` before reading state so
|
||||||
/// the client can dedupe its buffered live traffic against the
|
/// the client can dedupe its buffered live traffic against the
|
||||||
/// snapshot.
|
/// snapshot.
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ pub struct PowerStore {
|
||||||
impl PowerStore {
|
impl PowerStore {
|
||||||
/// Open (a connection to) the shared coordinator DB and ensure the
|
/// Open (a connection to) the shared coordinator DB and ensure the
|
||||||
/// `agent_power` table exists. `db_path` is the same sqlite file
|
/// `agent_power` table exists. `db_path` is the same sqlite file
|
||||||
/// the broker / approvals / questions stores open.
|
/// the broker / approvals stores open.
|
||||||
pub fn open(db_path: &Path) -> Result<Self> {
|
pub fn open(db_path: &Path) -> Result<Self> {
|
||||||
let conn = crate::db::open(db_path, "agent_power")?;
|
let conn = crate::db::open(db_path, "agent_power")?;
|
||||||
conn.execute_batch(SCHEMA)
|
conn.execute_batch(SCHEMA)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue