naming

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package naming contains shared naming helpers used by loom-mcp code generators.

The functions in this package centralize identifier sanitization and related naming conventions so generated code remains consistent across generators.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HumanizeTitle

func HumanizeTitle(s string) string

HumanizeTitle converts a slug-like name (snake_case, kebab-case, dotted) into a conservative Title Case string.

func Identifier

func Identifier(parts ...string) string

Identifier builds a stable dotted identifier by sanitizing parts and joining them with '.'.

func QueueName

func QueueName(parts ...string) string

QueueName builds a deterministic queue identifier for workflows/activities by sanitizing its parts and joining them with underscores.

func SanitizeToken

func SanitizeToken(name, fallback string) string

SanitizeToken converts an arbitrary string into a filesystem-safe token. It is used to derive deterministic directory/package fragments from user input (agent names, toolset names, etc).

The returned token:

  • is lower snake_case
  • contains only [a-z0-9_]
  • never starts/ends with '_' and never contains repeated "__"

When the sanitized result is empty, SanitizeToken returns fallback.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL