Files
orca/cloud/apps/connector/src/slack-operator-cli.ts
T
Jinwoo Hong aec426c2fa feat(connector): Discord adapter on the shared connector core (#34100)
Adds Discord as a second connector adapter on the shared core: signed interactions for answer buttons, one gateway worker (same image, single leader by database lock, commits on the lock's connection, checkpoints for resume), thread posts through the shared post queue, owner-only control, and teammate context only from linked accounts. Inert until the Discord settings are configured. A narrow gitleaks allowlist entry covers connector Discord env var names in config errors.
2026-10-26 19:01:05 -04:00

16 lines
630 B
TypeScript

import { text } from 'node:stream/consumers'
import { runOperatorCli } from './operator-cli.js'
import { decodeSlackTokenKey } from './slack-config.js'
import { runSlackOperator } from './slack-operator.js'
// pnpm --filter @orca-cloud/connector slack-operator <command>, with the service's database env.
const tokenKey = process.env.ORCA_CONNECTOR_SLACK_TOKEN_KEY
await runOperatorCli('orca-connector-slack-operator', (database) =>
runSlackOperator(process.argv.slice(2), {
database,
...(tokenKey ? { tokenKey: decodeSlackTokenKey(tokenKey) } : {}),
readSecret: () => text(process.stdin),
now: Date.now
})
)