Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

655 B
Raw Blame
import * as kafka from "@distilled.cloud/aws/kafka";
import * as Layer from "effect/Layer";
import { makeKafkaClusterHttpBinding } from "./BindingHttp.ts";
import { CreateTopic } from "./CreateTopic.ts";

export const CreateTopicHttp = Layer.effect(
  CreateTopic,
  makeKafkaClusterHttpBinding({
    tag: "AWS.Kafka.CreateTopic",
    operation: kafka.createTopic,
    // The control-plane action authorizes against the topic ARN; the
    // kafka-cluster analogs cover the underlying Kafka admin operation.
    actions: [
      "kafka:CreateTopic",
      "kafka-cluster:Connect",
      "kafka-cluster:CreateTopic",
    ],
    topicScoped: true,
  }),
);