feat(lookup): lookup_mst — Mibera Shadow Traits per-token enrichment (companion to URL_CONTRACT v1.2.0)#67
Draft
zkSoju wants to merge 3 commits into
Draft
Conversation
Composes URL_CONTRACT v1.2.0 (freeside-storage#6) sticker substrate paths
into a CLI/MCP lookup verb. Extends the bucket-1 pattern (`micodex lookup
<noun> <id>`) with a 6th noun: `mst`. Mirrors the lookup_grail / lookup_mibera
shape — agents call one verb, get the enriched envelope, never compose
URLs themselves.
Why MST is structurally different from canon Mibera:
- canon Mibera = 10K curated tokens, per-token JSONL, each with hash-keyed
image baked at mint phase
- MST = user-minted via trait strings hashed keccak256 on-chain (see
_codex/data/shadow-traits.md). 3219 known minted as of 2026-05-01. No
per-token curated record possible — each token is whatever the user
submitted. The codex publishes COLLECTION-level metadata + URL templates;
lookupMst(tokenId) composes URLs at call time.
What the lookup returns:
- collection: {contract, chain, standard, name, symbol} — on-chain identity
- metadata.sovereignUrl: metadata.0xhoneyjar.xyz/mibera/mst/{N}
(LIVE post-Cutover B 2026-05-01)
- stickers.urls[expr]: per-expression sticker URLs composed against
Mibera/MST/expressions/{version}/{tokenId}/{variant}/{expr}.webp paths
- stickers.substrateStatus: "pending" until M-1 (S3 bucket policy) +
M-2 (sticker generation pipeline) of mibera-family-sticker-substrate
cycle land. Until then sticker URLs return 403; manifest URL returns 403.
Files:
- _codex/data/mst-collection.json — collection metadata + sticker config
(one entry; per-token data composed at lookup time)
- src/lookups/mst.ts — lookupMst(tokenId) + getMstCollection() + reset
- src/types.ts — MstEntry + MstCollection + StickerCatalog (forward-compat
for Shadow/Tarot/Candies/GIF/Fractures sticker substrate). Extends
WorldElementType with "mst".
- src/validate.ts — validate_world_element handles "mst" via in-range
numeric tokenId heuristic (definitive existence requires on-chain
tokenURI call; this is for codex/MCP-side validation)
- src/server.ts — lookup_mst MCP tool with description naming substrate
status + sovereign metadata cycle reference
- bin/micodex.ts — CLI dispatch case "mst" + help text + accepts @mstn ref
- skills/query-entity/SKILL.md — teaches agents the new verb + bulk-access
reference + ref convention (@mst<tokenId>)
Smoke verified:
- micodex lookup mst 123 → enriched envelope with 7 sticker URLs
- micodex lookup mst @mst42 → ref form accepted (mirrors @g876 pattern)
- micodex lookup mst 99999 → exit 1 not_found (out of known supply range)
- pnpm build → tsc clean
Companion to URL_CONTRACT v1.2.0 (freeside-storage#6 — schema source).
Extends the codex-as-authority pattern crystallized in #60 (grail metadata):
distribution-layer concerns (file shape, JSON structure, MCP tool surface)
are operator's call; lore-layer concerns stay yours.
OPEN QUESTION (for @gumibera review): is the Shadow + MST distinction in
the substrate handoff (Mibera/Shadow/expressions/* + Mibera/MST/expressions/*)
referring to two distinct collections, or two paths for the same MST tokens?
Per shadow-traits.md, MST = "Mibera Shadow Traits" — narratively "Shadow",
technically "MST". This PR ships MST only; if Shadow is a separate codex
concept I should add lookup_shadow as a sibling, point me at the lore.
OPEN QUESTION (for @gumibera review): expressionsAvailable hardcoded to
the V0.6.x baseline (neutral · smile · angry · surprised · sad · sleepy ·
wink) per the consumer-side adapter shim. If MST has a sub-collection-
specific catalog (different expressions, additional ones, different default
variant), that's the lore call to make — flip _codex/data/mst-collection.json
to match.
Closes the codex-side leg of mibera-family-sticker-substrate-2026-05-02
substrate handoff; M-1 + M-2 + M-3 substrate-side work remains operator-
driven (handoff brief at bonfire/grimoires/bonfire/agenda/2026-05-02-mibera-
family-sticker-substrate-handoff.md).
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
per maintainer authority (file edits surfaced as intentional revert): SKILL.md teaching content is in gumi's lore-keeper domain, not operator's distribution domain. CLI dispatch + MCP tool surface + types stay; how agents are taught the new verb is the codex maintainer's call. the lookup_mst verb still works end-to-end (CLI smoke green) — agents discovering it via help text or MCP tool description will find it; the SKILL.md teaching update is left for whoever owns that surface to write. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
… v2/15 catalog Two open questions in PR #67 dug from the construct (lore-keeper sources) rather than punted to maintainer per operator framing. Q1 — Shadow vs MST → ALIAS (not distinct). Per `_codex/data/shadow-traits.md`: MST = "Mibera Shadow Traits" — the on-chain symbol IS "MST" but the narrative name IS "Shadow". URL_CONTRACT v1.2.0 registers BOTH path conventions for transitional consumer compat (`Mibera/Shadow/expressions/*` and `Mibera/MST/expressions/*`). Same tokens, same contract `0x048327A187b944ddac61c6e202BfccD20d17c008`, same on-chain mechanics. Operator framing 2026-05-02: "they should be the same thing unless concerned about a different nuance" — no nuance surfaced from the codex. Implementation: - `lookupShadow(tokenId)` — alias delegating to `lookupMst`. Returns identical data with `@shadow<N>` ref form (preserves input vocabulary in the response). `type` stays `"mst"` (technical truth). - CLI accepts `lookup shadow <id>` and `@shadow<N>` ref form on both verbs. WorldElementType extends with `"shadow"`. validate handles both via shared switch arm. - MCP `lookup_shadow` tool added with description naming the alias relationship + reference to canonical mechanics. Q2 — Expression catalog → CANON v2/15 (not V0.6.x baseline). Sourced from TWO authoritative substrates: 1. Live canon Mibera manifest at `https://assets.0xhoneyjar.xyz/Mibera/expressions/current.json` reports `version: "v2"`, `expressionCount: 15`, `variants: ["transparent", "bg"]`, `defaultVariant: "transparent"`. 2. Expression slugs extracted from `mibera-dimensions/lib/emoji/expression-presets.ts`'s `EXPRESSION_PRESETS` constant — 15 entries that match the live count exactly: neutral · angry · aww · sad · uneasy · yay · smirk · worried · shocked · devious · tearful · grumpy · bashful · fierce · bliss. The `V06X_EXPRESSIONS` hardcode in `@freeside-storage/stickers/adapter.ts` (7 entries) is an OUT-OF-DATE baseline used only by the synthesizer shim for tokens missing per-token manifests. The actual catalog is v2/15. `mst-collection.json` updated: - version: "v1" → "v2" - expressionsAvailable: V0.6.x 7 → canonical 15 - variants: ["transparent"] → ["transparent", "bg"] - defaultVariant unchanged - substrateNotes documents the canon mirror + alias rationale - new shadowAliasManifestUrl field exposes the Shadow path next to MST Smoke verified: - micodex lookup mst 123 → 15 expressions, v2 paths, MST manifest - micodex lookup shadow 42 → same data, @shadow42 ref form - pnpm build → tsc clean - live canon URL probe → 200 / matches expressionCount=15 - live MST + Shadow URL probe → 403 (expected, M-1+M-2 substrate pending) Closes both open questions in PR #67. No blocking on @gumibera anymore; post-merge work is purely substrate-side (M-1 bucket policy + M-2 gen pipeline, both operator-driven). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gm @gumibera 👋 — distribution-side draft for MST sticker substrate integration. Closes the lore-keeper / distribution-operator split: my job is the lookup verb shape + URL composition + MCP tool surface; lore stayed yours (and got it right by reading the construct).
Composes with freeside-storage#6 (URL_CONTRACT v1.2.0). Extends the codex-as-authority pattern from #60.
what this ships
returns:
collection_codex/data/mst-collection.jsonmetadata.sovereignUrlmetadata.0xhoneyjar.xyz/mibera/mst/{N}stickers.urls[expr]stickers.substrateStatus"pending"until M-1+M-2 land"live"post-substrate (1-line diff)cross-transport parity preserved: same verb works on CLI · MCP stdio · MCP HTTP. agents calling this get everything they need to render or refer to a token without composing strings themselves.
✅ both open questions answered from the construct itself
Q1 — Shadow vs MST: ALIAS (per
_codex/data/shadow-traits.md)MST = "Mibera Shadow Traits" (on-chain symbol = MST, narrative name = Shadow). Same tokens, same contract
0x048327A187b944ddac61c6e202BfccD20d17c008. URL_CONTRACT v1.2.0 registers BOTH path conventions for transitional consumer compat.→ Implemented
lookupShadow(tokenId)as alias delegating tolookupMst. Returns identical envelope with@shadow<N>ref form (preserves input vocabulary).typestays"mst"(technical truth). Both refs accepted on both verbs.Q2 — Expression catalog: CANONICAL v2 / 15 expressions (sourced from live + dimensions)
Live canon Mibera manifest at
assets.0xhoneyjar.xyz/Mibera/expressions/current.jsonreportsversion: "v2",expressionCount: 15,variants: ["transparent", "bg"],defaultVariant: "transparent". Slugs extracted frommibera-dimensions/lib/emoji/expression-presets.tsEXPRESSION_PRESETSconstant — 15 entries matching the live count exactly:The
V06X_EXPRESSIONShardcode in@freeside-storage/stickers/adapter.ts(7 entries) is OUT OF DATE — used only as synthesizer shim baseline for tokens missing per-token manifests.→
mst-collection.jsonupdated:version→v2,expressionsAvailable→ canonical 15,variants→["transparent", "bg"],defaultVariantunchanged. Substrate notes document the canon mirror.why MST is structurally different from canon Mibera
per
_codex/data/shadow-traits.md: MST is dynamically minted via user-submitted trait strings hashedkeccak256on-chain (3219 known minted as of 2026-05-01). there's no per-token curated record possible — each token is whatever the user submitted. so the codex publishes COLLECTION-level metadata + URL templates;lookupMst(tokenId)composes URLs at call time.contrast: canon Mibera has 10K curated tokens with per-token JSONL (
miberas.jsonl). MST has 1 collection record + a URL composer.files touched (3 commits on branch)
_codex/data/mst-collection.jsonsrc/lookups/mst.tslookupMst(tokenId)·lookupShadow(tokenId)(alias) ·getMstCollection()·resetMstCache()src/types.tsMstEntry·MstCollection·StickerCatalog(forward-compat for Tarot/Candies/GIF/Fractures sticker substrate) ·WorldElementTypeextends with"mst"+"shadow"src/validate.tsvalidate_world_elementshared switch arm formst+shadow(in-range numeric heuristic)src/server.tslookup_mstMCP tool +lookup_shadowalias tool (description names alias rationale + 15-expression catalog)bin/micodex.tsmst+shadow· help text updates · accepts@mst<N>and@shadow<N>refs on both verbswhat's deliberately NOT in this PR
skills/query-entity/SKILL.mdupdates — initial commit addedmicodex lookup mstto patterns + new MST section. Reverted on push (commit0fa5053ce) per maintainer-authority signal. SKILL.md teaching content is yours; agents will discover the verbs viamicodex lookup --help+ MCP tool descriptions without it.smoke verified
what's NOT in this PR (operator-side, post-merge)
Mibera/MST/*+Mibera/Shadow/*— admin AWS profile (operator)substrate going live = flip
mst-collection.jsonstickers.substrateStatusfrom"pending"→"live"+ removesubstrateNotes. one-line diff post-substrate.related
bonfire/grimoires/bonfire/agenda/2026-05-02-mibera-family-sticker-substrate-handoff.mdlookup_mst+lookup_shadowjoin the verb roster🤖 Generated with Claude Code