feishu-user-plugin 1.3.5 → 1.3.7
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/.claude-plugin/plugin.json +2 -2
- package/CHANGELOG.md +22 -0
- package/README.md +66 -40
- package/package.json +10 -3
- package/scripts/check-tool-count.js +15 -0
- package/scripts/check-version.js +40 -0
- package/scripts/smoke.js +224 -0
- package/scripts/sync-claude-md.sh +12 -0
- package/scripts/sync-team-skills.sh +22 -0
- package/scripts/test-all-tools.js +158 -0
- package/skills/feishu-user-plugin/SKILL.md +5 -5
- package/skills/feishu-user-plugin/references/CLAUDE.md +152 -96
- package/skills/feishu-user-plugin/references/table.md +18 -9
- package/src/auth/credentials.js +350 -0
- package/src/cli.js +42 -13
- package/src/clients/official/base.js +424 -0
- package/src/clients/official/bitable.js +269 -0
- package/src/clients/official/calendar.js +176 -0
- package/src/clients/official/contacts.js +54 -0
- package/src/clients/official/docs.js +301 -0
- package/src/clients/official/drive.js +77 -0
- package/src/clients/official/groups.js +68 -0
- package/src/clients/official/im.js +414 -0
- package/src/clients/official/index.js +30 -0
- package/src/clients/official/okr.js +127 -0
- package/src/clients/official/tasks.js +142 -0
- package/src/clients/official/uploads.js +260 -0
- package/src/clients/official/wiki.js +207 -0
- package/src/{client.js → clients/user.js} +23 -17
- package/src/doc-blocks.js +20 -5
- package/src/index.js +4 -1744
- package/src/logger.js +20 -0
- package/src/oauth.js +8 -1
- package/src/official.js +5 -1734
- package/src/prompts/_registry.js +69 -0
- package/src/prompts/index.js +54 -0
- package/src/server.js +242 -0
- package/src/test-all.js +2 -2
- package/src/test-comprehensive.js +3 -3
- package/src/test-send.js +1 -1
- package/src/tools/_registry.js +30 -0
- package/src/tools/bitable.js +246 -0
- package/src/tools/calendar.js +207 -0
- package/src/tools/contacts.js +66 -0
- package/src/tools/diagnostics.js +172 -0
- package/src/tools/docs.js +158 -0
- package/src/tools/drive.js +111 -0
- package/src/tools/groups.js +81 -0
- package/src/tools/im-read.js +259 -0
- package/src/tools/messaging-bot.js +151 -0
- package/src/tools/messaging-user.js +292 -0
- package/src/tools/okr.js +159 -0
- package/src/tools/profile.js +43 -0
- package/src/tools/tasks.js +168 -0
- package/src/tools/uploads.js +63 -0
- package/src/tools/wiki.js +191 -0
package/src/logger.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Global stdout guard. MCP stdio uses stdout for JSON-RPC; ANY accidental write
|
|
2
|
+
// from this process or its dependencies corrupts the transport and disconnects
|
|
3
|
+
// the client. Defense-in-depth: redirect every console.log / console.info to
|
|
4
|
+
// stderr at module load. REQUIRE THIS BEFORE ANY OTHER MODULE so even early
|
|
5
|
+
// log calls during dependency init are captured.
|
|
6
|
+
console.log = (...args) => console.error(...args);
|
|
7
|
+
console.info = (...args) => console.error(...args);
|
|
8
|
+
|
|
9
|
+
// Stderr-only logger for the Lark SDK (the SDK's defaultLogger.error() writes
|
|
10
|
+
// to stdout via console.log, which would also corrupt MCP stdio). Shape and
|
|
11
|
+
// prefixes preserved verbatim from the original definition in src/official.js.
|
|
12
|
+
const stderrLogger = {
|
|
13
|
+
error: (...msg) => console.error('[lark-sdk][error]:', ...msg),
|
|
14
|
+
warn: (...msg) => console.error('[lark-sdk][warn]:', ...msg),
|
|
15
|
+
info: () => {},
|
|
16
|
+
debug: () => {},
|
|
17
|
+
trace: () => {},
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
module.exports = { stderrLogger };
|
package/src/oauth.js
CHANGED
|
@@ -28,7 +28,14 @@ const REDIRECT_URI = `http://127.0.0.1:${PORT}/callback`;
|
|
|
28
28
|
// calendar:* for list_calendars / list_calendar_events / get_calendar_event
|
|
29
29
|
// wiki:wiki write access for move_docs_to_wiki (attach docs/bitables to wiki)
|
|
30
30
|
// docs:document.media:(upload|download) for docx image read/write
|
|
31
|
-
|
|
31
|
+
// v1.3.6 additions:
|
|
32
|
+
// sheets:spreadsheet for sheet_image / sheet_file media uploads
|
|
33
|
+
// drive:file:upload narrower scope for drive/v1/files/upload_all (independent of drive:drive)
|
|
34
|
+
// v1.3.7 additions:
|
|
35
|
+
// calendar:calendar.event:write create/update/delete/respond calendar events
|
|
36
|
+
// task:task full Task v2 read+write
|
|
37
|
+
// okr:okr.content:write create/delete OKR progress records
|
|
38
|
+
const SCOPES = 'offline_access auth:user.id:read im:message im:message:readonly im:chat im:chat:readonly contact:user.base:readonly contact:user.id:readonly docx:document drive:drive drive:file:upload bitable:app wiki:wiki:readonly wiki:wiki okr:okr:readonly okr:okr.period:readonly okr:okr.content:readonly okr:okr.content:write calendar:calendar:readonly calendar:calendar.event:read calendar:calendar.event:write docs:document.media:download docs:document.media:upload sheets:spreadsheet task:task';
|
|
32
39
|
|
|
33
40
|
if (!APP_ID || !APP_SECRET) {
|
|
34
41
|
console.error('Missing LARK_APP_ID or LARK_APP_SECRET.');
|