mirror of
https://github.com/stablyai/orca.git
synced 2026-11-03 02:27:43 +00:00
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.
16 lines
630 B
TypeScript
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
|
|
})
|
|
)
|