@codemieai/code 0.0.47 → 0.0.48

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.
@@ -5,5 +5,5 @@
5
5
  "name": "AI/Run CodeMie",
6
6
  "email": "support@codemieai.com"
7
7
  },
8
- "version": "1.0.13"
8
+ "version": "1.0.14"
9
9
  }
@@ -6,30 +6,24 @@ Work with your Microsoft 365 account from Claude Code — emails, calendar, Shar
6
6
 
7
7
  ## Quick Start
8
8
 
9
- ### 1. Install dependencies
9
+ ### 1. Log in (first time only)
10
10
 
11
11
  ```bash
12
- pip install msal requests
13
- ```
14
-
15
- ### 2. Log in (first time only)
16
-
17
- ```bash
18
- python .codemie/claude-plugin/skills/msgraph/msgraph.py login
12
+ node .codemie/claude-plugin/skills/msgraph/scripts/msgraph.js login
19
13
  ```
20
14
 
21
15
  You'll see a message like:
22
16
  ```
23
- ==============================
17
+ ============================================================
24
18
  To sign in, use a web browser to open the page https://microsoft.com/devicelogin
25
19
  and enter the code ABCD-1234 to authenticate.
26
- ==============================
20
+ ============================================================
27
21
  ```
28
22
 
29
23
  Open the URL in your browser, enter the code, and sign in with your Microsoft account.
30
24
  Your token is cached at `~/.ms_graph_token_cache.json` — you won't need to log in again until it expires (tokens refresh automatically).
31
25
 
32
- ### 3. Ask Claude anything
26
+ ### 2. Ask Claude anything
33
27
 
34
28
  After logging in, just ask Claude naturally:
35
29
 
@@ -43,10 +37,17 @@ Claude will use this skill automatically.
43
37
 
44
38
  ---
45
39
 
40
+ ## No dependencies required
41
+
42
+ The CLI uses **only built-in Node.js modules** — no `pip install`, no `npm install`.
43
+ Node.js >= 18 is the only requirement, which CodeMie already provides.
44
+
45
+ ---
46
+
46
47
  ## CLI Reference
47
48
 
48
49
  ```
49
- python .codemie/claude-plugin/skills/msgraph/msgraph.py <command> [options]
50
+ node .codemie/claude-plugin/skills/msgraph/scripts/msgraph.js <command> [options]
50
51
  ```
51
52
 
52
53
  ### Auth commands
@@ -78,54 +79,54 @@ Add `--json` to any command for machine-readable JSON output.
78
79
 
