@gowelle/stint-agent 1.2.52 → 1.2.53

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.
@@ -2,10 +2,10 @@ import {
2
2
  gitService,
3
3
  projectService,
4
4
  validatePidFile
5
- } from "./chunk-MEMRGMOW.js";
5
+ } from "./chunk-ZGV7IQMJ.js";
6
6
  import {
7
7
  authService
8
- } from "./chunk-ZVSUMF5E.js";
8
+ } from "./chunk-K3FOUU5A.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-BWH6PAAH.js";
4
+ import "./chunk-K3FOUU5A.js";
5
+ export {
6
+ apiService
7
+ };
@@ -2,7 +2,7 @@ import {
2
2
  authService,
3
3
  config,
4
4
  logger
5
- } from "./chunk-ZVSUMF5E.js";
5
+ } from "./chunk-K3FOUU5A.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.52";
103
+ var AGENT_VERSION = "1.2.53";
104
104
  var ApiServiceImpl = class {
105
105
  sessionId = null;
106
106
  circuitBreaker = new CircuitBreaker({
@@ -425,7 +425,7 @@ var ApiServiceImpl = class {
425
425
  * @param packageInfo - Optional array of detected package types
426
426
  * @param fileTree - Optional array of all files in the project
427
427
  */
428
- async syncProject(projectId, data, changedFiles, packageInfo, fileTree) {
428
+ async syncProject(projectId, data, changedFiles, packageInfo, fileTree, diff) {
429
429
  logger.info("api", `Syncing project ${projectId}`);
430
430
  return this.withRetry(async () => {
431
431
  const payload = {
@@ -444,6 +444,9 @@ var ApiServiceImpl = class {
444
444
  if (fileTree && fileTree.length > 0) {
445
445
  payload.file_tree = fileTree;
446
446
  }
447
+ if (diff) {
448
+ payload.diff = diff;
449
+ }
447
450
  const response = await this.request(`/api/agent/projects/${projectId}/sync`, {
448
451
  method: "POST",
449
452
  body: JSON.stringify(payload)
@@ -358,7 +358,7 @@ var AuthServiceImpl = class {
358
358
  return null;
359
359
  }
360
360
  try {
361
- const { apiService } = await import("./api-WLMF4NID.js");
361
+ const { apiService } = await import("./api-IFZZCDOY.js");
362
362
  const user = await apiService.getCurrentUser();
363
363
  logger.info("auth", `Token validated for user: ${user.email}`);
364
364
  return user;
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  apiService
3
- } from "./chunk-VXWZVT6P.js";
3
+ } from "./chunk-BWH6PAAH.js";
4
4
  import {
5
5
  gitService,
6
6
  projectService
7
- } from "./chunk-MEMRGMOW.js";
7
+ } from "./chunk-ZGV7IQMJ.js";
8
8
  import {
9
9
  authService,
10
10
  config,
11
11
  logger
12
- } from "./chunk-ZVSUMF5E.js";
12
+ } from "./chunk-K3FOUU5A.js";
13
13
 
14
14
  // src/services/package-detector.ts
15
15
  import fs from "fs";
@@ -1429,7 +1429,7 @@ var WebSocketServiceImpl = class {
1429
1429
  "websocket",
1430
1430
  `Commit ${commit.id} marked as large, fetching full details...`
1431
1431
  );
1432
- const { apiService: apiService2 } = await import("./api-WLMF4NID.js");
1432
+ const { apiService: apiService2 } = await import("./api-IFZZCDOY.js");
1433
1433
  const fullCommit = await apiService2.getCommit(commit.id);
1434
1434
  commit = {
1435
1435
  ...commit,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  config,
3
3
  logger
4
- } from "./chunk-ZVSUMF5E.js";
4
+ } from "./chunk-K3FOUU5A.js";
5
5
 
6
6
  // src/services/git.ts
7
7
  import simpleGit from "simple-git";
@@ -328,6 +328,21 @@ ${wrappedBody}`;
328
328
  return null;
329
329
  }
330
330
  }
331
+ /**
332
+ * Get the diff of changes in the repository
333
+ * @param path - Repository path
334
+ * @returns Diff string
335
+ */
336
+ async getDiff(path3) {
337
+ try {
338
+ const git = this.getGit(path3);
339
+ const diff = await git.diff(["HEAD"]);
340
+ return diff;
341
+ } catch (error) {
342
+ logger.error("git", `Failed to get diff in ${path3}`, error);
343
+ return "";
344
+ }
345
+ }
331
346
  /**
332
347
  * Get list of all tracked files in the repository
333
348
  * @param path - Repository path
@@ -4,21 +4,21 @@ import {
4
4
  notify,
5
5
  packageDetector,
6
6
  websocketService
7
- } from "../chunk-M7326ZDD.js";
7
+ } from "../chunk-LSBAWHMJ.js";
8
8
  import {
9
9
  apiService
10
- } from "../chunk-VXWZVT6P.js";
10
+ } from "../chunk-BWH6PAAH.js";
11
11
  import {
12
12
  gitService,
13
13
  projectService,
14
14
  removePidFile,
15
15
  writePidFile
16
- } from "../chunk-MEMRGMOW.js";
16
+ } from "../chunk-ZGV7IQMJ.js";
17
17
  import {
18
18
  authService,
19
19
  config,
20
20
  logger
21
- } from "../chunk-ZVSUMF5E.js";
21
+ } from "../chunk-K3FOUU5A.js";
22
22
 
23
23
  // src/daemon/runner.ts
24
24
  import "dotenv/config";
@@ -196,11 +196,15 @@ var FileWatcher = class {
196
196
  const packageInfo = await Promise.all(
197
197
  rawPackageInfo.map((p) => packageDetector.checkPublicationStatus(p))
198
198
  );
199
+ const diff = await gitService.getDiff(projectPath);
199
200
  const response = await apiService.syncProject(
200
201
  projectId,
201
202
  repoInfo,
202
203
  changedFiles,
203
- packageInfo
204
+ packageInfo,
205
+ void 0,
206
+ // fileTree (optional)
207
+ diff
204
208
  );
205
209
  if (response.auto_sync) {
206
210
  this.updateProjectSettings(projectId, response.auto_sync);
package/dist/index.js CHANGED
@@ -3,10 +3,10 @@ import {
3
3
  commitQueue,
4
4
  packageDetector,
5
5
  websocketService
6
- } from "./chunk-M7326ZDD.js";
6
+ } from "./chunk-LSBAWHMJ.js";
7
7
  import {
8
8
  apiService
9
- } from "./chunk-VXWZVT6P.js";
9
+ } from "./chunk-BWH6PAAH.js";
10
10
  import {
11
11
  getPidFilePath,
12
12
  gitService,
@@ -15,14 +15,14 @@ import {
15
15
  projectService,
16
16
  spawnDetached,
17
17
  validatePidFile
18
- } from "./chunk-MEMRGMOW.js";
18
+ } from "./chunk-ZGV7IQMJ.js";
19
19
  import {
20
20
  __commonJS,
21
21
  __toESM,
22
22
  authService,
23
23
  config,
24
24
  logger
25
- } from "./chunk-ZVSUMF5E.js";
25
+ } from "./chunk-K3FOUU5A.js";
26
26
 
27
27
  // node_modules/semver/internal/constants.js
28
28
  var require_constants = __commonJS({
@@ -2658,7 +2658,7 @@ function registerStatusCommand(program2) {
2658
2658
  try {
2659
2659
  const { render } = await import("ink");
2660
2660
  const { createElement } = await import("react");
2661
- const { StatusDashboard } = await import("./StatusDashboard-YNXIZTX5.js");
2661
+ const { StatusDashboard } = await import("./StatusDashboard-2RKO3NNM.js");
2662
2662
  render(createElement(StatusDashboard, { cwd }));
2663
2663
  return;
2664
2664
  } catch (error) {
@@ -5056,7 +5056,7 @@ function displayLocalProjects(entries) {
5056
5056
 
5057
5057
  // src/commands/about.ts
5058
5058
  import chalk17 from "chalk";
5059
- var AGENT_VERSION = "1.2.52";
5059
+ var AGENT_VERSION = "1.2.53";
5060
5060
  function registerAboutCommand(program2) {
5061
5061
  program2.command("about").description("Display information about Stint Agent").action(() => {
5062
5062
  console.log();
@@ -5070,7 +5070,9 @@ function registerAboutCommand(program2) {
5070
5070
  chalk17.bold.cyan(" \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D")
5071
5071
  );
5072
5072
  console.log();
5073
- console.log(chalk17.bold.blue(" \u{1F4E6} Version: ") + chalk17.white(AGENT_VERSION));
5073
+ console.log(
5074
+ chalk17.bold.blue(" \u{1F4E6} Version: ") + chalk17.white(AGENT_VERSION)
5075
+ );
5074
5076
  console.log(
5075
5077
  chalk17.bold.blue(" \u{1F464} Author: ") + chalk17.white("John Gowelle")
5076
5078
  );
@@ -5085,17 +5087,17 @@ function registerAboutCommand(program2) {
5085
5087
  );
5086
5088
  console.log();
5087
5089
  console.log(chalk17.gray(" Local daemon for Stint Project Assistant."));
5088
- console.log(chalk17.gray(" Tracks time, manages commits, and syncs with Stint."));
5089
- console.log();
5090
5090
  console.log(
5091
- chalk17.dim(" Made with \u2764\uFE0F by John Gowelle")
5091
+ chalk17.gray(" Tracks time, manages commits, and syncs with Stint.")
5092
5092
  );
5093
5093
  console.log();
5094
+ console.log(chalk17.dim(" Made with \u2764\uFE0F by John Gowelle"));
5095
+ console.log();
5094
5096
  });
5095
5097
  }
5096
5098
 
5097
5099
  // src/index.ts
5098
- var AGENT_VERSION2 = "1.2.52";
5100
+ var AGENT_VERSION2 = "1.2.53";
5099
5101
  var program = new Command3();
5100
5102
  program.name("stint").description("Stint Agent - Local daemon for Stint Project Assistant").version(AGENT_VERSION2, "-v, --version", "output the current version").addHelpText(
5101
5103
  "after",
package/package.json CHANGED
@@ -1,103 +1,103 @@
1
- {
2
- "name": "@gowelle/stint-agent",
3
- "version": "1.2.52",
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
- "typecheck": "tsc --noEmit",
37
- "format": "prettier --write src",
38
- "format:check": "prettier --check src",
39
- "test": "vitest",
40
- "test:update": "node --loader ts-node/esm scripts/test-update.ts",
41
- "prepublishOnly": "npm run build"
42
- },
43
- "dependencies": {
44
- "@inquirer/prompts": "^8.1.0",
45
- "chalk": "^5.3.0",
46
- "commander": "^12.0.0",
47
- "conf": "^12.0.0",
48
- "dotenv": "^17.2.3",
49
- "ink": "^5.2.1",
50
- "laravel-echo": "^2.2.6",
51
- "node-fetch": "^3.3.2",
52
- "node-notifier": "^10.0.1",
53
- "open": "^10.0.0",
54
- "ora": "^8.0.1",
55
- "prompts": "^2.4.2",
56
- "pusher-js": "^8.4.0",
57
- "react": "^18.3.1",
58
- "simple-git": "^3.22.0",
59
- "ws": "^8.16.0"
60
- },
61
- "devDependencies": {
62
- "@types/node": "^20.11.0",
63
- "@types/node-notifier": "^8.0.5",
64
- "@types/prompts": "^2.4.9",
65
- "@types/react": "^18.3.27",
66
- "@types/ws": "^8.5.10",
67
- "@typescript-eslint/eslint-plugin": "^8.50.0",
68
- "@typescript-eslint/parser": "^8.50.0",
69
- "@vitest/coverage-v8": "^4.0.16",
70
- "eslint": "^8.56.0",
71
- "eslint-config-prettier": "^10.1.8",
72
- "prettier": "^3.7.4",
73
- "ts-node": "^10.9.2",
74
- "tsup": "^8.0.1",
75
- "typescript": "^5.3.3",
76
- "vitest": "^4.0.16"
77
- },
78
- "engines": {
79
- "node": ">=20.0.0"
80
- },
81
- "stint": {
82
- "channels": {
83
- "stable": {
84
- "pattern": "^\\d+\\.\\d+\\.\\d+$",
85
- "description": "Production-ready releases"
86
- },
87
- "beta": {
88
- "pattern": "^\\d+\\.\\d+\\.\\d+-beta\\.\\d+$",
89
- "description": "Pre-release versions for testing"
90
- },
91
- "nightly": {
92
- "pattern": "^\\d+\\.\\d+\\.\\d+-nightly\\.\\d{8}$",
93
- "description": "Nightly builds from main branch"
94
- }
95
- },
96
- "defaultChannel": "stable"
97
- },
98
- "pnpm": {
99
- "onlyBuiltDependencies": [
100
- "esbuild"
101
- ]
102
- }
103
- }
1
+ {
2
+ "name": "@gowelle/stint-agent",
3
+ "version": "1.2.53",
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
+ "typecheck": "tsc --noEmit",
37
+ "format": "prettier --write src",
38
+ "format:check": "prettier --check src",
39
+ "test": "vitest",
40
+ "test:update": "node --loader ts-node/esm scripts/test-update.ts",
41
+ "prepublishOnly": "npm run build"
42
+ },
43
+ "dependencies": {
44
+ "@inquirer/prompts": "^8.1.0",
45
+ "chalk": "^5.3.0",
46
+ "commander": "^12.0.0",
47
+ "conf": "^12.0.0",
48
+ "dotenv": "^17.2.3",
49
+ "ink": "^5.2.1",
50
+ "laravel-echo": "^2.2.6",
51
+ "node-fetch": "^3.3.2",
52
+ "node-notifier": "^10.0.1",
53
+ "open": "^10.0.0",
54
+ "ora": "^8.0.1",
55
+ "prompts": "^2.4.2",
56
+ "pusher-js": "^8.4.0",
57
+ "react": "^18.3.1",
58
+ "simple-git": "^3.22.0",
59
+ "ws": "^8.16.0"
60
+ },
61
+ "devDependencies": {
62
+ "@types/node": "^20.11.0",
63
+ "@types/node-notifier": "^8.0.5",
64
+ "@types/prompts": "^2.4.9",
65
+ "@types/react": "^18.3.27",
66
+ "@types/ws": "^8.5.10",
67
+ "@typescript-eslint/eslint-plugin": "^8.50.0",
68
+ "@typescript-eslint/parser": "^8.50.0",
69
+ "@vitest/coverage-v8": "^4.0.16",
70
+ "eslint": "^8.56.0",
71
+ "eslint-config-prettier": "^10.1.8",
72
+ "prettier": "^3.7.4",
73
+ "ts-node": "^10.9.2",
74
+ "tsup": "^8.0.1",
75
+ "typescript": "^5.3.3",
76
+ "vitest": "^4.0.16"
77
+ },
78
+ "engines": {
79
+ "node": ">=20.0.0"
80
+ },
81
+ "stint": {
82
+ "channels": {
83
+ "stable": {
84
+ "pattern": "^\\d+\\.\\d+\\.\\d+$",
85
+ "description": "Production-ready releases"
86
+ },
87
+ "beta": {
88
+ "pattern": "^\\d+\\.\\d+\\.\\d+-beta\\.\\d+$",
89
+ "description": "Pre-release versions for testing"
90
+ },
91
+ "nightly": {
92
+ "pattern": "^\\d+\\.\\d+\\.\\d+-nightly\\.\\d{8}$",
93
+ "description": "Nightly builds from main branch"
94
+ }
95
+ },
96
+ "defaultChannel": "stable"
97
+ },
98
+ "pnpm": {
99
+ "onlyBuiltDependencies": [
100
+ "esbuild"
101
+ ]
102
+ }
103
+ }
@@ -1,7 +0,0 @@
1
- import {
2
- apiService
3
- } from "./chunk-VXWZVT6P.js";
4
- import "./chunk-ZVSUMF5E.js";
5
- export {
6
- apiService
7
- };