@gowelle/stint-agent 1.2.44 → 1.2.45

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-4IAVYCEN.js";
5
+ } from "./chunk-UFU7YWGS.js";
6
6
  import {
7
7
  authService
8
- } from "./chunk-X2Z4ILIY.js";
8
+ } from "./chunk-65VAEI4L.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-RS22EJ47.js";
4
+ import "./chunk-65VAEI4L.js";
5
+ export {
6
+ apiService
7
+ };
@@ -346,7 +346,7 @@ var AuthServiceImpl = class {
346
346
  return null;
347
347
  }
348
348
  try {
349
- const { apiService } = await import("./api-A5W4VYEH.js");
349
+ const { apiService } = await import("./api-JGS7AMNS.js");
350
350
  const user = await apiService.getCurrentUser();
351
351
  logger.info("auth", `Token validated for user: ${user.email}`);
352
352
  return user;
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  apiService
3
- } from "./chunk-UBU6PUVO.js";
3
+ } from "./chunk-RS22EJ47.js";
4
4
  import {
5
5
  gitService,
6
6
  projectService
7
- } from "./chunk-4IAVYCEN.js";
7
+ } from "./chunk-UFU7YWGS.js";
8
8
  import {
9
9
  authService,
10
10
  config,
11
11
  logger
12
- } from "./chunk-X2Z4ILIY.js";
12
+ } from "./chunk-65VAEI4L.js";
13
13
 
14
14
  // src/services/package-detector.ts
15
15
  import fs from "fs";
@@ -1159,7 +1159,7 @@ var WebSocketServiceImpl = class {
1159
1159
  "websocket",
1160
1160
  `Commit ${commit.id} marked as large, fetching full details...`
1161
1161
  );
1162
- const { apiService: apiService2 } = await import("./api-A5W4VYEH.js");
1162
+ const { apiService: apiService2 } = await import("./api-JGS7AMNS.js");
1163
1163
  const fullCommit = await apiService2.getCommit(commit.id);
