@auto-engineer/cli 1.148.0 → 1.150.0
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/CHANGELOG.md +42 -0
- package/README.md +243 -92
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,47 @@
|
|
|
1
1
|
# @auto-engineer/cli
|
|
2
2
|
|
|
3
|
+
## 1.150.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`a502d47`](https://github.com/BeOnAuto/auto-engineer/commit/a502d472df528a1c5d53905898220c2a3a49d8a5) Thanks [@osamanar](https://github.com/osamanar)! -
|
|
8
|
+
|
|
9
|
+
- [`c96a70e`](https://github.com/BeOnAuto/auto-engineer/commit/c96a70e49f9f64213450d0b9840bc9a8b2b1d77d) Thanks [@osamanar](https://github.com/osamanar)! -
|
|
10
|
+
|
|
11
|
+
- [`4343bca`](https://github.com/BeOnAuto/auto-engineer/commit/4343bcaa2576703ae578fd9b7f5ec5b9776702a9) Thanks [@osamanar](https://github.com/osamanar)! -
|
|
12
|
+
|
|
13
|
+
- [`28ffce9`](https://github.com/BeOnAuto/auto-engineer/commit/28ffce9c8b95f0c3ca61728bd1f667fa9416d461) Thanks [@osamanar](https://github.com/osamanar)! -
|
|
14
|
+
|
|
15
|
+
- [`3fd5dbf`](https://github.com/BeOnAuto/auto-engineer/commit/3fd5dbfbfb4f7a5fe71ae53105b31a1b0f30f911) Thanks [@osamanar](https://github.com/osamanar)! -
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`41f3df3`](https://github.com/BeOnAuto/auto-engineer/commit/41f3df3025445ba92208c2b007b8e29a40489309) Thanks [@github-actions[bot]](https://github.com/github-actions%5Bbot%5D)! - - **global**: version packages
|
|
20
|
+
- **global**: major refresh to all the docs
|
|
21
|
+
- Updated dependencies [[`a502d47`](https://github.com/BeOnAuto/auto-engineer/commit/a502d472df528a1c5d53905898220c2a3a49d8a5), [`c96a70e`](https://github.com/BeOnAuto/auto-engineer/commit/c96a70e49f9f64213450d0b9840bc9a8b2b1d77d), [`4343bca`](https://github.com/BeOnAuto/auto-engineer/commit/4343bcaa2576703ae578fd9b7f5ec5b9776702a9), [`28ffce9`](https://github.com/BeOnAuto/auto-engineer/commit/28ffce9c8b95f0c3ca61728bd1f667fa9416d461), [`41f3df3`](https://github.com/BeOnAuto/auto-engineer/commit/41f3df3025445ba92208c2b007b8e29a40489309), [`3fd5dbf`](https://github.com/BeOnAuto/auto-engineer/commit/3fd5dbfbfb4f7a5fe71ae53105b31a1b0f30f911)]:
|
|
22
|
+
- @auto-engineer/file-store@1.150.0
|
|
23
|
+
- @auto-engineer/narrative@1.150.0
|
|
24
|
+
- @auto-engineer/pipeline@1.150.0
|
|
25
|
+
|
|
26
|
+
## 1.149.0
|
|
27
|
+
|
|
28
|
+
### Minor Changes
|
|
29
|
+
|
|
30
|
+
- [`e1eebbd`](https://github.com/BeOnAuto/auto-engineer/commit/e1eebbdf4f209780e790094d2e6887c4fa809f98) Thanks [@github-actions[bot]](https://github.com/github-actions%5Bbot%5D)! - - **server-generator-apollo-emmett**: add Given state ref hints to state.ts.ejs
|
|
31
|
+
- **server-generator-apollo-emmett**: context-aware nonCommandField instructions
|
|
32
|
+
- **server-generator-apollo-emmett**: add state context instruction
|
|
33
|
+
- **server-generator-apollo-emmett**: extract shared template helpers
|
|
34
|
+
- **server-generator-apollo-emmett**: filter state refs from hasGivenEvents in decide.ts.ejs
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- [`d38c81e`](https://github.com/BeOnAuto/auto-engineer/commit/d38c81e7bb442a39626564cf4f6d8d55b60d0a38) Thanks [@SamHatoum](https://github.com/SamHatoum)! -
|
|
39
|
+
|
|
40
|
+
- Updated dependencies [[`d38c81e`](https://github.com/BeOnAuto/auto-engineer/commit/d38c81e7bb442a39626564cf4f6d8d55b60d0a38), [`e1eebbd`](https://github.com/BeOnAuto/auto-engineer/commit/e1eebbdf4f209780e790094d2e6887c4fa809f98)]:
|
|
41
|
+
- @auto-engineer/file-store@1.149.0
|
|
42
|
+
- @auto-engineer/narrative@1.149.0
|
|
43
|
+
- @auto-engineer/pipeline@1.149.0
|
|
44
|
+
|
|
3
45
|
## 1.148.0
|
|
4
46
|
|
|
5
47
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1,35 +1,39 @@
|
|
|
1
1
|
# @auto-engineer/cli
|
|
2
2
|
|
|
3
|
-
Command-line interface
|
|
4
|
-
|
|
5
|
-
---
|
|
3
|
+
Command-line interface that starts the Auto Engineer pipeline server, loads plugins, synchronizes local files with remote sandboxes, and optionally exposes a public tunnel.
|
|
6
4
|
|
|
7
5
|
## Purpose
|
|
8
6
|
|
|
9
|
-
The CLI
|
|
7
|
+
The CLI is the primary entry point for Auto Engineer. It:
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
- Loads an `auto.config.ts` configuration file and registers pipeline plugins and command handlers
|
|
10
|
+
- Starts an HTTP + WebSocket server that exposes pipeline endpoints and real-time file sync
|
|
11
|
+
- Watches the local `narratives/` directory (configurable) and streams file changes to connected clients via Socket.IO
|
|
12
|
+
- Discovers TypeScript type definitions for external dependencies and includes them in the sync payload
|
|
13
|
+
- Optionally opens an ngrok tunnel for remote access from the Auto cloud app
|
|
14
|
+
- Renders a terminal UI (Ink-based) that aggregates stdout/stderr from registered child services
|
|
12
15
|
|
|
13
16
|
## Installation
|
|
14
17
|
|
|
15
18
|
```bash
|
|
16
|
-
# Global
|
|
19
|
+
# Global install
|
|
17
20
|
npm install -g @auto-engineer/cli
|
|
18
21
|
|
|
19
|
-
# Or
|
|
22
|
+
# Or run directly
|
|
20
23
|
npx @auto-engineer/cli
|
|
21
24
|
```
|
|
22
25
|
|
|
26
|
+
Both `auto` and `auto-engineer` are registered as bin commands.
|
|
27
|
+
|
|
23
28
|
## Quick Start
|
|
24
29
|
|
|
25
30
|
```bash
|
|
26
|
-
#
|
|
31
|
+
# 1. Create a config file in your project root
|
|
27
32
|
cat > auto.config.ts << 'EOF'
|
|
28
33
|
import { define } from '@auto-engineer/pipeline';
|
|
29
34
|
|
|
30
35
|
export const plugins = [
|
|
31
36
|
'@auto-engineer/narrative',
|
|
32
|
-
'@auto-engineer/server-generator-apollo-emmett',
|
|
33
37
|
];
|
|
34
38
|
|
|
35
39
|
export const pipeline = define('my-pipeline')
|
|
@@ -41,100 +45,135 @@ export const pipeline = define('my-pipeline')
|
|
|
41
45
|
.build();
|
|
42
46
|
EOF
|
|
43
47
|
|
|
44
|
-
#
|
|
48
|
+
# 2. Start the server (launches TUI by default)
|
|
45
49
|
auto start
|
|
46
50
|
|
|
47
|
-
#
|
|
51
|
+
# 3. In another terminal, check status
|
|
52
|
+
auto status
|
|
53
|
+
|
|
54
|
+
# 4. Dispatch a command
|
|
55
|
+
auto dispatch GenerateServer --data '{"modelPath": "./schema.json", "destination": "."}'
|
|
56
|
+
|
|
57
|
+
# 5. Open the pipeline diagram in a browser
|
|
48
58
|
auto diagram
|
|
49
59
|
```
|
|
50
60
|
|
|
51
|
-
---
|
|
52
|
-
|
|
53
61
|
## How-to Guides
|
|
54
62
|
|
|
55
|
-
### Start
|
|
63
|
+
### Start with Legacy Console Output
|
|
56
64
|
|
|
57
65
|
```bash
|
|
58
|
-
auto start
|
|
59
|
-
# or simply
|
|
60
|
-
auto
|
|
66
|
+
auto start --no-tui
|
|
61
67
|
```
|
|
62
68
|
|
|
63
|
-
###
|
|
69
|
+
### Connect to a Remote Server
|
|
64
70
|
|
|
65
71
|
```bash
|
|
66
|
-
auto
|
|
72
|
+
auto status --host http://remote-server:5555
|
|
73
|
+
auto dispatch MyCommand --host http://remote-server:5555 --data '{}'
|
|
67
74
|
```
|
|
68
75
|
|
|
69
|
-
###
|
|
76
|
+
### Enable an ngrok Tunnel
|
|
77
|
+
|
|
78
|
+
Requires a free [ngrok account](https://ngrok.com/signup).
|
|
70
79
|
|
|
71
80
|
```bash
|
|
72
|
-
|
|
81
|
+
# Via CLI flag
|
|
82
|
+
auto start --tunnel
|
|
83
|
+
|
|
84
|
+
# Or in auto.config.ts
|
|
85
|
+
export const tunnel = {
|
|
86
|
+
enabled: true,
|
|
87
|
+
authtoken: 'your-ngrok-authtoken', // or set NGROK_AUTHTOKEN in .env
|
|
88
|
+
domain: 'my-custom.ngrok.io', // optional reserved domain
|
|
89
|
+
};
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
When the tunnel is active, the CLI generates a bearer token and prints it alongside the public URL. Both are needed to connect from the Auto cloud app.
|
|
93
|
+
|
|
94
|
+
### Configure File Sync Directory
|
|
95
|
+
|
|
96
|
+
By default the file syncer watches `narratives/` relative to the config file. Override it:
|
|
97
|
+
|
|
98
|
+
```typescript
|
|
99
|
+
// auto.config.ts
|
|
100
|
+
export const fileSync = {
|
|
101
|
+
dir: './custom-sync-dir',
|
|
102
|
+
};
|
|
73
103
|
```
|
|
74
104
|
|
|
75
|
-
###
|
|
105
|
+
### Supply AI Provider Credentials
|
|
106
|
+
|
|
107
|
+
The file syncer encrypts provider credentials into a JWE token and includes it in the synced `auto.config.json`. Set one of these in your `.env`:
|
|
76
108
|
|
|
77
109
|
```bash
|
|
78
|
-
|
|
110
|
+
ANTHROPIC_API_KEY=sk-...
|
|
111
|
+
OPENAI_API_KEY=sk-...
|
|
112
|
+
GEMINI_API_KEY=...
|
|
113
|
+
XAI_API_KEY=...
|
|
114
|
+
|
|
115
|
+
# Or a custom provider
|
|
116
|
+
CUSTOM_PROVIDER_NAME=my-provider
|
|
117
|
+
CUSTOM_PROVIDER_BASE_URL=https://api.example.com
|
|
118
|
+
CUSTOM_PROVIDER_API_KEY=sk-...
|
|
119
|
+
CUSTOM_PROVIDER_DEFAULT_MODEL=my-model
|
|
120
|
+
|
|
121
|
+
# Optional: override the default model for any provider
|
|
122
|
+
DEFAULT_AI_MODEL=claude-sonnet-4-20250514
|
|
79
123
|
```
|
|
80
124
|
|
|
81
125
|
### Configure for CI/CD
|
|
82
126
|
|
|
83
127
|
```bash
|
|
84
|
-
auto start --port 8080 --config ./ci.config.ts
|
|
128
|
+
auto start --port 8080 --config ./ci.config.ts --no-tui
|
|
85
129
|
```
|
|
86
130
|
|
|
87
|
-
|
|
131
|
+
The `--no-tui` flag disables the interactive terminal UI, which is required for non-interactive environments.
|
|
88
132
|
|
|
89
133
|
## CLI Reference
|
|
90
134
|
|
|
91
|
-
###
|
|
135
|
+
### Global Options
|
|
92
136
|
|
|
93
|
-
|
|
137
|
+
| Option | Alias | Type | Default | Description |
|
|
138
|
+
|--------|-------|------|---------|-------------|
|
|
139
|
+
| `--port` | `-p` | number | `5555` | Server port (auto-increments if taken, up to +100) |
|
|
140
|
+
| `--debug` | `-d` | boolean | `false` | Enable debug mode |
|
|
141
|
+
| `--config` | `-c` | string | `auto.config.ts` | Path to config file |
|
|
142
|
+
| `--host` | | string | `localhost` | Connect to an existing server |
|
|
143
|
+
| `--tunnel` | | boolean | `false` | Enable ngrok tunnel |
|
|
144
|
+
| `--no-tui` | | boolean | `false` | Disable TUI, use legacy console output |
|
|
145
|
+
| `--version` | `-v` | | | Print version |
|
|
94
146
|
|
|
95
|
-
|
|
147
|
+
### Commands
|
|
96
148
|
|
|
97
|
-
|
|
98
|
-
auto start [options]
|
|
99
|
-
```
|
|
149
|
+
#### `auto start` (default)
|
|
100
150
|
|
|
101
|
-
|
|
102
|
-
|--------|-------|------|---------|-------------|
|
|
103
|
-
| `--port` | `-p` | number | 5555 | Server port |
|
|
104
|
-
| `--debug` | `-d` | boolean | false | Enable debug mode |
|
|
105
|
-
| `--config` | `-c` | string | auto.config.ts | Path to config file |
|
|
151
|
+
Start the pipeline server. This is the default command -- running `auto` with no subcommand is equivalent.
|
|
106
152
|
|
|
107
153
|
#### `auto dispatch <command>`
|
|
108
154
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
```bash
|
|
112
|
-
auto dispatch <command> [options]
|
|
113
|
-
```
|
|
155
|
+
Send a command to the running pipeline server.
|
|
114
156
|
|
|
115
157
|
| Option | Type | Default | Description |
|
|
116
158
|
|--------|------|---------|-------------|
|
|
117
|
-
| `--data` | string | `{}` | Command
|
|
118
|
-
| `--host` | string | localhost | Connect to existing server |
|
|
119
|
-
|
|
120
|
-
#### `auto status`
|
|
121
|
-
|
|
122
|
-
Check pipeline server health and registry status.
|
|
159
|
+
| `--data` | string (JSON) | `{}` | Command payload |
|
|
123
160
|
|
|
124
161
|
```bash
|
|
125
|
-
auto
|
|
162
|
+
auto dispatch GenerateServer --data '{"modelPath": "./schema.json"}'
|
|
126
163
|
```
|
|
127
164
|
|
|
128
|
-
#### `auto
|
|
165
|
+
#### `auto status`
|
|
129
166
|
|
|
130
|
-
|
|
167
|
+
Query the server's `/health` and `/registry` endpoints. Prints uptime, registered command count, and event handler count.
|
|
131
168
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
169
|
+
#### `auto diagram`
|
|
170
|
+
|
|
171
|
+
Open the pipeline diagram (`/pipeline/diagram`) in the default browser.
|
|
135
172
|
|
|
136
173
|
### Configuration File
|
|
137
174
|
|
|
175
|
+
The CLI looks for `auto.config.ts` or `auto.config.js` in the current working directory.
|
|
176
|
+
|
|
138
177
|
```typescript
|
|
139
178
|
// auto.config.ts
|
|
140
179
|
import { define } from '@auto-engineer/pipeline';
|
|
@@ -153,89 +192,201 @@ export const pipeline = define('my-pipeline')
|
|
|
153
192
|
destination: e.data.directory,
|
|
154
193
|
}))
|
|
155
194
|
.build();
|
|
195
|
+
|
|
196
|
+
// Optional
|
|
197
|
+
export const fileSync = {
|
|
198
|
+
dir: 'narratives', // directory to watch and sync
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
export const tunnel = {
|
|
202
|
+
enabled: false, // enable ngrok tunnel
|
|
203
|
+
authtoken: 'ngrok-token', // or use NGROK_AUTHTOKEN env var
|
|
204
|
+
domain: 'my.ngrok.io', // optional reserved domain
|
|
205
|
+
token: 'custom-bearer', // optional fixed bearer token
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
export const COMMANDS = [
|
|
209
|
+
{
|
|
210
|
+
name: 'MyCommand',
|
|
211
|
+
handle: async (data) => ({ type: 'MyCommandDone', data: {} }),
|
|
212
|
+
},
|
|
213
|
+
];
|
|
156
214
|
```
|
|
157
215
|
|
|
158
|
-
|
|
216
|
+
### Server Endpoints
|
|
217
|
+
|
|
218
|
+
| Endpoint | Method | Description |
|
|
219
|
+
|----------|--------|-------------|
|
|
220
|
+
| `/health` | GET | Health check (status, uptime) |
|
|
221
|
+
| `/registry` | GET | List registered command and event handlers |
|
|
222
|
+
| `/pipeline` | GET | Pipeline state |
|
|
223
|
+
| `/pipeline/diagram` | GET | Visual pipeline diagram |
|
|
224
|
+
| `/events` | GET | SSE event stream |
|
|
225
|
+
| `/command` | POST | Dispatch a command (`{ type, data }`) |
|
|
226
|
+
| `/configure` | POST | Set service token and org/project IDs |
|
|
227
|
+
| `ws://.../file-sync` | Socket.IO | Bi-directional file sync |
|
|
228
|
+
|
|
229
|
+
### Subpath Exports
|
|
230
|
+
|
|
231
|
+
| Export | Description |
|
|
232
|
+
|--------|-------------|
|
|
233
|
+
| `@auto-engineer/cli` | `startServer`, `getServiceRegistry`, types |
|
|
234
|
+
| `@auto-engineer/cli/server` | Direct server module import |
|
|
159
235
|
|
|
160
236
|
## Troubleshooting
|
|
161
237
|
|
|
162
|
-
###
|
|
238
|
+
### "No pipeline config found" on Start
|
|
163
239
|
|
|
164
|
-
**Symptom:** `No pipeline config found
|
|
240
|
+
**Symptom:** Server exits with `No pipeline config found. Create an auto.config.ts file.`
|
|
165
241
|
|
|
166
|
-
**Cause:**
|
|
242
|
+
**Cause:** No `auto.config.ts` or `auto.config.js` exists in the current working directory.
|
|
167
243
|
|
|
168
244
|
**Solution:**
|
|
169
245
|
|
|
170
246
|
```bash
|
|
171
|
-
# Create a minimal config
|
|
172
247
|
cat > auto.config.ts << 'EOF'
|
|
248
|
+
import { define } from '@auto-engineer/pipeline';
|
|
173
249
|
export const plugins = [];
|
|
174
|
-
export const pipeline =
|
|
250
|
+
export const pipeline = define('default').build();
|
|
175
251
|
EOF
|
|
176
252
|
```
|
|
177
253
|
|
|
178
254
|
### Port Already in Use
|
|
179
255
|
|
|
180
|
-
**Symptom:** Server
|
|
256
|
+
**Symptom:** Server starts on a different port than expected.
|
|
181
257
|
|
|
182
|
-
**Cause:**
|
|
258
|
+
**Cause:** The requested port is occupied. The CLI auto-scans up to 100 ports above the requested one via `get-port`.
|
|
259
|
+
|
|
260
|
+
**Solution:** Check the actual port in the startup output, or specify a known-free port:
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
auto start --port 6000
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### Plugin Command Handlers Not Found
|
|
267
|
+
|
|
268
|
+
**Symptom:** Dispatching a command returns an error about missing handlers.
|
|
269
|
+
|
|
270
|
+
**Cause:** The plugin package is not installed, not built, or does not export a `COMMANDS` array.
|
|
271
|
+
|
|
272
|
+
**Solution:**
|
|
273
|
+
|
|
274
|
+
1. Install the plugin: `pnpm add @auto-engineer/my-plugin`
|
|
275
|
+
2. Build it: `pnpm --filter @auto-engineer/my-plugin build`
|
|
276
|
+
3. Verify it exports `COMMANDS` from its main entry point or has a `commands/` directory with `.js` files that export handlers
|
|
277
|
+
|
|
278
|
+
### ngrok Tunnel Fails to Start
|
|
279
|
+
|
|
280
|
+
**Symptom:** Warning `Failed to start ngrok tunnel` appears; server continues without tunnel.
|
|
281
|
+
|
|
282
|
+
**Cause:** Missing or invalid ngrok authtoken.
|
|
183
283
|
|
|
184
284
|
**Solution:**
|
|
185
285
|
|
|
186
286
|
```bash
|
|
187
|
-
|
|
287
|
+
# Set in .env
|
|
288
|
+
echo 'NGROK_AUTHTOKEN=your-token' >> .env
|
|
289
|
+
|
|
290
|
+
# Or in auto.config.ts
|
|
291
|
+
export const tunnel = {
|
|
292
|
+
enabled: true,
|
|
293
|
+
authtoken: 'your-token',
|
|
294
|
+
};
|
|
188
295
|
```
|
|
189
296
|
|
|
190
|
-
###
|
|
297
|
+
### TUI Not Rendering Correctly
|
|
191
298
|
|
|
192
|
-
**Symptom:**
|
|
299
|
+
**Symptom:** Garbled output or blank screen.
|
|
193
300
|
|
|
194
|
-
**Cause:**
|
|
301
|
+
**Cause:** Terminal does not support the Ink rendering framework, or the process is not attached to a TTY.
|
|
195
302
|
|
|
196
303
|
**Solution:**
|
|
197
304
|
|
|
198
305
|
```bash
|
|
199
|
-
|
|
306
|
+
auto start --no-tui
|
|
200
307
|
```
|
|
201
308
|
|
|
202
309
|
### Enable Debug Logging
|
|
203
310
|
|
|
204
311
|
```bash
|
|
312
|
+
# All auto debug output
|
|
205
313
|
DEBUG=auto:* auto start
|
|
206
|
-
```
|
|
207
314
|
|
|
208
|
-
|
|
315
|
+
# File syncer only
|
|
316
|
+
DEBUG=auto:cli:file-syncer auto start
|
|
317
|
+
|
|
318
|
+
# Type definition resolution
|
|
319
|
+
DEBUG=auto-engineer:file-syncer:* auto start
|
|
320
|
+
```
|
|
209
321
|
|
|
210
322
|
## Architecture
|
|
211
323
|
|
|
212
324
|
```
|
|
325
|
+
bin/
|
|
326
|
+
auto.ts # Thin shim: spawns src/index.js with forwarded args
|
|
213
327
|
src/
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
328
|
+
index.ts # CLI entry: Commander program, start/dispatch/status/diagram
|
|
329
|
+
server.ts # startServer(): config loading, plugin discovery, PipelineServer + FileSyncer
|
|
330
|
+
config-loader.ts # Loads auto.config.ts via jiti, resolves defaults
|
|
331
|
+
tunnel.ts # ngrok tunnel, bearer-token auth middleware, service-token store
|
|
332
|
+
tui/
|
|
333
|
+
index.tsx # renderTui() — Ink render entry
|
|
334
|
+
App.tsx # Root Ink component
|
|
335
|
+
Dashboard.tsx # Dashboard UI
|
|
336
|
+
ServiceRegistry.ts # Tracks registered child services (id, streams, process)
|
|
337
|
+
LogBuffer.ts # Ring buffer for service log lines
|
|
338
|
+
hooks/
|
|
339
|
+
useServiceStreams.ts # Wires Readable streams into LogBuffer
|
|
340
|
+
file-syncer/
|
|
341
|
+
index.ts # FileSyncer class: chokidar watch, Socket.IO sync, auto.config.json virtual file
|
|
342
|
+
types/wire.ts # WireChange, WireInitial protocol types
|
|
343
|
+
sync/
|
|
344
|
+
resolveSyncFileSet.ts # Computes the set of files to sync (narratives + .d.ts externals)
|
|
345
|
+
crypto/
|
|
346
|
+
jwe-encryptor.ts # Encrypts AI provider credentials as JWE using JWKS public key
|
|
347
|
+
provider-resolver.ts # Detects active AI provider from env vars
|
|
348
|
+
discovery/
|
|
349
|
+
bareImports.ts # Extracts bare import specifiers from source files
|
|
350
|
+
dts.ts # Probes node_modules for entry .d.ts files
|
|
351
|
+
utils/
|
|
352
|
+
hash.ts # md5, readBase64, statSize via NodeFileStore
|
|
353
|
+
path.ts # Wire path encoding/decoding, external path remapping
|
|
219
354
|
```
|
|
220
355
|
|
|
221
|
-
|
|
356
|
+
```mermaid
|
|
357
|
+
graph TD
|
|
358
|
+
A[bin/auto.ts] --> B[src/index.ts<br/>Commander CLI]
|
|
359
|
+
B --> C[src/server.ts<br/>startServer]
|
|
360
|
+
C --> D["@auto-engineer/pipeline<br/>PipelineServer"]
|
|
361
|
+
C --> E[file-syncer/index.ts<br/>FileSyncer]
|
|
362
|
+
C --> F[config-loader.ts]
|
|
363
|
+
C --> G[tui/index.tsx]
|
|
364
|
+
B --> H[tunnel.ts<br/>ngrok + auth]
|
|
365
|
+
E --> I["@auto-engineer/file-store<br/>NodeFileStore"]
|
|
366
|
+
E --> J["@auto-engineer/narrative<br/>getScenes"]
|
|
367
|
+
E --> K[crypto/jwe-encryptor.ts]
|
|
368
|
+
E --> L[discovery/dts.ts]
|
|
369
|
+
E --> M[discovery/bareImports.ts]
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
### Internal Dependencies
|
|
373
|
+
|
|
374
|
+
| Package | Role |
|
|
375
|
+
|---------|------|
|
|
376
|
+
| `@auto-engineer/pipeline` | Pipeline server, message bus, command handler registration |
|
|
377
|
+
| `@auto-engineer/narrative` | Scene graph and file discovery for sync (`getScenes`) |
|
|
378
|
+
| `@auto-engineer/file-store` | `NodeFileStore` virtual filesystem abstraction |
|
|
379
|
+
|
|
380
|
+
### Key Third-party Dependencies
|
|
222
381
|
|
|
223
|
-
|
|
|
224
|
-
|
|
225
|
-
| `/health` | Server health check |
|
|
226
|
-
| `/registry` | List registered handlers |
|
|
227
|
-
| `/pipeline` | Pipeline state |
|
|
228
|
-
| `/pipeline/diagram` | Visual diagram |
|
|
229
|
-
| `/events` | SSE stream |
|
|
230
|
-
| `ws://<syncPort>` | File sync WebSocket |
|
|
231
|
-
|
|
232
|
-
### Dependencies
|
|
233
|
-
|
|
234
|
-
| Package | Usage |
|
|
235
|
-
|---------|-------|
|
|
236
|
-
| `@auto-engineer/pipeline` | Pipeline server infrastructure |
|
|
237
|
-
| `@auto-engineer/narrative` | File discovery for sync |
|
|
238
|
-
| `@auto-engineer/file-store` | Virtual file system |
|
|
382
|
+
| Package | Role |
|
|
383
|
+
|---------|------|
|
|
239
384
|
| `commander` | CLI argument parsing |
|
|
240
|
-
| `socket.io` | WebSocket
|
|
241
|
-
| `chokidar` | File system
|
|
385
|
+
| `socket.io` | WebSocket-based file sync transport |
|
|
386
|
+
| `chokidar` | File system watcher |
|
|
387
|
+
| `ink` / `@inkjs/ui` | Terminal UI rendering (React-based) |
|
|
388
|
+
| `@ngrok/ngrok` | Public tunnel for remote access |
|
|
389
|
+
| `jose` | JWE encryption of AI provider credentials |
|
|
390
|
+
| `jiti` | Runtime TypeScript config loading |
|
|
391
|
+
| `get-port` | Finds available port |
|
|
392
|
+
| `ora` | Terminal spinner |
|
package/package.json
CHANGED
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"ora": "^8.0.1",
|
|
45
45
|
"react": "^18.3.1",
|
|
46
46
|
"socket.io": "^4.7.5",
|
|
47
|
-
"@auto-engineer/file-store": "1.
|
|
48
|
-
"@auto-engineer/narrative": "1.
|
|
49
|
-
"@auto-engineer/pipeline": "1.
|
|
47
|
+
"@auto-engineer/file-store": "1.150.0",
|
|
48
|
+
"@auto-engineer/narrative": "1.150.0",
|
|
49
|
+
"@auto-engineer/pipeline": "1.150.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/node": "^22.0.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"ink-testing-library": "^4.0.0",
|
|
55
55
|
"socket.io-client": "^4.8.3"
|
|
56
56
|
},
|
|
57
|
-
"version": "1.
|
|
57
|
+
"version": "1.150.0",
|
|
58
58
|
"scripts": {
|
|
59
59
|
"build": "tsc && tsx ../../scripts/fix-esm-imports.ts && chmod +x dist/bin/auto.js",
|
|
60
60
|
"test": "vitest run --reporter=dot",
|