79
80
  ```bash
80
81
  # List 20 most recent emails
81
- python .codemie/claude-plugin/skills/msgraph/msgraph.py emails --limit 20
82
+ node .codemie/claude-plugin/skills/msgraph/scripts/msgraph.js emails --limit 20
82
83
 
83
84
  # Read a specific email (paste the ID from list output)
84
- python .codemie/claude-plugin/skills/msgraph/msgraph.py emails --read AAMkAGI2...
85
+ node .codemie/claude-plugin/skills/msgraph/scripts/msgraph.js emails --read AAMkAGI2...
85
86
 
86
87
  # Send an email
87
- python .codemie/claude-plugin/skills/msgraph/msgraph.py emails \
88
+ node .codemie/claude-plugin/skills/msgraph/scripts/msgraph.js emails \
88
89
  --send colleague@company.com \
89
90
  --subject "Quick question" \
90
91
  --body "Are you free tomorrow at 2pm?"
91
92
 
92
93
  # Upcoming calendar events
93
- python .codemie/claude-plugin/skills/msgraph/msgraph.py calendar --limit 5
94
+ node .codemie/claude-plugin/skills/msgraph/scripts/msgraph.js calendar --limit 5
94
95
 
95
96
  # Create a meeting
96
- python .codemie/claude-plugin/skills/msgraph/msgraph.py calendar \
97
+ node .codemie/claude-plugin/skills/msgraph/scripts/msgraph.js calendar \
97
98
  --create "Design Review" \
98
99
  --start "2024-03-20T14:00" \
99
100
  --end "2024-03-20T15:00" \
100
101
  --timezone "Europe/Berlin"
101
102
 
102
103
  # List SharePoint sites you follow
103
- python .codemie/claude-plugin/skills/msgraph/msgraph.py sharepoint --sites
104
+ node .codemie/claude-plugin/skills/msgraph/scripts/msgraph.js sharepoint --sites
104
105
 
105
106
  # Browse a site's documents
106
- python .codemie/claude-plugin/skills/msgraph/msgraph.py sharepoint \
107
+ node .codemie/claude-plugin/skills/msgraph/scripts/msgraph.js sharepoint \
107
108
  --site "contoso.sharepoint.com,abc123,def456" \
108
109
  --path "Documents/2024"
109
110
 
110
111
  # Download a OneDrive file
111
- python .codemie/claude-plugin/skills/msgraph/msgraph.py onedrive --download ITEM_ID --output report.xlsx
112
+ node .codemie/claude-plugin/skills/msgraph/scripts/msgraph.js onedrive --download ITEM_ID --output report.xlsx
112
113
 
113
114
  # Upload to OneDrive
114
- python .codemie/claude-plugin/skills/msgraph/msgraph.py onedrive \
115
+ node .codemie/claude-plugin/skills/msgraph/scripts/msgraph.js onedrive \
115
116
  --upload ./presentation.pptx \
116
117
  --dest "Documents/presentations/deck.pptx"
117
118
 
118
119
  # Recent Teams chats
119
- python .codemie/claude-plugin/skills/msgraph/msgraph.py teams --chats
120
+ node .codemie/claude-plugin/skills/msgraph/scripts/msgraph.js teams --chats
120
121
 
121
122
  # Read a chat conversation
122
- python .codemie/claude-plugin/skills/msgraph/msgraph.py teams --messages 19:abc123@thread.v2
123
+ node .codemie/claude-plugin/skills/msgraph/scripts/msgraph.js teams --messages 19:abc123@thread.v2
123
124
 
124
125
  # Search your contacts
125
- python .codemie/claude-plugin/skills/msgraph/msgraph.py people --search "John"
126
+ node .codemie/claude-plugin/skills/msgraph/scripts/msgraph.js people --search "John"
126
127
 
127
128
  # Your manager
128
- python .codemie/claude-plugin/skills/msgraph/msgraph.py org --manager
129
+ node .codemie/claude-plugin/skills/msgraph/scripts/msgraph.js org --manager
129
130
  ```
130
131
 
131
132
  ---
@@ -133,9 +134,9 @@ python .codemie/claude-plugin/skills/msgraph/msgraph.py org --manager
133
134
  ## Token Cache
134
135
 
135
136
  Credentials are stored in `~/.ms_graph_token_cache.json`.
136
- - Access tokens refresh automatically (they last ~1 hour, but MSAL handles renewal)
137
- - Refresh tokens last longer (~90 days by default in Azure)
138
- - Run `logout` to remove the cache: `python msgraph.py logout`
137
+ - Access tokens refresh automatically (they last ~1 hour, silently renewed via refresh token)
138
+ - Refresh tokens last ~90 days by default in Azure
139
+ - Run `logout` to remove the cache: `node msgraph.js logout`
139
140
 
140
141
  ---
141
142
 
@@ -154,6 +155,7 @@ The script requests these Microsoft Graph scopes on first login:
154
155
  | `Chat.Read` / `Chat.ReadWrite` | Teams chats |
155
156
  | `People.Read` | People rankings |
156
157
  | `Contacts.Read` | Outlook contacts |
158
+ | `offline_access` | Silent token refresh |
157
159
 
158
160
  If your organization restricts some permissions, certain commands may return `Permission denied`.
159
161
 
@@ -161,14 +163,14 @@ If your organization restricts some permissions, certain commands may return `Pe
161
163
 
162
164
  ## Troubleshooting
163
165
 
164
- **`ModuleNotFoundError: No module named 'msal'`**
166
+ **`NOT_LOGGED_IN`**
165
167
  ```bash
166
- pip install msal requests
168
+ node .codemie/claude-plugin/skills/msgraph/scripts/msgraph.js login
167
169
  ```
168
170
 
169
- **`NOT_LOGGED_IN`**
171
+ **`TOKEN_EXPIRED`**
170
172
  ```bash
171
- python .codemie/claude-plugin/skills/msgraph/msgraph.py login
173
+ node .codemie/claude-plugin/skills/msgraph/scripts/msgraph.js login
172
174
  ```
173
175
 
174
176
  **`Permission denied (403)`**
@@ -176,8 +178,5 @@ Your organization may have restricted that Graph API permission. Contact your IT
176
178
 
177
179
  **`Authentication expired (401)`**
178
180
  ```bash
