import { slack } from "skyline-ts/providers/slack";
Use slack.config(...) to register one or more Slack workspaces.

Use project credentials (default)

Save the workspace bot token (and Socket Mode app token for inbound) once in the dashboard Platforms tab. Your agent only needs project credentials — Skyline mints short-lived JWTs and talks to the hosted Slack gateway. Bot tokens never reach the agent process.
import { Skyline, slack } from "skyline-ts";

const app = await Skyline({
  projectId: process.env.SKYLINE_PROJECT_ID!,
  projectSecret: process.env.SKYLINE_PROJECT_SECRET!,
  providers: [slack.config()],
});

Pass your own credentials

Put tokens in config (or env) when you manage Slack secrets yourself:
slack.config({
  tokens: {
    TEAM_ID: process.env.SLACK_BOT_TOKEN!, // or a gateway runtime JWT
  },
  teams: {
    TEAM_ID: {
      appId: "A0123456789",
      botUserId: "U0123456789",
      grantedScopes: ["chat:write", "channels:history"],
      teamName: "Acme",
    },
  },
  endpoint: process.env.SKYLINE_SLACK_ENDPOINT, // optional hosted gateway host:port
});
OptionDescription
tokensMap of team id → bot token (xoxb-…) or gateway runtime JWT.
teamsOptional metadata per team.
endpointOptional Slack gateway gRPC host (host:port). Defaults to SKYLINE_SLACK_ENDPOINT.
appTokensOptional Socket Mode app tokens (xapp-…) when using bot tokens directly.
For the usual hosted path, prefer empty slack.config() with projectId / projectSecret.

Addressing channels

const channel = app.channel({
  to: "C01234567",
  platform: "slack",
  teamId: "TEAM_ID",
});
await channel.send("Hello from Skyline");
Pass teamId when multiple workspaces are configured. Use channel.reply(messageTs, "…") to thread.