dsh-bit-login: Checking BIT Campus Network and Academic Affairs in DSH

Introduction

When using DeepSeek Harness (DSH) as an assistant on the Beijing Institute of Technology (BIT) campus, the model often lacks awareness of your connection status to the Srun gateway, remaining data traffic, or the ability to directly check grades, class schedules, or available classrooms. Manually opening the portal or academic affairs system to copy information creates a disconnect from the experience of “just asking in the conversation.” The community plugin dsh-bit-login (maintained by yuanstarstar) connects DSH to the campus Srun gateway and the BIT-Login gateway operated by the BIT101 community. It integrates network status and school system queries into the same Harness workflow through tools, a settings panel, and optional context injection.

What is this

dsh-bit-login is a Networking Tools class plugin for DSH (current package version 1.3.0, MIT License). It primarily does two things:

  1. Campus Network (Srun, http://10.0.0.55): Check online status, traffic and balance, login/logout, perform one-click troubleshooting, and inject real-time network status into the model context.
  2. School Systems (Grades / Schedule / Student Status / Free Classrooms / Exams): Perform unified identity authentication via the BIT-Login gateway to query undergraduate grades, schedules, student status, and credit progress; export trusted electronic transcripts and schedule calendars (.ics); and query available classrooms in teaching centers and exam schedules (prioritizing direct campus connection, with automatic fallback to webvpn).

The settings page provides a “BIT Campus Services” real-time panel (polling approximately every 15 seconds) where both sets of capabilities can be operated. Plugin directory and source code: SkillHub Directory Page, GitHub Repository.

Core Features

Summarized below according to the capability table in the README; the tool names on the model side correspond to the panel entries.

Campus Network (Srun)

Capability Tool Name Panel
Online Status / Traffic Used / Online Duration / Balance bit_login_status Top Card
Login (Account, Password, ISP, ac_id) bit_login_login Login Form
Logout bit_login_logout “Logout”
One-click Troubleshooting (Gateway reachability, ac_id probe, challenge, online status, portal hijacking) bit_login_diagnose “One-click Diagnose”

School Systems (BIT-Login Gateway)

Capability Tool Name Panel
Grades (Undergraduate Academic Affairs) bit_school_scores “Query Grades”
Schedule (Teaching Center) bit_school_schedule “Query Schedule”
Student Status & Credit Progress bit_school_profile “Status / Credits”
Trusted Electronic Transcript bit_school_transcript “Transcript”
Schedule Calendar .ics (Approx. 30 min validity) bit_school_ics “Schedule Calendar”
Free Classrooms (Dual Channel) bit_school_classroom “Query Free Classrooms”
Exam Schedule (Dual Channel) bit_school_exam “Exam Schedule”
Unified Auth Login / Verification Code / Session / Logout bit_school_login, bit_school_verify, bit_school_status, bit_school_logout Lower half of Panel

Host Integration

  • Session Keep-alive: A background timer silently renews the session as it approaches expiration; the panel indicates that login status will be maintained until DSH is closed (depending on settings like rememberCredentials).
  • Context Injection: Writes real-time status via systemPrompt.section and systemPrompt.context; promptInjection can be set to auto / always / off.
  • Implementation Highlights: Pure Node, zero third-party dependencies; srun.js independently encapsulates the Srun protocol; school.js interfaces with BIT101 REST (POST /api/auth/start + X-Challenge-Token polling + Authorization: Bearer); jxzxehall.js handles direct teaching center connection and webvpn fallback.

Installation and Activation

The plugin is installed as a DSH bundle: In your local DSH profile, use plugin_manager → install_bundle, and fill in the absolute path to this plugin’s directory as the target (You need to obtain the source code directory yourself first; the README does not provide a one-click command like dsh plugin add):

<path you cloned to>\dsh-bit-login

Newly installed bundles take effect directly via HMR; replacing an installed package with the same name requires restarting DSH to load the new JS modules. Uninstallation: plugin_manager → remove_bundle, with target dsh-bit-login.

Runtime Environment: Node ≥ 20 (consistent with engines in package.json).

Configuration

Modify settings in the config: section of cordis.patch.yml (the patch layer persists across DSH upgrades). Common items are as follows:

Key Default Description
gateway http://10.0.0.55 Srun Gateway
isp '' ISP: '' / cmcc / cmct / unicom
timeoutMs 6000 Single HTTP timeout
refreshSeconds 60 Background status collection interval; 0 disables
promptInjection auto Context injection strategy
schoolEnabled true Whether to enable school tools like grades/schedule
schoolBaseUrl https://login.bit101.flwfdd.xyz BIT101 BIT-Login Gateway (Third-party)
rememberCredentials true Unified identity password kept only in process memory for silent re-login
keepAlive true Background keep-alive

For complete key names and default values, see the “Configuration” section of the repository README.

Typical Usage

1. Operation via Settings Panel

Open DSH Settings → “BIT Campus Services”: View the campus network card and fill in the Srun login form; complete unified identity authentication in the school system area (cooperate with bit_school_verify if SMS or image captchas are required); click buttons for grades, schedule, free classrooms, etc., as needed. The panel route prefix defaults to routePrefix: /dsh-bit-login.

2. Model Calling Tools

Users or models can pass parameters per request, for example, campus network login (password is passed each time; the plugin does not retain Srun passwords):

bit_login_login({ username, password, ... })

First-time login for school systems:

bit_school_login({ username, password })

If a verification code is required, continue with bit_school_verify; query tools handle expiration and re-login internally via ensureReady() once the session is ready (provided rememberCredentials: true and you have logged in before).

3. Disabling School Systems or Third-party Gateway

If you do not trust the third-party gateway, you can set schoolEnabled: false in the configuration to turn off grade/schedule capabilities entirely; or set rememberCredentials: false to make the session closer to “one login lasts about 30 minutes” and avoid long-term retention of credentials in memory.

Applicable Scenarios & Notes

Who it is for: BIT faculty and students who are already using DSH for daily Q&A or automation and wish to integrate campus network status and academic affairs queries into their conversation entry point.

Permissions & Security (Please read the README sections “Credentials” and “Security Boundaries” before use):

  • The plugin runs with current DSH process permissions; you should review the source code and MIT License yourself before installation.
  • The Srun gateway uses plaintext HTTP, meaning passwords will appear in LAN packets, similar to common BIT login scripts; do not use on untrusted networks.
  • Grades/Schedules are accessed via the BIT101 community third-party gateway (not the official school system); unified identity passwords are submitted to this gateway via HTTPS. When rememberCredentials: true (default), the password is retained in process memory until logout or DSH closure for automatic re-login.
  • The plugin declares no disk writes, no logging, and no entry into storageDomain; tool return values are stripped of fields like passwords and tokens via sanitize() to prevent feedback into the model.
  • Since 2020-10-09, campus network accounts have been unified with identity authentication accounts; automated usage requires self-evaluation of compliance risks.

SkillHub (skillhub.cn) is a community plugin directory and has no official affiliation with DeepSeek / High-Flyer; the DSH ecosystem emphasizes “everything is a plugin,” and this plugin is a link in that chain facing BIT networking and academic affairs.

Conclusion

dsh-bit-login consolidates Srun campus network status and BIT academic affairs queries into DSH’s tools and panels, and optionally writes network status into the system prompt, reducing the repetitive labor of repeatedly opening portals and copying schedules on campus. Installation and configuration are subject to the repository README.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye