paean 0.1.0 → 0.1.1
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 +18 -16
- package/dist/utils/config.d.ts +2 -2
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +28 -28
- package/dist/utils/config.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
> Connect your local development environment with Paean AI cloud for intelligent task management and AI agent workflows.
|
|
4
4
|
|
|
5
5
|
**Paean CLI** is a dual-mode command-line tool that serves both as:
|
|
6
|
+
|
|
6
7
|
- A **human-friendly CLI** for developers to manage tasks and authenticate
|
|
7
8
|
- An **MCP (Model Context Protocol) server** for AI agent integration with Cursor, Claude Code, and other AI coding assistants
|
|
8
9
|
|
|
@@ -111,22 +112,22 @@ Add to your Claude Desktop config:
|
|
|
111
112
|
|
|
112
113
|
### Available MCP Resources
|
|
113
114
|
|
|
114
|
-
| Resource URI
|
|
115
|
-
|
|
116
|
-
| `paean://tasks/pending`
|
|
117
|
-
| `paean://tasks/completed` | Recently completed tasks
|
|
118
|
-
| `paean://tasks/all`
|
|
119
|
-
| `paean://context`
|
|
115
|
+
| Resource URI | Description |
|
|
116
|
+
| ------------------------- | ------------------------------------ |
|
|
117
|
+
| `paean://tasks/pending` | Current pending tasks |
|
|
118
|
+
| `paean://tasks/completed` | Recently completed tasks |
|
|
119
|
+
| `paean://tasks/all` | All tasks with full details |
|
|
120
|
+
| `paean://context` | Full project context |
|
|
120
121
|
| `paean://pending-changes` | AI-suggested changes awaiting review |
|
|
121
122
|
|
|
122
123
|
### Available MCP Tools
|
|
123
124
|
|
|
124
|
-
| Tool
|
|
125
|
-
|
|
126
|
-
| `paean_complete_task` | Mark a task as completed
|
|
127
|
-
| `paean_create_task`
|
|
128
|
-
| `paean_update_task`
|
|
129
|
-
| `paean_list_tasks`
|
|
125
|
+
| Tool | Description |
|
|
126
|
+
| --------------------- | ----------------------------- |
|
|
127
|
+
| `paean_complete_task` | Mark a task as completed |
|
|
128
|
+
| `paean_create_task` | Create a new task |
|
|
129
|
+
| `paean_update_task` | Update task status/priority |
|
|
130
|
+
| `paean_list_tasks` | List tasks with filters |
|
|
130
131
|
| `paean_accept_change` | Accept an AI-suggested change |
|
|
131
132
|
| `paean_reject_change` | Reject an AI-suggested change |
|
|
132
133
|
|
|
@@ -210,13 +211,14 @@ Configuration is stored in `~/.paean/config.json`:
|
|
|
210
211
|
"token": "your-jwt-token",
|
|
211
212
|
"email": "user@example.com",
|
|
212
213
|
"apiUrl": "https://api.paean.ai",
|
|
213
|
-
"webUrl": "https://
|
|
214
|
+
"webUrl": "https://app.paean.ai",
|
|
214
215
|
"defaultPriority": "medium",
|
|
215
216
|
"outputFormat": "table"
|
|
216
217
|
}
|
|
217
218
|
```
|
|
218
219
|
|
|
219
220
|
View config path:
|
|
221
|
+
|
|
220
222
|
```bash
|
|
221
223
|
paean --config
|
|
222
224
|
```
|
|
@@ -232,17 +234,17 @@ import {
|
|
|
232
234
|
getTodoList,
|
|
233
235
|
completeTodoItem,
|
|
234
236
|
startMcpServer,
|
|
235
|
-
} from
|
|
237
|
+
} from "paean";
|
|
236
238
|
|
|
237
239
|
// Authenticate
|
|
238
240
|
const result = await browserLogin();
|
|
239
241
|
if (result.success) {
|
|
240
242
|
// Get tasks
|
|
241
|
-
const tasks = await getTodoList({ status:
|
|
243
|
+
const tasks = await getTodoList({ status: "pending" });
|
|
242
244
|
console.log(tasks.data.items);
|
|
243
245
|
|
|
244
246
|
// Complete a task
|
|
245
|
-
await completeTodoItem(
|
|
247
|
+
await completeTodoItem("task-id", "Completed the feature");
|
|
246
248
|
}
|
|
247
249
|
```
|
|
248
250
|
|
package/dist/utils/config.d.ts
CHANGED
|
@@ -10,8 +10,8 @@ export interface PaeanConfig {
|
|
|
10
10
|
expiresAt?: string;
|
|
11
11
|
apiUrl?: string;
|
|
12
12
|
webUrl?: string;
|
|
13
|
-
defaultPriority?:
|
|
14
|
-
outputFormat?:
|
|
13
|
+
defaultPriority?: "high" | "medium" | "low";
|
|
14
|
+
outputFormat?: "table" | "json" | "minimal";
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* Get the full configuration
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,MAAM,WAAW,WAAW;IAE1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,eAAe,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;IAC5C,YAAY,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;CAC7C;AA2BD;;GAEG;AACH,wBAAgB,SAAS,IAAI,WAAW,CAEvC;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,MAAM,WAAW,WAAW;IAE1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,eAAe,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;IAC5C,YAAY,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;CAC7C;AA2BD;;GAEG;AACH,wBAAgB,SAAS,IAAI,WAAW,CAEvC;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,WAAW,EACxD,GAAG,EAAE,CAAC,GACL,WAAW,CAAC,CAAC,CAAC,CAEhB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,WAAW,EACxD,GAAG,EAAE,CAAC,EACN,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,GACpB,IAAI,CAEN;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,IAAI,CAM5D;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAiBzC;AAED;;GAEG;AACH,wBAAgB,QAAQ,IAAI,MAAM,GAAG,SAAS,CAE7C;AAED;;GAEG;AACH,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED;;GAEG;AACH,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,IAAI,CAOP;AAED;;GAEG;AACH,wBAAgB,SAAS,IAAI,IAAI,CAMhC;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAElC"}
|
package/dist/utils/config.js
CHANGED
|
@@ -2,30 +2,30 @@
|
|
|
2
2
|
* Configuration management for Paean CLI
|
|
3
3
|
* Stores authentication tokens and user preferences in ~/.paean/config.json
|
|
4
4
|
*/
|
|
5
|
-
import Conf from
|
|
6
|
-
import { homedir } from
|
|
7
|
-
import { join } from
|
|
5
|
+
import Conf from "conf";
|
|
6
|
+
import { homedir } from "os";
|
|
7
|
+
import { join } from "path";
|
|
8
8
|
const CONFIG_DEFAULTS = {
|
|
9
|
-
apiUrl:
|
|
10
|
-
webUrl:
|
|
11
|
-
defaultPriority:
|
|
12
|
-
outputFormat:
|
|
9
|
+
apiUrl: "https://api.paean.ai",
|
|
10
|
+
webUrl: "https://app.paean.ai",
|
|
11
|
+
defaultPriority: "medium",
|
|
12
|
+
outputFormat: "table",
|
|
13
13
|
};
|
|
14
14
|
// Store config in ~/.paean directory
|
|
15
15
|
const config = new Conf({
|
|
16
|
-
projectName:
|
|
17
|
-
cwd: join(homedir(),
|
|
16
|
+
projectName: "paean",
|
|
17
|
+
cwd: join(homedir(), ".paean"),
|
|
18
18
|
defaults: CONFIG_DEFAULTS,
|
|
19
19
|
schema: {
|
|
20
|
-
token: { type:
|
|
21
|
-
refreshToken: { type:
|
|
22
|
-
userId: { type:
|
|
23
|
-
email: { type:
|
|
24
|
-
expiresAt: { type:
|
|
25
|
-
apiUrl: { type:
|
|
26
|
-
webUrl: { type:
|
|
27
|
-
defaultPriority: { type:
|
|
28
|
-
outputFormat: { type:
|
|
20
|
+
token: { type: "string" },
|
|
21
|
+
refreshToken: { type: "string" },
|
|
22
|
+
userId: { type: "number" },
|
|
23
|
+
email: { type: "string" },
|
|
24
|
+
expiresAt: { type: "string" },
|
|
25
|
+
apiUrl: { type: "string" },
|
|
26
|
+
webUrl: { type: "string" },
|
|
27
|
+
defaultPriority: { type: "string", enum: ["high", "medium", "low"] },
|
|
28
|
+
outputFormat: { type: "string", enum: ["table", "json", "minimal"] },
|
|
29
29
|
},
|
|
30
30
|
});
|
|
31
31
|
/**
|
|
@@ -60,8 +60,8 @@ export function setConfig(values) {
|
|
|
60
60
|
* Check if user is authenticated
|
|
61
61
|
*/
|
|
62
62
|
export function isAuthenticated() {
|
|
63
|
-
const token = config.get(
|
|
64
|
-
const expiresAt = config.get(
|
|
63
|
+
const token = config.get("token");
|
|
64
|
+
const expiresAt = config.get("expiresAt");
|
|
65
65
|
if (!token)
|
|
66
66
|
return false;
|
|
67
67
|
// Check if token is expired (with 5 minute buffer)
|
|
@@ -79,19 +79,19 @@ export function isAuthenticated() {
|
|
|
79
79
|
* Get the authentication token
|
|
80
80
|
*/
|
|
81
81
|
export function getToken() {
|
|
82
|
-
return config.get(
|
|
82
|
+
return config.get("token");
|
|
83
83
|
}
|
|
84
84
|
/**
|
|
85
85
|
* Get the API URL
|
|
86
86
|
*/
|
|
87
87
|
export function getApiUrl() {
|
|
88
|
-
return config.get(
|
|
88
|
+
return config.get("apiUrl") || CONFIG_DEFAULTS.apiUrl;
|
|
89
89
|
}
|
|
90
90
|
/**
|
|
91
91
|
* Get the Web URL
|
|
92
92
|
*/
|
|
93
93
|
export function getWebUrl() {
|
|
94
|
-
return config.get(
|
|
94
|
+
return config.get("webUrl") || CONFIG_DEFAULTS.webUrl;
|
|
95
95
|
}
|
|
96
96
|
/**
|
|
97
97
|
* Store authentication data
|
|
@@ -108,11 +108,11 @@ export function storeAuth(data) {
|
|
|
108
108
|
* Clear authentication data (logout)
|
|
109
109
|
*/
|
|
110
110
|
export function clearAuth() {
|
|
111
|
-
config.delete(
|
|
112
|
-
config.delete(
|
|
113
|
-
config.delete(
|
|
114
|
-
config.delete(
|
|
115
|
-
config.delete(
|
|
111
|
+
config.delete("token");
|
|
112
|
+
config.delete("refreshToken");
|
|
113
|
+
config.delete("userId");
|
|
114
|
+
config.delete("email");
|
|
115
|
+
config.delete("expiresAt");
|
|
116
116
|
}
|
|
117
117
|
/**
|
|
118
118
|
* Get the config file path
|
package/dist/utils/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,IAA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