Skip to content

Latest commit

 

History

History
115 lines (66 loc) · 10.5 KB

GUI.md

File metadata and controls

115 lines (66 loc) · 10.5 KB

FORGE Control Center

The FORGE Control Center is a local, multi-page application served by the Node.js CLI. It uses the same verification engine, policy evaluator, evidence store and deployment preflight as the command line.

Start the application

From a FORGE checkout:

npm install
npm run dev

Or start the installed CLI:

forge gui

The server binds to IPv4 loopback only. The default port is 4820; --port 0 requests an available port. Press Ctrl+C to stop the server.

Production asset build

Create the production Control Center assets with:

npm ci
npm run build
forge gui

The build copies the checked-in UI into build/ui/ and writes a deterministic SHA-256 asset manifest. The packaged CLI serves this production directory when its manifest is present. The npm package ships this built runtime bundle rather than duplicating the raw ui/ development source tree. The repository's dist/ directory remains reserved for release artifact bundles. npm run dev always serves the live ui/ source directory, so edits are visible without rebuilding. The prepack lifecycle rebuilds the production assets before package validation and archive creation.

Release readiness dashboard

Open Release readiness dashboard to review release gates, local candidate build status, candidate history and artifact-verification results. The target matrix reports separate npm, Debian, OCI and signed APT readiness, including lockfile integrity, verification evidence, artifact security, signing pins and human approval. GitHub deployment and workflow history is fetched only after an explicit refresh. This is a preflight and review surface; it cannot publish a release or bypass protected approval.

Keyboard navigation

Open the command palette with Ctrl+K (or ⌘K on macOS), search for a page or action, move through results with the arrow keys and press Enter to run the selected item. Press ? outside text fields to open the keyboard-shortcut reference; press Escape to dismiss the active dialog. The same shortcut guide is available as Show keyboard shortcuts in the command palette.

First boot and sign-in

The first visit opens the setup wizard. Create the local owner account and select the project directory, theme and idle-session timeout. On subsequent visits, sign in with that account. Sessions use an HttpOnly, SameSite=Strict cookie, are stored in memory by the server, and expire after the configured idle timeout or a 24-hour absolute limit. Restarting FORGE invalidates active sessions. Password changes revoke every session.

Passwords are stored as salted scrypt derivations, never as plaintext. Account and settings files live outside the repository in the user's FORGE configuration directory. See Control Center details for storage locations and controls.

Pages

The application has separate routes for:

  • Overview and repository readiness.
  • Verification planning and the live execution engine.
  • Traces, evidence, activity and deployment preflight.
  • Guardrails and package-script execution.
  • Workspace file browsing, text preview, diff review and guarded save.
  • CLI examples and the Python SDK.
  • Local Ollama assistant.
  • Installation and APT release-gate status.
  • Account and workspace settings.
  • Encrypted credentials vault with owner-password re-authentication, reveal and deletion.

Execution capabilities

The verification planner detects project-native checks and lets the owner choose which ones to run. The execution engine supports progress updates, cancellation, a quality-gate evaluation and correlated local traces. The Trace Explorer compares a baseline run with a candidate run, showing score/runtime deltas, regressions, improvements and plan changes. Owners can set maximum check regressions, score drop and runtime increase; the comparison reports each threshold violation.

The project-script page lists only entries declared in the selected package.json. It shows the package-manager command and requires a browser confirmation before starting the child process. The GUI does not accept arbitrary shell text from the browser.

The Guardrails page edits the project's local allow/deny policy. Explicit deny rules win. This is policy evaluation and configuration, not an operating-system sandbox; commands still run with the current user's permissions.

Workspace files

The file explorer only reads regular, UTF-8 text files up to 512 KiB. It hides credential and secret names, environment files, Git internals, dependency/build output and symbolic links. It does not preview file contents from hidden paths.

A draft must be reviewed in the diff panel before saving. The save request includes the original SHA-256 and fails if the file changed after it was opened. The UI asks for a second confirmation before writing. Saves use an atomic replacement. The same file service is available through forge files and the Python SDK.

Local inference and model evaluation

