openpaean 0.3.0 → 0.4.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 +8 -0
- package/dist/commands/agent.d.ts.map +1 -1
- package/dist/commands/agent.js +25 -0
- package/dist/commands/agent.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp/client.d.ts +34 -1
- package/dist/mcp/client.d.ts.map +1 -1
- package/dist/mcp/client.js +59 -11
- package/dist/mcp/client.js.map +1 -1
- package/dist/mcp/system.d.ts +41 -0
- package/dist/mcp/system.d.ts.map +1 -0
- package/dist/mcp/system.js +740 -0
- package/dist/mcp/system.js.map +1 -0
- package/dist/mcp/tools.d.ts +73 -1
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +175 -2
- package/dist/mcp/tools.js.map +1 -1
- package/dist/ui/terminal/TerminalApp.d.ts +17 -16
- package/dist/ui/terminal/TerminalApp.d.ts.map +1 -1
- package/dist/ui/terminal/TerminalApp.js +156 -130
- package/dist/ui/terminal/TerminalApp.js.map +1 -1
- package/dist/ui/theme/branding.d.ts +19 -0
- package/dist/ui/theme/branding.d.ts.map +1 -0
- package/dist/ui/theme/branding.js +42 -0
- package/dist/ui/theme/branding.js.map +1 -0
- package/dist/ui/theme/index.d.ts +37 -152
- package/dist/ui/theme/index.d.ts.map +1 -1
- package/dist/ui/theme/index.js +50 -233
- package/dist/ui/theme/index.js.map +1 -1
- package/package.json +5 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/theme/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/theme/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM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
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
brightWhite: '\x1b[97m',
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* Semantic color definitions
|
|
40
|
-
*/
|
|
41
|
-
export const COLORS = {
|
|
42
|
-
// Status colors with semantic meaning
|
|
43
|
-
success: {
|
|
44
|
-
code: ANSI.brightGreen,
|
|
45
|
-
symbol: '✓',
|
|
46
|
-
},
|
|
47
|
-
error: {
|
|
48
|
-
code: ANSI.brightRed,
|
|
49
|
-
symbol: '✗',
|
|
50
|
-
},
|
|
51
|
-
warning: {
|
|
52
|
-
code: ANSI.brightYellow,
|
|
53
|
-
symbol: '⚠',
|
|
54
|
-
},
|
|
55
|
-
info: {
|
|
56
|
-
code: ANSI.brightCyan,
|
|
57
|
-
symbol: 'ℹ',
|
|
58
|
-
},
|
|
59
|
-
// Brand colors
|
|
60
|
-
primary: {
|
|
61
|
-
code: ANSI.brightMagenta, // AI brand color
|
|
62
|
-
symbol: '◆',
|
|
63
|
-
},
|
|
64
|
-
secondary: {
|
|
65
|
-
code: ANSI.brightBlue, // Accent color
|
|
66
|
-
symbol: '◇',
|
|
67
|
-
},
|
|
68
|
-
// Text colors
|
|
69
|
-
text: {
|
|
70
|
-
code: ANSI.white,
|
|
71
|
-
},
|
|
72
|
-
textDim: {
|
|
73
|
-
code: ANSI.brightBlack,
|
|
74
|
-
},
|
|
75
|
-
// Special indicators
|
|
76
|
-
mcp: {
|
|
77
|
-
code: ANSI.brightMagenta,
|
|
78
|
-
symbol: '🔗',
|
|
79
|
-
},
|
|
80
|
-
tool: {
|
|
81
|
-
code: ANSI.brightYellow,
|
|
82
|
-
symbol: '⚙',
|
|
83
|
-
},
|
|
84
|
-
thinking: {
|
|
85
|
-
code: ANSI.brightCyan,
|
|
86
|
-
symbol: '⋯',
|
|
87
|
-
},
|
|
88
|
-
};
|
|
89
|
-
/**
|
|
90
|
-
* Color utility functions
|
|
91
|
-
*/
|
|
92
|
-
/**
|
|
93
|
-
* Apply a color code to text (only if colors are supported)
|
|
94
|
-
*/
|
|
95
|
-
export function colorize(text, colorCode) {
|
|
96
|
-
if (!supportsColor()) {
|
|
97
|
-
return text;
|
|
98
|
-
}
|
|
99
|
-
return `${colorCode}${text}${ANSI.reset}`;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Apply bold style
|
|
103
|
-
*/
|
|
104
|
-
export function bold(text) {
|
|
105
|
-
if (!supportsColor()) {
|
|
106
|
-
return text;
|
|
107
|
-
}
|
|
108
|
-
return `${ANSI.bold}${text}${ANSI.reset}`;
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Apply dim style
|
|
112
|
-
*/
|
|
113
|
-
export function dim(text) {
|
|
114
|
-
if (!supportsColor()) {
|
|
115
|
-
return text;
|
|
116
|
-
}
|
|
117
|
-
return `${ANSI.dim}${text}${ANSI.reset}`;
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Semantic color functions
|
|
121
|
-
*/
|
|
122
|
-
/**
|
|
123
|
-
* Style text as success
|
|
124
|
-
*/
|
|
125
|
-
export function success(text) {
|
|
126
|
-
return colorize(text, COLORS.success.code);
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Style text as error
|
|
130
|
-
*/
|
|
131
|
-
export function error(text) {
|
|
132
|
-
return colorize(text, COLORS.error.code);
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* Style text as warning
|
|
136
|
-
*/
|
|
137
|
-
export function warning(text) {
|
|
138
|
-
return colorize(text, COLORS.warning.code);
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* Style text as info
|
|
142
|
-
*/
|
|
143
|
-
export function info(text) {
|
|
144
|
-
return colorize(text, COLORS.info.code);
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* Style text as primary (brand)
|
|
148
|
-
*/
|
|
149
|
-
export function primary(text) {
|
|
150
|
-
return colorize(text, COLORS.primary.code);
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Style text as secondary (accent)
|
|
154
|
-
*/
|
|
155
|
-
export function secondary(text) {
|
|
156
|
-
return colorize(text, COLORS.secondary.code);
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Style text as dim
|
|
160
|
-
*/
|
|
161
|
-
export function muted(text) {
|
|
162
|
-
return dim(text);
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Get success symbol (with or without color)
|
|
166
|
-
*/
|
|
167
|
-
export function successSymbol() {
|
|
168
|
-
return colorize(COLORS.success.symbol, COLORS.success.code);
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* Get error symbol (with or without color)
|
|
172
|
-
*/
|
|
173
|
-
export function errorSymbol() {
|
|
174
|
-
return colorize(COLORS.error.symbol, COLORS.error.code);
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* Get warning symbol (with or without color)
|
|
178
|
-
*/
|
|
179
|
-
export function warningSymbol() {
|
|
180
|
-
return colorize(COLORS.warning.symbol, COLORS.warning.code);
|
|
181
|
-
}
|
|
182
|
-
/**
|
|
183
|
-
* Get info symbol (with or without color)
|
|
184
|
-
*/
|
|
185
|
-
export function infoSymbol() {
|
|
186
|
-
return colorize(COLORS.info.symbol, COLORS.info.code);
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* Get MCP tool symbol
|
|
190
|
-
*/
|
|
191
|
-
export function mcpSymbol() {
|
|
192
|
-
return colorize(COLORS.mcp.symbol, COLORS.mcp.code);
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* Get tool symbol
|
|
196
|
-
*/
|
|
197
|
-
export function toolSymbol() {
|
|
198
|
-
return colorize(COLORS.tool.symbol, COLORS.tool.code);
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* Get thinking symbol
|
|
202
|
-
*/
|
|
203
|
-
export function thinkingSymbol() {
|
|
204
|
-
return colorize(COLORS.thinking.symbol, COLORS.thinking.code);
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* Create a styled message with dual encoding (color + symbol)
|
|
208
|
-
*/
|
|
209
|
-
export function styledMessage(type, message) {
|
|
210
|
-
const color = COLORS[type];
|
|
211
|
-
return colorize(`${color.symbol} ${message}`, color.code);
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* Export theme as object for convenience
|
|
215
|
-
*/
|
|
216
|
-
export const theme = {
|
|
217
|
-
colorize,
|
|
218
|
-
bold,
|
|
219
|
-
dim,
|
|
220
|
-
success,
|
|
221
|
-
error,
|
|
222
|
-
warning,
|
|
223
|
-
info,
|
|
224
|
-
primary,
|
|
225
|
-
secondary,
|
|
226
|
-
muted,
|
|
227
|
-
successSymbol,
|
|
228
|
-
errorSymbol,
|
|
229
|
-
warningSymbol,
|
|
230
|
-
infoSymbol,
|
|
231
|
-
mcpSymbol,
|
|
232
|
-
toolSymbol,
|
|
233
|
-
thinkingSymbol,
|
|
234
|
-
styledMessage,
|
|
2
|
+
* Theme configuration
|
|
3
|
+
* Centralized styling for the CLI
|
|
4
|
+
*/
|
|
5
|
+
import chalk from 'chalk';
|
|
6
|
+
import { BRAND_COLORS } from './branding.js';
|
|
7
|
+
// Re-export specific brand colors for usage
|
|
8
|
+
export const PAEAN_BLUE = BRAND_COLORS.primary;
|
|
9
|
+
// Styled functions using Chalk
|
|
10
|
+
export const primary = chalk.hex(BRAND_COLORS.primary);
|
|
11
|
+
export const primaryBold = chalk.hex(BRAND_COLORS.primary).bold;
|
|
12
|
+
export const secondary = chalk.hex(BRAND_COLORS.secondary);
|
|
13
|
+
export const success = chalk.hex(BRAND_COLORS.success);
|
|
14
|
+
export const warning = chalk.hex(BRAND_COLORS.warning);
|
|
15
|
+
export const error = chalk.hex(BRAND_COLORS.error);
|
|
16
|
+
export const dummy = chalk.gray; // Placeholder
|
|
17
|
+
export const muted = chalk.hex(BRAND_COLORS.muted);
|
|
18
|
+
export const dim = chalk.dim;
|
|
19
|
+
export const bold = chalk.bold;
|
|
20
|
+
export const italic = chalk.italic;
|
|
21
|
+
// Component styles
|
|
22
|
+
export const link = chalk.underline.hex(BRAND_COLORS.primaryLight);
|
|
23
|
+
export const code = chalk.bgHex('#1e1e1e').hex('#d4d4d4');
|
|
24
|
+
export const highlight = chalk.bgHex(BRAND_COLORS.primary).black;
|
|
25
|
+
// Status indicators
|
|
26
|
+
export const symbols = {
|
|
27
|
+
info: primary('ℹ'),
|
|
28
|
+
success: success('✔'),
|
|
29
|
+
warning: warning('⚠'),
|
|
30
|
+
error: error('✖'),
|
|
31
|
+
arrow: primary('➜'),
|
|
32
|
+
bullet: muted('•'),
|
|
33
|
+
pointer: primary('❯'),
|
|
34
|
+
checkboxOn: success('◉'),
|
|
35
|
+
checkboxOff: muted('○'),
|
|
235
36
|
};
|
|
37
|
+
// Application specific symbols
|
|
38
|
+
export const mcpSymbol = () => chalk.hex('#f59e0b')('⚡'); // Amber lightning for tools/MCP
|
|
39
|
+
export const toolSymbol = () => chalk.hex('#8b5cf6')('🔧'); // Violet wrench for tools
|
|
40
|
+
export const thinkingSymbol = () => primary('⧖'); // Thinking hourglass symbol
|
|
41
|
+
/**
|
|
42
|
+
* Format a styled message block
|
|
43
|
+
*/
|
|
44
|
+
export function styledMessage(type, text) {
|
|
45
|
+
const symbol = symbols[type];
|
|
46
|
+
return `${symbol} ${text}`;
|
|
47
|
+
}
|
|
48
|
+
// Export branding assets
|
|
49
|
+
export { getLogoAscii, getCompactLogo } from './branding.js';
|
|
50
|
+
export { BRAND_COLORS };
|
|
51
|
+
// Additional styles
|
|
52
|
+
export const info = chalk.hex(BRAND_COLORS.primaryLight);
|
|
236
53
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/theme/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/theme/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,4CAA4C;AAC5C,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC,OAAO,CAAC;AAE/C,+BAA+B;AAC/B,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;AACvD,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC;AAChE,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;AAC3D,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;AACvD,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;AACvD,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;AACnD,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,cAAc;AAC/C,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;AACnD,MAAM,CAAC,MAAM,GAAG,GAAG,KA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G,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,4BAA4B;AAE9E;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,IAA8C,EAAE,IAAY;IACtF,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,OAAO,GAAG,MAAM,IAAI,IAAI,EAAE,CAAC;AAC/B,CAAC;AAED,yBAAyB;AACzB,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,CAAC;AAExB,oBAAoB;AACpB,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openpaean",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Open source AI agent CLI with
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "Open source AI agent CLI with shell tools, custom MCP support, scrolling TUI and local MCP integration",
|
|
5
5
|
"author": "Paean AI <dev@paean.ai>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
@@ -72,10 +72,12 @@
|
|
|
72
72
|
"mcp",
|
|
73
73
|
"model-context-protocol",
|
|
74
74
|
"agent",
|
|
75
|
+
"shell",
|
|
76
|
+
"custom-mcp",
|
|
75
77
|
"fullscreen"
|
|
76
78
|
],
|
|
77
79
|
"homepage": "https://github.com/paean-ai/openpaean",
|
|
78
80
|
"bugs": {
|
|
79
81
|
"url": "https://github.com/paean-ai/openpaean/issues"
|
|
80
82
|
}
|
|
81
|
-
}
|
|
83
|
+
}
|