1164
1164
  commit = {
1165
1165
  ...commit,
@@ -2,7 +2,7 @@ import {
2
2
  authService,
3
3
  config,
4
4
  logger
5
- } from "./chunk-X2Z4ILIY.js";
5
+ } from "./chunk-65VAEI4L.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.44";
103
+ var AGENT_VERSION = "1.2.45";
104
104
  var ApiServiceImpl = class {
105
105
  sessionId = null;
106
106
  circuitBreaker = new CircuitBreaker({
@@ -412,8 +412,9 @@ var ApiServiceImpl = class {
412
412
  * @param data - Repository information (path, remote URL, branches)
413
413
  * @param changedFiles - Optional array of changed files for commit file selection
414
414
  * @param packageInfo - Optional array of detected package types
415
+ * @param fileTree - Optional array of all files in the project
415
416
  */
416
- async syncProject(projectId, data, changedFiles, packageInfo) {
417
+ async syncProject(projectId, data, changedFiles, packageInfo, fileTree) {
417
418
  logger.info("api", `Syncing project ${projectId}`);
418
419
  return this.withRetry(async () => {
419
420
  const payload = {
@@ -429,6 +430,9 @@ var ApiServiceImpl = class {
429
430
  if (packageInfo && packageInfo.length > 0) {
430
431
  payload.package_info = packageInfo;
431
432
  }
433
+ if (fileTree && fileTree.length > 0) {
434
+ payload.file_tree = fileTree;
435
+ }
432
436
  const response = await this.request(`/api/agent/projects/${projectId}/sync`, {
433
437
  method: "POST",
434
438
  body: JSON.stringify(payload)
@@ -436,7 +440,7 @@ var ApiServiceImpl = class {
436
440
  const packageTypes = packageInfo?.map((p) => p.type).join(", ") || "none";
437
441
  logger.success(
438
442
  "api",
439
- `Project ${projectId} synced (${changedFiles?.length ?? 0} files, packages: ${packageTypes})`
443
+ `Project ${projectId} synced (changed: ${changedFiles?.length ?? 0}, tree: ${fileTree?.length ?? 0}, pkgs: ${packageTypes})`
440
444
  );
441
445
  return {
442
446
  auto_sync: response.auto_sync
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  config,
3
3
  logger
4
- } from "./chunk-X2Z4ILIY.js";
4
+ } from "./chunk-65VAEI4L.js";
5
5
 
6
6
  // src/services/git.ts
7
7
  import simpleGit from "simple-git";
@@ -285,6 +285,30 @@ var GitServiceImpl = class {
285
285
  return null;
286
286
  }
287
287
  }
288
+ /**
289
+ * Get list of all tracked files in the repository
290
+ * @param path - Repository path
291
+ * @returns Array of file paths relative to repo root
292
+ */
293
+ async getFileTree(path3) {
294
+ try {
295
+ const git = this.getGit(path3);
296
+ const tracked = await git.raw(["ls-files"]);
297
+ const untracked = await git.raw([
298
+ "ls-files",
299
+ "--others",
300
+ "--exclude-standard"
301
+ ]);
302
+ const files = [
303
+ ...tracked.split("\n").filter(Boolean),
304
+ ...untracked.split("\n").filter(Boolean)
305
+ ];
306
+ return [...new Set(files)].sort();
307
+ } catch (error) {
308
+ logger.error("git", `Failed to get file tree in ${path3}`, error);
309
+ return [];
310
+ }
311
+ }
288
312
  };
289
313
  var gitService = new GitServiceImpl();
290
314
 
@@ -4,20 +4,20 @@ import {
4
4
  notify,
5
5
  packageDetector,
6
6
  websocketService
7
- } from "../chunk-7B4YYEBR.js";
7
+ } from "../chunk-IPK6ZV6I.js";
8
8
  import {
9
9
  apiService
10
- } from "../chunk-UBU6PUVO.js";
10
+ } from "../chunk-RS22EJ47.js";
11
11
  import {
12
12
  gitService,
13
13
  projectService,
14
14
  removePidFile,
15
15
  writePidFile
16
- } from "../chunk-4IAVYCEN.js";
16
+ } from "../chunk-UFU7YWGS.js";
17
17
  import {
18
18
  authService,
19
19
  logger
20
- } from "../chunk-X2Z4ILIY.js";
20
+ } from "../chunk-65VAEI4L.js";
21
21
 
22
22
  // src/daemon/runner.ts
23
23
  import "dotenv/config";
package/dist/index.js CHANGED
@@ -3,10 +3,10 @@ import {
3
3
  commitQueue,
4
4
  packageDetector,
5
5
  websocketService
6
- } from "./chunk-7B4YYEBR.js";
6
+ } from "./chunk-IPK6ZV6I.js";
7
7
  import {
8
8
  apiService
9
- } from "./chunk-UBU6PUVO.js";
9
+ } from "./chunk-RS22EJ47.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-4IAVYCEN.js";
18
+ } from "./chunk-UFU7YWGS.js";
19
19
  import {
20
20
  __commonJS,
21
21
  __toESM,
22
22
  authService,
23
23
  config,
24
24
  logger
25
- } from "./chunk-X2Z4ILIY.js";
25
+ } from "./chunk-65VAEI4L.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-LG4VC32Y.js");
2661
+ const { StatusDashboard } = await import("./StatusDashboard-H4POEKO4.js");
2662
2662
  render(createElement(StatusDashboard, { cwd }));
2663
2663
  return;
2664
2664
  } catch (error) {
@@ -2886,6 +2886,8 @@ function registerSyncCommand(program2) {
2886
2886
  const changedFiles = await gitService.getChangedFiles(cwd);
2887
2887
  spinner.text = "Detecting package types...";
2888
2888
  const packageInfo = await packageDetector.detectAll(cwd);
2889
+ spinner.text = "Scanning file tree...";
2890
+ const fileTree = await gitService.getFileTree(cwd);
2889
2891
  spinner.text = "Preparing sync payload...";
2890
2892
  const syncSpinner = ora7("Connecting to server...").start();
2891
2893
  try {
@@ -2893,7 +2895,8 @@ function registerSyncCommand(program2) {
2893
2895
  linkedProject.projectId,
2894
2896
  repoInfo,
2895
2897
  changedFiles,
2896
- packageInfo
2898
+ packageInfo,
2899
+ fileTree
2897
2900
  );
2898
2901
  syncSpinner.succeed("Server sync completed");
2899
2902
  } catch (error) {
@@ -2912,6 +2915,9 @@ function registerSyncCommand(program2) {
2912
2915
  const pkgTypes = packageInfo.map((p) => `${p.type} (${p.name}@${p.version})`).join(", ");
2913
2916
  console.log(`${chalk7.bold("Packages:")} ${pkgTypes}`);
2914
2917
  }
2918
+ console.log(
2919
+ `${chalk7.bold("File Tree:")} ${fileTree.length} files indexed`
2920
+ );
2915
2921
  console.log(`${chalk7.bold("Project ID:")} ${linkedProject.projectId}`);
2916
2922
  console.log(`${chalk7.bold("Branch:")} ${repoInfo.currentBranch}`);
2917
2923
  console.log(
@@ -4936,7 +4942,7 @@ Tasks for project ${chalk15.cyan(linkedProject.projectId)}`
4936
4942
  });
4937
4943
 
4938
4944
  // src/index.ts
4939
- var AGENT_VERSION = "1.2.44";
4945
+ var AGENT_VERSION = "1.2.45";
4940
4946
  var program = new Command2();
4941
4947
  program.name("stint").description("Stint Agent - Local daemon for Stint Project Assistant").version(AGENT_VERSION, "-v, --version", "output the current version").addHelpText(
4942
4948
  "after",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gowelle/stint-agent",
3
- "version": "1.2.44",
3
+ "version": "1.2.45",
4
4
  "description": "Local agent for Stint - Project Assistant",
5
5
  "author": "Gowelle John <gowelle.john@icloud.com>",
6
6
  "license": "MIT",
@@ -1,7 +0,0 @@
1
- import {
2
- apiService
3
- } from "./chunk-UBU6PUVO.js";
4
- import "./chunk-X2Z4ILIY.js";
5
- export {
6
- apiService
7
- };