t1k:registry
| Field | Value |
|---|---|
| Module | t1k-registry |
| Version | 1.16.31 |
| Effort | low |
| Tools | Bash, Glob, Grep, Read |
Keywords: cpm publish, publish package, register repo for publishing, registry auth, registry token, repositories.json, studio registry, upm publish, UPMAutoPublisher
How to invoke
Section titled “How to invoke”/t1k:registry[auth | publish | register]Studio Package Registry
Section titled “Studio Package Registry”The t1k-registry module is the one place for registry auth, publishing and repo onboarding. It is required
(every T1K user gets it) and thin on purpose: this skill is the only always-listed cost. The charter, the
file-ownership table and the contract (C1 to C6) live in docs/registry-module.md in the kit repo.
Publish a package: start here
Section titled “Publish a package: start here”Run the preflight first. It reads only, names the fix for each failed check, and never prints a token:
bun .claude/skills/t1k-registry/scripts/registry-publish-preflight.cjs <package-dir> # add --json for machines| You are publishing | Do |
|---|---|
A Unity package (com.theone.*, com.orion.*) | Preflight, then publish-flow.md (references/publish-flow.md): CI via UPMAutoPublisher, or by hand with a token |
A Cocos package (@playablelabs/*, @orion/*) | Publishing goes through cpm-publish.yml, never by hand. Run the preflight to catch the walls first |
An internal tool (@the1studio/*) | Preflight, then publish by hand |
| Anything else | It is admin-only: rename it under a studio scope |
| A tarball at 64 MiB or more (too big for the normal publish) | large-publish.md (references/large-publish.md): registry-publish-large.cjs. Cocos packages in CI still go through cpm-publish.yml |
Never unpublish; deprecate instead. Hosts, scopes and limits are in registry-facts.json (references/registry-facts.json), the single source: read them there, do not retype them.
References
Section titled “References”- publish-flow.md (
references/publish-flow.md): the flow by package type, versions, never unpublish - auth-paths.md (
references/auth-paths.md): create, list and revoke a token, the engine, which file the client reads, machine tokens - errors.md (
references/errors.md): 401, 403 (scope wall and Cloudflare challenge), 413, 502, E401, ENOSPC - size-limits.md (
references/size-limits.md): the tarball ceiling and how to get under it - large-publish.md (
references/large-publish.md): publish a tarball above the normal ceiling in parts, exit codes, limits - register-repo.md (
references/register-repo.md): validate and register a repo for auto-publish (UPM, CPM), the dispatcher choice - self-hosted-publish.md (
references/self-hosted-publish.md): CI publish of UPM packages on the self-hosted runners: the signed release workflow, the DNS failure and its fix, verifying a publish - ci-oidc.md (
references/ci-oidc.md): publish from CI with a GitHub OIDC token instead of a stored one: readiness check, templates, rules, rollback
Your registry token, no browser
Section titled “Your registry token, no browser”With the NetBird VPN connected (/t1k:vpn), the engine (owned by t1k-base) creates, lists and revokes tokens through the registry API and stores the token itself; it never prints one:
bun .claude/scripts/registry-auth-sync.cjs --create # readonly, 365 days, every enabled registry (add --registry <id>)bun .claude/scripts/registry-auth-sync.cjs --create --write # a publish token, 30 daysbun .claude/scripts/registry-auth-sync.cjs --list # keys, never secretsbun .claude/scripts/registry-auth-sync.cjs --revoke <key> --registry <id>A token cannot mint a token: the mint carries no Authorization header, so it is the VPN that identifies you. Do not use the /-/web/tokens page: its tokens are not recognised yet (package-registry#130). Details, files and limits: auth-paths.md (references/auth-paths.md). --check --json reports one outcome per registry; the old studio mint route is retired (registryAuth.studioTokenRoute: retired). Config: docs/registry-auto-auth.md. No other file writes a token or keeps a host allow-list.
Executed by
Section titled “Executed by”Running the preflight and reporting its per-check status is mechanical: one script call, then quote each line it printed, including the fix: line. Deciding whether a warn is acceptable, which flow a package type takes, and whether to publish at all stays reasoning-tier — the script checks the walls, it does not know your release intent. Routing SSOT: docs/orchestration-rules.md § “Task-Type → Agent Routing”.
| Step | Agent |
|---|---|
Run scripts/registry-publish-preflight.cjs <package-dir> [--json] and report every check’s status and fix: line verbatim | t1k-tester |
Run scripts/registry-register.cjs validate <repo> [--json] or status and report every check and fix: line verbatim | t1k-tester |
Run scripts/registry-publish-large.cjs <package> --dry-run --json and report the plan or the refusal and its fix verbatim | t1k-tester |
Run scripts/registry-oidc-readiness.cjs <owner/repo> --tenant <t> --json and report every check, its owner and fix verbatim | t1k-tester |
| Run the real large upload, decide whether a package should use it | main session (not cheap) |
Decide to move a repo from a stored token to OIDC (register --ci oidc, the snippet), read the PR it opens | main session (not cheap) |
Pick the publish flow for the package type, decide whether a warn blocks the release, run the publish | main session (not cheap) |
Decide to register a repo (tenant, --via, --trigger, --publish-mode), read the PR it opens | main session (not cheap) |
Create, list or revoke a registry token (--create, --list, --revoke): writes a credential file | main session (not cheap); the t1k-base engine owns the file writes, never this skill |
Scripts
Section titled “Scripts”| Script | Does | Exit codes |
|---|---|---|
registry-publish-preflight.cjs <package-dir> [--json] | the local gate before the first publish: scope wall, size, host, token, version | 0 ready, 1 not ready (named reason per check), 2 usage |
registry-publish-large.cjs <package-dir|tarball.tgz> [--registry <url>] [--dry-run] [--json] | publish a tarball at or above 64 MiB in parts, ending with the normal registry entry; see large-publish.md (references/large-publish.md) | 0 published, 1 refused (reason and fix), 2 usage, 3 remote error |
registry-oidc-readiness.cjs <owner/repo> --tenant upm|cpm|utils [--context <ctx>] [--json] | read-only check that a repo can publish from CI with an OIDC token; each failed prerequisite names its owner and fix; see ci-oidc.md (references/ci-oidc.md) | 0 ready, 1 not ready (owner and fix per check), 2 usage, 3 remote error |
registry-register.cjs validate|register|status|list <repo> [--tenant upm|cpm] [--ci static|oidc] [--json] | validate a repo, then register it for auto-publish by PR (never a push to a default branch); see register-repo.md (references/register-repo.md) | 0 ok, 1 validation failed, 2 usage, 3 remote error |
Print a token, a studio assertion or an Authorization header. Hand-edit the token lines of ~/.upmconfig.toml or ~/.npmrc that the engine owns. Send an Authorization header on the create call. Write a second token writer.
Testing this module
Section titled “Testing this module”Any test that spawns the engine, the hook or the CLI goes through .claude/skills/t1k-registry/tests/helpers/sandbox-home.cjs. Setting HOME alone is not isolation: gh auth token reads the OS keyring and ignores GH_CONFIG_DIR, so a “sandboxed” engine still minted real tokens until a gh shim was put first on PATH (2026-10-23). The helper sets HOME, USERPROFILE and the XDG and gh variables together, runs children under bun, probes where os.homedir() actually points, and installs that shim. Why each part is needed, and what to do when a child reads a keyring: skills/t1k-test/SKILL.md § “A sandbox HOME is not isolation when the child reads a keyring” and docs/registry-module.md § “Test sandbox: HOME is not enough”.