@nogataka/smart-edit 0.0.15 → 0.1.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 CHANGED
@@ -1,6 +1,6 @@
1
- # smart-edit
1
+ # Smart Edit
2
2
 
3
- smart-edit は、Python 製のエージェント基盤「Serena」(<https://github.com/oraios/serena>) を TypeScript / Node.js 上で動作するよう全面移植したプロジェクトです。MCP (Model Context Protocol) サーバーとして動作し、SolidLSP ベースの言語サーバー管理や Serena 固有のツール群を TypeScript で再構築しています。移植に際しては Python 版と同じディレクトリ構成・ファイル名(拡張子のみ `.ts` / `.tsx`)を維持しつつ、`@modelcontextprotocol/sdk`、`zod` など Node エコシステムに合わせた依存関係やエラーハンドリングを採用しています。
3
+ Smart Edit は、Python 製のエージェント基盤「Serena」(<https://github.com/oraios/serena>) を TypeScript / Node.js 上で動作するよう全面移植したプロジェクトです。MCP (Model Context Protocol) サーバーとして動作し、SolidLSP ベースの言語サーバー管理や Serena 固有のツール群を TypeScript で再構築しています。移植に際しては Python 版と同じディレクトリ構成・ファイル名(拡張子のみ `.ts` / `.tsx`)を維持しつつ、`@modelcontextprotocol/sdk`、`zod` など Node エコシステムに合わせた依存関係やエラーハンドリングを採用しています。
4
4
 
5
5
  ## 主な構成
6
6
 
@@ -252,7 +252,7 @@ class Dashboard {
252
252
  }
253
253
 
254
254
  updateTitle(activeProject) {
255
- document.title = activeProject ? `${activeProject} – Serena Dashboard` : 'Serena Dashboard';
255
+ document.title = activeProject ? `${activeProject} – Smart Edit Dashboard` : 'Smart Edit Dashboard';
256
256
  }
257
257
 
258
258
  loadLogs() {
@@ -641,11 +641,12 @@ class Dashboard {
641
641
  }
642
642
 
643
643
  generateColors(count) {
644
- const colors = [
645
- '#FF6384', '#36A2EB', '#FFCE56', '#4BC0C0', '#9966FF',
646
- '#FF9F40', '#FF6384', '#C9CBCF', '#4BC0C0', '#FF6384'
644
+ const palette = [
645
+ '#101010', '#1f1f1f', '#2e2e2e', '#3d3d3d', '#4c4c4c',
646
+ '#5b5b5b', '#6a6a6a', '#797979', '#888888', '#979797',
647
+ '#a6a6a6', '#b5b5b5', '#c4c4c4', '#d3d3d3', '#e2e2e2'
647
648
  ];
648
- return Array.from({length: count}, (_, i) => colors[i % colors.length]);
649
+ return Array.from({ length: count }, (_, i) => palette[i % palette.length]);
649
650
  }
650
651
 
651
652
  updateSummaryTable(totalCalls, totalInputTokens, totalOutputTokens) {
@@ -806,7 +807,7 @@ class Dashboard {
806
807
  }
807
808
 
808
809
  // ask for confirmation using a dialog
809
- if (confirm("This will fully terminate the Serena server.")) {
810
+ if (confirm("This will fully terminate the Smart Edit server.")) {
810
811
  _shutdown();
811
812
  } else {
812
813
  console.log("Shutdown cancelled");
@@ -4,10 +4,7 @@
4
4
  <head>
5
5
  <meta charset="UTF-8">
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <title>Serena Dashboard</title>
8
- <link rel="icon" type="image/png" sizes="16x16" href="serena-icon-16.png">
9
- <link rel="icon" type="image/png" sizes="32x32" href="serena-icon-32.png">
10
- <link rel="icon" type="image/png" sizes="48x48" href="serena-icon-48.png">
7
+ <title>Smart Edit Dashboard</title>
11
8
  <script src="jquery.min.js"></script>
12
9
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
13
10
  <script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-datalabels@2"></script>
@@ -15,48 +12,50 @@
15
12
  <style>
16
13
  :root {
17
14
  /* Light theme variables */
18
- --bg-primary: #f5f5f5;
15
+ --bg-primary: #f2f2f2;
19
16
  --bg-secondary: #ffffff;
20
- --text-primary: #000000;
21
- --text-secondary: #333333;
22
- --text-muted: #666666;
23
- --border-color: #ddd;
24
- --btn-primary: #eaa45d;
25
- --btn-hover: #dca662;
26
- --btn-disabled: #6c757d;
27
- --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
28
- --tool-highlight: #ffff00;
29
- --tool-highlight-text: #000000;
30
- --log-debug: #808080;
31
- --log-info: #000000;
32
- --log-warning: #FF8C00;
33
- --log-error: #FF0000;
34
- --stats-header: #f8f9fa;
17
+ --text-primary: #1a1a1a;
18
+ --text-secondary: #3d3d3d;
19
+ --text-muted: #777;
20
+ --border-color: #cfcfcf;
21
+ --btn-primary: #2b2b2b;
22
+ --btn-hover: #1e1e1e;
23
+ --btn-disabled: #9c9c9c;
24
+ --btn-text: #f5f5f5;
25
+ --shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
26
+ --tool-highlight: #e5e5e5;
27
+ --tool-highlight-text: #1a1a1a;
28
+ --log-debug: #888;
29
+ --log-info: #1a1a1a;
30
+ --log-warning: #454545;
31
+ --log-error: #111111;
32
+ --stats-header: #ebebeb;
35
33
  }
36
34
 
37
35
  [data-theme="dark"] {
38
36
  /* Dark theme variables */
39
- --bg-primary: #1a1a1a;
40
- --bg-secondary: #2d2d2d;
41
- --text-primary: #ffffff;
42
- --text-secondary: #e0e0e0;
43
- --text-muted: #b0b0b0;
44
- --border-color: #444;
45
- --btn-primary: #eaa45d;
46
- --btn-hover: #dca662;
47
- --btn-disabled: #6c757d;
48
- --shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
49
- --tool-highlight: #ffd700;
50
- --tool-highlight-text: #000000;
51
- --log-debug: #808080;
52
- --log-info: #ffffff;
53
- --log-warning: #FF8C00;
54
- --log-error: #FF0000;
55
- --stats-header: #3a3a3a;
37
+ --bg-primary: #121212;
38
+ --bg-secondary: #1e1e1e;
39
+ --text-primary: #f1f1f1;
40
+ --text-secondary: #d0d0d0;
41
+ --text-muted: #9a9a9a;
42
+ --border-color: #2c2c2c;
43
+ --btn-primary: #ededed;
44
+ --btn-hover: #d6d6d6;
45
+ --btn-disabled: #4a4a4a;
46
+ --btn-text: #111111;
47
+ --shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
48
+ --tool-highlight: #2a2a2a;
49
+ --tool-highlight-text: #f1f1f1;
50
+ --log-debug: #a0a0a0;
51
+ --log-info: #f1f1f1;
52
+ --log-warning: #c7c7c7;
53
+ --log-error: #ffffff;
54
+ --stats-header: #262626;
56
55
  }
57
56
 
58
57
  body {
59
- font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
58
+ font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, 'Cantarell', 'Noto Sans', Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji';
60
59
  margin: 0;
61
60
  padding: 20px;
62
61
  background-color: var(--bg-primary);
@@ -101,7 +100,7 @@
101
100
 
102
101
  .btn {
103
102
  background-color: var(--btn-primary);
104
- color: white;
103
+ color: var(--btn-text);
105
104
  border: none;
106
105
  padding: 8px 16px;
107
106
  border-radius: 4px;
@@ -116,6 +115,7 @@
116
115
 
117
116
  .btn:disabled {
118
117
  background-color: var(--btn-disabled);
118
+ color: var(--text-muted);
119
119
  cursor: not-allowed;
120
120
  }
121
121
 
@@ -149,10 +149,12 @@
149
149
 
150
150
  .log-warning {
151
151
  color: var(--log-warning);
152
+ font-weight: 600;
152
153
  }
153
154
 
154
155
  .log-error {
155
156
  color: var(--log-error);
157
+ font-weight: 700;
156
158
  }
157
159
 
158
160
  .log-default {
@@ -255,17 +257,13 @@
255
257
 
256
258
  <body>
257
259
  <div class="header">
258
- <img id="serena-logo" src="serena-logs.png" alt="Serena" style="max-width: 400px; height: auto;">
260
+ Smart Edit Dashboard
259
261
  </div>
260
262
 
261
263
  <div class="controls">
262
264
  <button id="load-logs" class="btn">Reload Log</button>
263
265
  <button id="shutdown" class="btn">Shutdown Server</button>
264
266
  <button id="toggle-stats" class="btn">Show Stats</button>
265
- <div id="theme-toggle" class="theme-toggle" title="Toggle theme">
266
- <span class="icon" id="theme-icon">🌙</span>
267
- <span id="theme-text">Dark</span>
268
- </div>
269
267
  </div>
270
268
 
271
269
  <div id="error-container"></div>
@@ -311,4 +309,4 @@
311
309
  </script>
312
310
  </body>
313
311
 
314
- </html>
312
+ </html>
@@ -0,0 +1,25 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
3
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
+ <svg version="1.0" xmlns="http://www.w3.org/2000/svg"
5
+ width="32.000000pt" height="32.000000pt" viewBox="0 0 32.000000 32.000000"
6
+ preserveAspectRatio="xMidYMid meet">
7
+
8
+ <g transform="translate(0.000000,32.000000) scale(0.100000,-0.100000)"
9
+ fill="#000000" stroke="none">
10
+ <path d="M17 302 c-14 -15 -17 -41 -17 -144 0 -163 -5 -158 162 -158 163 0
11
+ 158 -5 158 162 0 163 5 158 -162 158 -108 0 -127 -2 -141 -18z m192 -23 c27
12
+ -26 27 -94 -1 -94 -9 0 -20 -4 -24 -8 -4 -4 -2 -7 5 -7 7 0 9 -4 6 -10 -11
13
+ -18 -58 -11 -82 12 -28 26 -30 75 -5 106 22 28 71 29 101 1z m-129 -153 c0
14
+ -18 -26 -39 -39 -31 -7 4 -6 12 2 25 14 23 37 27 37 6z m110 -2 c17 9 30 14
15
+ 29 9 -1 -4 1 -16 6 -26 11 -26 0 -32 -71 -33 -66 -2 -69 0 -58 43 6 22 7 22
16
+ 35 6 27 -16 31 -16 59 1z m87 -4 c8 -13 9 -21 2 -25 -13 -8 -39 13 -39 31 0
17
+ 21 23 17 37 -6z m-107 -100 c0 -3 -11 -5 -25 -5 -28 0 -30 7 -14 37 11 21 12
18
+ 21 25 -3 7 -13 13 -26 14 -29z m30 15 c0 -14 -4 -25 -10 -25 -5 0 -10 11 -10
19
+ 25 0 14 5 25 10 25 6 0 10 -11 10 -25z"/>
20
+ <path d="M100 220 c0 -18 7 -20 60 -20 53 0 60 2 60 20 0 18 -7 20 -60 20 -53
21
+ 0 -60 -2 -60 -20z m35 0 c3 -5 1 -10 -4 -10 -6 0 -11 5 -11 10 0 6 2 10 4 10
22
+ 3 0 8 -4 11 -10z m65 0 c0 -5 -5 -10 -11 -10 -5 0 -7 5 -4 10 3 6 8 10 11 10
23
+ 2 0 4 -4 4 -10z"/>
24
+ </g>
25
+ </svg>
@@ -0,0 +1,25 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
3
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
+ <svg version="1.0" xmlns="http://www.w3.org/2000/svg"
5
+ width="32.000000pt" height="32.000000pt" viewBox="0 0 32.000000 32.000000"
6
+ preserveAspectRatio="xMidYMid meet">
7
+
8
+ <g transform="translate(0.000000,32.000000) scale(0.100000,-0.100000)"
9
+ fill="#000000" stroke="none">
10
+ <path d="M17 302 c-14 -15 -17 -41 -17 -144 0 -163 -5 -158 162 -158 163 0
11
+ 158 -5 158 162 0 163 5 158 -162 158 -108 0 -127 -2 -141 -18z m192 -23 c27
12
+ -26 27 -94 -1 -94 -9 0 -20 -4 -24 -8 -4 -4 -2 -7 5 -7 7 0 9 -4 6 -10 -11
13
+ -18 -58 -11 -82 12 -28 26 -30 75 -5 106 22 28 71 29 101 1z m-129 -153 c0
14
+ -18 -26 -39 -39 -31 -7 4 -6 12 2 25 14 23 37 27 37 6z m110 -2 c17 9 30 14
15
+ 29 9 -1 -4 1 -16 6 -26 11 -26 0 -32 -71 -33 -66 -2 -69 0 -58 43 6 22 7 22
16
+ 35 6 27 -16 31 -16 59 1z m87 -4 c8 -13 9 -21 2 -25 -13 -8 -39 13 -39 31 0
17
+ 21 23 17 37 -6z m-107 -100 c0 -3 -11 -5 -25 -5 -28 0 -30 7 -14 37 11 21 12
18
+ 21 25 -3 7 -13 13 -26 14 -29z m30 15 c0 -14 -4 -25 -10 -25 -5 0 -10 11 -10
19
+ 25 0 14 5 25 10 25 6 0 10 -11 10 -25z"/>
20
+ <path d="M100 220 c0 -18 7 -20 60 -20 53 0 60 2 60 20 0 18 -7 20 -60 20 -53
21
+ 0 -60 -2 -60 -20z m35 0 c3 -5 1 -10 -4 -10 -6 0 -11 5 -11 10 0 6 2 10 4 10
22
+ 3 0 8 -4 11 -10z m65 0 c0 -5 -5 -10 -11 -10 -5 0 -7 5 -4 10 3 6 8 10 11 10
23
+ 2 0 4 -4 4 -10z"/>
24
+ </g>
25
+ </svg>
@@ -0,0 +1,25 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
3
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
+ <svg version="1.0" xmlns="http://www.w3.org/2000/svg"
5
+ width="32.000000pt" height="32.000000pt" viewBox="0 0 32.000000 32.000000"
6
+ preserveAspectRatio="xMidYMid meet">
7
+
8
+ <g transform="translate(0.000000,32.000000) scale(0.100000,-0.100000)"
9
+ fill="#000000" stroke="none">
10
+ <path d="M17 302 c-14 -15 -17 -41 -17 -144 0 -163 -5 -158 162 -158 163 0
11
+ 158 -5 158 162 0 163 5 158 -162 158 -108 0 -127 -2 -141 -18z m192 -23 c27
12
+ -26 27 -94 -1 -94 -9 0 -20 -4 -24 -8 -4 -4 -2 -7 5 -7 7 0 9 -4 6 -10 -11
13
+ -18 -58 -11 -82 12 -28 26 -30 75 -5 106 22 28 71 29 101 1z m-129 -153 c0
14
+ -18 -26 -39 -39 -31 -7 4 -6 12 2 25 14 23 37 27 37 6z m110 -2 c17 9 30 14
15
+ 29 9 -1 -4 1 -16 6 -26 11 -26 0 -32 -71 -33 -66 -2 -69 0 -58 43 6 22 7 22
16
+ 35 6 27 -16 31 -16 59 1z m87 -4 c8 -13 9 -21 2 -25 -13 -8 -39 13 -39 31 0
17
+ 21 23 17 37 -6z m-107 -100 c0 -3 -11 -5 -25 -5 -28 0 -30 7 -14 37 11 21 12
18
+ 21 25 -3 7 -13 13 -26 14 -29z m30 15 c0 -14 -4 -25 -10 -25 -5 0 -10 11 -10
19
+ 25 0 14 5 25 10 25 6 0 10 -11 10 -25z"/>
20
+ <path d="M100 220 c0 -18 7 -20 60 -20 53 0 60 2 60 20 0 18 -7 20 -60 20 -53
21
+ 0 -60 -2 -60 -20z m35 0 c3 -5 1 -10 -4 -10 -6 0 -11 5 -11 10 0 6 2 10 4 10
22
+ 3 0 8 -4 11 -10z m65 0 c0 -5 -5 -10 -11 -10 -5 0 -7 5 -4 10 3 6 8 10 11 10
23
+ 2 0 4 -4 4 -10z"/>
24
+ </g>
25
+ </svg>
@@ -0,0 +1,25 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
3
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
+ <svg version="1.0" xmlns="http://www.w3.org/2000/svg"
5
+ width="32.000000pt" height="32.000000pt" viewBox="0 0 32.000000 32.000000"
6
+ preserveAspectRatio="xMidYMid meet">
7
+
8
+ <g transform="translate(0.000000,32.000000) scale(0.100000,-0.100000)"
9
+ fill="#000000" stroke="none">
10
+ <path d="M17 302 c-14 -15 -17 -41 -17 -144 0 -163 -5 -158 162 -158 163 0
11
+ 158 -5 158 162 0 163 5 158 -162 158 -108 0 -127 -2 -141 -18z m192 -23 c27
12
+ -26 27 -94 -1 -94 -9 0 -20 -4 -24 -8 -4 -4 -2 -7 5 -7 7 0 9 -4 6 -10 -11
13
+ -18 -58 -11 -82 12 -28 26 -30 75 -5 106 22 28 71 29 101 1z m-129 -153 c0
14
+ -18 -26 -39 -39 -31 -7 4 -6 12 2 25 14 23 37 27 37 6z m110 -2 c17 9 30 14
15
+ 29 9 -1 -4 1 -16 6 -26 11 -26 0 -32 -71 -33 -66 -2 -69 0 -58 43 6 22 7 22
16
+ 35 6 27 -16 31 -16 59 1z m87 -4 c8 -13 9 -21 2 -25 -13 -8 -39 13 -39 31 0
17
+ 21 23 17 37 -6z m-107 -100 c0 -3 -11 -5 -25 -5 -28 0 -30 7 -14 37 11 21 12
18
+ 21 25 -3 7 -13 13 -26 14 -29z m30 15 c0 -14 -4 -25 -10 -25 -5 0 -10 11 -10
19
+ 25 0 14 5 25 10 25 6 0 10 -11 10 -25z"/>
20
+ <path d="M100 220 c0 -18 7 -20 60 -20 53 0 60 2 60 20 0 18 -7 20 -60 20 -53
21
+ 0 -60 -2 -60 -20z m35 0 c3 -5 1 -10 -4 -10 -6 0 -11 5 -11 10 0 6 2 10 4 10
22
+ 3 0 8 -4 11 -10z m65 0 c0 -5 -5 -10 -11 -10 -5 0 -7 5 -4 10 3 6 8 10 11 10
23
+ 2 0 4 -4 4 -10z"/>
24
+ </g>
25
+ </svg>
@@ -0,0 +1,25 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
3
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
+ <svg version="1.0" xmlns="http://www.w3.org/2000/svg"
5
+ width="32.000000pt" height="32.000000pt" viewBox="0 0 32.000000 32.000000"
6
+ preserveAspectRatio="xMidYMid meet">
7
+
8
+ <g transform="translate(0.000000,32.000000) scale(0.100000,-0.100000)"
9
+ fill="#000000" stroke="none">
10
+ <path d="M17 302 c-14 -15 -17 -41 -17 -144 0 -163 -5 -158 162 -158 163 0
11
+ 158 -5 158 162 0 163 5 158 -162 158 -108 0 -127 -2 -141 -18z m192 -23 c27
12
+ -26 27 -94 -1 -94 -9 0 -20 -4 -24 -8 -4 -4 -2 -7 5 -7 7 0 9 -4 6 -10 -11
13
+ -18 -58 -11 -82 12 -28 26 -30 75 -5 106 22 28 71 29 101 1z m-129 -153 c0
14
+ -18 -26 -39 -39 -31 -7 4 -6 12 2 25 14 23 37 27 37 6z m110 -2 c17 9 30 14
15
+ 29 9 -1 -4 1 -16 6 -26 11 -26 0 -32 -71 -33 -66 -2 -69 0 -58 43 6 22 7 22
16
+ 35 6 27 -16 31 -16 59 1z m87 -4 c8 -13 9 -21 2 -25 -13 -8 -39 13 -39 31 0
17
+ 21 23 17 37 -6z m-107 -100 c0 -3 -11 -5 -25 -5 -28 0 -30 7 -14 37 11 21 12
18
+ 21 25 -3 7 -13 13 -26 14 -29z m30 15 c0 -14 -4 -25 -10 -25 -5 0 -10 11 -10
19
+ 25 0 14 5 25 10 25 6 0 10 -11 10 -25z"/>
20
+ <path d="M100 220 c0 -18 7 -20 60 -20 53 0 60 2 60 20 0 18 -7 20 -60 20 -53
21
+ 0 -60 -2 -60 -20z m35 0 c3 -5 1 -10 -4 -10 -6 0 -11 5 -11 10 0 6 2 10 4 10
22
+ 3 0 8 -4 11 -10z m65 0 c0 -5 -5 -10 -11 -10 -5 0 -7 5 -4 10 3 6 8 10 11 10
23
+ 2 0 4 -4 4 -10z"/>
24
+ </g>
25
+ </svg>
@@ -67,11 +67,11 @@ function resolveInitialPrompt(projectConfig) {
67
67
  function resolveProjectYamlPath(project) {
68
68
  const camelCase = project.pathToProjectYml;
69
69
  if (typeof camelCase === 'function') {
70
- return camelCase();
70
+ return camelCase.call(project);
71
71
  }
72
72
  const snakeCase = project.path_to_project_yml;
73
73
  if (typeof snakeCase === 'function') {
74
- return snakeCase();
74
+ return snakeCase.call(project);
75
75
  }
76
76
  return undefined;
77
77
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nogataka/smart-edit",
3
- "version": "0.0.15",
4
- "description": "TypeScript版 Serena",
3
+ "version": "0.1.0",
4
+ "description": "Smart Edit is a tool for editing code with AI.",
5
5
  "private": false,
6
6
  "license": "MIT",
7
7
  "type": "module",