dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
Read-only Microsoft 365 tools for DeepSeek Harness using Microsoft Graph v1.0
A read-only Microsoft 365 plugin for DeepSeek Harness. It uses the Microsoft Graph v1.0 REST API to let an agent inspect the signed-in user's profile, Outlook mail, calendar, OneDrive metadata, and Teams chat search results.
The plugin does not send mail, edit events, upload or download files, change Teams data, or call any Microsoft Graph mutation endpoint.
npm install @libai168/dsh-tool-microsoft-365
The package requires @deepseek-ai/cordis (^4.0.1) and @deepseek-ai/dsh-tools (^0.1.0-rc.6) as peer dependencies.
Provide a delegated Microsoft Graph OAuth access token through the host configuration. The token must be kept outside source control and is never returned by a tool.
- name: '@libai168/dsh-tool-microsoft-365'
config:
accessToken: 'replace-with-a-short-lived-delegated-graph-token'
# timeoutMs: 15000
See examples/cordis.yml. The client accepts only the production https://graph.microsoft.com/v1.0 endpoint. This prevents a Bearer token from being sent to an arbitrary configured host. OAuth acquisition and refresh belong in the host application.
Recommended delegated permissions are the smallest set needed by the tools you enable:
| Capability | Microsoft Graph delegated permission |
|---|---|
| ms_auth_test, ms_get_profile | User.Read |
| ms_search_messages | Mail.Read |
| ms_list_calendar_events, ms_list_calendar_view | Calendars.Read |
| ms_search_drive_items, ms_get_drive_item | Files.Read |
| ms_search_chat_messages | Chat.Read |
Microsoft Entra consent and Conditional Access policies can require administrator approval. A token with fewer permissions returns the Graph status and a sanitized error code.
| Tool | Description | Access |
|---|---|---|
| ms_auth_test | Verify the delegated token through /me and return safe profile fields | read |
| ms_get_profile | Read the signed-in user's allowlisted profile fields | read |
| ms_search_messages | Search Outlook messages through POST /search/query | read |
| ms_list_calendar_events | List default or selected calendar events | read |
| ms_list_calendar_view | List recurring event instances in an ISO 8601 time window | read |
| ms_search_drive_items | Search OneDrive files and folders | read |
| ms_get_drive_item | Read one OneDrive item's safe metadata | read |
| ms_search_chat_messages | Search Teams chat messages through POST /search/query | read |
Search requests use Microsoft Graph's read-only Search API with message or chatMessage entity types. Calendar and OneDrive collections use the Graph @odata.nextLink mechanism internally.
Each list tool returns a short, process-local nextCursor when Graph has another page. Pass that value back as cursor to the same tool. The cursor is random and contains no Graph URL or skip token; it expires when the plugin process exits. The plugin checks that every stored cursor belongs to the fixed collection path for that tool.
Offset search tools return nextFrom and accept it as from. Both offset and page-size values are bounded to avoid accidentally requesting an unbounded result set.
npm install
npm run typecheck
npm run build
npm pack --dry-run
See DEVELOPMENT.md for endpoint mapping and release checks.