answer (hooks/command.ts)

ruflo · plugins/ruflo-chatgpt-federation/hooks/command.ts · typescript · MIT
chat

Module exposing: answer

// Source: https://github.com/ruvnet/ruflo | License: MIT | Copyright 2024-2026 ruvnet
// Provided via justclaw.it.com; keep this notice with the code.
import { PUBLIC_CHANNEL } from './guard'
import type { ModOptions } from './options'
import { secretsIn } from './screen'
import type { Stats } from './status'

export type CommandDeps = { readonly opts: ModOptions; readonly stats: Stats }

const HELP = ['/chatgpt-mod status', '/chatgpt-mod scan <text>', '/chatgpt-mod channel <id>'].join('\n')

/** `/chatgpt-mod` is answered locally and takes no model turn. Read-only: runs the guard's checks on what you give it. */
export function answer(args: string, { opts, stats }: CommandDeps): string {
  const [verb = '', ...rest] = args.trim().split(/\s+/)
  const arg = rest.join(' ')
  if (verb === '

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key