mirror of
https://github.com/hanzoai/insights.git
synced 2026-11-03 00:52:32 +00:00
The tree was a debranded snapshot of upstream taken around 2026-02-20, and upstream has moved about five months since. This replaces it with upstream master, mechanically re-derived: bin/debrand does the rename, and the pipeline and squashed migrations are restored from the shipped tree. Not a merge. The previous import replaced the tree wholesale in a single commit, so there is no shared content history to merge against. Reproducing the rename on the new tree is what actually converges. What survives: .hanzo/workflows, the Dockerfiles and bin/docker* entrypoints, compose files, LLM.md, and insights/migrations. The squashed initial migration is load-bearing — the live database records it by name, so upstream's ~918 individual migrations cannot come back. Nine products are dropped as unreferenced. Twenty-one more that we do not run are kept anyway because the core app still imports them; unpicking those is a refactor and does not belong in a rebase. This base does not build yet, and the reasons are not in the rename: upstream now wants Python 3.13.13 against our 3.12.12 and Django 5.2 against our 4.2, and the dependency manifests still name upstream packages that we republish under our own names. Those are decisions, not renames.
71 lines
3.2 KiB
Python
71 lines
3.2 KiB
Python
from insights.api.routing import RouterRegistry
|
|
|
|
import products.signals.backend.views as signals
|
|
from products.signals.backend.scout_harness.views import (
|
|
SignalProjectProfileViewSet,
|
|
SignalScoutConfigViewSet,
|
|
SignalScoutMembersViewSet,
|
|
SignalScoutMetadataViewSet,
|
|
SignalScoutNoteViewSet,
|
|
SignalScoutRunViewSet,
|
|
SignalScoutViewSet,
|
|
SignalScratchpadViewSet,
|
|
)
|
|
from products.signals.backend.views import SignalViewSet
|
|
|
|
|
|
def register_routes(routers: RouterRegistry) -> None:
|
|
routers.projects.register(r"signals", SignalViewSet, "project_signals", ["team_id"])
|
|
signal_reports_router = routers.projects.register(
|
|
r"signals/reports", signals.SignalReportViewSet, "project_signal_reports", ["team_id"]
|
|
)
|
|
signal_reports_router.register(
|
|
r"artefacts",
|
|
signals.SignalReportArtefactViewSet,
|
|
"project_signal_report_artefacts",
|
|
["team_id", "report_id"],
|
|
)
|
|
routers.projects.register(
|
|
r"signals/source_configs", signals.SignalSourceConfigViewSet, "project_signal_source_configs", ["team_id"]
|
|
)
|
|
routers.projects.register(r"signals/config", signals.SignalTeamConfigViewSet, "project_signal_config", ["team_id"])
|
|
routers.projects.register(
|
|
r"signals/processing", signals.SignalProcessingViewSet, "project_signal_processing", ["team_id"]
|
|
)
|
|
# Signals agent HTTP surface — exposed via MCP as `scout-*` tools. Most reads (runs,
|
|
# memory, project profile) are public-grantable via `signal_scout:read`; writes — and the member
|
|
# roster read — are sandbox-scope only via the internal `signal_scout_internal` scope object.
|
|
routers.projects.register(r"signals/scout/runs", SignalScoutRunViewSet, "project_signals_scout_runs", ["team_id"])
|
|
routers.projects.register(
|
|
r"signals/scout/configs", SignalScoutConfigViewSet, "project_signals_scout_configs", ["team_id"]
|
|
)
|
|
routers.projects.register(
|
|
r"signals/scout/scratchpad", SignalScratchpadViewSet, "project_signals_scout_scratchpad", ["team_id"]
|
|
)
|
|
# Steering notes team members (or their agents) leave for the scouts. Reads are public
|
|
# (`signal_scout:read`); writes require skill-authoring-level authorization — see the viewset.
|
|
routers.projects.register(
|
|
r"signals/scout/notes", SignalScoutNoteViewSet, "project_signals_scout_notes", ["team_id"]
|
|
)
|
|
routers.projects.register(
|
|
r"signals/scout/project_profile",
|
|
SignalProjectProfileViewSet,
|
|
"project_signals_scout_project_profile",
|
|
["team_id"],
|
|
)
|
|
routers.projects.register(
|
|
r"signals/scout/metadata",
|
|
SignalScoutMetadataViewSet,
|
|
"project_signals_scout_metadata",
|
|
["team_id"],
|
|
)
|
|
# Reviewer-routing roster. `signal_scout_internal:read` (internal scope) → sandbox-only, never in
|
|
# the public MCP catalog; the org-nested member tools the scoped-team token can't reach can't serve this.
|
|
routers.projects.register(
|
|
r"signals/scout/members",
|
|
SignalScoutMembersViewSet,
|
|
"project_signals_scout_members",
|
|
["team_id"],
|
|
)
|
|
routers.projects.register(r"signals/scout", SignalScoutViewSet, "project_signals_scout", ["team_id"])
|