Skip to content

Move Hypershell to cgp 0.8.0 namespaces for the 0.2.0 release - #5

Merged
soareschen merged 37 commits into
mainfrom
v0.8.0
Nov 17, 2026
Merged

soareschen merged 37 commits into
mainfrom
v0.8.0

Conversation

@soareschen

@soareschen soareschen commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Overview

[claude-opus-5-5] Hypershell builds on cgp 0.8.0 from crates.io and is ready to publish as 0.2.0. The language is now assembled from HypershellNamespace, in place of the cgp_preset! presets that cgp 0.8.0 removed, and a context joins it with one namespace HypershellNamespace; line. Stages dispatch on their input type through path keys, in place of UseInputDelegate.

The repository README and a README for each published crate present the project to a first-time reader and install it from crates.io.

Impact

  • Breaking for 0.1.0 users: the crates require cgp 0.8.0, a custom context joins HypershellNamespace instead of a preset, and hypershell::prelude exports the handler traits and keys that cgp::prelude no longer carries.
  • Fixed behavior: the branch fixes these defects:
    • A streaming HTTP request with a byte-buffer body is sent buffered, so it follows redirects.
    • ConvertTo is wired as Promote<PromoteAsync<HandleConvert>>, since HandleConvert is a synchronous Computer.
    • PutMethod and DeleteMethod are routed.
    • A streamed command that exits with a failure ends its output with an io::Error carrying a ChildExitError, with the exit code and stderr.
    • A failed WebSocket connection is raised as an error instead of a panic.
  • Toolchain: the workspace pins nightly-2026-11-16 with -Z next-solver=globally, but the library and small programs build on stable Rust, as a crate outside the workspace running hello showed. Only the two compare examples need the new solver to type-check in reasonable memory.
  • A direct cgp dependency: a program's crate depends on cgp itself, because the hypershell! expansion names it.
  • Pre-release versions: the manifests carry 0.2.0-prerelease and require cgp 0.8.0-prerelease, so the publish can be rehearsed first. The release drops both suffixes, and the git patch of cgp is gone.
  • Package contents: hypershell-examples is publish = false, and each of the eight published crates links the workspace LICENSE and carries a README that is also its crate documentation. CI builds and tests the workspace.

Areas needing attention

  • ChildOutputStream decides which error a reader sees. In crates/hypershell-tokio-components/src/types/child_output.rs it waits for the child once its stdout ends, drains stderr in the background, and aborts an unfinished stdin feed once the child exits, and that ordering picks the error.
  • The hypershell doc test runs echo, so it needs that command wherever cargo test runs.

soareschen and others added 30 commits June 27, 2026 13:48
…ethod routes

- Key `StreamingHttpRequest` per input in the reqwest bundle, so a
  `Vec<u8>` or `String` body is sent buffered and follows redirects.
- Wire `ConvertTo` as `Promote<PromoteAsync<HandleConvert>>`, since
  `HandleConvert` is a synchronous `Computer`.
- Route `PutMethod` and `DeleteMethod` in the bundle and the namespace.
- Rewrite five example header comments that described the removed
  preset system.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ction

`StreamingExec` now returns a `ChildOutputStream` that, when the child's
stdout ends, waits for the child and ends with an `io::Error` for a
non-success exit (a `ChildExitError` carrying the code and stderr) or for
a failure reading its input. It drains stderr in the background, records
an input error before closing the child's stdin, and aborts an unfinished
stdin feed once the child exits.

`HandleWebsocket` raises the `tungstenite::Error` from a failed connection
instead of unwrapping it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Override `cgp` and `cgp-error-anyhow` with the `cgp` repository's `main`
branch instead of a local `../cgp` checkout, so the workspace builds
from a fresh clone, and lock it at the commit carrying the fixed error
backends. The local-path entries stay commented out for testing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The install snippet pinned `cgp` 0.4.1 and the crate list advertised the
default presets that 0.8.0 removed, so both were wrong for this branch.
The snippet now pins 0.8.0 and `reqwest` 0.12, the crate list names the
default namespace, and the example list covers all twelve programs.
All nine crates shared one description and named no categories or
homepage. Each crate now describes what it provides, and the workspace
names the project page and the categories the DSL fits.
The four components in `hypershell-components` now carry a doc comment, so a
reader of the crate docs sees what each type and extractor is for.
Every component, provider, and provider struct in the crates now carries a
doc comment saying what it is for, so the crate docs explain the language's
pieces instead of listing them bare. Each line distils the knowledge base's
reference entry for the same item, and links the website page that explains
the construct where one exists.

