mirror of
https://github.com/block/buzz.git
synced 2026-11-14 05:12:27 +00:00
## Summary - inject bounded project-home identity and repository context into managed agent sessions - add project-aware CLI flows for creating projects, repositories, issues, and related channels - match project homes through the existing relay query surface, then filter channel metadata client-side This is Part 1 of the channel-first Projects stack. Part 2 contains project creation and model foundations. ## Testing - `cargo fmt --all -- --check` - `cargo clippy -p buzz-cli -p buzz-acp --all-targets -- -D warnings` - `cargo test -p buzz-cli -p buzz-acp` — 1,184 tests passed, 1 doc test ignored - full pre-push gate passed ## Post-Deploy Monitoring & Validation - validate project-home agent context and project-aware CLI commands against a staging relay - healthy signals: project context matches the active channel, explicit repo coordinates remain stable, and normal channels receive no project block - failure signals: cross-channel project context, duplicate project creation, or commands targeting an unrelated repository; mitigate by reverting this PR --------- Signed-off-by: Thomas Petersen <thomasp@squareup.com> Signed-off-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz> Co-authored-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz>
41 lines
1002 B
TypeScript
41 lines
1002 B
TypeScript
export const PROJECT_HOME_WORKSPACE_SHEET_TABS = [
|
|
"issues",
|
|
"prs",
|
|
"commits",
|
|
"files",
|
|
"contributors",
|
|
] as const;
|
|
|
|
export type ProjectHomeWorkspaceSheetTab =
|
|
(typeof PROJECT_HOME_WORKSPACE_SHEET_TABS)[number];
|
|
|
|
export function isProjectHomeWorkspaceSheetTab(
|
|
value: string | undefined,
|
|
): value is ProjectHomeWorkspaceSheetTab {
|
|
return (
|
|
value != null &&
|
|
(PROJECT_HOME_WORKSPACE_SHEET_TABS as readonly string[]).includes(value)
|
|
);
|
|
}
|
|
|
|
const WORKSPACE_SHEET_TITLES: Record<ProjectHomeWorkspaceSheetTab, string> = {
|
|
commits: "Commits",
|
|
contributors: "People",
|
|
files: "Files",
|
|
issues: "Tasks",
|
|
prs: "Reviews",
|
|
};
|
|
|
|
export function projectHomeWorkspaceSheetTitle(
|
|
tab: ProjectHomeWorkspaceSheetTab,
|
|
): string {
|
|
return WORKSPACE_SHEET_TITLES[tab];
|
|
}
|
|
|
|
/** Repository workspace tab to open when expanding a home-channel sheet. */
|
|
export function projectHomeWorkspaceSheetExpandTab(
|
|
tab: ProjectHomeWorkspaceSheetTab,
|
|
): ProjectHomeWorkspaceSheetTab {
|
|
return tab;
|
|
}
|