Skip to content

Commit 660ff17

Browse files
committed
BroccoliQ has been removed from dietcode-plugin. Work that was already in progress is finished, and remaining references are cleaned up.
Removed surface area /broccoliq slash command and bq alias queue_tools.py — broccolidb_queue_status, broccolidb_shard_status, broccolidb_hive_integrity RPC methods — queue_status, shard_status, hive_integrity (RPC version bumped to 5) hive_board_intel no longer includes queue metrics (hive metrics only) Updated behavior kanban_broccolidb_board_intel() returns "hive" instead of "broccoliq" in its JSON payload Plugin metadata, prompts, toolset expectations, and public exports no longer mention BroccoliQ Docs & branding README, CHANGELOG, and docs under docs/ updated BroccoliQ comments/strings updated across Python, TypeScript, and kernel files Kernel memory telemetry sources renamed: broccolidb_memory, broccolidb_replay_cache What remains BroccoliDB — graph, audit, hive sync, kanban bridge tools Internal queue tables/code under broccolidb/infrastructure/queue/ (database layer, not exposed as BroccoliQ) The only remaining broccoliq mention is a historical note in kernel/MIGRATION.md for the old runtime/memory/broccoliq/ path.
1 parent 1526e19 commit 660ff17

39 files changed

Lines changed: 77 additions & 273 deletions

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,4 @@ See [docs/releases/v1.9.0.md](docs/releases/v1.9.0.md) and [kernel/MIGRATION.md]
114114

115115
## v1.8.0 and earlier
116116