The tables and namespaces that `delegate_components!` and `cgp_namespace!`
declare take their doc from the macro instead: rustdoc ignores a doc comment
on a macro invocation, and warnings are denied here.
The channel was the floating `nightly`, so a toolchain update could change how
the next-generation trait solver behaves without a commit. The pin names the
2026-11-07 nightly, which builds the workspace, builds the docs with warnings
denied, and passes the suite.
The repository had no workflow, so its build and test ran only on a
contributor's machine. Two jobs now run the README's new Building commands
on the pinned `nightly-2026-11-07`, which `.cargo/config.toml` needs for
`-Z next-solver=globally`.

The README listed no test command, so the suite was undocumented even
though it ran; the Building section now lists both commands.
`cgp::prelude` no longer exports `cgp_handler`'s traits and component
keys, and Hypershell's programs are pipelines of handlers, so
`hypershell::prelude` exports them itself. The internal crates, which
import `cgp::prelude` directly, import the names they use from
`cgp::extra::handler`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`cgp::prelude` no longer re-exports `Cons`, `Nil`, `Field`, and the
other type-level and field-access names, so the modules that write them
import them from `cgp::core::field`. Modules left with no use of the
glob drop it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The file gives agents the rules every CGP repository shares, sends them
to the `/cgp` skill and the knowledge base to learn CGP, points to the
knowledge base's section on this project before a change to what it
describes, and names the build and test commands CI runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The README's Building section now sends contributors and agents to
AGENTS.md, as the other CGP repositories' READMEs do, and AGENTS.md
names the knowledge base's record of the website section that explains
this project, which a change to the code it shows must update.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
soareschen and others added 7 commits November 15, 2026 14:49
The universal writing rule now asks for natural writing in documents
people outside the project read, such as a repository or crate README,
beside point-first writing for internal prose.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The writing rules name the `/point-first-writing` skill, which no CGP
repository publishes, so an outside contributor's agent cannot load it.
The rules keep the two styles and ask for the skill only when it is
available.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The workspace moves to the nightly that cargo-cgp pins. The build and
the test suite pass on it unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The workspace takes `cgp` and `cgp-error-anyhow` 0.8.0-prerelease from
crates.io instead of patching them to the `cgp` repository's `main`
branch, so the tests build against what a published package resolves.

`hypershell-examples` sets `publish = false`, so publishing the
workspace releases only the eight library crates. Each of them links
the workspace `LICENSE`, since cargo does not copy a root file into a
member's package, and the keywords name the project's subject.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The README names Context-Generic Programming beside what Hypershell is,
keeps the experimental disclaimer up front, and shows the `hello`
program and the one-line context that runs it before the details. It
installs the crates from crates.io with `cgp` beside them, since the
macro's expansion names it, and says which toolchain a program needs:
the library and small programs build on stable Rust, while programs
that nest others deeply can need nightly with the new trait solver.

The crates.io badge now links its page, the example list gains
`save_webpage`, the costs follow the website's project page, and the
License section is gone, since the badge and `LICENSE` carry it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each of the eight crates says what it holds and where it fits in the
language, links the `hypershell` crate, the website, and the
repository, and becomes its crate documentation through
`#![doc = include_str!("../README.md")]`, so docs.rs and crates.io show
the same page. The `hypershell` README carries the `hello` program,
which `cargo test` runs as a doc test with Tokio as a dev-dependency,
and says which toolchain a program needs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The crate READMEs wrap at 100 columns without splitting a link or code
span, and the hash crate's opening no longer reads as though CGP
provides its syntax.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@soareschen
soareschen marked this pull request as ready for review November 17, 2026 19:39
@soareschen
soareschen merged commit f794092 into main Nov 17, 2026
4 checks passed
@soareschen
soareschen deleted the v0.8.0 branch November 17, 2026 19:40
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.

1 participant