feat: add tlon channel plugin

This commit is contained in:
Peter Steinberger
2026-01-24 00:17:58 +00:00
parent d46642319b
commit 791b568f78
38 changed files with 2431 additions and 3027 deletions

View File

@@ -1,14 +1,29 @@
import { listChannelPluginCatalogEntries } from "../channels/plugins/catalog.js";
import { CHAT_CHANNEL_ORDER } from "../channels/registry.js";
import { listChannelPlugins } from "../channels/plugins/index.js";
import { isTruthyEnvValue } from "../infra/env.js";
import { ensurePluginRegistryLoaded } from "./plugin-registry.js";
function dedupe(values: string[]): string[] {
const seen = new Set<string>();
const resolved: string[] = [];
for (const value of values) {
if (!value || seen.has(value)) continue;
seen.add(value);
resolved.push(value);
}
return resolved;
}
export function resolveCliChannelOptions(): string[] {
const catalog = listChannelPluginCatalogEntries().map((entry) => entry.id);
const base = dedupe([...CHAT_CHANNEL_ORDER, ...catalog]);
if (isTruthyEnvValue(process.env.CLAWDBOT_EAGER_CHANNEL_OPTIONS)) {
ensurePluginRegistryLoaded();
return listChannelPlugins().map((plugin) => plugin.id);
const pluginIds = listChannelPlugins().map((plugin) => plugin.id);
return dedupe([...base, ...pluginIds]);
}
return [...CHAT_CHANNEL_ORDER];
return base;
}
export function formatCliChannelOptions(extra: string[] = []): string {