The AI Assistant and dedicated Model Evaluation workspaces connect to Ollama at 127.0.0.1:11434 only. The sidebar keeps inference and plan drafting separate from repeatable benchmark runs. The CLI exposes the same engine through forge ai infer and forge ai evaluate. Model discovery and generation requests are pinned to loopback, reject redirects, use bounded request timeouts and limit response sizes. Inference results include elapsed time, prompt/generated token counts when provided by Ollama, model-load time and generated-token throughput.

The Model Evaluation Lab runs a user-supplied dataset of up to 50 cases against a selected local model. Cases support exact, contains and starts-with matching, a configurable minimum pass score and a bounded concurrency of up to four requests. The report presents per-case outcomes, overall score, average and percentile latency, and a quality-gate verdict. Dataset fields are schema-validated; they cannot contain shell commands or execution instructions. Evaluation prompts and model responses are returned to the current authenticated browser session and are not written to FORGE's execution traces or evidence journal.

Evaluation measures the response conditions expressed by the dataset; it is not a general measure of model intelligence, factuality or safety. Build representative datasets for the tasks you care about and review the cases and thresholds before using a score as a release signal. Model responses remain advisory. FORGE never applies model output or executes commands automatically.

Encrypted credentials

The Credentials page stores metadata and secrets in a user-only file encrypted with AES-256-GCM. Its key is derived from the local owner password with scrypt. Unlock, add, reveal and delete operations require the owner password again. The vault locks after five minutes of inactivity, when you navigate away, sign out or close the page; it never stores the password in local storage. Password changes re-encrypt the entries. The CLI and Python SDK can also access the same vault.

Deployment and APT

The Deployments and Installations pages report release and signed APT readiness. Local FORGE only runs preflight checks. Public APT activation remains blocked until the protected release and Pages workflow has the separate archive signing key, matching key ID and full fingerprint configured, the release is approved and a successful Pages deployment publishes active key metadata. The installer intentionally refuses to configure an inactive or unverified repository.

See Installation for the exact protected GitHub Actions settings and activation process.

Security boundary

The Control Center is local-first and single-owner. It is not a cloud/team identity provider or remote control plane. It rejects cross-origin mutations, checks the loopback Host/Origin, bounds file/request sizes, rejects symlinks in the explorer, and requires an authenticated session for project APIs. Review project scripts before running them: they still have the current user's operating-system permissions.

Workspace execution manifests

The Verify planner reports whether `.forge/verification-manifest.json` is active, how many checks have dependencies, which checks branch on terminal outcomes and which checks are excluded by path/platform conditions. A manifest can reorder and select existing adapter-discovered checks, but it cannot introduce arbitrary command strings. Package-defined custom checks remain governed by the exact per-profile script allowlist in `package.json`.

Selecting a downstream check automatically includes its prerequisite chain; the resolved plan records those extra checks before execution. A `runWhen` branch can deliberately respond to a failed, errored, skipped or cancelled prerequisite, while all other prerequisites still have to pass. The planner shows these edges and branch rules alongside the exact command so they can be reviewed before starting a run.

GitHub deployment history

The Deployments page includes an explicit Refresh status action for the repository's public github.com origin. It reads up to ten deployment records and their latest status from the GitHub REST API. The adapter never dispatches workflows, creates deployments, tags releases, uploads artifacts or changes remote state. No GitHub request is made just by opening the page.

Only HTTPS, SSH and SCP-style origin remotes on github.com are accepted. Custom hosts, embedded credentials, query strings and untrusted URLs are rejected; requests go only to api.github.com. A GITHUB_TOKEN, GH_TOKEN or FORGE_GITHUB_TOKEN inherited by the FORGE server can provide private-repository access, but its value is never stored in workspace configuration or returned to the browser. Keep this token read-only and narrowly scoped. The same explicit refresh also retrieves up to ten recent GitHub Actions runs (workflow, branch, trigger event, commit, status and conclusion). Actions history fails independently when the token lacks read access, so deployment status remains visible. The status view remains optional; local candidate building and protected publication workflows are unchanged.

Deployment target matrix

The Deployments page shows separate local preflight results for npm, Debian, OCI and signed APT. Each target carries its own required gate list, blockers, pending approvals and next action; one target can be blocked without hiding which other target gates are configured. The engine and UI always report `preflight-only` with `publishPerformed: false`. Actual publication remains in protected workflows requiring a human approval; local candidate creation and verification do not publish.