117-
Prior releases: BroccoliDB, BroccoliQ, JoyZoning governance, and JSDP Hermes integration.
117+
Prior releases: BroccoliDB, JoyZoning governance, and JSDP Hermes integration.

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ progress telemetry (`/dietcode kernel cockpit`, watch, explain-gate).
7474
| Component | Role |
7575
| --- | --- |
7676
| **Roadmap** | Native `roadmap` toolset — checkpoint, validate, autofill, cockpit, gates |
77-
| **BroccoliDB** | Knowledge graph, audit, refactor, structural analysis |
78-
| **BroccoliQ** | Queue status, shard health, integrity |
77+
| **BroccoliDB** | Knowledge graph, audit, refactor, structural analysis, hive sync |
7978
| **JoyZoning** | Mutation lifecycle, convergence, runtime journal |
8079
| **JSDP** | Rolling-horizon autonomous delivery helpers |
8180
| **Kernel bridge** | Optional macOS `dietcode_kernel` patch/verify + raw-write policy |
@@ -168,7 +167,6 @@ Decision tree when stuck: [docs/roadmap.md#decision-tree](docs/roadmap.md#decisi
168167
/dietcode tools
169168
/dietcode broccolidb
170169
/broccolidb status
171-
/broccoliq queue
172170
/joyzoning status
173171
```
174172

__init__.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
"""DietCode unified plugin — BroccoliDB, BroccoliQ, JoyZoning, and JSDP for upstream Hermes."""
2+
"""DietCode unified plugin — BroccoliDB, JoyZoning, and JSDP for upstream Hermes."""
33
from __future__ import annotations
44

55
import importlib.util
@@ -41,15 +41,14 @@ def _mark_registered(ctx) -> None:
4141
def _register_commands(ctx) -> None:
4242
from plugins.dietcode.slash_commands import (
4343
_handle_broccolidb,
44-
_handle_broccoliq,
4544
_handle_joyzoning,
4645
_handle_roadmap,
4746
)
4847

4948
ctx.register_command(
5049
"dietcode",
5150
handler=handle_dietcode_command,
52-
description="DietCode integration health — BroccoliDB, BroccoliQ, JoyZoning, JSDP.",
51+
description="DietCode integration health — BroccoliDB, JoyZoning, JSDP.",
5352
args_hint="[status|doctor|tools|broccolidb]",
5453
)
5554
ctx.register_command(
@@ -63,8 +62,6 @@ def _register_commands(ctx) -> None:
6362
("jz", _handle_joyzoning, "JoyZoning layering audit (alias).", "[status|check <file>|…]"),
6463
("broccolidb", _handle_broccolidb, "BroccoliDB epistemic database console.", "[status|query|audit|heal]"),
6564
("bdb", _handle_broccolidb, "BroccoliDB console (alias).", "[status|query|audit|heal]"),
66-
("broccoliq", _handle_broccoliq, "BroccoliQ sharded queue and hive infrastructure.", "[queue|shards|integrity]"),
67-
("bq", _handle_broccoliq, "BroccoliQ console (alias).", "[queue|shards|integrity]"),
6865
("roadmap", _handle_roadmap, "Native roadmap checkpoint console.", "[cockpit|doctor|checkpoint|validate|guide]"),
6966
("rm", _handle_roadmap, "Roadmap checkpoint console (alias).", "[cockpit|doctor|checkpoint|validate|guide]"),
7067
):

broccolidb/infrastructure/db/BufferedDbPool.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export type WriteOp = {
112112
where?: WhereCondition | WhereCondition[];
113113
conflictTarget?: string | string[]; // For upserts
114114
agentId?: string;
115-
shardId?: string; // Level 8: BroccoliQ shard partitioning
115+
shardId?: string; // Level 8: shard partitioning
116116
layer?: DbLayer;
117117
// Level 6: Pre-calculated Metadata
118118
hasIncrements?: boolean;
@@ -976,12 +976,12 @@ export class BufferedDbPool {
976976
return results.length > 0 ? (results[results.length - 1] as Schema[T]) : null;
977977
}
978978

979-
/** BroccoliQ Level 8: resolve a sharded database handle. */
979+
/** Level 8: resolve a sharded database handle. */
980980
public async getDb(shardId: string = 'main'): Promise<Kysely<Schema>> {
981981
return getDb(shardId);
982982
}
983983

984-
/** BroccoliQ Level 5: distributed lock via claims table. */
984+
/** Level 5: distributed lock via claims table. */
985985
public async acquireLock(
986986
resource: string,
987987
author: string,

broccolidb/infrastructure/db/DatabaseSchema.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
* Principle: Unified TypeScript type definitions for Kysely database schema
55
* Hardening: Master Sovereign Hive Architecture (v2.0)
66
*
7-
* Provides bit-for-bit parity across DietCode and BroccoliQ/broccolidb.
7+
* Provides bit-for-bit parity across DietCode and broccolidb.
88
*/
99

1010
export interface Schema {
11-
// --- CORE BROCCOLIQ TABLES ---
11+
// --- CORE HIVE / QUEUE TABLES ---
1212
users: {
1313
id: string;
1414
createdAt: number;

broccolidb/infrastructure/db/pool/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* BroccoliQ pool module — re-exports the canonical BufferedDbPool singleton
3-
* used throughout broccolidb. Keeps @noorm/broccoliq import paths stable.
2+
* Broccolidb pool module — re-exports the canonical BufferedDbPool singleton
3+
* used throughout broccolidb.
44
*/
55
export {
66
BufferedDbPool,

broccolidb/infrastructure/hermes/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Hermes native RPC (`infrastructure/hermes/`)
22

3-
Persistent BroccoliDB/BroccoliQ worker used by DietCode / Hermes Python tools.
3+
Persistent BroccoliDB worker used by DietCode / Hermes Python tools.
44

55
## Documentation
66

@@ -17,7 +17,7 @@ Persistent BroccoliDB/BroccoliQ worker used by DietCode / Hermes Python tools.
1717
|------|------|
1818
| `hermes_rpc.ts` | Persistent stdin/stdout worker (`ready` first, lazy DB warm) |
1919
| `hermes_oneshot.ts` | Cold fallback: one JSON line on stdout, then `process.exit(0)` |
20-
| `rpc_handlers.ts` | Canonical handlers (`dispatchRpc`, `RPC_VERSION = 4`) |
20+
| `rpc_handlers.ts` | Canonical handlers (`dispatchRpc`, `RPC_VERSION = 5`) |
2121
| `agent_session.ts` | Warm `AgentContext` singleton |
2222
| `agent_invoke.ts` | Graph / kanban cognitive ops |
2323
| `queue_metrics.ts` | SQL `GROUP BY` queue status (no full-table scan) |
@@ -44,7 +44,7 @@ Expect: one `{"ready":true,…}` line, then one `{"id":1,"ok":true,…}` line. L
4444
from plugins.dietcode.lib.tools.broccolidb_tools.exec import run_db_rpc, run_agent_rpc, warm_db_rpc
4545

4646
warm_db_rpc(block=True)
47-
raw = run_db_rpc("queue_status")
47+
raw = run_db_rpc("hive_board_intel", {"shard_id": "kanban"})
4848
```
4949

5050
## Node native modules

broccolidb/infrastructure/hermes/hermes_rpc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Hermes ↔ BroccoliDB/BroccoliQ native RPC — persistent stdin/stdout worker.
2+
* Hermes ↔ BroccoliDB native RPC — persistent stdin/stdout worker.
33
*
44
* Emits {"ready":true} immediately so Python never blocks on schema migration.
55
* DB / AgentContext warmup runs lazily on the first request.

broccolidb/infrastructure/hermes/rpc_handlers.ts

Lines changed: 2 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,20 @@
11
/**
2-
* Canonical BroccoliDB/BroccoliQ RPC handlers — single implementation for
2+
* Canonical BroccoliDB RPC handlers — single implementation for
33
* hermes_rpc.ts (persistent worker) and thin CLI wrappers (hive_*.ts).
44
*/
55
import * as crypto from "node:crypto";
66
import { sql } from "kysely";
77
import { buildDashboardSnapshot } from "../dashboard/snapshot_core.js";
88
import { getActiveShards, getDb } from "../db/Config.js";
9-
import { IntegrityWorker } from "../db/IntegrityWorker.js";
109
import { runAgentInvoke } from "./agent_invoke.js";
1110
import { flushDbPool } from "./agent_session.js";
12-
import { aggregateQueueByStatus } from "./queue_metrics.js";
1311

14-
export const RPC_VERSION = 4;
12+
export const RPC_VERSION = 5;
1513

1614
export const RPC_METHODS = [
1715
"ping",
1816
"rpc_health",
1917
"dashboard_snapshot",
20-
"queue_status",
21-
"shard_status",
22-
"hive_integrity",
2318
"proposal_action",
2419
"hive_sync",
2520
"hive_drift",
@@ -82,7 +77,6 @@ export interface HiveDriftPayload {
8277

8378
export interface HiveBoardIntelPayload {
8479
shard_id?: string;
85-
queue_limit?: number;
8680
hive_limit?: number;
8781
}
8882

@@ -117,56 +111,6 @@ export async function runRpcHealth(): Promise<Record<string, unknown>> {
117111
};
118112
}
119113

120-
export async function runQueueStatus(): Promise<Record<string, unknown>> {
121-
const shards = getActiveShards().length ? getActiveShards() : ["main"];
122-
const byStatus: Record<string, number> = {};
123-
let total = 0;
124-
for (const shardId of shards) {
125-
const db = await getDb(shardId);
126-
const agg = await aggregateQueueByStatus(db);
127-
for (const [status, count] of Object.entries(agg.byStatus)) {
128-
byStatus[status] = (byStatus[status] ?? 0) + count;
129-
}
130-
total += agg.total;
131-
}
132-
return { success: true, total, byStatus, shards };
133-
}
134-
135-
export async function runShardStatus(): Promise<Record<string, unknown>> {
136-
const shards = getActiveShards();
137-
const listed = shards.length ? shards : ["main"];
138-
const detail: Array<Record<string, unknown>> = [];
139-
for (const shardId of listed) {
140-
try {
141-
const db = await getDb(shardId);
142-
const probe = await db
143-
.selectFrom("queue_settings" as never)
144-
.selectAll()
145-
.limit(1)
146-
.execute();
147-
detail.push({ shardId, healthy: true, probeRows: probe.length });
148-
} catch (e) {
149-
detail.push({
150-
shardId,
151-
healthy: false,
152-
error: e instanceof Error ? e.message : String(e),
153-
});
154-
}
155-
}
156-
return { success: true, shardCount: detail.length, shards: detail };
157-
}
158-
159-
export async function runHiveIntegrity(): Promise<Record<string, unknown>> {
160-
const worker = new IntegrityWorker(600_000);
161-
await worker.runAudit();
162-
const shards = getActiveShards();
163-
return {
164-
success: true,
165-
message: "Integrity audit complete",
166-
shards: shards.length ? shards : ["main"],
167-
};
168-
}
169-
170114
export async function runProposalAction(
171115
params: Record<string, unknown>,
172116
): Promise<Record<string, unknown>> {
@@ -376,8 +320,6 @@ export async function runHiveBoardIntel(
376320

377321
const db = await getDb(shardId);
378322

379-
const queueAgg = await aggregateQueueByStatus(db);
380-
381323
const hiveRows = await db
382324
.selectFrom("hive_tasks")
383325
.select(["status", sql<number>`count(*)`.as("count")])
@@ -395,10 +337,6 @@ export async function runHiveBoardIntel(
395337
return {
396338
success: true,
397339
shard_id: shardId,
398-
queue: {
399-
total: queueAgg.total,
400-
byStatus: queueAgg.byStatus,
401-
},
402340
hive: {
403341
total: hiveTotal,
404342
byStatus: hiveByStatus,
@@ -418,9 +356,6 @@ export const rpcHandlers: Record<string, HandlerFn> = {
418356
ping: async () => runPing(),
419357
rpc_health: async () => runRpcHealth(),
420358
dashboard_snapshot: async () => buildDashboardSnapshot(),
421-
queue_status: async () => runQueueStatus(),
422-
shard_status: async () => runShardStatus(),
423-
hive_integrity: async () => runHiveIntegrity(),
424359
proposal_action: async (p) => runProposalAction(p),
425360
hive_sync: async (p) => runHiveSync(p as unknown as KanbanHiveSyncPayload),
426361
hive_drift: async (p) => runHiveDrift(p as unknown as HiveDriftPayload),

broccolidb/infrastructure/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
/**
2-
* BroccoliQ - Queue and Database Processing Infrastructure
2+
* BroccoliDB infrastructure — queue and database processing.
33
*
4-
* Re-exports the main public API for easy import from '@broccoliq/queue'.
5-
* Use direct imports from 'broccoliq' for the primary entry points.
4+
* Re-exports the main public API for broccolidb consumers.
65
*/
76

87
// Core database and pool functionality

0 commit comments

Comments
 (0)