Skip to content

feat: consume agentic-craft shadcn registry instead of hand-vendoring - #6

Merged
arielconti10 merged 2 commits into
mainfrom
feat/consume-agentic-craft-registry
Jun 12, 2026
Merged

arielconti10 merged 2 commits into
mainfrom
feat/consume-agentic-craft-registry

Conversation

@arielconti10

Copy link
Copy Markdown
Contributor

What

Replaces the hand-vendored fork copies of tool-call/tool-tree with CLI-managed installs from the canonical bitcomplete/agentic-craft shadcn registry, and adopts status-indicator.

  • components.json modeled on upstream's (base-nova, Tailwind v4 CSS entry, hugeicons, @/ aliases) with an @agentic-craft registry namespace pointing at the committed public/r JSON on raw GitHub
  • pnpm registry:sync re-pulls the three components with --overwrite — registry files are never edited by hand
  • Upstream's ToolCall evolved into a compound API (ToolCallTrigger/ToolCallError/ToolCallRetry, React.use): primitive re-exports updated; the MDX-facing <details> wrappers are unchanged
  • Registry primitives added to the manifest extractor's INTERNAL_NAMES (they're building blocks, not MDX-facing; in-file JSDoc would be wiped on sync)

Base UI note: the three consumed components depend only on hugeicons — Base UI enters agentic-craft via button/dialog/field deps that only interactive components pull in. The namespace setup brings @base-ui/react in automatically if a future install needs it.

Fixes found along the way

  • build: tsup clean: true deleted dist/styles.css right after build:css wrote it — every full build shipped without the stylesheet. Build now rm -rf's dist up front.
  • ToolTree: defaultOpen was declared but never applied to the <details>.
  • examples/plan.mdx: never compiled since the initial commit — a raw < in prose is a malformed JSX tag to MDX. (Follow-up idea: a test that compiles examples/*.mdx.)

Verification

  • typecheck + 14/14 tests + full build
  • IIFE smoke-tested in a bare node:vm context (no process, no Node APIs): compileMDX returns {html, css}, componentManifest intact (29 entries)
  • examples/plan.mdx rendered and inspected in headless chromium, light + dark
  • pin compatibility: copied the built bundle into a bitcomplete/pin checkout and ran its Go suite — internal/mdxrender, internal/library, internal/library/mdxcomponent all pass
  • Session doc rendered by this very package: https://pin.bitcomplete.dev/p/01KTWJC1YR9EZBHS4D0J97CX0Z

- components.json with @agentic-craft namespace (bitcomplete/agentic-craft
  public/r on raw GitHub); tool-call, tool-tree installed via the shadcn
  CLI, status-indicator newly adopted; pnpm registry:sync re-pulls upstream
- upstream ToolCall became a compound API (Trigger/Error/Retry, React.use):
  primitive re-exports updated, MDX-facing wrappers unchanged
- registry primitives added to the manifest extractor's INTERNAL_NAMES so
  registry files stay unedited (sync would wipe hand-added JSDoc)
- fix: tsup clean:true deleted dist/styles.css written by build:css —
  build now rm -rf's dist up front
- fix: ToolTree silently ignored defaultOpen
- fix: examples/plan.mdx never compiled (raw '<' parsed as JSX)
@arielconti10
arielconti10 force-pushed the feat/consume-agentic-craft-registry branch from 22d7c9f to ccad89a Compare June 12, 2026 00:11
The build-script allowlist (allowBuilds) has to live in pnpm-workspace.yaml:
pnpm 11 no longer reads the package.json "pnpm" field, but pnpm 9 treats
any pnpm-workspace.yaml without a packages field as an error. The lockfile
is already in 9.0 format written by pnpm 11, so CI and release move to 11.
@arielconti10
arielconti10 force-pushed the feat/consume-agentic-craft-registry branch from ccad89a to 8139c19 Compare June 12, 2026 00:14
@arielconti10
arielconti10 requested a review from terraboops June 12, 2026 00:15
Comment thread package.json
"build:manifest": "node scripts/extract-manifest.mjs",
"build:js": "tsup",
"build": "pnpm run build:manifest && pnpm run build:css && pnpm run build:js",
"registry:sync": "npx shadcn@latest add @agentic-craft/tool-call @agentic-craft/tool-tree @agentic-craft/status-indicator --overwrite --yes",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@arielconti10
arielconti10 merged commit 60bfb45 into main Jun 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants