Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/release-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,18 @@ jobs:
if: runner.os != 'Windows'
run: |
mkdir -p dist
cp target/${{ matrix.target }}/release/cargo-agents dist/
cp target/${{ matrix.target }}/release/cargo-agents target/${{ matrix.target }}/release/symposium dist/
cd dist
tar -czvf cargo-agents-${{ matrix.target }}.tar.gz cargo-agents
tar -czvf cargo-agents-${{ matrix.target }}.tar.gz cargo-agents symposium

- name: Package (Windows)
if: runner.os == 'Windows'
run: |
mkdir dist
copy target\${{ matrix.target }}\release\cargo-agents.exe dist\
copy target\${{ matrix.target }}\release\symposium.exe dist\
cd dist
7z a cargo-agents-${{ matrix.target }}.zip cargo-agents.exe
7z a cargo-agents-${{ matrix.target }}.zip cargo-agents.exe symposium.exe

- name: Upload to release
if: github.event_name == 'release'
Expand Down
7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,14 @@ path = "src/lib.rs"
name = "cargo-agents"
path = "src/bin/cargo-agents.rs"

# Same program under a standalone name; see `src/entry.rs`.
[[bin]]
name = "symposium"
path = "src/bin/symposium.rs"

[package.metadata.binstall]
pkg-url = "{ repo }/releases/download/{ name }-v{ version }/cargo-agents-{ target }.tar.gz"
bin-dir = "cargo-agents{ binary-ext }"
bin-dir = "{ bin }{ binary-ext }"
pkg-fmt = "tgz"
[package.metadata.binstall.overrides.x86_64-pc-windows-msvc]
pkg-url = "{ repo }/releases/download/{ name }-v{ version }/cargo-agents-{ target }.zip"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Install with [`cargo binstall`](https://github.com/cargo-bins/cargo-binstall) (p
cargo binstall symposium # or: cargo install symposium
```

Both provide the `cargo-agents` binary, invoked as `cargo agents`.
Both install two identical executables: `cargo-agents`, invoked as `cargo agents`, and `symposium`, for use outside of Cargo. Every command below also works as `symposium <command>`.

## Quick start

Expand Down
4 changes: 2 additions & 2 deletions md/design/important-flows.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The key code paths are in `discovery.rs`, `config.rs` (`PluginsConfig`, `UseEntr
3. For `<built-in> --help`, `help_text` re-renders clap's per-command help by walking clap's command tree to the named subcommand — so required-arg commands (`crate-info`), required-subcommand groups (`plugin`), and nested commands (`plugin list`) all work even though clap's auto help flag is disabled.
4. A plugin-vended `<name> --help` is left alone: `help_text` returns `None`, and dispatch forwards `--help` to the child binary, which owns its own help.

clap's auto help flag and help subcommand are disabled in `cli::Cli`; `--help`/`-h` is a manual `global` bool. The key code paths are in `help_render.rs` (`help_text`, `render`, `subcommand_help`), `cli.rs` (`builtin_audience`, the `Cli` flags), and `bin/cargo-agents.rs` plus `symposium-testlib` (the parse-then-`help_text` wiring).
clap's auto help flag and help subcommand are disabled in `cli::Cli`; `--help`/`-h` is a manual `global` bool. The key code paths are in `help_render.rs` (`help_text`, `render`, `subcommand_help`), `cli.rs` (`builtin_audience`, the `Cli` flags), and `entry.rs` plus `symposium-testlib` (the parse-then-`help_text` wiring).

## Subcommand dispatch

Expand All @@ -49,4 +49,4 @@ When the user runs `cargo agents <name>` for a name not built into the binary, c
3. The matched subcommand's `command` field names an `Installation` on the same plugin. `installation::resolve_runnable` acquires the source if any, runs `install_commands`, and picks the `Runnable` (`Exec` for binaries, `Script` for shell scripts).
4. The child is spawned with stdio inherited. Its exit code is collapsed to a `u8` — the binary wraps it in `ExitCode::from`; the library treats non-zero as an error so the test harness can assert on success/failure.

The key code paths are in `subcommand_dispatch.rs`, `cli.rs` (the `External` arm), and `bin/cargo-agents.rs` (binary-side wrapping that surfaces the numeric exit code to the OS).
The key code paths are in `subcommand_dispatch.rs`, `cli.rs` (the `External` arm), and `entry.rs` (binary-side wrapping that surfaces the numeric exit code to the OS).
2 changes: 1 addition & 1 deletion md/design/module-structure.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Key modules

Symposium is a Rust crate with both a library (`src/lib.rs`) and a binary (`src/bin/cargo-agents.rs`). The library re-exports all modules so that integration tests can access internals.
Symposium is a Rust crate with a library (`src/lib.rs`) and two binaries, `cargo-agents` and `symposium`. Both are one-line shims in `src/bin/` that call `entry::main`; the shared `main` body lives in `src/entry.rs`. `cli::Invocation` records which name the process was started under (by the file stem of `argv[0]`) so help and error output name the right program; `cli::command()` builds the clap `Command` with that name and should be used wherever help is rendered. The two are functionally identical today; `Invocation` is the seam for giving `cargo agents` different defaults later. The library re-exports all modules so that integration tests can access internals.

### `config.rs` — application context

Expand Down
Loading