@cliangdev/flux-plugin 0.0.0-dev.8e9707e → 0.0.0-dev.b40f7c2
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/server/index.js +48 -19
- package/package.json +4 -2
package/dist/server/index.js
CHANGED
|
@@ -22481,7 +22481,6 @@ var config2 = {
|
|
|
22481
22481
|
};
|
|
22482
22482
|
|
|
22483
22483
|
// src/server/db/index.ts
|
|
22484
|
-
import { Database } from "bun:sqlite";
|
|
22485
22484
|
import { existsSync as existsSync2, mkdirSync } from "node:fs";
|
|
22486
22485
|
|
|
22487
22486
|
// src/server/utils/logger.ts
|
|
@@ -22584,6 +22583,43 @@ CREATE INDEX IF NOT EXISTS idx_tasks_status ON tasks(status);
|
|
|
22584
22583
|
CREATE INDEX IF NOT EXISTS idx_criteria_parent ON acceptance_criteria(parent_type, parent_id);
|
|
22585
22584
|
`;
|
|
22586
22585
|
|
|
22586
|
+
// src/server/db/sqlite.ts
|
|
22587
|
+
var isBun = typeof process !== "undefined" && !!process.versions?.bun;
|
|
22588
|
+
var DatabaseImpl;
|
|
22589
|
+
if (isBun) {
|
|
22590
|
+
const { Database: BunDatabase } = await import("bun:sqlite");
|
|
22591
|
+
DatabaseImpl = BunDatabase;
|
|
22592
|
+
} else {
|
|
22593
|
+
const BetterSqlite3 = (await import("better-sqlite3")).default;
|
|
22594
|
+
|
|
22595
|
+
class BetterSqlite3Wrapper {
|
|
22596
|
+
db;
|
|
22597
|
+
constructor(path) {
|
|
22598
|
+
this.db = new BetterSqlite3(path);
|
|
22599
|
+
}
|
|
22600
|
+
query(sql) {
|
|
22601
|
+
const stmt = this.db.prepare(sql);
|
|
22602
|
+
return {
|
|
22603
|
+
get: (...params) => stmt.get(...params),
|
|
22604
|
+
all: (...params) => stmt.all(...params),
|
|
22605
|
+
run: (...params) => {
|
|
22606
|
+
stmt.run(...params);
|
|
22607
|
+
}
|
|
22608
|
+
};
|
|
22609
|
+
}
|
|
22610
|
+
exec(sql) {
|
|
22611
|
+
this.db.exec(sql);
|
|
22612
|
+
}
|
|
22613
|
+
run(sql) {
|
|
22614
|
+
this.db.exec(sql);
|
|
22615
|
+
}
|
|
22616
|
+
close() {
|
|
22617
|
+
this.db.close();
|
|
22618
|
+
}
|
|
22619
|
+
}
|
|
22620
|
+
DatabaseImpl = BetterSqlite3Wrapper;
|
|
22621
|
+
}
|
|
22622
|
+
|
|
22587
22623
|
// src/server/db/ids.ts
|
|
22588
22624
|
function generateId(prefix = "") {
|
|
22589
22625
|
const timestamp = Date.now().toString(36);
|
|
@@ -22686,7 +22722,7 @@ function initDb() {
|
|
|
22686
22722
|
mkdirSync(config2.fluxPath, { recursive: true });
|
|
22687
22723
|
}
|
|
22688
22724
|
logger.info(`Opening database: ${config2.dbPath}`);
|
|
22689
|
-
db = new
|
|
22725
|
+
db = new DatabaseImpl(config2.dbPath);
|
|
22690
22726
|
db.run("PRAGMA foreign_keys = ON");
|
|
22691
22727
|
db.exec(SCHEMA);
|
|
22692
22728
|
logger.info("Database initialized successfully");
|
|
@@ -86184,14 +86220,7 @@ var getStatsTool = {
|
|
|
86184
86220
|
handler: handler8
|
|
86185
86221
|
};
|
|
86186
86222
|
// src/version.ts
|
|
86187
|
-
|
|
86188
|
-
import { dirname as dirname2, join as join2 } from "node:path";
|
|
86189
|
-
import { fileURLToPath } from "node:url";
|
|
86190
|
-
var __filename2 = fileURLToPath(import.meta.url);
|
|
86191
|
-
var __dirname2 = dirname2(__filename2);
|
|
86192
|
-
var packageJsonPath = join2(__dirname2, "..", "package.json");
|
|
86193
|
-
var packageJson = JSON.parse(readFileSync6(packageJsonPath, "utf-8"));
|
|
86194
|
-
var VERSION = packageJson.version;
|
|
86223
|
+
var VERSION = "0.1.0";
|
|
86195
86224
|
|
|
86196
86225
|
// src/server/tools/get-version.ts
|
|
86197
86226
|
var inputSchema10 = exports_external.object({});
|
|
@@ -86208,15 +86237,15 @@ var getVersionTool = {
|
|
|
86208
86237
|
handler: handler9
|
|
86209
86238
|
};
|
|
86210
86239
|
// src/server/tools/init-project.ts
|
|
86211
|
-
import { existsSync as existsSync8, mkdirSync as mkdirSync4, readFileSync as
|
|
86212
|
-
import { dirname as
|
|
86240
|
+
import { existsSync as existsSync8, mkdirSync as mkdirSync4, readFileSync as readFileSync6, writeFileSync as writeFileSync4 } from "node:fs";
|
|
86241
|
+
import { dirname as dirname2, join as join2 } from "node:path";
|
|
86213
86242
|
function getStatusLineBinaryPath() {
|
|
86214
|
-
const thisDir =
|
|
86215
|
-
return
|
|
86243
|
+
const thisDir = dirname2(new URL(import.meta.url).pathname);
|
|
86244
|
+
return join2(thisDir, "..", "..", "..", "bin", "flux-status");
|
|
86216
86245
|
}
|
|
86217
86246
|
function setupClaudeSettings(projectRoot) {
|
|
86218
|
-
const claudeDir =
|
|
86219
|
-
const settingsPath =
|
|
86247
|
+
const claudeDir = join2(projectRoot, ".claude");
|
|
86248
|
+
const settingsPath = join2(claudeDir, "settings.local.json");
|
|
86220
86249
|
const statusBinaryPath = getStatusLineBinaryPath();
|
|
86221
86250
|
if (!existsSync8(statusBinaryPath)) {
|
|
86222
86251
|
return;
|
|
@@ -86227,7 +86256,7 @@ function setupClaudeSettings(projectRoot) {
|
|
|
86227
86256
|
let settings = {};
|
|
86228
86257
|
if (existsSync8(settingsPath)) {
|
|
86229
86258
|
try {
|
|
86230
|
-
settings = JSON.parse(
|
|
86259
|
+
settings = JSON.parse(readFileSync6(settingsPath, "utf-8"));
|
|
86231
86260
|
} catch {
|
|
86232
86261
|
settings = {};
|
|
86233
86262
|
}
|
|
@@ -86393,7 +86422,7 @@ var queryEntitiesTool = {
|
|
|
86393
86422
|
handler: handler11
|
|
86394
86423
|
};
|
|
86395
86424
|
// src/server/tools/render-status.ts
|
|
86396
|
-
import { existsSync as existsSync9, readFileSync as
|
|
86425
|
+
import { existsSync as existsSync9, readFileSync as readFileSync7 } from "node:fs";
|
|
86397
86426
|
|
|
86398
86427
|
// src/utils/display.ts
|
|
86399
86428
|
function renderProgressBar(percentage, width) {
|
|
@@ -86506,7 +86535,7 @@ function getProjectInfo() {
|
|
|
86506
86535
|
return null;
|
|
86507
86536
|
}
|
|
86508
86537
|
try {
|
|
86509
|
-
const content =
|
|
86538
|
+
const content = readFileSync7(config2.projectJsonPath, "utf-8");
|
|
86510
86539
|
const project = JSON.parse(content);
|
|
86511
86540
|
return {
|
|
86512
86541
|
name: project.name || "Unnamed Project",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cliangdev/flux-plugin",
|
|
3
|
-
"version": "0.0.0-dev.
|
|
3
|
+
"version": "0.0.0-dev.b40f7c2",
|
|
4
4
|
"description": "Claude Code plugin for AI-first workflow orchestration with MCP server",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/server/index.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"scripts": {
|
|
16
16
|
"dev": "bun run src/server/index.ts",
|
|
17
|
-
"build": "bun build src/server/index.ts --outdir dist/server --target node",
|
|
17
|
+
"build": "bun build src/server/index.ts --outdir dist/server --target node --external better-sqlite3",
|
|
18
18
|
"postbuild": "node -e \"const fs=require('fs');const f='dist/server/index.js';const c=fs.readFileSync(f,'utf-8');if(!c.startsWith('#!/usr/bin/env node')){fs.writeFileSync(f,'#!/usr/bin/env node\\n'+c)}\"",
|
|
19
19
|
"build:compile": "bun build --compile --outfile bin/flux-server src/server/index.ts && bun build --compile --outfile bin/flux-status src/status-line/index.ts",
|
|
20
20
|
"build:compile:server": "bun build --compile --outfile bin/flux-server src/server/index.ts",
|
|
@@ -47,12 +47,14 @@
|
|
|
47
47
|
"license": "MIT",
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@biomejs/biome": "^2.3.11",
|
|
50
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
50
51
|
"@types/bun": "^1.3.6",
|
|
51
52
|
"typescript": "^5.0.0"
|
|
52
53
|
},
|
|
53
54
|
"dependencies": {
|
|
54
55
|
"@linear/sdk": "^70.0.0",
|
|
55
56
|
"@modelcontextprotocol/sdk": "^1.25.2",
|
|
57
|
+
"better-sqlite3": "^12.6.2",
|
|
56
58
|
"chalk": "^5.4.1",
|
|
57
59
|
"zod": "^4.3.5"
|
|
58
60
|
},
|