Commit graph

189 commits

Author SHA1 Message Date
github-actions[bot]
b5130a3c4e chore: Release railwayapp version 4.36.0 2026-03-31 21:24:10 +00:00
github-actions[bot]
ec1ea2e371 chore: Release railwayapp version 4.35.2 2026-03-31 03:59:03 +00:00
github-actions[bot]
5b75f1884c chore: Release railwayapp version 4.35.1 2026-03-30 09:15:48 +00:00
github-actions[bot]
cc8cc6ec0d chore: Release railwayapp version 4.35.0 2026-03-25 20:06:36 +00:00
github-actions[bot]
34a635ab34 chore: Release railwayapp version 4.34.0 2026-03-25 18:44:46 +00:00
Mahmoud Abdelwahab
c276e4ec2b
feat(auth): replace custom login flow with OAuth 2.0 (PKCE + device flow) (#822)
Replace the GraphQL-based LoginSession flow and hyper HTTP server with
standard OAuth 2.0: Authorization Code + PKCE for browser login, and
Device Authorization Grant (RFC 8628) for browserless. Adds automatic
token refresh before commands, CSRF state verification, and proper
error variants. Removes hyper, hyper-util, http-body-util, and hostname
dependencies in favor of raw TCP + sha2 for PKCE.

Browser login hardened with OS-assigned port, looped callback handler
for preconnect resilience, 5-minute timeout, and prompt=consent to
ensure refresh tokens are always issued.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 20:38:18 +02:00
github-actions[bot]
d858c26652 chore: Release railwayapp version 4.33.0 2026-03-18 17:03:05 +00:00
github-actions[bot]
b24f48db41 chore: Release railwayapp version 4.32.0 2026-03-18 06:17:16 +00:00
Mahmoud Abdelwahab
a7aeeccfb3
Adds an experimental MCP server (#813)
* Add GraphQL queries and mutations for MCP server

Add Metrics and Templates queries for service observability and template
search. Add ServiceInstanceUpdate mutation for updating service settings
like build command, replicas, and health check path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Extract upload logic from up command into controller

Move tarball creation and upload logic into src/controllers/upload.rs so
it can be reused by both the up CLI command and the MCP deploy tool.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Change log callbacks from Fn to FnMut

The MCP log handler collects logs into a Vec, which requires mutating
captured state. Fn closures don't allow this — FnMut does. Existing
callers are unaffected since every Fn is a valid FnMut.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Add MCP server for AI-agent access to Railway

Expose Railway operations (deploy, logs, variables, domains, templates,
metrics, etc.) as MCP tools so AI agents can manage infrastructure
programmatically. Uses the rmcp crate for the MCP protocol.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Add more fields to update_service MCP tool

Expose cron_schedule, dockerfile_path, healthcheck_timeout,
restart_policy_type, restart_policy_max_retries, pre_deploy_command,
region, railway_config_file, and watch_patterns.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Fix MCP server: deploy resolution, linked-context precedence, and workspace auto-detect

- Return clear error with available services when deploy gets an unknown service name
- Prefer locally-linked project over token-derived project in MCP context resolution
- Auto-detect team workspace when create_project is called without workspace_id

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Fix docs_search and split into search + fetch tools

- Replace GitHub API (401 auth failures) with public sitemap for page listing
- Fix content path from src/docs/ to content/ to match actual repo structure
- Use plain HTTP client for external fetches (Railway auth headers caused GitHub 401s)
- Split into docs_search (returns top 5 URLs) and docs_fetch (reads full page)
- Improve scoring: exact path segment matches rank higher than substrings

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Hide confirm field from MCP schema to prevent AI agents from auto-setting it

AI agents were reading "Requires confirm: true" in tool descriptions and
auto-populating confirm on the first call, bypassing the destructive action
safety guard. Fix by adding #[schemars(skip)] to the confirm field on
RemoveServiceParams, RemoveBucketParams, and RemoveVolumeParams so it's
hidden from the JSON schema (serde still deserializes it, defaulting to
false). Updated descriptions to say "Returns a preview first" instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Reject create_service when both source_repo and source_image are provided

The backend silently picks repo over image when both are set (via an
if/else chain in the serviceCreate resolver), dropping the image with
no error or warning. This is confusing for MCP agents that may not
realize one source was ignored. Validate early in the MCP layer to
give a clear, actionable error instead of silent precedence.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Add help text for mcp command

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Drop vulnerable time crate by disabling unused serde_with features

serde_with was pulling in the time crate (RUSTSEC-2026-0009, DoS via
stack exhaustion in RFC 2822 parsing) through default features. We only
use skip_serializing_none from the macros feature, so disable defaults
and enable only macros. This removes time and several other unused
transitive deps (hex, indexmap v1, deranged, powerfmt, num-conv).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 08:10:03 +02:00
Zicklag
d41b2e4dfb
fix: fix connection errors when using custom system certificates and an http proxy. (#807)
When trying to use the Railway CLI behind an HTTP proxy that requires
a custom certificate ( such as some VPNs ), the CLI would previously
fail with a certificate error. This adds the `rustls-tls-native-roots`
feature reqwest to trust the native platform's system certificate store to
fix that.

Railway commands that require a websocket connection were also
failing to go through the proxy, because while `reqwest` automatically
sends requests through the proxy `async-tungstenite` would not. This
removes `async-tungstenite` in favor of `reqwest-websocket` which is
simpler and uses `reqwest` to properly send the initial HTTP request
through the proxy before the websocket upgrade.
2026-03-12 12:01:23 -04:00
github-actions[bot]
6b9b52eb17 chore: Release railwayapp version 4.31.0 2026-03-06 19:41:42 +00:00
github-actions[bot]
427c325f22 chore: Release railwayapp version 4.30.5 2026-02-24 19:27:36 +00:00
github-actions[bot]
49f73e0178 chore: Release railwayapp version 4.30.4 2026-02-23 17:52:21 +00:00
github-actions[bot]
a8a5afe145 chore: Release railwayapp version 4.30.3 2026-02-17 01:15:39 +00:00
github-actions[bot]
7650d29f22 chore: Release railwayapp version 4.30.2 2026-02-14 03:18:16 +00:00
github-actions[bot]
eaafe342bb chore: Release railwayapp version 4.30.1 2026-02-12 20:47:54 +00:00
github-actions[bot]
51b896ffc5 chore: Release railwayapp version 4.30.0 2026-02-12 17:11:01 +00:00
github-actions[bot]
7f86594b1b chore: Release railwayapp version 4.29.0 2026-02-04 03:58:47 +00:00
github-actions[bot]
986d6fa22d chore: Release railwayapp version 4.28.0 2026-02-03 18:51:17 +00:00
github-actions[bot]
a8a683c593 chore: Release railwayapp version 4.27.6 2026-02-03 05:20:20 +00:00
github-actions[bot]
500b29d6db chore: Release railwayapp version 4.27.5 2026-01-30 01:07:44 +00:00
github-actions[bot]
a8163605f6 chore: Release railwayapp version 4.27.4 2026-01-28 02:57:40 +00:00
github-actions[bot]
af8f0a8630 chore: Release railwayapp version 4.27.3 2026-01-27 06:24:20 +00:00
github-actions[bot]
d71699deb0 chore: Release railwayapp version 4.27.2 2026-01-26 04:24:14 +00:00
github-actions[bot]
82a187fb31 chore: Release railwayapp version 4.27.1 2026-01-26 04:17:39 +00:00
github-actions[bot]
d18b2bce11 chore: Release railwayapp version 4.27.0 2026-01-23 18:32:29 +00:00
github-actions[bot]
a5b50ff82b chore: Release railwayapp version 4.26.0 2026-01-19 22:29:03 +00:00
Milo
59a65311b7
Allow changing service config in railway environment new (#702)
* it works

* remove useless comment

* fix conflicts, make it work again

* update schema

* cli side work is becoming a lot closer

* organise environment command

* more cleanup

* todos

* filter out old regions from scale non-interactively

* add non-interactive options for everything

* make trait variable handling more consistent for things that require custom value parsers

* begin work on porting to other way non-interactively

* it works

* add all interactive options and fix issue with --service flag in scale command

* add build command and start command and fix some parsing errors in non-interactive

* add placeholders for env being duplicated

* add edit command

* simplify and ux

* address comments

* remove interactive auto update
2026-01-19 17:25:17 -05:00
github-actions[bot]
663ad05451 chore: Release railwayapp version 4.25.3 2026-01-18 16:43:44 +00:00
github-actions[bot]
7a812e5249 chore: Release railwayapp version 4.25.2 2026-01-16 16:18:26 +00:00
Jake Runzer
724ccf15c8
feat: Add mouse-based text selection in TUI logs (#765)
* feat: Add mouse-based text selection in TUI logs

Implement custom text selection with mouse drag support in the `railway dev` TUI:
- Click and drag to select log text with visual highlighting
- Auto-copy selected text to clipboard on mouse release
- Auto-follow when scrolling back to bottom while paused
- Prevent screen flicker when scrolling down in follow mode
- Restore log buffering for better selection and scroll support

* fix: address code review issues in TUI text selection

- Consolidate LogRef enum to log_store.rs (was duplicated)
- Add clipboard failure feedback to user
- Fix prefix color logic when selection spans across prefix
- Make convert_color private
- Add comment explaining .take(2) limit in info pane

* refactor: optimize TUI log rendering and simplify selection

- Add LogRef::parts() to reduce duplication in log extraction
- Only collect visible logs instead of all logs (skip/take)
- Simplify selection rendering with explicit span regions
- Fix magic number defaults for log area bounds
- Remove unused Selection::contains method
2026-01-15 12:32:00 -05:00
github-actions[bot]
63b8b0374a chore: Release railwayapp version 4.25.1 2026-01-14 21:55:03 +00:00
github-actions[bot]
911294f33d chore: Release railwayapp version 4.25.0 2026-01-14 20:16:08 +00:00
github-actions[bot]
a5354048d9 chore: Release railwayapp version 4.24.0 2026-01-14 18:37:02 +00:00
github-actions[bot]
012bd72f5c chore: Release railwayapp version 4.23.3 2026-01-13 22:37:34 +00:00
github-actions[bot]
1f1a130051 chore: Release railwayapp version 4.23.2 2026-01-13 03:53:16 +00:00
github-actions[bot]
2925ccc490 chore: Release railwayapp version 4.23.1 2026-01-12 20:53:23 +00:00
github-actions[bot]
f9db690c6d chore: Release railwayapp version 4.23.0 2026-01-08 22:02:09 +00:00
github-actions[bot]
170cebc5e2 chore: Release railwayapp version 4.22.0 2026-01-08 21:42:59 +00:00
github-actions[bot]
36656b8c8c chore: Release railwayapp version 4.21.0 2026-01-08 21:20:33 +00:00
github-actions[bot]
87f256557c chore: Release railwayapp version 4.20.0 2026-01-08 20:55:49 +00:00
github-actions[bot]
a2ca3f270a chore: Release railwayapp version 4.19.0 2026-01-08 20:23:43 +00:00
github-actions[bot]
baeb81ef44 chore: Release railwayapp version 4.18.2 2026-01-08 19:10:20 +00:00
jakecooper
f21fe1965d chore: Release railwayapp version 4.18.1
Also fixes Create Release workflow:
- Push before publishing to crates.io (fail safely)
- Add concurrency control to prevent race conditions
2026-01-08 10:39:58 -08:00
jakecooper
f937add0ef chore: Release railwayapp version 4.18.0 2026-01-08 09:20:53 -08:00
Jake Runzer
0d1d2a1cae chore: Release railwayapp version 4.17.1 2026-01-07 12:35:16 -05:00
Jake Runzer
a529d5baf9 chore: Release railwayapp version 4.17.0 2026-01-07 02:08:37 -05:00
Jake Runzer
a587107dfd chore: Release railwayapp version 4.16.1 2025-12-19 19:32:40 -05:00
Jake Runzer
53a3d40e5d chore: Release railwayapp version 4.16.0 2025-12-19 18:49:44 -05:00
Jake Runzer
a1d7ce67f6
Add TUI log viewer for dev command (#714)
* Add TUI log viewer for dev command

- ratatui-based interface with tabs: Local, Image, per-service
- 100k line scrollback, follow mode, vim-style navigation
- Docker logs streamed alongside code services
- Opt-out via --no-tui flag (TUI is default)
- Auto-disables when stdout is not a terminal

* Fix TUI scroll behavior and filter railway-proxy logs

- Enable mouse capture for native scroll support
- Fix scroll jump when exiting follow mode by syncing scroll_offset
- Filter out railway-proxy infrastructure logs from docker output

* Batch scroll events to eliminate momentum lag

Drain queued events before rendering to prevent macOS trackpad
inertia from causing gradual scroll movement across render cycles.

* Add service info pane and improve TUI tab visibility

- Change tab colors from DarkGray to Gray (unselected) and Cyan (selected)
- Add info pane showing service URLs and var counts
- Display both private and public URLs separated by pipe when HTTPS enabled
- Info pane content changes based on current tab (Local/Image/Service)

* Skip service summary output in TUI mode and fix terminal cleanup

- Only print service summaries in non-TUI mode (info now shown in TUI pane)
- Fix terminal cleanup order: restore before disabling mouse capture

* Fix --no-tui to only stream code service logs

* Kill process groups on shutdown and fix panic terminal cleanup

- Use process_group(0) to create new process groups for spawned processes
- Use killpg instead of kill to terminate entire process groups
- Add panic hook to restore terminal on panic
- Extract setup_terminal/restore_terminal helpers for consistent cleanup

* Fix terminal corruption on TUI exit by isolating child stdin

Child processes were inheriting stdin from the terminal. When receiving
SIGTERM during shutdown, they could write escape sequences directly to
the terminal, bypassing piped stdout/stderr and corrupting cursor state.

* Improve post-TUI shutdown output

Clear terminal after TUI exits to remove confusing scrollback,
suppress docker compose output, show clean service count summary

* Refactor dev up command with DevSession struct

Extract TUI/service execution logic from up_command() into DevSession
struct with focused methods: start(), run(), shutdown()

* Move DevSession to controllers/develop/session.rs

- Move DevSession struct and impl to session.rs alongside DevelopSessionLock
- Move print_code_service_summary to output.rs
- Update imports in dev.rs

* Remove test script and unnecessary comments
2025-12-19 17:59:40 -05:00