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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@
.altius/
*.pem
*.key

# ide/ (Altius IDE fork scaffold): upstream checkout + JS build output, never checked in
/ide/vscode/
**/node_modules/
/ide/extensions/*/out/
*.vsix
90 changes: 90 additions & 0 deletions ide/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Altius IDE (fork scaffold)

Altius IDE is a from-source, rebranded build of [VS Code
OSS](https://github.com/microsoft/vscode) with an Altius-owned extension
bundled in by default, turning it into an agentic Solana development
environment: fleet dispatch, guarded security scanning, and TxGuard-guided
deploys, all inside the editor rather than a separate terminal/PWA.

**Status: scaffold, not a shipped binary.** Building a full custom VS Code
distribution — Electron packaging, installers, code-signing, an update
server — is a substantial, ongoing engineering effort in its own right, well
beyond what one change can produce. What lives here is the real, reusable
part of that effort:

- a branding overlay (`product.json`) and a merge script that applies it to
an upstream checkout, following the same pattern
[VSCodium](https://github.com/VSCodium/vscodium) uses to de-Microsoft and
rebrand VS Code OSS;
- a working, compilable extension (`extensions/altius-agent`) that *is* the
actual product surface — it runs today in stock VS Code, unmodified, and
is the thing `bootstrap.sh` bundles as built-in once you do run the fork
build;
- a bootstrap script that clones the pinned upstream tag and wires the two
together.

## Why an extension instead of patching VS Code's source

The agentic Solana workflows (dispatch a fleet run, review scan findings,
walk a guarded deploy) don't need forked editor internals — they need a
sidebar, a webview, a diagnostics collection, and an output channel, all of
which are stable extension APIs. Keeping that logic in
`extensions/altius-agent` means:

- it's useful immediately, in any VS Code install, without anyone building
the fork;
- it's what the fork build bundles as a built-in (see below), so the fork
itself only needs branding + packaging changes, not a maintained source
patch set against upstream.

If the fork later needs true editor-level changes (a custom activity bar
default, a different welcome page), those become entries under `patches/`
applied by `bootstrap.sh` — none exist yet because nothing so far requires
touching VS Code's own source.

## Layout

```
ide/
product.json Altius IDE branding overlay (name, app id, Open VSX gallery, telemetry off)
build/
bootstrap.sh clones microsoft/vscode @ pinned tag, merges product.json, bundles the extension
merge-product-json.js deep-merge helper used by bootstrap.sh
patches/ reserved for upstream source patches (empty until one is needed)
extensions/
altius-agent/ the bundled extension — see extensions/altius-agent/README.md
vscode/ gitignored; created by bootstrap.sh, not checked in
```

## Building the fork

Requires Node 20+, and enough disk/bandwidth for a shallow VS Code clone
(~500MB) plus its own toolchain.

```sh
./ide/build/bootstrap.sh
cd ide/extensions/altius-agent && npm install && npm run compile && cd -
cd ide/vscode
corepack enable && yarn install
yarn compile
./scripts/code.sh # or scripts\code.bat on Windows
```

`ALTIUS_VSCODE_REF` overrides the pinned upstream tag (default set in
`bootstrap.sh`). Bump it deliberately, not automatically — VS Code forks
that auto-track upstream `main` inherit unreviewed churn.

## Trying the extension without the fork

The extension is the part worth using today. Open
`ide/extensions/altius-agent` in stock VS Code, `npm install`, press F5 to
launch an Extension Development Host, and the same "Altius" activity-bar
view, findings tree, and guarded deploy commands are available — see
`extensions/altius-agent/README.md`.

## Distribution (not yet built)

Turning a local `code.sh` build into something installable (per-OS
packaging, an update feed, code signing) is deliberately out of scope here;
it's a packaging/ops project, not an editor-feature one, and shouldn't block
the extension from being useful on its own.
50 changes: 50 additions & 0 deletions ide/build/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/usr/bin/env bash
# Bootstraps a full "Altius IDE" build on top of a pristine microsoft/vscode
# checkout: clones the pinned upstream tag, deep-merges ide/product.json over
# it, and bundles the altius-agent extension as a built-in.
#
# This does the actual fork checkout + merge; it does NOT run the VS Code
# build itself (that's `yarn && yarn compile` / `./scripts/code.sh`, see
# ide/README.md) — those steps need a full Node/native-modules toolchain and
# a large download that don't belong in an unattended script.
set -euo pipefail

IDE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
VSCODE_DIR="${IDE_DIR}/vscode"
VSCODE_REF="${ALTIUS_VSCODE_REF:-1.94.2}" # pinned upstream tag; bump deliberately

if [ -d "${VSCODE_DIR}/.git" ]; then
echo "==> ${VSCODE_DIR} already exists, skipping clone (delete it to re-clone)"
else
echo "==> Cloning microsoft/vscode @ ${VSCODE_REF} into ${VSCODE_DIR}"
git clone --depth 1 --branch "${VSCODE_REF}" \
https://github.com/microsoft/vscode.git "${VSCODE_DIR}"
fi

echo "==> Merging ide/product.json over vscode/product.json"
node "${IDE_DIR}/build/merge-product-json.js" \
"${VSCODE_DIR}/product.json" \
"${IDE_DIR}/product.json" \
"${VSCODE_DIR}/product.json"

echo "==> Bundling altius-agent as a built-in extension"
mkdir -p "${VSCODE_DIR}/extensions/altius-agent"
rsync -a --delete \
--exclude node_modules \
--exclude out \
--exclude '.vsix' \
"${IDE_DIR}/extensions/altius-agent/" \
"${VSCODE_DIR}/extensions/altius-agent/"

cat <<'EOF'

==> Bootstrap complete.

Next steps (inside ide/vscode), see ide/README.md for details:
1. corepack enable && yarn install
2. yarn compile
3. ./scripts/code.sh (Linux/macOS) or .\scripts\code.bat (Windows)

The bundled altius-agent extension still needs its own compile step first:
(cd ide/extensions/altius-agent && npm install && npm run compile)
EOF
36 changes: 36 additions & 0 deletions ide/build/merge-product-json.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env node
// Deep-merges an Altius branding overlay over a base VS Code OSS
// product.json, writing the result to `out`. `overlay` values win on
// conflicts; arrays are replaced wholesale rather than concatenated.
"use strict";

const fs = require("fs");

const [, , basePath, overlayPath, outPath] = process.argv;
if (!basePath || !overlayPath || !outPath) {
console.error(
"usage: merge-product-json.js <base.json> <overlay.json> <out.json>",
);
process.exit(1);
}

function readJson(path) {
return JSON.parse(fs.readFileSync(path, "utf8"));
}

function deepMerge(base, overlay) {
if (Array.isArray(overlay)) return overlay;
if (typeof overlay !== "object" || overlay === null) return overlay;
const out = { ...(typeof base === "object" && base ? base : {}) };
for (const [key, value] of Object.entries(overlay)) {
out[key] = deepMerge(out[key], value);
}
return out;
}

const base = readJson(basePath);
const overlay = readJson(overlayPath);
const merged = deepMerge(base, overlay);

fs.writeFileSync(outPath, JSON.stringify(merged, null, 2) + "\n");
console.log(`wrote ${outPath}`);
6 changes: 6 additions & 0 deletions ide/extensions/altius-agent/.vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.vscode/**
src/**
.gitignore
tsconfig.json
**/*.map
node_modules/**
58 changes: 58 additions & 0 deletions ide/extensions/altius-agent/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Altius Agent

A VS Code extension for agentic Solana development against
[Altius Code](https://github.com/daemon-blockint-tech/altius-code): dispatch
fleet runs, review guarded security scan findings inline, and walk a
TxGuard-guided deploy — without leaving the editor.

This is the extension bundled as a built-in by the Altius IDE fork scaffold
(`ide/`), but it is a normal extension: it runs in stock VS Code today.

## Features

- **Fleet Dispatch** (Altius activity bar view) — send a prompt to an agent
(`altius`, `security`, `browser`, ...) via a running `altius fleet serve`
instance, watch runs update, and resume/deny/cancel runs that pause for
approval. Talks to the same [BeeAI ACP](https://agentcommunicationprotocol.dev)
`/runs*` HTTP API as the project's existing PWA thin client
(`crates/altius-cli/assets/pwa`).
- **Security Findings** (Altius activity bar view) — `Altius: Scan Project
for Security Findings` runs `altius scan --format json`, surfaces findings
as editor diagnostics (Problems panel, inline squiggles) and as a tree
grouped by severity; click a finding to jump to its location.
- **Guarded Deploy** — `Altius: Guarded Deploy (Dry Run)` runs `altius
deploy --dry-run` (policy + mandatory simulation only; `FailClosed`
guarantees nothing is ever signed). `Altius: Guarded Deploy (Sign &
Submit)` runs the real pipeline behind a modal warning and a typed
confirmation, streaming TxGuard's policy/simulate/diff/audit/sign steps to
the "Altius" output channel.

## Requirements

- The `altius` CLI on `PATH` (or set `altius.cliPath`) — see the [repo
README](../../../README.md#ways-to-run) to build it.
- For Fleet Dispatch: a running `altius fleet serve` instance (defaults to
`http://127.0.0.1:8788`, overridable via `altius.fleetUrl`). Set a bearer
token with `Altius: Set Fleet Bearer Token` if the server requires one.
- For deploy: `altius-signerd` running and `ALTIUS_SIGNER_SOCKET` set in the
environment VS Code was launched from (same requirement as the CLI).

## Settings

| Setting | Default | Description |
|---|---|---|
| `altius.cliPath` | `altius` | Path to the `altius` binary. |
| `altius.fleetUrl` | `http://127.0.0.1:8788` | Base URL of `altius fleet serve`. |
| `altius.scanPath` | *(workspace root)* | Path passed to `altius scan --path`, relative to the workspace root. |
| `altius.scanChain` | `auto` | Chain family passed to `altius scan --chain`. |
| `altius.deployProjectPath` | *(workspace root)* | Path passed to `altius deploy --project`, relative to the workspace root. |

## Development

```sh
npm install
npm run compile # or: npm run watch
```

Press `F5` in VS Code (with this folder open) to launch an Extension
Development Host with the extension loaded.
4 changes: 4 additions & 0 deletions ide/extensions/altius-agent/media/altius.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 59 additions & 0 deletions ide/extensions/altius-agent/package-lock.json

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

Loading
Loading