Skip to main content

Module teams

Module teams 

Source
Expand description

Where supercode-teams lives on this box, and the service unit that keeps its machine daemon up (docs/plans/teams-server.md §11).

supercode does not implement teams; the sdk/teams package does. This module holds the two facts the Rust CLI needs about it:

  • where its Node entry is — teams_entry, resolved exactly the way crate::orchestrator::daemon_entry resolves the orchestrator’s: SUPERCODE_TEAMS_ENTRY first, then the checkout the running binary sits in, then the checkout it was built from, then the globally installed @volter/supercode-teams package (npm root -g).
  • what a service unit for its node would say — service_unit renders the launchd plist / systemd unit / Windows Scheduled Task that runs node <entry> machine start, written under <home>/service/; install_service and uninstall_service drive launchctl / systemctl --user / schtasks over it.

Everything else about teams — its host key, log, contexts, enrollments — is the Node package’s own state, written by its own CLI. There is no second writer of that home in this binary.

Enums§

TeamsError
Why a teams verb could not do its work.

Constants§

SERVICE_DIR
Directory the rendered service unit is written into, relative to the home.
SERVICE_NAME
launchd label / systemd unit name for this machine’s teams daemon.
TEAMS_ENTRY
The teams CLI entry inside the sdk/teams package.
TEAMS_PACKAGE
The npm name the sdk/teams package is published under.

Functions§

connector_service_name
Stable, context-scoped label for one workspace connector service.
connector_service_status
Read-only service-manager status for one context connector.
connector_service_unit
Render the persistent foreground connector command for one saved context.
install_connector_service
Install a rendered context connector. An identical installed unit is an idempotent success. A different unit in this home’s own service folder is this home’s connector with new parameters (a new build, PATH or folder), so it is replaced and restarted; a label the manager holds with no unit here belongs to another home and is refused.
install_service
Render the unit, hand it to the platform’s service manager, and start it.
register_message_tools
Give every installed harness supercode’s messaging tools: register <supercode> message mcp as a user-scope MCP server named supercode through each harness’s own mcp add. A harness whose CLI is absent, or that already has the entry, is left as it is. One line per harness says what happened.
service_status
What the platform’s service manager says about the teams daemon unit.
service_unit
Render the per-platform service unit for this machine’s teams daemon.
teams_entry
Locate the Node teams entry (sdk/teams/bin/teams.mjs).
teams_home
The teams home: SUPERCODE_TEAMS_HOME, else <SUPERCODE_HOME>/teams.
uninstall_connector_service
Stop and remove exactly one context connector service.
uninstall_service
Stop and unregister the unit, and remove the rendered file.
write_unit
Write a rendered unit under <home>/service/.