Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Describe the user-visible problem and the solution.
- [ ] `cargo fmt --all -- --check`
- [ ] `cargo clippy --locked --workspace --all-targets -- -D warnings`
- [ ] `cargo test --locked --workspace`
- [ ] Relevant DLR or Harbor checks, if changed
- [ ] Relevant DLR checks, if changed

List any additional manual or automated checks:

Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,3 @@ jobs:
- run: cargo fmt --manifest-path integrations/dlr/Cargo.toml --all -- --check
- run: cargo clippy --locked --manifest-path integrations/dlr/Cargo.toml --workspace --all-targets -- -D warnings
- run: cargo test --locked --manifest-path integrations/dlr/Cargo.toml --workspace

harbor:
name: Harbor adapter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- run: uv sync --project integrations/harbor --extra test --locked
- run: uv run --project integrations/harbor pytest
32 changes: 1 addition & 31 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- uses: astral-sh/setup-uv@v6
- name: Validate release tag and package versions
env:
RELEASE_TAG: ${{ github.ref_name }}
Expand All @@ -33,10 +32,6 @@ jobs:
cargo clippy --locked --manifest-path integrations/dlr/Cargo.toml \
--workspace --all-targets -- -D warnings
cargo test --locked --manifest-path integrations/dlr/Cargo.toml --workspace
- name: Check Harbor adapter
run: |
uv sync --project integrations/harbor --extra test --locked
uv run --project integrations/harbor pytest

linux-binaries:
needs: release-preflight
Expand Down Expand Up @@ -84,34 +79,9 @@ jobs:
dist/sc-${{ matrix.target }}.tar.gz.sha256.sigstore.json
if-no-files-found: error

