jowork 0.3.5 → 0.3.7

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.
@@ -181,7 +181,9 @@ async function syncGitLab(ctx, data, logger = defaultLogger) {
181
181
  logger.info(`Found ${projects} GitLab projects`);
182
182
  const issuesSince = ctx.getUpdatedSince("gitlab:issues");
183
183
  const mrsSince = ctx.getUpdatedSince("gitlab:mrs");
184
- for (const project of projectList) {
184
+ for (let pi = 0; pi < projectList.length; pi++) {
185
+ const project = projectList[pi];
186
+ logger.info(`Project ${pi + 1}/${projectList.length}: ${project.path_with_namespace}`);
185
187
  const encodedPath = encodeURIComponent(project.path_with_namespace);
186
188
  try {
187
189
  let issueUrl = `${baseUrl}/api/v4/projects/${encodedPath}/issues?state=all&per_page=100&order_by=updated_at`;
@@ -343,7 +345,10 @@ async function syncLinear(ctx, data, logger = defaultLogger2) {
343
345
  const since = ctx.getUpdatedSince("linear:issues");
344
346
  let hasNextPage = true;
345
347
  let endCursor = null;
348
+ let pageNum = 0;
346
349
  while (hasNextPage) {
350
+ pageNum++;
351
+ logger.info(`Fetching issues page ${pageNum}...`);
347
352
  const res = await fetch(LINEAR_API, {
348
353
  method: "POST",
349
354
  headers,
@@ -51,7 +51,9 @@ async function syncFeishu(ctx, data, logger = defaultLogger) {
51
51
  const sqlite = ctx.getSqlite();
52
52
  const fileWriter = ctx.writer;
53
53
  const dayMessages = /* @__PURE__ */ new Map();
54
- for (const chat of chats) {
54
+ for (let ci = 0; ci < chats.length; ci++) {
55
+ const chat = chats[ci];
56
+ logger.info(`Chat ${ci + 1}/${chats.length}: ${chat.name ?? chat.chat_id}`);
55
57
  const cursor = ctx.getCursor(`feishu:${chat.chat_id}`);
56
58
  let pageToken = cursor?.pageToken;
57
59
  let hasMore = true;
@@ -2,10 +2,10 @@ import {
2
2
  linkAllUnprocessed,
3
3
  syncGitLab,
4
4
  syncLinear
5
- } from "./chunk-PUUHYDI7.js";
5
+ } from "./chunk-3IYVMICH.js";
6
6
  import {
7
7
  syncGitHub
8
- } from "./chunk-XT5LUO65.js";
8
+ } from "./chunk-L2SHMRM6.js";
9
9
  import {
10
10
  GitManager
11
11
  } from "./chunk-EYP6WMFF.js";
@@ -26,7 +26,7 @@ import {
26
26
  syncFeishuDocs,
27
27
  syncFeishuLinks,
28
28
  syncFeishuMeetings
29
- } from "./chunk-V3KWJ43Y.js";
29
+ } from "./chunk-BLDJCUZF.js";
30
30
  import {
31
31
  formatAnalytics,
32
32
  formatMessages
@@ -429,8 +429,18 @@ function sourceLabel(name) {
429
429
  return `${colors[name] ?? c.white}${c.bold}${name}${c.reset}`;
430
430
  }
431
431
  function resultLine(ok, msg) {
432
+ if (isTTY) process.stdout.write("\r\x1B[K");
432
433
  console.log(` ${ok ? icon.ok : icon.warn} ${msg}`);
433
434
  }
435
+ var _currentSource = "";
436
+ function progressLine(msg) {
437
+ if (!isTTY) return;
438
+ process.stdout.write(`\r ${icon.sync} ${_currentSource} ${c.dim}${msg}${c.reset}\x1B[K`);
439
+ }
440
+ function clearProgress() {
441
+ if (!isTTY) return;
442
+ process.stdout.write("\r\x1B[K");
443
+ }
434
444
  function elapsed(start) {
435
445
  const ms = Date.now() - start;
436
446
  return ms < 1e3 ? `${ms}ms` : `${(ms / 1e3).toFixed(1)}s`;
@@ -481,12 +491,20 @@ async function runSync(sources) {
481
491
  continue;
482
492
  }
483
493
  const sourceStart = Date.now();
484
- console.log(` ${icon.sync} ${sourceLabel(source)} ${c.dim}syncing...${c.reset}`);
494
+ _currentSource = sourceLabel(source);
495
+ progressLine("syncing...");
485
496
  const logger = {
486
- info: (_msg) => {
497
+ info: (msg) => {
498
+ progressLine(msg);
487
499
  },
488
- warn: (msg) => resultLine(false, `${c.dim}${msg}${c.reset}`),
489
- error: (msg) => console.error(` ${icon.fail} ${c.red}${msg}${c.reset}`)
500
+ warn: (msg) => {
501
+ clearProgress();
502
+ resultLine(false, `${c.dim}${msg}${c.reset}`);
503
+ },
504
+ error: (msg) => {
505
+ clearProgress();
506
+ console.error(` ${icon.fail} ${c.red}${msg}${c.reset}`);
507
+ }
490
508
  };
491
509
  try {
492
510
  switch (source) {
@@ -572,6 +590,7 @@ async function runSync(sources) {
572
590
  default:
573
591
  console.log(` ${icon.skip} ${c.dim}unknown source${c.reset}`);
574
592
  }
593
+ clearProgress();
575
594
  console.log(` ${c.dim}${elapsed(sourceStart)}${c.reset}`);
576
595
  } catch (err) {
577
596
  logError("sync", `Failed to sync ${source}`, { error: String(err) });
@@ -85,7 +85,9 @@ async function syncGitHub(ctx, data, logger = defaultLogger) {
85
85
  logger.warn(`Bare repo sync error (non-fatal): ${err}`);
86
86
  }
87
87
  const since = ctx.getUpdatedSince("github:issues");
88
- for (const repo of repoList) {
88
+ for (let ri = 0; ri < repoList.length; ri++) {
89
+ const repo = repoList[ri];
90
+ logger.info(`Scanning repo ${ri + 1}/${repoList.length}: ${repo.full_name}`);
89
91
  try {
90
92
  let issueUrl = `${GITHUB_API}/repos/${repo.full_name}/issues?state=all&per_page=100&sort=updated&direction=asc`;
91
93
  if (since) {
@@ -349,7 +349,7 @@ function createJoWorkMcpServer(opts) {
349
349
  try {
350
350
  switch (src) {
351
351
  case "feishu": {
352
- const { syncFeishu } = await import("./feishu-GWZDJMWA.js");
352
+ const { syncFeishu } = await import("./feishu-3H2ZS2MO.js");
353
353
  const { SyncContext } = await import("./context-ZNI3WOB7.js");
354
354
  const feishuCtx = new SyncContext(sqlite, { info: () => {
355
355
  }, warn: () => {
@@ -359,7 +359,7 @@ function createJoWorkMcpServer(opts) {
359
359
  break;
360
360
  }
361
361
  case "github": {
362
- const { syncGitHub } = await import("./github-WIGZNLKW.js");
362
+ const { syncGitHub } = await import("./github-YHIQJN6K.js");
363
363
  const { SyncContext } = await import("./context-ZNI3WOB7.js");
364
364
  const ghCtx = new SyncContext(sqlite, { info: () => {
365
365
  }, warn: () => {
@@ -1089,7 +1089,7 @@ ${hot.summary}
1089
1089
  try {
1090
1090
  switch (src) {
1091
1091
  case "feishu": {
1092
- const { syncFeishu } = await import("./feishu-GWZDJMWA.js");
1092
+ const { syncFeishu } = await import("./feishu-3H2ZS2MO.js");
1093
1093
  const { SyncContext } = await import("./context-ZNI3WOB7.js");
1094
1094
  const feishuCtx = new SyncContext(sqlite, { info: () => {
1095
1095
  }, warn: () => {
@@ -1100,7 +1100,7 @@ ${hot.summary}
1100
1100
  break;
1101
1101
  }
1102
1102
  case "github": {
1103
- const { syncGitHub } = await import("./github-WIGZNLKW.js");
1103
+ const { syncGitHub } = await import("./github-YHIQJN6K.js");
1104
1104
  const { SyncContext } = await import("./context-ZNI3WOB7.js");
1105
1105
  const ghCtx = new SyncContext(sqlite, { info: () => {
1106
1106
  }, warn: () => {
package/dist/cli.js CHANGED
@@ -5,15 +5,15 @@ import {
5
5
  syncCommand,
6
6
  syncFirebase,
7
7
  syncPostHog
8
- } from "./chunk-OOZVBO2V.js";
8
+ } from "./chunk-KIETDRXF.js";
9
9
  import {
10
10
  linkAllUnprocessed,
11
11
  syncGitLab,
12
12
  syncLinear
13
- } from "./chunk-PUUHYDI7.js";
13
+ } from "./chunk-3IYVMICH.js";
14
14
  import {
15
15
  syncGitHub
16
- } from "./chunk-XT5LUO65.js";
16
+ } from "./chunk-L2SHMRM6.js";
17
17
  import {
18
18
  GitManager
19
19
  } from "./chunk-EYP6WMFF.js";
@@ -23,7 +23,7 @@ import {
23
23
  import {
24
24
  PLUGIN_REGISTRY,
25
25
  createJoWorkMcpServer
26
- } from "./chunk-TGVQ63F4.js";
26
+ } from "./chunk-VKP57MQJ.js";
27
27
  import {
28
28
  GoalManager
29
29
  } from "./chunk-VX662YLA.js";
@@ -53,7 +53,7 @@ import {
53
53
  syncFeishuDocs,
54
54
  syncFeishuLinks,
55
55
  syncFeishuMeetings
56
- } from "./chunk-V3KWJ43Y.js";
56
+ } from "./chunk-BLDJCUZF.js";
57
57
  import "./chunk-VWT2U6NB.js";
58
58
  import {
59
59
  logError,
@@ -102,7 +102,7 @@ function initCommand(program2) {
102
102
  default: true
103
103
  }]);
104
104
  if (continueSetup) {
105
- const { runSetupWizard } = await import("./setup-XMJ3EQ6E.js");
105
+ const { runSetupWizard } = await import("./setup-5LFE6XDW.js");
106
106
  await runSetupWizard();
107
107
  } else {
108
108
  console.log("");
@@ -2102,7 +2102,7 @@ function dashboardCommand(program2) {
2102
2102
  console.error("Error: JoWork not initialized. Run `jowork init` first.");
2103
2103
  process.exit(1);
2104
2104
  }
2105
- const { startDashboard } = await import("./server-V3WMAKJQ.js");
2105
+ const { startDashboard } = await import("./server-Y3RNHAJ2.js");
2106
2106
  const port = opts.port ? parseInt(opts.port, 10) : void 0;
2107
2107
  const dashboard = await startDashboard({ port });
2108
2108
  const url = `http://127.0.0.1:${dashboard.port}`;
@@ -2793,7 +2793,7 @@ function isInstalled(packageName) {
2793
2793
  // src/cli.ts
2794
2794
  process.env["I18NEXT_DISABLE_BANNER"] = "1";
2795
2795
  var program = new Command();
2796
- program.name("jowork").description("AI Agent Infrastructure \u2014 let AI agents truly understand your work").version("0.3.5");
2796
+ program.name("jowork").description("AI Agent Infrastructure \u2014 let AI agents truly understand your work").version("0.3.7");
2797
2797
  initCommand(program);
2798
2798
  serveCommand(program);
2799
2799
  registerCommand(program);
@@ -2820,7 +2820,7 @@ program.action(async () => {
2820
2820
  const config = readConfig2();
2821
2821
  if (!config.initialized || !existsSync18(dbPath2())) {
2822
2822
  if (process.stdin.isTTY) {
2823
- const { runSetupWizard } = await import("./setup-XMJ3EQ6E.js");
2823
+ const { runSetupWizard } = await import("./setup-5LFE6XDW.js");
2824
2824
  await runSetupWizard();
2825
2825
  } else {
2826
2826
  console.log("JoWork is not initialized. Run `jowork init` in an interactive terminal.");
@@ -5,7 +5,7 @@ import {
5
5
  syncFeishuDocs,
6
6
  syncFeishuLinks,
7
7
  syncFeishuMeetings
8
- } from "./chunk-V3KWJ43Y.js";
8
+ } from "./chunk-BLDJCUZF.js";
9
9
  import "./chunk-VWT2U6NB.js";
10
10
  import "./chunk-MYDK7MWB.js";
11
11
  import {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  syncGitHub
3
- } from "./chunk-XT5LUO65.js";
3
+ } from "./chunk-L2SHMRM6.js";
4
4
  import "./chunk-EYP6WMFF.js";
5
5
  import "./chunk-4PIT2GZ4.js";
6
6
  import "./chunk-VWT2U6NB.js";
@@ -2,10 +2,10 @@ import {
2
2
  linkAllUnprocessed,
3
3
  syncGitLab,
4
4
  syncLinear
5
- } from "./chunk-PUUHYDI7.js";
5
+ } from "./chunk-3IYVMICH.js";
6
6
  import {
7
7
  syncGitHub
8
- } from "./chunk-XT5LUO65.js";
8
+ } from "./chunk-L2SHMRM6.js";
9
9
  import "./chunk-EYP6WMFF.js";
10
10
  import {
11
11
  DbManager
@@ -27,7 +27,7 @@ import {
27
27
  syncFeishuApprovals,
28
28
  syncFeishuDocs,
29
29
  syncFeishuMeetings
30
- } from "./chunk-V3KWJ43Y.js";
30
+ } from "./chunk-BLDJCUZF.js";
31
31
  import "./chunk-VWT2U6NB.js";
32
32
  import {
33
33
  logError,
@@ -212,7 +212,7 @@ async function runSetupWizard() {
212
212
  console.log("");
213
213
  console.log(zh ? ` \u6B63\u5728\u540C\u6B65 ${connectedSources.length} \u4E2A\u6570\u636E\u6E90...` : ` Syncing ${connectedSources.length} source${connectedSources.length > 1 ? "s" : ""}...`);
214
214
  console.log("");
215
- const { runSync } = await import("./sync-7Z4SQJKG.js");
215
+ const { runSync } = await import("./sync-XUDNMTTA.js");
216
216
  try {
217
217
  await runSync(connectedSources);
218
218
  } catch {
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  runSync,
3
3
  syncCommand
4
- } from "./chunk-OOZVBO2V.js";
5
- import "./chunk-PUUHYDI7.js";
6
- import "./chunk-XT5LUO65.js";
4
+ } from "./chunk-KIETDRXF.js";
5
+ import "./chunk-3IYVMICH.js";
6
+ import "./chunk-L2SHMRM6.js";
7
7
  import "./chunk-EYP6WMFF.js";
8
8
  import "./chunk-74AHY7X6.js";
9
9
  import "./chunk-54SD5GBF.js";
10
10
  import "./chunk-FX6Z3QHV.js";
11
11
  import "./chunk-4PIT2GZ4.js";
12
- import "./chunk-V3KWJ43Y.js";
12
+ import "./chunk-BLDJCUZF.js";
13
13
  import "./chunk-VWT2U6NB.js";
14
14
  import "./chunk-MYDK7MWB.js";
15
15
  import "./chunk-OXWWOKC7.js";
package/dist/transport.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createJoWorkMcpServer
3
- } from "./chunk-TGVQ63F4.js";
3
+ } from "./chunk-VKP57MQJ.js";
4
4
  import "./chunk-VX662YLA.js";
5
5
  import "./chunk-54SD5GBF.js";
6
6
  import "./chunk-FX6Z3QHV.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jowork",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
4
4
  "description": "AI Agent Infrastructure — let AI agents truly understand your work. Connect data sources, give agents awareness and goals. Local-first, one command.",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0",