toolspace › registry › Muninn bsky_limit
Muninn bsky_limit
Bluesky 300-grapheme length checker and truncator. len() lies on emoji and ZWJ sequences; this counts graphemes correctly and truncates at the last whitespace boundary.
Install
install-manifest install https://raw.githubusercontent.com/oaustegard/muninn-utilities/main/manifests/bsky-limit/muninn-bsky-limit.v0.4.json
manifest JSON · source · docs · issues · homepage
Security
| Kill switch | manual Manual procedure: — |
|---|---|
| Smoke contract | shell timeout 10s |
Scopes
-
compute.localreadPure string computation. The only non-pure surface is a one-time pip install of `grapheme` if absent at import time.
Actions
-
fits none idempotent
Return whether the given text fits the Bluesky 300-grapheme post limit. ·
compute.local- Goal
- Check whether text fits Bluesky's 300-grapheme cap.
- Inputs
text (req), limit (int, default 300)- Outputs
{fits: bool, length: int}- Errors
(none — pure compute)- Example
fits text='Hello 👋' limit=300
-
truncate none idempotent
Truncate text to fit the grapheme limit, walking back to the last whitespace boundary if possible. ·
compute.local- Goal
- Trim text to fit Bluesky's grapheme cap without breaking words.
- Inputs
text (req), limit (int, default 300), suffix (string, default '…')- Outputs
{text: string, length: int, truncated: bool}- Errors
(none — pure compute)- Example
truncate text='very long...' limit=50
Verify & cost
| Install fee | 0¢ |
|---|---|
| Monthly fee | 0¢ |
| Usage model | none |
Runtime
runtime: python-module · install method: preinstalled · entrypoint: python -m muninn_utils.bsky_limit
Two-function helper used by anything that posts to Bluesky. fits(text, limit=300) returns whether the text fits the AppView's grapheme cap; truncate(text, limit=300, suffix='…') walks back to the last whitespace under the cap and appends the suffix. Pure compute: no I/O, no environment, no state. Depends on the `grapheme` PyPI package, which the module pip-installs at import time if missing (the only side-effect surface). Manifested here as the shared-credential / shared-dependency reuse case for Bluesky utilities (bsky_card, blog_publish, whtwnd) and as the v0.3-spec stress-test of 'a tool whose only declarable scope is compute.local'.
Tags: blueskyatprotographemetext-utilitylength-check
License: MIT
Last fetched 2026-06-18T09:09:16Z (live)