harbor-wheel:
needs: release-preflight
runs-on: ubuntu-24.04
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
- uses: sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6 # v4.1.2
- name: Build Harbor adapter
run: |
uv build integrations/harbor --out-dir dist
sha256sum dist/*.whl dist/*.tar.gz > dist/SHA256SUMS
cosign sign-blob --yes --bundle dist/SHA256SUMS.sigstore.json dist/SHA256SUMS
- uses: actions/upload-artifact@v4
with:
name: harbor-wheel
path: |
dist/*.whl
dist/*.tar.gz
dist/SHA256SUMS
dist/SHA256SUMS.sigstore.json
if-no-files-found: error

github-release:
name: Publish GitHub release
needs: [linux-binaries, harbor-wheel]
needs: linux-binaries
runs-on: ubuntu-24.04
permissions:
contents: write
Expand Down
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ Initial public release.
- OpenAI-compatible streaming with tool calls, retries, request spooling, and
optional gzip transport.
- Optional DLR sidecar transport for large, repeated conversation contexts.
- Crash-safe benchmark reports and ATIF trajectories for Harbor.
- Reproducible offline Harbor adapters for Subconscious Code and mini-swe-agent.
- Crash-safe benchmark reports and ATIF trajectories emitted directly by the
`sc` CLI.
- Secure first-launch API-key setup for the interactive CLI.

### Reliability

- Bounded recovery for transport failures that occur before semantic model
output, without replaying partially emitted responses.
- Benchmark completion review, no-progress handling, and endpoint diagnostics.
- Linux sandboxing, fail-closed headless permissions, and offline benchmark
network policy.
- Linux sandboxing and fail-closed headless permissions.

[0.1.0]: https://github.com/subconscious-systems/subconscious-code/releases/tag/v0.1.0
7 changes: 0 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@ The DLR protocol is a separate Cargo workspace and must be checked separately:
cargo test --locked --manifest-path integrations/dlr/Cargo.toml --workspace
```

The optional Harbor adapter uses Python 3.12+ and `uv`:

```sh
uv sync --project integrations/harbor --extra test --locked
uv run --project integrations/harbor pytest
```

## Before opening a pull request

Run the checks that apply to your change:
Expand Down
3 changes: 2 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 26 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,25 @@ install -m 0755 sc "$HOME/.local/bin/sc"
sc --version
```

Release archives and their checksum files include keyless Sigstore bundles;
the [Harbor guide](integrations/harbor/README.md#install-on-the-benchmark-platform)
shows how to verify the signing identity with Cosign.
Release archives and their checksum files include keyless Sigstore bundles.

Configure the default Subconscious endpoint:
Launch `sc`. On first use, the CLI securely prompts for your Subconscious API
key and saves it to `~/.sc/key` with user-only permissions:

```sh
export SC_API_KEY="your-api-key"
sc doctor
cd /path/to/your/project
sc
```

For automation, provide the key through the environment and verify the endpoint
before running a headless task:

```sh
export SC_API_KEY="your-api-key"
sc doctor
sc -p "explain the architecture and identify the main entry point"
```

For another compatible provider, set its base URL and model. Custom providers
use ordinary JSON unless you explicitly configure a DLR endpoint:

Expand Down Expand Up @@ -104,9 +110,8 @@ headless mode for code changes.
| [Configuration](docs/CONFIGURATION.md) | Settings files, environment variables, permissions, DLR, and examples |
| [Architecture](docs/ARCHITECTURE.md) | Crate boundaries, request flow, persistence, and transport design |
| [Troubleshooting](docs/TROUBLESHOOTING.md) | Endpoint, terminal, context-size, DLR, and sandbox problems |
| [Benchmarks](docs/BENCHMARKS.md) | What the checked-in benchmark artifacts measure and how to reproduce them |
| [Benchmarks](docs/BENCHMARKS.md) | How to reproduce transport and harness measurements |
| [DLR sidecar](integrations/dlr/README.md) | Protocol status, local testing, deployment, and internals |
| [Harbor adapter](integrations/harbor/README.md) | Reproducible benchmark integration |
| [Contributing](CONTRIBUTING.md) | Development setup, tests, review expectations, and PR workflow |

Please report vulnerabilities privately as described in
Expand Down Expand Up @@ -286,21 +291,22 @@ sc -p "explain src/" # headless one-shot, prints the answer to stdout
sc doctor --body-ladder # measure the gateway's real maximum request size
```

### Harbor benchmarks
### Headless benchmarks

The native Harbor adapter lives in
[`integrations/harbor`](integrations/harbor/README.md). It packages `sc` as a
first-class Harbor agent and maps its benchmark report into Harbor token,
cache, cost, and timing metadata. Headless runs can emit that versioned report
directly:
The CLI can write a stable performance report and an ATIF v1.7 trajectory for
headless evaluation runs:

```sh
sc --benchmark-report report.json -p "fix the task"
SC_API_KEY="your-api-key" sc \
--benchmark-report report.json \
--benchmark-trajectory trajectory.json \
-p "fix the task"
```

Tagged releases publish the adapter wheel plus x86_64/aarch64 Linux binaries,
so cloud sandboxes can download a pinned artifact instead of compiling Rust in
every trial.
The report contains timing, token, cost, retry, tool, and build-provenance
fields without prompt or tool-result content. The trajectory is an explicit
transcript artifact and may contain sensitive task data; review it before
sharing.

In the TUI: `Shift+Tab` cycles permission mode, `Esc` cancels a turn, `Ctrl+C`
quits, `@` completes file paths, `/` completes commands (`/menu`, `/clear`,
Expand Down Expand Up @@ -797,8 +803,5 @@ rustup target add x86_64-unknown-linux-gnu
cargo check -p rc-sandbox --target x86_64-unknown-linux-gnu --all-targets
```

Milestones: chat completions (M0), streaming + tool loop (M1), core tools (M2),
permissions (M3), TUI (M4), session persistence (M5), context assembly (M6),
background shells + sandbox + rewind (M7), and the large-context/request
track plus `sc doctor` (M8). Still ahead: MCP, hooks, skills, and full
compaction — see `working-cli-plan.md`.
Planned work is tracked in the repository issue tracker. MCP, hooks, skills,
and full compaction are not yet part of the user-facing product.
1 change: 1 addition & 0 deletions crates/rc-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ tracing.workspace = true
tracing-subscriber.workspace = true
libc.workspace = true
uuid = { version = "=1.20.0", features = ["v4"] }
crossterm = "0.28"

[dev-dependencies]
tempfile = "3"
Expand Down
3 changes: 2 additions & 1 deletion crates/rc-cli/src/doctor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ pub async fn run(settings: &Settings, body_ladder: bool) -> Result<bool> {
Status::Fail("no API key — set $SC_API_KEY".into()).render("api key")
);
println!();
println!("Set the key and re-run: SC_API_KEY=... sc doctor");
println!("Run bare `sc` to save a key, or set SC_API_KEY for automation,");
println!("then re-run: sc doctor");
return Ok(false);
};

Expand Down
Loading
Loading