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.
- package/dist/{chunk-PUUHYDI7.js → chunk-3IYVMICH.js} +6 -1
- package/dist/{chunk-V3KWJ43Y.js → chunk-BLDJCUZF.js} +3 -1
- package/dist/{chunk-OOZVBO2V.js → chunk-KIETDRXF.js} +26 -7
- package/dist/{chunk-XT5LUO65.js → chunk-L2SHMRM6.js} +3 -1
- package/dist/{chunk-TGVQ63F4.js → chunk-VKP57MQJ.js} +4 -4
- package/dist/cli.js +9 -9
- package/dist/{feishu-GWZDJMWA.js → feishu-3H2ZS2MO.js} +1 -1
- package/dist/{github-WIGZNLKW.js → github-YHIQJN6K.js} +1 -1
- package/dist/{server-V3WMAKJQ.js → server-Y3RNHAJ2.js} +3 -3
- package/dist/{setup-XMJ3EQ6E.js → setup-5LFE6XDW.js} +1 -1
- package/dist/{sync-7Z4SQJKG.js → sync-XUDNMTTA.js} +4 -4
- package/dist/transport.js +1 -1
- package/package.json +1 -1
|
@@ -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 (
|
|
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 (
|
|
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-
|
|
5
|
+
} from "./chunk-3IYVMICH.js";
|
|
6
6
|
import {
|
|
7
7
|
syncGitHub
|
|
8
|
-
} from "./chunk-
|
|
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-
|
|
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
|
-
|
|
494
|
+
_currentSource = sourceLabel(source);
|
|
495
|
+
progressLine("syncing...");
|
|
485
496
|
const logger = {
|
|
486
|
-
info: (
|
|
497
|
+
info: (msg) => {
|
|
498
|
+
progressLine(msg);
|
|
487
499
|
},
|
|
488
|
-
warn: (msg) =>
|
|
489
|
-
|
|
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 (
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
8
|
+
} from "./chunk-KIETDRXF.js";
|
|
9
9
|
import {
|
|
10
10
|
linkAllUnprocessed,
|
|
11
11
|
syncGitLab,
|
|
12
12
|
syncLinear
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3IYVMICH.js";
|
|
14
14
|
import {
|
|
15
15
|
syncGitHub
|
|
16
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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.
|
|
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-
|
|
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.");
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
linkAllUnprocessed,
|
|
3
3
|
syncGitLab,
|
|
4
4
|
syncLinear
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-3IYVMICH.js";
|
|
6
6
|
import {
|
|
7
7
|
syncGitHub
|
|
8
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
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-
|
|
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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jowork",
|
|
3
|
-
"version": "0.3.
|
|
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",
|