__init__.py
python
sha256:61100cca63d948098d334e1b600d8fea514568a1c26ef357bf8b6380fbd8a217
chore(timeline): remove unused RationalRate import in entity.py
Human
minor
⚠ breaking
8 days ago
| 1 | """muse hub — MuseHub fabric connection management. |
| 2 | |
| 3 | The hub is not just a remote. It is the shared fabric where versioned |
| 4 | multidimensional state flows across agents, humans, and repositories. |
| 5 | Connecting a repo to a hub anchors it to the synchronisation layer that |
| 6 | enables push/pull, plugin discovery, and multi-agent coordination. |
| 7 | |
| 8 | Subcommands are implemented across domain modules: |
| 9 | |
| 10 | hub/_core.py — shared helpers, TypedDicts, constants |
| 11 | hub/connection.py — connect, disconnect, status, ping |
| 12 | hub/repos.py — repo create/delete/update/list/read/transfer |
| 13 | hub/proposals.py — proposal list/read/create/merge/review/comment |
| 14 | hub/issues.py — issue create/update/read/list/close/comment/assign/label |
| 15 | hub/labels.py — label create/list/update/delete |
| 16 | hub/collaborators.py — collaborator list/invite/update/remove |
| 17 | hub/webhooks.py — webhook create/list/delete + deliveries |
| 18 | hub/releases.py — release list/create/read/delete + assets |
| 19 | hub/users.py — user read/update + topics + forks |
| 20 | hub/attestations.py — attestation create/list/revoke |
| 21 | """ |
| 22 | |
| 23 | import argparse |
| 24 | |
| 25 | from . import ( |
| 26 | attestations, |
| 27 | collaborators, |
| 28 | connection, |
| 29 | issues, |
| 30 | labels, |
| 31 | proposals, |
| 32 | releases, |
| 33 | repos, |
| 34 | users, |
| 35 | webhooks, |
| 36 | ) |
| 37 | from ._core import ( |
| 38 | _HANDLE_RE, |
| 39 | _MAX_API_RESPONSE_BYTES, |
| 40 | _MAX_HANDLE_LEN, |
| 41 | _MAX_ISSUE_COMMENT_LEN, |
| 42 | _MAX_ISSUE_LABEL_LEN, |
| 43 | _MAX_ISSUE_TITLE_LEN, |
| 44 | _MAX_LABEL_DESC_LEN, |
| 45 | _MAX_LABEL_NAME_LEN, |
| 46 | _MAX_PROPOSAL_BODY_LINES, |
| 47 | _MAX_PROPOSAL_TITLE_LEN, |
| 48 | _MAX_REPO_DESC_LEN, |
| 49 | _MAX_REPO_NAME_LEN, |
| 50 | _PROPOSAL_PREFIX_RESOLVE_LIMIT, |
| 51 | _PING_OPENER, |
| 52 | _format_proposal, |
| 53 | _get_hub_and_identity, |
| 54 | _get_hub_and_optional_identity, |
| 55 | _hub_api, |
| 56 | _normalise_url, |
| 57 | _ping_hub, |
| 58 | _resolve_body, |
| 59 | _resolve_proposal_id, |
| 60 | _resolve_repo_id, |
| 61 | _validate_assignee, |
| 62 | get_hub_url, |
| 63 | ) |
| 64 | from .labels import _validate_hex_color |
| 65 | from .issues import run_issue_create |
| 66 | |
| 67 | def register(subparsers: "argparse._SubParsersAction[argparse.ArgumentParser]") -> None: |
| 68 | """Register the ``muse hub`` subcommand tree and all its flags.""" |
| 69 | parser = subparsers.add_parser( |
| 70 | "hub", |
| 71 | help="MuseHub fabric connection management.", |
| 72 | description=__doc__, |
| 73 | formatter_class=argparse.RawDescriptionHelpFormatter, |
| 74 | ) |
| 75 | subs = parser.add_subparsers(dest="subcommand", metavar="SUBCOMMAND") |
| 76 | subs.required = True |
| 77 | |
| 78 | connection.register(subs) |
| 79 | repos.register(subs) |
| 80 | proposals.register(subs) |
| 81 | issues.register(subs) |
| 82 | labels.register(subs) |
| 83 | collaborators.register(subs) |
| 84 | webhooks.register(subs) |
| 85 | releases.register(subs) |
| 86 | users.register(subs) |
| 87 | attestations.register(subs) |
File History
1 commit
sha256:61100cca63d948098d334e1b600d8fea514568a1c26ef357bf8b6380fbd8a217
chore(timeline): remove unused RationalRate import in entity.py
Human
minor
⚠
8 days ago