179
- python .codemie/claude-plugin/skills/msgraph/msgraph.py login
181
+ node .codemie/claude-plugin/skills/msgraph/scripts/msgraph.js login
180
182
  ```
181
-
182
- **Token cache is at wrong path**
183
- Edit `CACHE_FILE` at the top of `msgraph.py` to change the location.
@@ -7,20 +7,21 @@ description: >
7
7
  SharePoint documents, OneDrive files, colleagues, manager, direct reports, or any personal/
8
8
  organizational Microsoft data. Invoke proactively any time the user mentions Outlook, Teams,
9
9
  SharePoint, OneDrive, or wants to interact with their Microsoft 365 account. The skill uses
10
- a local Python CLI (msgraph.py) that handles authentication, token caching, and all API calls.
10
+ a local Node.js CLI (msgraph.js) that handles authentication, token caching, and all API calls.
11
11
  ---
12
12
 
13
13
  # Microsoft Graph API Skill
14
14
 
15
15
  This skill lets you interact with Microsoft 365 services on behalf of the user using the
16
- Microsoft Graph API. The Python CLI at `scripts/msgraph.py` handles everything.
16
+ Microsoft Graph API. The Node.js CLI at `scripts/msgraph.js` handles everything — no Python
17
+ or extra packages needed, only the Node.js that CodeMie already requires.
17
18
 
18
19
  ## Setup & Authentication
19
20
 
20
21
  **Check login status first** — always run this before any other command:
21
22
 
22
23
  ```bash
23
- python scripts/msgraph.py status
24
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js status
24
25
  ```
25
26
 
26
27
  **Output interpretation:**
@@ -31,7 +32,7 @@ python scripts/msgraph.py status
31
32
  ### Login Flow (first time or after expiry)
32
33
 
33
34
  ```bash
34
- python scripts/msgraph.py login
35
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js login
35
36
  ```
36
37
 
37
38
  This starts the **Device Code Flow** — it will print a URL and a short code like:
@@ -49,7 +50,7 @@ If status returns `NOT_LOGGED_IN` or `TOKEN_EXPIRED`, tell the user:
49
50
 
50
51
  > "You need to log in to Microsoft first. Run this command in your terminal:
51
52
  > ```
52
- > python scripts/msgraph.py login
53
+ > node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js login
53
54
  > ```
54
55
  > A code and URL will appear — open the URL in your browser and enter the code."
55
56
 
@@ -61,59 +62,59 @@ If status returns `NOT_LOGGED_IN` or `TOKEN_EXPIRED`, tell the user:
61
62
 
62
63
  ```bash
63
64
  # Your profile
64
- python scripts/msgraph.py me
65
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js me
65
66
 
66
67
  # Your manager
67
- python scripts/msgraph.py org --manager
68
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js org --manager
68
69
 
69
70
  # Your direct reports
70
- python scripts/msgraph.py org --reports
71
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js org --reports
71
72
  ```
72
73
 
73
74
  ### Emails
74
75
 
75
76
  ```bash
76
77
  # List recent emails (default 10)
77
- python scripts/msgraph.py emails
78
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js emails
78
79
 
79
80
  # More emails
80
- python scripts/msgraph.py emails --limit 25
81
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js emails --limit 25
81
82
 
82
83
  # Unread only
83
- python scripts/msgraph.py emails --unread
84
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js emails --unread
84
85
 
85
86
  # Search emails
86
- python scripts/msgraph.py emails --search "invoice Q4"
87
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js emails --search "invoice Q4"
87
88
 
88
89
  # Read a specific email by ID (copy ID from list output)
89
- python scripts/msgraph.py emails --read MESSAGE_ID
90
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js emails --read MESSAGE_ID
90
91
 
91
92
  # Send an email
92
- python scripts/msgraph.py emails --send recipient@example.com --subject "Hello" --body "Message text"
93
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js emails --send recipient@example.com --subject "Hello" --body "Message text"
93
94
 
94
95
  # Browse specific folder (inbox, sentitems, drafts, deleteditems, junkemail)
95
- python scripts/msgraph.py emails --folder sentitems --limit 5
96
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js emails --folder sentitems --limit 5
96
97
 
97
98
  # Machine-readable JSON output
98
- python scripts/msgraph.py emails --json
99
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js emails --json
99
100
  ```
100
101
 
101
102
  ### Calendar
102
103
 
103
104
  ```bash
104
105
  # Upcoming events (default 10)
105
- python scripts/msgraph.py calendar
106
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js calendar
106
107
 
107
108
  # More events
108
- python scripts/msgraph.py calendar --limit 20
109
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js calendar --limit 20
109
110
 
