Files
jason.woltje 3e21d239b3 feat(bus): owner project archive and unarchive (#797)
Jason's owner report 2026-11-06: no way to archive or delete projects.
Archive is the reversible half; delete stays out of scope because project
and run records are write-once evidence.

- project.archive / project.unarchive: human-only (project.create's gate
  minus the tester carve-out; tester, user and agent refused). State is the
  latest row of a new append-only project_archives journal (3s->3t, additive;
  the rows are the audit trail), so projects itself never changes and nothing
  is deleted. Repeats refuse project-already-archived / project-not-archived.
- project.list hides archived projects until {includeArchived:true}, which
  flags each with archived:true; a user still lists granted projects only.
- While archived, thread.create, thread.send, room.open and room.send refuse
  project-archived; every existing record stays readable and unarchive
  restores everything.
- Console: new public/project-archive.js (+css) and project-archive-http.mjs
  routes (chatHTTP's write fence); chat.js gains two one-line hooks,
  index.html one script and one link tag; styling only through the shell's
  .project-archive-control / .project-archived-filter hooks.
- CLI: mosaic project archive|unarchive <name-or-id> and list --archived.
- stack-release COUNTED/LISTED gain project_archives (schema order); schema
  step-count pins and migration fixtures updated for 3t.

bus 1601/1601 (Node 24; Node 26 has the pre-existing project-file socket
stall), webui 582/582, plugins 132/132, cli 1191/1194 (two pre-existing
load flakes of the row253 C4 and land_work families; both pass isolated and
the base commit's full suite fails four of the same family).
2026-11-05 23:50:51 -06:00

31 lines
751 B
JavaScript

// Surface adapter only. The caller and its human proof belong to core.
import { PluginError } from "../../src/kinds.mjs";
export const interfaceVersion = 1;
const VERBS = new Set([
"room.open",
"room.read",
"room.send",
"project.list",
"project.create",
"project.archive",
"project.unarchive",
"thread.list",
"thread.create",
"thread.messages",
"thread.send",
"thread.open",
"thread.shares",
"thread.share",
"thread.unshare",
"session.list",
"session.create",
"session.clear",
"session.cancel",
"session.operation",
]);
export async function dispatch({ verb, args }, { call }) {
if (!VERBS.has(verb)) throw new PluginError("channel-operation", "unsupported channel operation");
return call(verb, args);
}