@wingman-ai/gateway 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +310 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
<p align="center" width="100%">
|
|
2
|
+
<img src="./apps/website/public/wingman_opengraph.png" alt="Wingman logo" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# Wingman AI Agent System
|
|
6
|
+
|
|
7
|
+
Wingman is a **stateful, multi-agent runtime** with a **local CLI control plane** and a **gateway** for routing, sessions, and collaboration. It is designed for more than coding: use it for research, operations, support, planning, and any workflow where agents, tools, and durable context matter.
|
|
8
|
+
|
|
9
|
+
## What Wingman Is
|
|
10
|
+
|
|
11
|
+
- **Gateway-first runtime**: The gateway hosts agents, routing, and durable sessions by default.
|
|
12
|
+
- **Local control plane**: The CLI configures, invokes, and connects to the gateway, with an optional `--local` execution mode.
|
|
13
|
+
- **Multi-agent orchestration**: A root agent can delegate to specialized subagents with clear roles.
|
|
14
|
+
- **Protocol-first**: The gateway streams raw agent events so any client (web, mobile, terminal) can render them.
|
|
15
|
+
- **Tool-driven UI prompts (SGUI)**: tool calls can include UI render hints for Web UI components.
|
|
16
|
+
- **Extensible**: Custom agents, hooks, skills, and MCP tools let you tailor workflows to your team.
|
|
17
|
+
|
|
18
|
+
## What It’s For (Not Just Coding)
|
|
19
|
+
|
|
20
|
+
Wingman is an agent system, not a single “coding assistant.” Example use cases:
|
|
21
|
+
|
|
22
|
+
- **Engineering**: design reviews, refactors, dependency audits, multi-file changes, test automation
|
|
23
|
+
- **Research**: technology evaluations, competitive analysis, documentation synthesis
|
|
24
|
+
- **Operations**: scheduled routines, webhook-driven triage, incident summaries
|
|
25
|
+
- **Support**: channel routing, account-specific agents, structured responses
|
|
26
|
+
- **Custom domains**: finance, legal, data pipelines, or any workflow with tool integrations
|
|
27
|
+
|
|
28
|
+
## Architecture at a Glance
|
|
29
|
+
|
|
30
|
+
- **Wingman Gateway**: stateful runtime for agents, routing, sessions, and channels
|
|
31
|
+
- **Wingman CLI**: local control plane for onboarding, config, and agent invocation
|
|
32
|
+
- **Control UI**: chat + streaming interface (served by the gateway)
|
|
33
|
+
- **Wingman macOS App (planned)**: menu-bar companion that exposes macOS-only capabilities as a node
|
|
34
|
+
|
|
35
|
+
By default, the CLI connects to a local gateway. For isolated, local-only runs, use `--local`.
|
|
36
|
+
|
|
37
|
+
## Documentation Gate (Source of Truth)
|
|
38
|
+
|
|
39
|
+
**All product requirements live in `docs/requirements/`.** These PRDs are the source of truth and act as a documentation gate:
|
|
40
|
+
|
|
41
|
+
- Any product or behavior change must update the relevant PRD(s).
|
|
42
|
+
- PRs are expected to keep requirements and implementation in sync.
|
|
43
|
+
- Legacy docs outside `docs/requirements/` (including any historical docs-site content) should not be used for product decisions.
|
|
44
|
+
|
|
45
|
+
Key docs:
|
|
46
|
+
- `docs/requirements/000-architecture-overview.md`
|
|
47
|
+
- `docs/requirements/001-multi-agent-architecture.md`
|
|
48
|
+
- `docs/requirements/002-gateway-prd.md`
|
|
49
|
+
- `docs/requirements/003-macos-app-prd.md`
|
|
50
|
+
- `docs/requirements/004-node-protocol.md`
|
|
51
|
+
- `docs/requirements/005-web-ui-sgui-prd.md`
|
|
52
|
+
- `docs/custom-agents.md`
|
|
53
|
+
|
|
54
|
+
## Repository Layout
|
|
55
|
+
|
|
56
|
+
- `apps/macos`: macOS app (Xcode project)
|
|
57
|
+
- `apps/wingman`: Gateway + CLI + Control UI (Bun)
|
|
58
|
+
- `apps/docs-website`: documentation site (Rspress)
|
|
59
|
+
- `apps/website`: marketing site (Vite)
|
|
60
|
+
- `docs/requirements`: PRDs (source of truth)
|
|
61
|
+
- `docs/dev-setup.md`: local development guide
|
|
62
|
+
|
|
63
|
+
## Quick Start
|
|
64
|
+
|
|
65
|
+
### Install
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
npm install -g @wingman-ai/gateway
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Initialize a Workspace
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
wingman init
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Start the Gateway
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
wingman gateway start
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Gateway Auth (Environment Token)
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
export WINGMAN_GATEWAY_TOKEN=sk-...
|
|
87
|
+
wingman gateway start --auth
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Connect
|
|
91
|
+
|
|
92
|
+
- **CLI**: `wingman chat`
|
|
93
|
+
- **Control UI**: `http://localhost:18790` (default)
|
|
94
|
+
- **VS Code**: Install the Wingman extension (see project repo)
|
|
95
|
+
|
|
96
|
+
### Provider Auth
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# Cloud providers
|
|
100
|
+
wingman provider login anthropic
|
|
101
|
+
wingman provider login openai
|
|
102
|
+
wingman provider login openrouter
|
|
103
|
+
wingman provider login xai
|
|
104
|
+
wingman provider login copilot
|
|
105
|
+
|
|
106
|
+
# Local providers (optional - work without auth)
|
|
107
|
+
wingman provider login lmstudio # Optional
|
|
108
|
+
wingman provider login ollama # Optional
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Local-only (No Gateway)
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
wingman agent --local --agent <id> "prompt"
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Gateway Configuration (All the Ways + Why)
|
|
118
|
+
|
|
119
|
+
Gateway behavior can be configured in three layers (higher priority wins): runtime flags, environment variables, and `wingman.config.json`. Use the config file for persistent defaults, then override per run when needed.
|
|
120
|
+
|
|
121
|
+
### 1) `wingman.config.json` (persistent defaults)
|
|
122
|
+
|
|
123
|
+
- `gateway.host` / `gateway.port` - bind address + port. Use `0.0.0.0` for LAN access, or change the port to avoid conflicts.
|
|
124
|
+
- `gateway.stateDir` - where durable sessions and gateway state live. Point to fast local storage or a shared volume.
|
|
125
|
+
- `gateway.fsRoots` - allowlist for Control UI working folders and output paths. Keep this tight for safety.
|
|
126
|
+
- `gateway.auth.mode` / `gateway.auth.token` / `gateway.auth.password` - gateway auth strategy (token, password, or none) for remote access.
|
|
127
|
+
- `gateway.auth.allowTailscale` - trust Tailscale identity headers so Tailnet users can access without tokens.
|
|
128
|
+
- `gateway.controlUi.enabled` / `gateway.controlUi.port` - enable/disable Control UI and choose its port.
|
|
129
|
+
- `gateway.controlUi.pairingRequired` - require pairing for Control UI clients (recommended).
|
|
130
|
+
- `gateway.controlUi.allowInsecureAuth` - only for local dev when testing auth flows.
|
|
131
|
+
- `gateway.adapters.discord.*` - Discord output adapter:
|
|
132
|
+
- `enabled`, `token`, `mentionOnly`, `allowBots`, `allowedGuilds`, `allowedChannels`
|
|
133
|
+
- `channelSessions` to pin channels to a session (or `agent:<id>:` to force routing)
|
|
134
|
+
- `sessionCommand` for ad-hoc session overrides
|
|
135
|
+
- `responseChunkSize` to fit Discord message limits
|
|
136
|
+
- Optional `gatewayUrl`, `gatewayToken`, `gatewayPassword` to point the adapter at a remote gateway
|
|
137
|
+
|
|
138
|
+
### 2) Runtime flags (`wingman gateway start` / `run`)
|
|
139
|
+
|
|
140
|
+
- `--host`, `--port` - override bind address + port for this run.
|
|
141
|
+
- `--auth`, `--auth-mode`, `--token`, `--password` - enable auth without editing config.
|
|
142
|
+
- `--discovery mdns|tailscale`, `--name` - advertise your gateway for LAN or Tailnet discovery.
|
|
143
|
+
- `--max-nodes`, `--ping-interval`, `--ping-timeout` - tune scale and heartbeat behavior.
|
|
144
|
+
- `--log-level` - dial verbosity for debugging or production.
|
|
145
|
+
|
|
146
|
+
### 3) Environment overrides
|
|
147
|
+
|
|
148
|
+
- `WINGMAN_GATEWAY_TOKEN` - supply a token at runtime so you don't store secrets in config.
|
|
149
|
+
|
|
150
|
+
### Related gateway behavior (configured elsewhere)
|
|
151
|
+
|
|
152
|
+
- `agents.bindings` - deterministic routing rules used by the gateway to select an agent per inbound channel/message.
|
|
153
|
+
- `voice` - gateway TTS defaults (provider + settings), with optional per-agent overrides for voice-enabled UIs.
|
|
154
|
+
|
|
155
|
+
### Example configs (common setups)
|
|
156
|
+
|
|
157
|
+
#### 1) Local dev (single user, no auth)
|
|
158
|
+
|
|
159
|
+
```json
|
|
160
|
+
{
|
|
161
|
+
"gateway": {
|
|
162
|
+
"host": "127.0.0.1",
|
|
163
|
+
"port": 18789,
|
|
164
|
+
"auth": { "mode": "none" },
|
|
165
|
+
"controlUi": { "enabled": true, "port": 18790 }
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
#### 2) Shared LAN gateway (token auth + restricted outputs)
|
|
171
|
+
|
|
172
|
+
```json
|
|
173
|
+
{
|
|
174
|
+
"gateway": {
|
|
175
|
+
"host": "0.0.0.0",
|
|
176
|
+
"port": 18789,
|
|
177
|
+
"fsRoots": ["~/Projects", "~/.wingman/outputs"],
|
|
178
|
+
"auth": { "mode": "token" },
|
|
179
|
+
"controlUi": { "enabled": true, "port": 18790, "pairingRequired": true }
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Tip: set `WINGMAN_GATEWAY_TOKEN` at runtime so you do not store tokens in config.
|
|
185
|
+
|
|
186
|
+
#### 3) Headless gateway + Discord output adapter
|
|
187
|
+
|
|
188
|
+
```json
|
|
189
|
+
{
|
|
190
|
+
"gateway": {
|
|
191
|
+
"host": "0.0.0.0",
|
|
192
|
+
"port": 18789,
|
|
193
|
+
"auth": { "mode": "token" },
|
|
194
|
+
"controlUi": { "enabled": false },
|
|
195
|
+
"adapters": {
|
|
196
|
+
"discord": {
|
|
197
|
+
"enabled": true,
|
|
198
|
+
"token": "DISCORD_BOT_TOKEN",
|
|
199
|
+
"mentionOnly": true,
|
|
200
|
+
"allowedGuilds": ["123456789012345678"],
|
|
201
|
+
"allowedChannels": ["987654321098765432"],
|
|
202
|
+
"channelSessions": {
|
|
203
|
+
"987654321098765432": "agent:support:discord:channel:987654321098765432"
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
#### 4) Remote access over Tailscale + voice TTS
|
|
212
|
+
|
|
213
|
+
```json
|
|
214
|
+
{
|
|
215
|
+
"gateway": {
|
|
216
|
+
"host": "0.0.0.0",
|
|
217
|
+
"port": 18789,
|
|
218
|
+
"auth": { "mode": "token", "allowTailscale": true },
|
|
219
|
+
"controlUi": { "enabled": true, "port": 18790, "pairingRequired": true }
|
|
220
|
+
},
|
|
221
|
+
"voice": {
|
|
222
|
+
"provider": "elevenlabs",
|
|
223
|
+
"defaultPolicy": "off",
|
|
224
|
+
"elevenlabs": {
|
|
225
|
+
"voiceId": "VOICE_ID",
|
|
226
|
+
"modelId": "eleven_multilingual_v2",
|
|
227
|
+
"stability": 0.4,
|
|
228
|
+
"similarityBoost": 0.7
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Start discovery at runtime:
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
wingman gateway start --discovery tailscale --name "Work Gateway"
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
## Core Concepts
|
|
241
|
+
|
|
242
|
+
- **Deterministic routing**: bindings map inbound messages to a single agent by default.
|
|
243
|
+
- **Durable sessions**: sessions live in the gateway and persist across clients/devices.
|
|
244
|
+
- **Agent isolation**: each agent has its own workspace, config, and session store.
|
|
245
|
+
- **Explicit broadcast**: rooms enable parallel agent responses when requested.
|
|
246
|
+
|
|
247
|
+
## Capabilities
|
|
248
|
+
|
|
249
|
+
- **Channels + bindings** for deterministic routing across accounts and peers.
|
|
250
|
+
- **Routines** for scheduled runs and repeatable workflows.
|
|
251
|
+
- **Webhooks** to trigger agents from external systems.
|
|
252
|
+
- **Hooks** for pre/post tool automation.
|
|
253
|
+
- **Skills** for reusable, domain-specific instruction sets.
|
|
254
|
+
- **MCP tools** to connect external systems and custom integrations.
|
|
255
|
+
|
|
256
|
+
## Development
|
|
257
|
+
|
|
258
|
+
### Prerequisites
|
|
259
|
+
|
|
260
|
+
- Bun (required for `bun:sqlite` support)
|
|
261
|
+
- Node.js (for tools outside Bun)
|
|
262
|
+
|
|
263
|
+
### Install
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
bun install
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
### Build
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
cd apps/wingman
|
|
273
|
+
bun run build
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
### Run Gateway (with Control UI)
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
cd apps/wingman
|
|
280
|
+
./bin/wingman gateway start
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### Run Gateway + Web UI (hot reload)
|
|
284
|
+
|
|
285
|
+
```bash
|
|
286
|
+
cd apps/wingman
|
|
287
|
+
bun run dev
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Tests
|
|
291
|
+
|
|
292
|
+
```bash
|
|
293
|
+
cd apps/wingman
|
|
294
|
+
bun run test
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
### Config and Logs
|
|
298
|
+
|
|
299
|
+
- Config: `apps/wingman/.wingman/wingman.config.json`
|
|
300
|
+
- Logs: `~/.wingman/logs/wingman.log`
|
|
301
|
+
|
|
302
|
+
## Contributing Expectations
|
|
303
|
+
|
|
304
|
+
- Keep `docs/requirements/` current for any behavior changes.
|
|
305
|
+
- Add tests for new functionality.
|
|
306
|
+
- Ensure all tests and builds pass before submitting.
|
|
307
|
+
|
|
308
|
+
## License
|
|
309
|
+
|
|
310
|
+
See `LICENSE.txt`.
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@wingman-ai/gateway",
|
|
3
3
|
"displayName": "Wingman Agent",
|
|
4
4
|
"description": "Wingman-AI agentic coding assistant that works with Anthropic, OpenAI, Google, xAI and LMStudio.",
|
|
5
|
-
"version": "0.2.
|
|
5
|
+
"version": "0.2.1",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"bin": {
|
|
8
8
|
"wingman": "./bin/wingman"
|