feat: the npm path works — behold demo, no-project honesty, /api index, shipped agent contract - #194
Merged
Merged
Conversation
…x, shipped agent contract (#193) A fresh `npm install @intentius/behold` used to dead-end: preview in a non-chant dir served a blank graph, the README's quickstart was contributor-only, nothing runnable shipped, and the agent contract (AGENTS.md) was neither in the tarball nor discoverable. - /api/graph 404s with structured {code: "no-project"} when the base entity graph is empty and the dir has no chant.config.ts — the SPA's precondition card + a CLI startup warning say so in both surfaces. A legitimately empty chant project keeps its 200. - behold demo: copy the bundled example-writes (now shipped) into ./behold-demo, install, serve --local --env prod. The copy filter tests paths relative to the bundled root — inside an npm install the example itself lives under node_modules, so a bare match copied nothing. - GET /api: a route index (method/path/desc, version, agents-guide link). behold --version prints the package version. - AGENTS.md: shipped via files[], response shape corrected to {ir, svg, meta}, /api discovery + fuller routes; docs gain "Driving it from an agent" and an npx variant of the agent prompt; README gains a real npm quickstart. Verified from the packed tarball in a fresh directory: --version, /api index, the no-project 404 + warning, and the full demo — copy, install, emulator boot, 2-node graph on env prod. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Closes #193.
A fresh
npm install @intentius/beholddead-ended: blank graph on non-projects, contributor-only README, nothing runnable in the tarball, invisible agent contract. This PR makes the npm path first-class.New-user path
behold demo— copies the bundledexample-writes(now shipped infiles) into./behold-demo, installs its deps, and serves it with--local --env prod. The copy is the user's to edit. Idempotent — rerunning reuses the copy. The copy filter tests paths relative to the bundled root: inside an npm install the example itself lives undernode_modules/, so a naive substring match copied nothing (caught by verifying against the packed tarball, not the checkout)./api/graph404s with structured{code: "no-project", error, remedy}when the base entity graph is empty and there's nochant.config.ts; the SPA shows its precondition card and the CLI warns at startup. A legitimately empty chant project keeps its 200 (the stack-lens fixtures pin this).npx @intentius/behold demo/preview); the checkout commands are labeled as such.behold --version.Agent path
GET /api— a route index: method/path/one-line desc for every route, server version, agents-guide link. No more reading source to discover the surface.{ir, svg, meta}, not{ir, layout, meta}), documents/apidiscovery, the fuller route set, and the structuredno-projectcode.npx @intentius/behold demovariant beside the clone-based agent prompt on the front page and run-it.Verified
587 tests (3 new: no-project 404 + lens exemption,
/apiindex), tsc, build. End-to-end from the packed tarball in a fresh directory:--version→ 0.2.3;/apiindex served; preview in an empty dir → CLI warning + structured 404;behold demo→ copy, install, emulator boot, 2-node graph on env prod over HTTP.🤖 Generated with Claude Code