@gowelle/stint-agent 1.2.37 → 1.2.38

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 CHANGED
@@ -1,256 +1,256 @@
1
- # Stint Agent
2
-
3
- [![npm version](https://img.shields.io/npm/v/@gowelle/stint-agent.svg)](https://www.npmjs.com/package/@gowelle/stint-agent)
4
- [![npm downloads](https://img.shields.io/npm/dm/@gowelle/stint-agent.svg)](https://www.npmjs.com/package/@gowelle/stint-agent)
5
- [![CI](https://github.com/gowelle/stint-agent/actions/workflows/ci.yml/badge.svg)](https://github.com/gowelle/stint-agent/actions/workflows/ci.yml)
6
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
- [![Node.js](https://img.shields.io/badge/node-%3E%3D20.0.0-brightgreen.svg)](https://nodejs.org/)
8
-
9
- The official CLI agent for [Stint](https://stint.codes) — a lightweight daemon that bridges the Stint web app and your local git repositories, enabling automatic commit execution and real-time repo syncing.
10
-
11
- ## Features
12
-
13
- - 🔐 Secure authentication with OAuth
14
- - 🔄 Real-time WebSocket connection to Stint
15
- - 📦 Automatic commit execution
16
- - 🔍 Repository status syncing
17
- - 🖥️ Background daemon process
18
- - 📝 Comprehensive logging and filtering
19
- - 📊 Interactive status dashboard
20
- - 🚀 Multiple release channels (stable/beta/nightly)
21
- - 🔍 Built-in environment diagnostics
22
- - 📈 Resource usage monitoring
23
- - 📁 File selection for commits (sync changed files to web app)
24
-
25
- For detailed feature documentation, see the **[Features Guide](docs/features.md)**.
26
-
27
- ## Installation
28
-
29
- ```bash
30
- npm install -g @gowelle/stint-agent
31
- # or
32
- pnpm add -g @gowelle/stint-agent
33
- ```
34
-
35
- ## Quick Start
36
-
37
- ```bash
38
- # Authenticate with Stint
39
- stint login
40
-
41
- # Check your authentication status
42
- stint whoami
43
-
44
- # Link a project (or create a new one)
45
- cd /path/to/your/project
46
- stint link
47
-
48
- # Start the daemon
49
- stint daemon start
50
-
51
- # Check daemon status
52
- stint daemon status
53
- ```
54
-
55
- ## Commands
56
-
57
- ### General
58
-
59
- | Command | Description |
60
- | ----------------------------- | ---------------------------------- |
61
- | `stint --version`, `stint -V` | Show current agent version |
62
- | `stint --help`, `stint -h` | Show help information |
63
- | `stint update` | Update agent to the latest version |
64
-
65
- ### Authentication
66
-
67
- | Command | Description |
68
- | -------------- | ------------------------------------------------- |
69
- | `stint login` | Authenticate with Stint (opens browser for OAuth) |
70
- | `stint logout` | Remove stored credentials |
71
- | `stint whoami` | Show current user and machine information |
72
-
73
- ### Daemon Lifecycle
74
-
75
- | Command | Description |
76
- | ------------------------------- | --------------------------------------------------------- |
77
- | `stint install` | Register daemon to run on system startup (Login required) |
78
- | `stint uninstall` | Remove daemon from system startup |
79
- | `stint daemon start` | Start background daemon manually |
80
- | `stint daemon stop` | Stop daemon gracefully |
81
- | `stint daemon status` | Check if daemon is running |
82
- | `stint daemon logs [--lines N]` | View daemon logs (default: 50 lines) |
83
- | `stint daemon restart` | Restart the daemon |
84
-
85
- ### Project Management
86
-
87
- | Command | Description |
88
- | ---------------------------- | --------------------------------------------------------------- |
89
- | `stint link` | Link current directory to a Stint project (or create a new one) |
90
- | `stint unlink [--force]` | Remove project link |
91
- | `stint status [--dashboard]` | Show status (use `-d` for interactive dashboard) |
92
- | `stint sync` | Manually sync repository information to server |
93
-
94
- ### Commit Operations
95
-
96
- | Command | Description |
97
- | -------------------------- | ------------------------------------------------------ |
98
- | `stint commits` | List pending commits for this repository |
99
- | `stint commit <id>` | Execute a specific pending commit (supports partial ID)|
100
-
101
- **`stint commit` Options:**
102
-
103
- | Option | Description |
104
- | -------------- | --------------------------------------------------- |
105
- | `--auto-stage` | Automatically stage files specified in the commit |
106
- | `--push` | Push changes to remote after committing |
107
- | `--force` | Skip file validation warnings |
108
-
109
- ### Commit Workflow Controls
110
-
111
- Stint supports advanced commit controls configured via the web dashboard:
112
-
113
- 1. **Commit Templates**: Enforce message conventions (e.g., conventional commits).
114
- 2. **Pre-commit Hooks**: Automatically run local commands (linting, tests) before the agent executes a commit.
115
- * **Blocking**: Configure hooks to prevent commit on failure.
116
- * **Timeouts**: Configurable timeout execution.
117
-
118
- Configure these securely in your Project Settings on [stint.codes](https://stint.codes).
119
-
120
- ## Complete Workflow
121
-
122
- ```bash
123
- # 1. Install and authenticate
124
- npm install -g @gowelle/stint-agent
125
- stint login
126
-
127
- # 2. Link your project
128
- cd /path/to/your/project
129
- stint link
130
-
131
- # 3. Start the daemon
132
- stint daemon start
133
-
134
- # 4. Check status
135
- stint status
136
-
137
- # Now commits approved in the web app will execute automatically!
138
- ```
139
-
140
- ## Configuration
141
-
142
- ### Desktop Notifications
143
-
144
- The daemon sends desktop notifications for important events. Notifications can be controlled globally or per-category.
145
-
146
- #### Notification Categories
147
-
148
- | Category | Events | Default |
149
- | ------------- | --------------------------------------------- | ------- |
150
- | `commits` | Commit approved, pending, pushed, failed | ✅ On |
151
- | `sync` | Sync requested, project updated | ❌ Off |
152
- | `suggestions` | New AI suggestions | ✅ On |
153
-
154
- > **Note:** `sync` is disabled by default because these events fire frequently during active development.
155
-
156
- #### Toggle All Notifications
157
-
158
- ```bash
159
- # Disable all notifications
160
- stint config set notifications.enabled false
161
-
162
- # Enable all notifications
163
- stint config set notifications.enabled true
164
- ```
165
-
166
- #### Toggle by Category
167
-
168
- ```bash
169
- # Disable sync notifications (noisy during development)
170
- stint config set notifications.sync false
171
-
172
- # Enable commit notifications
173
- stint config set notifications.commits true
174
-
175
- # Disable suggestion notifications
176
- stint config set notifications.suggestions false
177
- ```
178
-
179
- #### View Current Settings
180
-
181
- ```bash
182
- stint config list
183
- ```
184
-
185
- > **Note:** Events are still logged even when notifications are disabled.
186
-
187
- ## Troubleshooting
188
-
189
- For comprehensive troubleshooting help, see the **[Troubleshooting Guide](docs/TROUBLESHOOTING.md)**.
190
-
191
- ### Quick Tips
192
-
193
- **"Not authenticated" error**
194
-
195
- ```bash
196
- stint login
197
- ```
198
-
199
- **Daemon won't start**
200
-
201
- ```bash
202
- stint daemon status # Check if already running
203
- stint daemon logs # Check logs for errors
204
- stint daemon restart # Restart daemon
205
- ```
206
-
207
- **For detailed solutions**, including:
208
-
209
- - Connection issues (WebSocket, API, Circuit Breaker)
210
- - Daemon problems (crashes, autostart)
211
- - Authentication errors
212
- - Git operation failures
213
- - Platform-specific issues (Windows, macOS, Linux)
214
-
215
- See the **[Troubleshooting Guide](docs/TROUBLESHOOTING.md)**.
216
-
217
- ## Logging
218
-
219
- Logs are stored in your system's config directory:
220
-
221
- | Platform | Log Location |
222
- | ----------- | ----------------------------------- |
223
- | **macOS** | `~/.config/stint/logs/` |
224
- | **Linux** | `~/.config/stint/logs/` |
225
- | **Windows** | `%USERPROFILE%\.config\stint\logs\` |
226
-
227
- Log files:
228
-
229
- - `agent.log` - General CLI operations
230
- - `daemon.log` - Daemon process logs
231
- - `error.log` - Error details
232
-
233
- ## Development
234
-
235
- ```bash
236
- git clone https://github.com/gowelle/stint-agent.git
237
- cd stint-agent
238
- pnpm install
239
- pnpm build
240
- pnpm dev # Watch mode
241
- ```
242
-
243
- ## Security
244
-
245
- - Tokens are encrypted at rest using machine-specific keys
246
- - All API communication uses HTTPS
247
- - WebSocket connections are authenticated
248
- - Git operations are restricted to linked directories
249
-
250
- ## License
251
-
252
- MIT © [Gowelle John](https://github.com/gowelle)
253
-
254
- ## Support
255
-
256
- For issues and questions, please [open an issue](https://github.com/gowelle/stint-agent/issues).
1
+ # Stint Agent
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@gowelle/stint-agent.svg)](https://www.npmjs.com/package/@gowelle/stint-agent)
4
+ [![npm downloads](https://img.shields.io/npm/dm/@gowelle/stint-agent.svg)](https://www.npmjs.com/package/@gowelle/stint-agent)
5
+ [![CI](https://github.com/gowelle/stint-agent/actions/workflows/ci.yml/badge.svg)](https://github.com/gowelle/stint-agent/actions/workflows/ci.yml)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+ [![Node.js](https://img.shields.io/badge/node-%3E%3D20.0.0-brightgreen.svg)](https://nodejs.org/)
8
+
9
+ The official CLI agent for [Stint](https://stint.codes) — a lightweight daemon that bridges the Stint web app and your local git repositories, enabling automatic commit execution and real-time repo syncing.
10
+
11
+ ## Features
12
+
13
+ - 🔐 Secure authentication with OAuth
14
+ - 🔄 Real-time WebSocket connection to Stint
15
+ - 📦 Automatic commit execution
16
+ - 🔍 Repository status syncing
17
+ - 🖥️ Background daemon process
18
+ - 📝 Comprehensive logging and filtering
19
+ - 📊 Interactive status dashboard
20
+ - 🚀 Multiple release channels (stable/beta/nightly)
21
+ - 🔍 Built-in environment diagnostics
22
+ - 📈 Resource usage monitoring
23
+ - 📁 File selection for commits (sync changed files to web app)
24
+
25
+ For detailed feature documentation, see the **[Features Guide](docs/features.md)**.
26
+
27
+ ## Installation
28
+
29
+ ```bash
30
+ npm install -g @gowelle/stint-agent
31
+ # or
32
+ pnpm add -g @gowelle/stint-agent
33
+ ```
34
+
35
+ ## Quick Start
36
+
37
+ ```bash
38
+ # Authenticate with Stint
39
+ stint login
40
+
41
+ # Check your authentication status
42
+ stint whoami
43
+
44
+ # Link a project (or create a new one)
45
+ cd /path/to/your/project
46
+ stint link
47
+
48
+ # Start the daemon
49
+ stint daemon start
50
+
51
+ # Check daemon status
52
+ stint daemon status
53
+ ```
54
+
55
+ ## Commands
56
+
57
+ ### General
58
+
59
+ | Command | Description |
60
+ | ----------------------------- | ---------------------------------- |
61
+ | `stint --version`, `stint -V` | Show current agent version |
62
+ | `stint --help`, `stint -h` | Show help information |
63
+ | `stint update` | Update agent to the latest version |
64
+
65
+ ### Authentication
66
+
67
+ | Command | Description |
68
+ | -------------- | ------------------------------------------------- |
69
+ | `stint login` | Authenticate with Stint (opens browser for OAuth) |
70
+ | `stint logout` | Remove stored credentials |
71
+ | `stint whoami` | Show current user and machine information |
72
+
73
+ ### Daemon Lifecycle
74
+
75
+ | Command | Description |
76
+ | ------------------------------- | --------------------------------------------------------- |
77
+ | `stint install` | Register daemon to run on system startup (Login required) |
78
+ | `stint uninstall` | Remove daemon from system startup |
79
+ | `stint daemon start` | Start background daemon manually |
80
+ | `stint daemon stop` | Stop daemon gracefully |
81
+ | `stint daemon status` | Check if daemon is running |
82
+ | `stint daemon logs [--lines N]` | View daemon logs (default: 50 lines) |
83
+ | `stint daemon restart` | Restart the daemon |
84
+
85
+ ### Project Management
86
+
87
+ | Command | Description |
88
+ | ---------------------------- | --------------------------------------------------------------- |
89
+ | `stint link` | Link current directory to a Stint project (or create a new one) |
90
+ | `stint unlink [--force]` | Remove project link |
91
+ | `stint status [--dashboard]` | Show status (use `-d` for interactive dashboard) |
92
+ | `stint sync` | Manually sync repository information to server |
93
+
94
+ ### Commit Operations
95
+
96
+ | Command | Description |
97
+ | ------------------- | ------------------------------------------------------- |
98
+ | `stint commits` | List pending commits for this repository |
99
+ | `stint commit <id>` | Execute a specific pending commit (supports partial ID) |
100
+
101
+ **`stint commit` Options:**
102
+
103
+ | Option | Description |
104
+ | -------------- | ------------------------------------------------- |
105
+ | `--auto-stage` | Automatically stage files specified in the commit |
106
+ | `--push` | Push changes to remote after committing |
107
+ | `--force` | Skip file validation warnings |
108
+
109
+ ### Commit Workflow Controls
110
+
111
+ Stint supports advanced commit controls configured via the web dashboard:
112
+
113
+ 1. **Commit Templates**: Enforce message conventions (e.g., conventional commits).
114
+ 2. **Pre-commit Hooks**: Automatically run local commands (linting, tests) before the agent executes a commit.
115
+ - **Blocking**: Configure hooks to prevent commit on failure.
116
+ - **Timeouts**: Configurable timeout execution.
117
+
118
+ Configure these securely in your Project Settings on [stint.codes](https://stint.codes).
119
+
120
+ ## Complete Workflow
121
+
122
+ ```bash
123
+ # 1. Install and authenticate
124
+ npm install -g @gowelle/stint-agent
125
+ stint login
126
+
127
+ # 2. Link your project
128
+ cd /path/to/your/project
129
+ stint link
130
+
131
+ # 3. Start the daemon
132
+ stint daemon start
133
+
134
+ # 4. Check status
135
+ stint status
136
+
137
+ # Now commits approved in the web app will execute automatically!
138
+ ```
139
+
140
+ ## Configuration
141
+
142
+ ### Desktop Notifications
143
+
144
+ The daemon sends desktop notifications for important events. Notifications can be controlled globally or per-category.
145
+
146
+ #### Notification Categories
147
+
148
+ | Category | Events | Default |
149
+ | ------------- | ---------------------------------------- | ------- |
150
+ | `commits` | Commit approved, pending, pushed, failed | ✅ On |
151
+ | `sync` | Sync requested, project updated | ❌ Off |
152
+ | `suggestions` | New AI suggestions | ✅ On |
153
+
154
+ > **Note:** `sync` is disabled by default because these events fire frequently during active development.
155
+
156
+ #### Toggle All Notifications
157
+
158
+ ```bash
159
+ # Disable all notifications
160
+ stint config set notifications.enabled false
161
+
162
+ # Enable all notifications
163
+ stint config set notifications.enabled true
164
+ ```
165
+
166
+ #### Toggle by Category
167
+
168
+ ```bash
169
+ # Disable sync notifications (noisy during development)
170
+ stint config set notifications.sync false
171
+
172
+ # Enable commit notifications
173
+ stint config set notifications.commits true
174
+
175
+ # Disable suggestion notifications
176
+ stint config set notifications.suggestions false
177
+ ```
178
+
179
+ #### View Current Settings
180
+
181
+ ```bash
182
+ stint config list
183
+ ```
184
+
185
+ > **Note:** Events are still logged even when notifications are disabled.
186
+
187
+ ## Troubleshooting
188
+
189
+ For comprehensive troubleshooting help, see the **[Troubleshooting Guide](docs/TROUBLESHOOTING.md)**.
190
+
191
+ ### Quick Tips
192
+
193
+ **"Not authenticated" error**
194
+
195
+ ```bash
196
+ stint login
197
+ ```
198
+
199
+ **Daemon won't start**
200
+
201
+ ```bash
202
+ stint daemon status # Check if already running
203
+ stint daemon logs # Check logs for errors
204
+ stint daemon restart # Restart daemon
205
+ ```
206
+
207
+ **For detailed solutions**, including:
208
+
209
+ - Connection issues (WebSocket, API, Circuit Breaker)
210
+ - Daemon problems (crashes, autostart)
211
+ - Authentication errors
212
+ - Git operation failures
213
+ - Platform-specific issues (Windows, macOS, Linux)
214
+
215
+ See the **[Troubleshooting Guide](docs/TROUBLESHOOTING.md)**.
216
+
217
+ ## Logging
218
+
219
+ Logs are stored in your system's config directory:
220
+
221
+ | Platform | Log Location |
222
+ | ----------- | ----------------------------------- |
223
+ | **macOS** | `~/.config/stint/logs/` |
224
+ | **Linux** | `~/.config/stint/logs/` |
225
+ | **Windows** | `%USERPROFILE%\.config\stint\logs\` |
226
+
227
+ Log files:
228
+
229
+ - `agent.log` - General CLI operations
230
+ - `daemon.log` - Daemon process logs
231
+ - `error.log` - Error details
232
+
233
+ ## Development
234
+
235
+ ```bash
236
+ git clone https://github.com/gowelle/stint-agent.git
237
+ cd stint-agent
238
+ pnpm install
239
+ pnpm build
240
+ pnpm dev # Watch mode
241
+ ```
242
+
243
+ ## Security
244
+
245
+ - Tokens are encrypted at rest using machine-specific keys
246
+ - All API communication uses HTTPS
247
+ - WebSocket connections are authenticated
248
+ - Git operations are restricted to linked directories
249
+
250
+ ## License
251
+
252
+ MIT © [Gowelle John](https://github.com/gowelle)
253
+
254
+ ## Support
255
+
256
+ For issues and questions, please [open an issue](https://github.com/gowelle/stint-agent/issues).
@@ -2,10 +2,10 @@ import {
2
2
  gitService,
3
3
  projectService,
4
4
  validatePidFile
5
- } from "./chunk-XRNTJYCQ.js";
5
+ } from "./chunk-FJO77ALZ.js";
6
6
  import {
7
7
  authService
8
- } from "./chunk-HPHXBSGB.js";
8
+ } from "./chunk-LJLCMCK6.js";
9
9
 
10
10
  // src/components/StatusDashboard.tsx
11
11
  import { useState, useEffect } from "react";
@@ -0,0 +1,7 @@
1
+ import {
2
+ apiService
3
+ } from "./chunk-SE4UOLIV.js";
4
+ import "./chunk-LJLCMCK6.js";
5
+ export {
6
+ apiService
7
+ };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  config,
3
3
  logger
4
- } from "./chunk-HPHXBSGB.js";
4
+ } from "./chunk-LJLCMCK6.js";
5
5
 
6
6
  // src/services/git.ts
7
7
  import simpleGit from "simple-git";
@@ -346,7 +346,7 @@ var AuthServiceImpl = class {
346
346
  return null;
347
347
  }
348
348
  try {
349
- const { apiService } = await import("./api-AFSILC7K.js");
349
+ const { apiService } = await import("./api-DVQBJAYO.js");
350
350
  const user = await apiService.getCurrentUser();
351
351
  logger.info("auth", `Token validated for user: ${user.email}`);
352
352
  return user;
@@ -2,7 +2,7 @@ import {
2
2
  authService,
3
3
  config,
4
4
  logger
5
- } from "./chunk-HPHXBSGB.js";
5
+ } from "./chunk-LJLCMCK6.js";
6
6
 
7
7
  // src/utils/circuit-breaker.ts
8
8
  var CircuitBreaker = class {
@@ -100,7 +100,7 @@ var CircuitBreaker = class {
100
100
  };
101
101
 
102
102
  // src/services/api.ts
103
- var AGENT_VERSION = "1.2.37";
103
+ var AGENT_VERSION = "1.2.38";
104
104
  var ApiServiceImpl = class {
105
105
  sessionId = null;
106
106
  circuitBreaker = new CircuitBreaker({
@@ -295,8 +295,15 @@ var ApiServiceImpl = class {
295
295
  id: item.id,
296
296
  projectId: projectId2,
297
297
  message: item.message,
298
+ body: item.body,
298
299
  files: item.files,
299
- createdAt
300
+ createdAt,
301
+ type: item.type,
302
+ scope: item.scope,
303
+ taskIds: item.task_ids || item.taskIds,
304
+ branch: item.branch,
305
+ status: item.status,
306
+ error: item.error
300
307
  };
301
308
  });
302
309
  logger.info("api", `Found ${commits.length} pending commits`);
@@ -325,9 +332,16 @@ var ApiServiceImpl = class {
325
332
  id: item.id,
326
333
  projectId,
327
334
  message: item.message,
335
+ body: item.body,
328
336
  files: item.files,
329
337
  has_large_files: hasLargeFiles,
330
- createdAt
338
+ createdAt,
339
+ type: item.type,
340
+ scope: item.scope,
341
+ taskIds: item.task_ids || item.taskIds,
342
+ branch: item.branch,
343
+ status: item.status,
344
+ error: item.error
331
345
  };
332
346
  }
333
347
  /**
@@ -363,8 +377,11 @@ var ApiServiceImpl = class {
363
377
  const commit = {
364
378
  id: data.id,
365
379
  projectId,
380
+ pendingCommitId: data.pending_commit_id || data.pendingCommitId,
366
381
  message: data.message,
382
+ body: data.body,
367
383
  sha: data.sha,
384
+ branch: data.branch,
368
385
  status: data.status,
369
386
  createdAt,
370
387
  executedAt,
@@ -478,7 +495,10 @@ var ApiServiceImpl = class {
478
495
  }
479
496
  });
480
497
  } catch (error) {
481
- logger.debug("api", `Stream failed for ${commitId}`, error);
498
+ logger.debug(
499
+ "api",
500
+ `Stream failed for ${commitId}: ${error.message}`
501
+ );
482
502
  }
483
503
  }
484
504
  };
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  apiService
3
- } from "./chunk-IBGWKTT7.js";
3
+ } from "./chunk-SE4UOLIV.js";
4
4
  import {
5
5
  gitService,
6
6
  projectService
7
- } from "./chunk-XRNTJYCQ.js";
7
+ } from "./chunk-FJO77ALZ.js";
8
8
  import {
9
9
  authService,
10
10
  config,
11
11
  logger
12
- } from "./chunk-HPHXBSGB.js";
12
+ } from "./chunk-LJLCMCK6.js";
13
13
 
14
14
  // src/utils/notify.ts
15
15
  import notifier from "node-notifier";
@@ -263,10 +263,25 @@ var hookService = new HookService();
263
263
  var CommitQueueProcessor = class {
264
264
  queue = [];
265
265
  isProcessing = false;
266
+ currentCommitId = null;
267
+ /**
268
+ * Check if commit is already in queue or processing
269
+ */
270
+ hasCommit(commitId) {
271
+ if (this.currentCommitId === commitId) return true;
272
+ return this.queue.some((item) => item.commit.id === commitId);
273
+ }
266
274
  /**
267
275
  * Add commit to processing queue
268
276
  */
269
277
  addToQueue(commit, project) {
278
+ if (this.hasCommit(commit.id)) {
279
+ logger.info(
280
+ "queue",
281
+ `Commit ${commit.id} is already in the queue or being processed. Skipping.`
282
+ );
283
+ return;
284
+ }
270
285
  this.queue.push({ commit, project });
271
286
  logger.info(
272
287
  "queue",
@@ -287,6 +302,7 @@ var CommitQueueProcessor = class {
287
302
  while (this.queue.length > 0) {
288
303
  const item = this.queue.shift();
289
304
  if (!item) break;
305
+ this.currentCommitId = item.commit.id;
290
306
  try {
291
307
  await this.executeCommit(item.commit, item.project);
292
308
  } catch (error) {
@@ -295,6 +311,8 @@ var CommitQueueProcessor = class {
295
311
  `Failed to execute commit ${item.commit.id}`,
296
312
  error
297
313
  );
314
+ } finally {
315
+ this.currentCommitId = null;
298
316
  }
299
317
  }
300
318
  this.isProcessing = false;
@@ -890,7 +908,7 @@ var WebSocketServiceImpl = class {
890
908
  "websocket",
891
909
  `Commit ${commit.id} marked as large, fetching full details...`
892
910
  );
893
- const { apiService: apiService2 } = await import("./api-AFSILC7K.js");
911
+ const { apiService: apiService2 } = await import("./api-DVQBJAYO.js");
894
912
  const fullCommit = await apiService2.getCommit(commit.id);
895
913
  commit = {
896
914
  ...commit,
@@ -934,7 +952,7 @@ var WebSocketServiceImpl = class {
934
952
  (handler) => handler(data.suggestion)
935
953
  );
936
954
  }).listen(".project.updated", (data) => {
937
- logger.info("websocket", `Project updated: ${data.project.id}`);
955
+ logger.debug("websocket", `Project updated: ${data.project.id}`);
938
956
  writeStatus({
939
957
  lastEvent: "project.updated",
940
958
  lastEventTime: (/* @__PURE__ */ new Date()).toISOString()
@@ -3,20 +3,20 @@ import {
3
3
  commitQueue,
4
4
  notify,
5
5
  websocketService
6
- } from "../chunk-NODAAPCO.js";
6
+ } from "../chunk-ZBVVGIPE.js";
7
7
  import {
8
8
  apiService
9
- } from "../chunk-IBGWKTT7.js";
9
+ } from "../chunk-SE4UOLIV.js";
10
10
  import {
11
11
  gitService,
12
12
  projectService,
13
13
  removePidFile,
14
14
  writePidFile
15
- } from "../chunk-XRNTJYCQ.js";
15
+ } from "../chunk-FJO77ALZ.js";
16
16
  import {
17
17
  authService,
18
18
  logger
19
- } from "../chunk-HPHXBSGB.js";
19
+ } from "../chunk-LJLCMCK6.js";
20
20
 
21
21
  // src/daemon/runner.ts
22
22
  import "dotenv/config";
@@ -310,26 +310,28 @@ async function syncPendingCommits() {
310
310
  "sync",
311
311
  `Checking ${relevantProjects.length} projects for pending commits...`
312
312
  );
313
- for (const project of relevantProjects) {
314
- try {
315
- const pendingCommits = await apiService.getPendingCommits(project.id);
316
- if (pendingCommits.length > 0) {
317
- logger.info(
313
+ await Promise.all(
314
+ relevantProjects.map(async (project) => {
315
+ try {
316
+ const pendingCommits = await apiService.getPendingCommits(project.id);
317
+ if (pendingCommits.length > 0) {
318
+ logger.info(
319
+ "sync",
320
+ `Found ${pendingCommits.length} pending commits for project ${project.name}`
321
+ );
322
+ for (const commit of pendingCommits) {
323
+ commitQueue.addToQueue(commit, project);
324
+ }
325
+ }
326
+ } catch (error) {
327
+ logger.error(
318
328
  "sync",
319
- `Found ${pendingCommits.length} pending commits for project ${project.name}`
329
+ `Failed to sync commits for project ${project.name}`,
330
+ error
320
331
  );
321
- for (const commit of pendingCommits) {
322
- commitQueue.addToQueue(commit, project);
323
- }
324
332
  }
325
- } catch (error) {
326
- logger.error(
327
- "sync",
328
- `Failed to sync commits for project ${project.name}`,
329
- error
330
- );
331
- }
332
- }
333
+ })
334
+ );
333
335
  logger.success("sync", "Pending commit sync complete");
334
336
  } catch (error) {
335
337
  logger.error("sync", "Failed to sync pending commits", error);
@@ -390,18 +392,16 @@ Project: ${project.name}`,
390
392
  });
391
393
  });
392
394
  websocketService.onProjectUpdated((project) => {
393
- logger.info("daemon", `Project updated: ${project.id} - ${project.name}`);
395
+ logger.debug(
396
+ "daemon",
397
+ `Project updated: ${project.id} - ${project.name}`
398
+ );
394
399
  if (project.settings?.auto_sync) {
395
400
  fileWatcher.updateProjectSettings(
396
401
  project.id,
397
402
  project.settings.auto_sync
398
403
  );
399
404
  }
400
- notify({
401
- title: "Project Updated",
402
- message: project.name,
403
- category: "sync"
404
- });
405
405
  });
406
406
  websocketService.onDisconnect(() => {
407
407
  logger.warn(
@@ -466,17 +466,19 @@ Priority: ${suggestion.priority}`,
466
466
  "daemon",
467
467
  `Syncing ${projectEntries.length} linked project(s) on startup...`
468
468
  );
469
- for (const [, linkedProject] of projectEntries) {
470
- try {
471
- await fileWatcher.syncProjectById(linkedProject.projectId);
472
- } catch (error) {
473
- logger.error(
474
- "daemon",
475
- `Failed to sync project ${linkedProject.projectId} on startup`,
476
- error
477
- );
478
- }
479
- }
469
+ await Promise.all(
470
+ projectEntries.map(async ([, linkedProject]) => {
471
+ try {
472
+ await fileWatcher.syncProjectById(linkedProject.projectId);
473
+ } catch (error) {
474
+ logger.error(
475
+ "daemon",
476
+ `Failed to sync project ${linkedProject.projectId} on startup`,
477
+ error
478
+ );
479
+ }
480
+ })
481
+ );
480
482
  logger.success("daemon", "Initial project sync complete");
481
483
  }
482
484
  await syncPendingCommits();
package/dist/index.js CHANGED
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  commitQueue,
4
4
  websocketService
5
- } from "./chunk-NODAAPCO.js";
5
+ } from "./chunk-ZBVVGIPE.js";
6
6
  import {
7
7
  apiService
8
- } from "./chunk-IBGWKTT7.js";
8
+ } from "./chunk-SE4UOLIV.js";
9
9
  import {
10
10
  getPidFilePath,
11
11
  gitService,
@@ -14,14 +14,14 @@ import {
14
14
  projectService,
15
15
  spawnDetached,
16
16
  validatePidFile
17
- } from "./chunk-XRNTJYCQ.js";
17
+ } from "./chunk-FJO77ALZ.js";
18
18
  import {
19
19
  __commonJS,
20
20
  __toESM,
21
21
  authService,
22
22
  config,
23
23
  logger
24
- } from "./chunk-HPHXBSGB.js";
24
+ } from "./chunk-LJLCMCK6.js";
25
25
 
26
26
  // node_modules/semver/internal/constants.js
27
27
  var require_constants = __commonJS({
@@ -2657,7 +2657,7 @@ function registerStatusCommand(program2) {
2657
2657
  try {
2658
2658
  const { render } = await import("ink");
2659
2659
  const { createElement } = await import("react");
2660
- const { StatusDashboard } = await import("./StatusDashboard-AMDPK7EQ.js");
2660
+ const { StatusDashboard } = await import("./StatusDashboard-YI6HJLZS.js");
2661
2661
  render(createElement(StatusDashboard, { cwd }));
2662
2662
  return;
2663
2663
  } catch (error) {
@@ -4846,7 +4846,7 @@ ${chalk14.bold("Config file:")} ${chalk14.cyan(configPath)}
4846
4846
  }
4847
4847
 
4848
4848
  // src/index.ts
4849
- var AGENT_VERSION = "1.2.37";
4849
+ var AGENT_VERSION = "1.2.38";
4850
4850
  var program = new Command();
4851
4851
  program.name("stint").description("Stint Agent - Local daemon for Stint Project Assistant").version(AGENT_VERSION, "-v, --version", "output the current version").addHelpText(
4852
4852
  "after",
package/package.json CHANGED
@@ -1,98 +1,98 @@
1
- {
2
- "name": "@gowelle/stint-agent",
3
- "version": "1.2.37",
4
- "description": "Local agent for Stint - Project Assistant",
5
- "author": "Gowelle John <gowelle.john@icloud.com>",
6
- "license": "MIT",
7
- "type": "module",
8
- "bin": {
9
- "stint": "./dist/index.js"
10
- },
11
- "files": [
12
- "dist",
13
- "assets",
14
- "README.md",
15
- "LICENSE"
16
- ],
17
- "repository": {
18
- "type": "git",
19
- "url": "git+https://github.com/gowelle/stint-agent.git"
20
- },
21
- "homepage": "https://github.com/gowelle/stint-agent#readme",
22
- "bugs": {
23
- "url": "https://github.com/gowelle/stint-agent/issues"
24
- },
25
- "keywords": [
26
- "stint",
27
- "agent",
28
- "project-assistant",
29
- "cli",
30
- "git"
31
- ],
32
- "scripts": {
33
- "build": "tsup",
34
- "dev": "tsup --watch",
35
- "lint": "eslint src",
36
- "test": "vitest",
37
- "test:update": "node --loader ts-node/esm scripts/test-update.ts",
38
- "prepublishOnly": "npm run build"
39
- },
40
- "dependencies": {
41
- "@inquirer/prompts": "^8.1.0",
42
- "chalk": "^5.3.0",
43
- "commander": "^12.0.0",
44
- "conf": "^12.0.0",
45
- "dotenv": "^17.2.3",
46
- "ink": "^5.2.1",
47
- "laravel-echo": "^2.2.6",
48
- "node-fetch": "^3.3.2",
49
- "node-notifier": "^10.0.1",
50
- "open": "^10.0.0",
51
- "ora": "^8.0.1",
52
- "prompts": "^2.4.2",
53
- "pusher-js": "^8.4.0",
54
- "react": "^18.3.1",
55
- "simple-git": "^3.22.0",
56
- "ws": "^8.16.0"
57
- },
58
- "devDependencies": {
59
- "@types/node": "^20.11.0",
60
- "@types/node-notifier": "^8.0.5",
61
- "@types/prompts": "^2.4.9",
62
- "@types/react": "^18.3.27",
63
- "@types/ws": "^8.5.10",
64
- "@typescript-eslint/eslint-plugin": "^8.50.0",
65
- "@typescript-eslint/parser": "^8.50.0",
66
- "@vitest/coverage-v8": "^4.0.16",
67
- "eslint": "^8.56.0",
68
- "ts-node": "^10.9.2",
69
- "tsup": "^8.0.1",
70
- "typescript": "^5.3.3",
71
- "vitest": "^4.0.16"
72
- },
73
- "engines": {
74
- "node": ">=20.0.0"
75
- },
76
- "stint": {
77
- "channels": {
78
- "stable": {
79
- "pattern": "^\\d+\\.\\d+\\.\\d+$",
80
- "description": "Production-ready releases"
81
- },
82
- "beta": {
83
- "pattern": "^\\d+\\.\\d+\\.\\d+-beta\\.\\d+$",
84
- "description": "Pre-release versions for testing"
85
- },
86
- "nightly": {
87
- "pattern": "^\\d+\\.\\d+\\.\\d+-nightly\\.\\d{8}$",
88
- "description": "Nightly builds from main branch"
89
- }
90
- },
91
- "defaultChannel": "stable"
92
- },
93
- "pnpm": {
94
- "onlyBuiltDependencies": [
95
- "esbuild"
96
- ]
97
- }
98
- }
1
+ {
2
+ "name": "@gowelle/stint-agent",
3
+ "version": "1.2.38",
4
+ "description": "Local agent for Stint - Project Assistant",
5
+ "author": "Gowelle John <gowelle.john@icloud.com>",
6
+ "license": "MIT",
7
+ "type": "module",
8
+ "bin": {
9
+ "stint": "./dist/index.js"
10
+ },
11
+ "files": [
12
+ "dist",
13
+ "assets",
14
+ "README.md",
15
+ "LICENSE"
16
+ ],
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/gowelle/stint-agent.git"
20
+ },
21
+ "homepage": "https://github.com/gowelle/stint-agent#readme",
22
+ "bugs": {
23
+ "url": "https://github.com/gowelle/stint-agent/issues"
24
+ },
25
+ "keywords": [
26
+ "stint",
27
+ "agent",
28
+ "project-assistant",
29
+ "cli",
30
+ "git"
31
+ ],
32
+ "scripts": {
33
+ "build": "tsup",
34
+ "dev": "tsup --watch",
35
+ "lint": "eslint src",
36
+ "test": "vitest",
37
+ "test:update": "node --loader ts-node/esm scripts/test-update.ts",
38
+ "prepublishOnly": "npm run build"
39
+ },
40
+ "dependencies": {
41
+ "@inquirer/prompts": "^8.1.0",
42
+ "chalk": "^5.3.0",
43
+ "commander": "^12.0.0",
44
+ "conf": "^12.0.0",
45
+ "dotenv": "^17.2.3",
46
+ "ink": "^5.2.1",
47
+ "laravel-echo": "^2.2.6",
48
+ "node-fetch": "^3.3.2",
49
+ "node-notifier": "^10.0.1",
50
+ "open": "^10.0.0",
51
+ "ora": "^8.0.1",
52
+ "prompts": "^2.4.2",
53
+ "pusher-js": "^8.4.0",
54
+ "react": "^18.3.1",
55
+ "simple-git": "^3.22.0",
56
+ "ws": "^8.16.0"
57
+ },
58
+ "devDependencies": {
59
+ "@types/node": "^20.11.0",
60
+ "@types/node-notifier": "^8.0.5",
61
+ "@types/prompts": "^2.4.9",
62
+ "@types/react": "^18.3.27",
63
+ "@types/ws": "^8.5.10",
64
+ "@typescript-eslint/eslint-plugin": "^8.50.0",
65
+ "@typescript-eslint/parser": "^8.50.0",
66
+ "@vitest/coverage-v8": "^4.0.16",
67
+ "eslint": "^8.56.0",
68
+ "ts-node": "^10.9.2",
69
+ "tsup": "^8.0.1",
70
+ "typescript": "^5.3.3",
71
+ "vitest": "^4.0.16"
72
+ },
73
+ "engines": {
74
+ "node": ">=20.0.0"
75
+ },
76
+ "stint": {
77
+ "channels": {
78
+ "stable": {
79
+ "pattern": "^\\d+\\.\\d+\\.\\d+$",
80
+ "description": "Production-ready releases"
81
+ },
82
+ "beta": {
83
+ "pattern": "^\\d+\\.\\d+\\.\\d+-beta\\.\\d+$",
84
+ "description": "Pre-release versions for testing"
85
+ },
86
+ "nightly": {
87
+ "pattern": "^\\d+\\.\\d+\\.\\d+-nightly\\.\\d{8}$",
88
+ "description": "Nightly builds from main branch"
89
+ }
90
+ },
91
+ "defaultChannel": "stable"
92
+ },
93
+ "pnpm": {
94
+ "onlyBuiltDependencies": [
95
+ "esbuild"
96
+ ]
97
+ }
98
+ }
@@ -1,7 +0,0 @@
1
- import {
2
- apiService
3
- } from "./chunk-IBGWKTT7.js";
4
- import "./chunk-HPHXBSGB.js";
5
- export {
6
- apiService
7
- };