@tarcisiopgs/lisa 1.4.0 → 1.6.0
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/README.md +184 -112
- package/dist/chunk-KAME5MG7.js +54 -0
- package/dist/index.js +2033 -1141
- package/dist/kanban-KIPKQ2IL.js +127 -0
- package/package.json +59 -57
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
useKanbanState
|
|
4
|
+
} from "./chunk-KAME5MG7.js";
|
|
5
|
+
|
|
6
|
+
// src/ui/kanban.tsx
|
|
7
|
+
import { Box as Box5, useApp, useInput } from "ink";
|
|
8
|
+
|
|
9
|
+
// src/ui/board.tsx
|
|
10
|
+
import { Box as Box3 } from "ink";
|
|
11
|
+
|
|
12
|
+
// src/ui/column.tsx
|
|
13
|
+
import { Box as Box2, Text as Text2 } from "ink";
|
|
14
|
+
|
|
15
|
+
// src/ui/card.tsx
|
|
16
|
+
import { Box, Text } from "ink";
|
|
17
|
+
import Spinner from "ink-spinner";
|
|
18
|
+
import { useEffect, useState } from "react";
|
|
19
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
20
|
+
function formatElapsed(ms) {
|
|
21
|
+
const seconds = Math.floor(ms / 1e3);
|
|
22
|
+
const minutes = Math.floor(seconds / 60);
|
|
23
|
+
const remainingSeconds = seconds % 60;
|
|
24
|
+
if (minutes > 0) return `${minutes}m ${remainingSeconds}s`;
|
|
25
|
+
return `${seconds}s`;
|
|
26
|
+
}
|
|
27
|
+
function Card({ card }) {
|
|
28
|
+
const [now, setNow] = useState(Date.now());
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
if (card.column !== "in_progress") return;
|
|
31
|
+
const interval = setInterval(() => setNow(Date.now()), 1e3);
|
|
32
|
+
return () => clearInterval(interval);
|
|
33
|
+
}, [card.column]);
|
|
34
|
+
const truncated = card.title.length > 22 ? `${card.title.slice(0, 19)}...` : card.title;
|
|
35
|
+
const borderColor = card.hasError ? "red" : card.column === "done" ? "green" : "white";
|
|
36
|
+
return /* @__PURE__ */ jsxs(
|
|
37
|
+
Box,
|
|
38
|
+
{
|
|
39
|
+
borderStyle: "round",
|
|
40
|
+
borderColor,
|
|
41
|
+
flexDirection: "column",
|
|
42
|
+
paddingX: 1,
|
|
43
|
+
marginBottom: 1,
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ jsx(Text, { bold: true, color: "cyan", children: card.id }),
|
|
46
|
+
/* @__PURE__ */ jsx(Text, { children: truncated }),
|
|
47
|
+
card.column === "in_progress" && card.startedAt !== void 0 && /* @__PURE__ */ jsxs(Box, { children: [
|
|
48
|
+
/* @__PURE__ */ jsx(Text, { color: "yellow", children: /* @__PURE__ */ jsx(Spinner, { type: "dots" }) }),
|
|
49
|
+
/* @__PURE__ */ jsxs(Text, { color: "yellow", children: [
|
|
50
|
+
" ",
|
|
51
|
+
formatElapsed(now - card.startedAt)
|
|
52
|
+
] })
|
|
53
|
+
] })
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// src/ui/column.tsx
|
|
60
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
61
|
+
function Column({ label, cards }) {
|
|
62
|
+
return /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", flexGrow: 1, borderStyle: "single", paddingX: 1, children: [
|
|
63
|
+
/* @__PURE__ */ jsxs2(Text2, { bold: true, color: "cyan", children: [
|
|
64
|
+
label,
|
|
65
|
+
" (",
|
|
66
|
+
cards.length,
|
|
67
|
+
")"
|
|
68
|
+
] }),
|
|
69
|
+
/* @__PURE__ */ jsx2(Box2, { height: 1 }),
|
|
70
|
+
cards.map((card) => /* @__PURE__ */ jsx2(Card, { card }, card.id))
|
|
71
|
+
] });
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// src/ui/board.tsx
|
|
75
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
76
|
+
function Board({ cards, labels }) {
|
|
77
|
+
const backlog = cards.filter((c) => c.column === "backlog");
|
|
78
|
+
const inProgress = cards.filter((c) => c.column === "in_progress");
|
|
79
|
+
const done = cards.filter((c) => c.column === "done");
|
|
80
|
+
return /* @__PURE__ */ jsxs3(Box3, { flexGrow: 1, flexDirection: "row", children: [
|
|
81
|
+
/* @__PURE__ */ jsx3(Column, { label: labels.backlog, cards: backlog }),
|
|
82
|
+
/* @__PURE__ */ jsx3(Column, { label: labels.inProgress, cards: inProgress }),
|
|
83
|
+
/* @__PURE__ */ jsx3(Column, { label: labels.done, cards: done })
|
|
84
|
+
] });
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// src/ui/sidebar.tsx
|
|
88
|
+
import { Box as Box4, Text as Text3 } from "ink";
|
|
89
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
90
|
+
function Sidebar({ provider, source }) {
|
|
91
|
+
return /* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", width: 18, borderStyle: "single", paddingX: 1, children: [
|
|
92
|
+
/* @__PURE__ */ jsx4(Text3, { bold: true, color: "yellow", children: "\u25C6 LISA" }),
|
|
93
|
+
/* @__PURE__ */ jsx4(Box4, { height: 1 }),
|
|
94
|
+
/* @__PURE__ */ jsx4(Text3, { dimColor: true, children: "Provider" }),
|
|
95
|
+
/* @__PURE__ */ jsx4(Text3, { color: "cyan", children: provider }),
|
|
96
|
+
/* @__PURE__ */ jsx4(Box4, { height: 1 }),
|
|
97
|
+
/* @__PURE__ */ jsx4(Text3, { dimColor: true, children: "Source" }),
|
|
98
|
+
/* @__PURE__ */ jsx4(Text3, { color: "cyan", children: source }),
|
|
99
|
+
/* @__PURE__ */ jsx4(Box4, { flexGrow: 1 }),
|
|
100
|
+
/* @__PURE__ */ jsx4(Text3, { dimColor: true, children: "[q] Quit" })
|
|
101
|
+
] });
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// src/ui/kanban.tsx
|
|
105
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
106
|
+
function KanbanApp({ config }) {
|
|
107
|
+
const { exit } = useApp();
|
|
108
|
+
const { cards } = useKanbanState();
|
|
109
|
+
useInput((input) => {
|
|
110
|
+
if (input === "q") {
|
|
111
|
+
process.emit("SIGINT");
|
|
112
|
+
exit();
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
const labels = {
|
|
116
|
+
backlog: config.source_config.pick_from,
|
|
117
|
+
inProgress: config.source_config.in_progress,
|
|
118
|
+
done: config.source_config.done
|
|
119
|
+
};
|
|
120
|
+
return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "row", height: process.stdout.rows, children: [
|
|
121
|
+
/* @__PURE__ */ jsx5(Sidebar, { provider: config.provider, source: config.source }),
|
|
122
|
+
/* @__PURE__ */ jsx5(Board, { cards, labels })
|
|
123
|
+
] });
|
|
124
|
+
}
|
|
125
|
+
export {
|
|
126
|
+
KanbanApp
|
|
127
|
+
};
|
package/package.json
CHANGED
|
@@ -1,58 +1,60 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
2
|
+
"name": "@tarcisiopgs/lisa",
|
|
3
|
+
"version": "1.6.0",
|
|
4
|
+
"description": "Deterministic autonomous issue resolver — structured AI agent loop for Linear/Trello",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"lisa": "dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@clack/prompts": "^1.0.1",
|
|
12
|
+
"citty": "^0.2.1",
|
|
13
|
+
"execa": "^9.6.1",
|
|
14
|
+
"ink": "^6.8.0",
|
|
15
|
+
"ink-spinner": "^5.0.0",
|
|
16
|
+
"picocolors": "^1.1.1",
|
|
17
|
+
"react": "^19.2.4",
|
|
18
|
+
"yaml": "^2.8.2"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@biomejs/biome": "^2.4.3",
|
|
22
|
+
"@types/node": "^22.13.4",
|
|
23
|
+
"@types/react": "^19.2.14",
|
|
24
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
25
|
+
"concurrently": "^9.2.1",
|
|
26
|
+
"husky": "^9.1.7",
|
|
27
|
+
"lint-staged": "^16.2.7",
|
|
28
|
+
"tsup": "^8.4.0",
|
|
29
|
+
"tsx": "^4.19.3",
|
|
30
|
+
"typescript": "^5.9.3",
|
|
31
|
+
"vitest": "^4.0.18"
|
|
32
|
+
},
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
},
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "https://github.com/tarcisiopgs/lisa.git"
|
|
39
|
+
},
|
|
40
|
+
"files": [
|
|
41
|
+
"dist"
|
|
42
|
+
],
|
|
43
|
+
"lint-staged": {
|
|
44
|
+
"*.{ts,tsx}": [
|
|
45
|
+
"biome check --write"
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"build": "tsup",
|
|
50
|
+
"dev": "tsx src/index.ts",
|
|
51
|
+
"check": "biome check src/",
|
|
52
|
+
"format": "biome format --write src/",
|
|
53
|
+
"lint": "biome lint src/",
|
|
54
|
+
"typecheck": "tsc --noEmit",
|
|
55
|
+
"test": "vitest run",
|
|
56
|
+
"test:watch": "vitest",
|
|
57
|
+
"test:coverage": "vitest run --coverage",
|
|
58
|
+
"ci": "concurrently -n lint,typecheck,test \"pnpm lint\" \"pnpm typecheck\" \"pnpm test\""
|
|
59
|
+
}
|
|
60
|
+
}
|