110
111
  # Create an event
111
- python scripts/msgraph.py calendar --create "Team Standup" \
112
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js calendar --create "Team Standup" \
112
113
  --start "2024-03-20T09:00" --end "2024-03-20T09:30" \
113
114
  --location "Teams" --timezone "Europe/Berlin"
114
115
 
115
116
  # Check availability for a time window
116
- python scripts/msgraph.py calendar --availability \
117
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js calendar --availability \
117
118
  --start "2024-03-20T09:00:00" --end "2024-03-20T18:00:00"
118
119
  ```
119
120
 
@@ -121,64 +122,64 @@ python scripts/msgraph.py calendar --availability \
121
122
 
122
123
  ```bash
123
124
  # List followed/joined SharePoint sites
124
- python scripts/msgraph.py sharepoint --sites
125
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js sharepoint --sites
125
126
 
126
127
  # Browse files in a specific site (use ID from --sites output)
127
- python scripts/msgraph.py sharepoint --site SITE_ID
128
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js sharepoint --site SITE_ID
128
129
 
129
130
  # Browse a subfolder within a site
130
- python scripts/msgraph.py sharepoint --site SITE_ID --path "Documents/Reports"
131
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js sharepoint --site SITE_ID --path "Documents/Reports"
131
132
 
132
133
  # Download a file
133
- python scripts/msgraph.py sharepoint --download ITEM_ID --output report.xlsx
134
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js sharepoint --download ITEM_ID --output report.xlsx
134
135
  ```
135
136
 
136
137
  ### Teams
137
138
 
138
139
  ```bash
139
140
  # List all Teams chats
140
- python scripts/msgraph.py teams --chats
141
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js teams --chats
141
142
 
142
143
  # Read messages from a chat (use chat ID from --chats output)
143
- python scripts/msgraph.py teams --messages CHAT_ID
144
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js teams --messages CHAT_ID
144
145
 
145
146
  # Send a message to a chat
146
- python scripts/msgraph.py teams --send "Hello team!" --chat-id CHAT_ID
147
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js teams --send "Hello team!" --chat-id CHAT_ID
147
148
 
148
149
  # List teams you're a member of
149
- python scripts/msgraph.py teams --teams-list
150
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js teams --teams-list
150
151
  ```
151
152
 
152
153
  ### OneDrive
153
154
 
154
155
  ```bash
155
156
  # List root files
156
- python scripts/msgraph.py onedrive
157
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js onedrive
157
158
 
158
159
  # Browse a folder
159
- python scripts/msgraph.py onedrive --path "Documents"
160
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js onedrive --path "Documents"
160
161
 
161
162
  # Upload a file
162
- python scripts/msgraph.py onedrive --upload ./report.pdf --dest "Documents/report.pdf"
163
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js onedrive --upload ./report.pdf --dest "Documents/report.pdf"
163
164
 
164
165
  # Download a file by ID
165
- python scripts/msgraph.py onedrive --download ITEM_ID --output local_copy.pdf
166
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js onedrive --download ITEM_ID --output local_copy.pdf
166
167
 
167
168
  # File metadata
168
- python scripts/msgraph.py onedrive --info ITEM_ID
169
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js onedrive --info ITEM_ID
169
170
  ```
170
171
 
171
172
  ### People & Contacts
172
173
 
173
174
  ```bash
174
175
  # Frequent collaborators (AI-ranked by Microsoft)
175
- python scripts/msgraph.py people
176
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js people
176
177
 
177
178
  # Search people by name
178
- python scripts/msgraph.py people --search "Alice"
179
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js people --search "Alice"
179
180
 
180
181
  # Outlook address book contacts
181
- python scripts/msgraph.py people --contacts
182
+ node ${CLAUDE_PLUGIN_ROOT}/skills/msgraph/scripts/msgraph.js people --contacts
182
183
  ```
183
184
 
184
185
  ---
@@ -224,10 +225,6 @@ This can happen if the user's organization has restricted certain Graph API perm
224
225
 
225
226
  ## Dependencies
226
227
 
227
- The script requires Python 3.10+ and two packages:
228
- ```bash
229
- pip install msal requests
230
- ```
231
-
232
- If `msal` or `requests` are not installed, the script prints the install command and exits.
228
+ **None** — the script uses only built-in Node.js modules (`https`, `fs`, `path`, `os`).
229
+ Node.js >= 18 is required, which is already a CodeMie prerequisite.
233
230
  IMPORTANT: you must work with current date (get it from sh/bash)