Skip to content

feat(gateway): add multi-channel gateway runtime + serve/watch integration#535

Merged
kajogo777 merged 12 commits into
mainfrom
feature/gateway-existing-changes
Feb 14, 2026
Merged

feat(gateway): add multi-channel gateway runtime + serve/watch integration#535
kajogo777 merged 12 commits into
mainfrom
feature/gateway-existing-changes

Conversation

@ahmedhesham6

@ahmedhesham6 ahmedhesham6 commented Feb 12, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds a new stakpak-gateway crate and integrates it into CLI/server flows.

What changed

  • Added new libs/gateway crate with:
    • channel adapters: Telegram, Slack (Socket Mode), Discord
    • dispatcher, routing, targeting, SQLite mapping store, API, runtime
    • client for server HTTP/SSE interaction
    • gateway README with setup and command usage
  • Added gateway CLI commands:
    • stakpak gateway init
    • stakpak gateway channels {list,test,add,remove}
    • stakpak gateway run
  • Integrated gateway into stakpak serve via --gateway and mounted /v1/gateway/* routes.
  • Added watch notification delivery to gateway send API.
  • Updated libs/server/README.md with serve/gateway operator instructions.
  • Ensured gateway approval behavior follows serve/profile auto-approve settings when running via stakpak serve --gateway.

Why

Provide end-to-end chat-channel ingress/egress for Stakpak sessions and enable watch-trigger notifications through a shared gateway API.

Validation

  • cargo fmt on touched Rust files
  • cargo clippy -p stakpak-gateway -p stakpak --all-targets -- -D warnings

- pass --profile before serve in stakpak up child process
- derive embedded gateway loopback URL from listener IP family
- treat gateway context persistence failures as non-fatal after successful send
- add watch notification HTTP timeouts and sanitize outbound summary/context text
ahmedhesham6 and others added 5 commits February 12, 2026 16:00
Remove rusqlite bundled SQLite in gateway so stakpak binary does not link two sqlite3 implementations (libsql-ffi + libsqlite3-sys), which caused Linux CI multiple-definition linker errors.
- add libsql to workspace dependencies and consume via workspace in cli/gateway crates
- replace gateway rusqlite store with async libsql implementation
- update runtime/dispatcher/api and gateway command paths to await async store and gateway initialization
- keep prior serve/watch hardening fixes in the same change set
@kajogo777 kajogo777 changed the base branch from feature/serve-command to main February 14, 2026 20:46
…ckpoint optimization

- Rename AutoApprovePolicy → ToolApprovalPolicy (from main)
- Adopt main's with_defaults()/with_overrides() builder pattern
- Adopt #[derive(Default)] cleanup (from main)
- Keep gateway runtime integration in serve command
- Keep dirty-tracking checkpoint persistence optimization
- Bump versions to 0.3.42
- Fix auto_approve_tools borrow after move (ref + iter().cloned())
@kajogo777 kajogo777 merged commit 3388af5 into main Feb 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants