plugins/project/index.js |
Plugin entry: the owner switch (flybot.pluginEnabled('project')), bindHost(seam.helpers), installProjectDomain(seam.runtime). A core with no flybot.projectHost() is told once and nothing is registered; the host's own fallbacks answer instead. |
plugins/project/src/install.js |
Puts the seams on the runtime in the core's old MODULES order — state reader, Chief, board, dossier, assistant — and marks the runtime so a second apply() is a no-op (a second ctx.tools.register of the same name would fail the whole plugin). |
plugins/project/src/host.js |
The helpers this package takes from its host, read at call time so a module-scope arrow (oneLine, capped) sees the binding: cut, codePoints, dirKind, defineTool, output, columnOf, priorityOf, advanceRefusal, workDirFor, dayKey, MAX_ENTRY, ASSISTANT_ROLE and the quiet-hours reads. REQUIRED is the whole list; a host that binds a partial bag fails at apply() naming the missing helper. |
plugins/project/src/project-state.js |
The project_state tool: the Project State files of the Session working folder (PROJECT.md, ROADMAP.md, docs/governance.md, decisions/*.md, LESSONS.md), listed with byte size, a sha256 content hash and mtime, or one file whole up to 200,000 bytes. Answers absent, too large, not a repository or unreadable: <path> (<reason>) with the reason instead of an empty document; a decision name is one segment under decisions/ ending in .md (isDecisionPath), read through lstat so a symlink answers absent, and decisions/ itself must be a real directory (#2055, #2037, #2041, #2461). |
plugins/project/src/project-board.js |
The board read model (#1696): state.tasks, state.meetings, the decisions/*.md files and the Project bindings, with the workflow run refs read through the core's provider seam (rt.onProjectProvider). Read-only by construction; it writes nothing. Carries the role policy (rolesOf, roleOf, roleChoices, changeRole — one Owner, nobody promotes themselves, a Project always keeps its Owner), the queue/lease/blocked groups and the decision card (decisionCardOf, advanceRefusal). An empty decisions/meetings section carries empty beside its reason (#2984): { key, params } with the folder as {dir}, so the page can say the case in the window's language — reason stays the host's own English sentence for whoever reads the read model. |
plugins/project/src/project-chief.js |
The Project Chief (#1859): one hidden Bot per Project, named Project Chief (<name>), bound with bindProject and given instructions that name that one Project and forbid answering for any other; retired through the host's own deleteBot with the Project. rt.projectChief is { create, chiefOf, remove }. |
plugins/project/src/project-team.js |
The team dossier (#1864), read-only: rt.projectTeam(projectId) answers { rows } in the board's order — the Chief, the assistant, then roles.maintainers / roles.members — with persona (the Bot's instructions), the head and topic names of its own memory, its skills and only this Project's rooms. Every string and list is capped and a deleted Bot is a null row, never an error for the whole answer. |
plugins/project/src/project-metrics.js |
The board's seven numbers (#1829) read from GitHub REST and the local task store, with a five-minute cache and one honest failure answer: a missing credential or an unreadable source is unavailable and every value reads null, never 0. The lists are followed page by page under a cap (#2650), a foreign host is never followed with the token, and the day boundary is the caller's zone (resolveTimeZone) rather than the host's UTC clock. Its day key is core/src/host/day-key.js since #2830. |
plugins/project/src/project-assistant.js |
The Project Assistant (#1712): one hidden Bot and Session per Project with exactly one 09:00 Asia/Shanghai project_digest task on that Session through the host's schedule path (never a cron in the plugin; a task already on that Session with that title and a daily rule — including one its owner paused — is adopted instead of written again, and only an ended row (inactive) is replaced, so the stored scheduleId always names a task that can still fire, #1751), per-owner memory in state.projectMemory behind the store's write door (600 code points), and a digest built only from board rows and Project State (what merged, what closed, what is in progress and on whom, the next slice; a day with no change is one line, a second build answers skipped). Its writes carry Written-by: Project Assistant (<name>) / Posted-for: <login>. |
plugins/project/client.js |
Empty in this slice: the browser half is still in the core, see Does not own. |