@shin1ohno/sage 0.1.0 → 0.2.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 +79 -114
- package/dist/config/storage/storage-factory.d.ts +5 -1
- package/dist/config/storage/storage-factory.d.ts.map +1 -1
- package/dist/config/storage/storage-factory.js +12 -19
- package/dist/config/storage/storage-factory.js.map +1 -1
- package/dist/core/sage-core.d.ts +10 -5
- package/dist/core/sage-core.d.ts.map +1 -1
- package/dist/core/sage-core.js +28 -51
- package/dist/core/sage-core.js.map +1 -1
- package/dist/index.js +335 -0
- package/dist/index.js.map +1 -1
- package/dist/integrations/apple-reminders.d.ts +46 -0
- package/dist/integrations/apple-reminders.d.ts.map +1 -1
- package/dist/integrations/apple-reminders.js +169 -0
- package/dist/integrations/apple-reminders.js.map +1 -1
- package/dist/integrations/notion-mcp.d.ts +136 -1
- package/dist/integrations/notion-mcp.d.ts.map +1 -1
- package/dist/integrations/notion-mcp.js +449 -1
- package/dist/integrations/notion-mcp.js.map +1 -1
- package/dist/integrations/task-synchronizer.d.ts +124 -0
- package/dist/integrations/task-synchronizer.d.ts.map +1 -0
- package/dist/integrations/task-synchronizer.js +363 -0
- package/dist/integrations/task-synchronizer.js.map +1 -0
- package/dist/integrations/todo-list-manager.d.ts +185 -0
- package/dist/integrations/todo-list-manager.d.ts.map +1 -0
- package/dist/integrations/todo-list-manager.js +581 -0
- package/dist/integrations/todo-list-manager.js.map +1 -0
- package/dist/platform/adapter-factory.d.ts.map +1 -1
- package/dist/platform/adapter-factory.js +4 -8
- package/dist/platform/adapter-factory.js.map +1 -1
- package/dist/platform/adapters/mcp-adapter.js +1 -1
- package/dist/platform/adapters/mcp-adapter.js.map +1 -1
- package/dist/platform/adapters/remote-mcp-adapter.d.ts +34 -0
- package/dist/platform/adapters/remote-mcp-adapter.d.ts.map +1 -0
- package/dist/platform/adapters/remote-mcp-adapter.js +54 -0
- package/dist/platform/adapters/remote-mcp-adapter.js.map +1 -0
- package/dist/platform/detector.d.ts +5 -16
- package/dist/platform/detector.d.ts.map +1 -1
- package/dist/platform/detector.js +52 -108
- package/dist/platform/detector.js.map +1 -1
- package/dist/platform/index.d.ts +0 -2
- package/dist/platform/index.d.ts.map +1 -1
- package/dist/platform/index.js +0 -2
- package/dist/platform/index.js.map +1 -1
- package/dist/platform/types.d.ts +20 -62
- package/dist/platform/types.d.ts.map +1 -1
- package/dist/platform/types.js +6 -11
- package/dist/platform/types.js.map +1 -1
- package/dist/remote/cloud-config.d.ts +139 -0
- package/dist/remote/cloud-config.d.ts.map +1 -0
- package/dist/remote/cloud-config.js +229 -0
- package/dist/remote/cloud-config.js.map +1 -0
- package/dist/remote/hybrid-integration.d.ts +109 -0
- package/dist/remote/hybrid-integration.d.ts.map +1 -0
- package/dist/remote/hybrid-integration.js +230 -0
- package/dist/remote/hybrid-integration.js.map +1 -0
- package/dist/remote/remote-mcp-server.d.ts +244 -0
- package/dist/remote/remote-mcp-server.d.ts.map +1 -0
- package/dist/remote/remote-mcp-server.js +507 -0
- package/dist/remote/remote-mcp-server.js.map +1 -0
- package/dist/utils/priority.d.ts.map +1 -1
- package/dist/utils/priority.js +18 -5
- package/dist/utils/priority.js.map +1 -1
- package/dist/utils/stakeholders.d.ts +4 -0
- package/dist/utils/stakeholders.d.ts.map +1 -1
- package/dist/utils/stakeholders.js +45 -4
- package/dist/utils/stakeholders.js.map +1 -1
- package/dist/utils/task-splitter.d.ts.map +1 -1
- package/dist/utils/task-splitter.js +62 -11
- package/dist/utils/task-splitter.js.map +1 -1
- package/manifest.json +74 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,155 +1,120 @@
|
|
|
1
1
|
# sage (賢者)
|
|
2
2
|
|
|
3
|
-
AI Task Management Assistant MCP Server for Claude Desktop and
|
|
3
|
+
AI Task Management Assistant - MCP Server for Claude Desktop, Claude Code, and Remote clients.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
- **Task Analysis**: Automatic priority assignment (P0-P3), time estimation, stakeholder extraction
|
|
8
|
-
- **Task Splitting**: Break complex tasks into actionable subtasks
|
|
9
|
-
- **Apple Reminders Integration**: Create reminders via AppleScript (macOS) or native API (iOS/iPadOS)
|
|
10
|
-
- **Notion Integration**: Sync long-term tasks (8+ days) to Notion via MCP
|
|
11
|
-
- **Calendar Integration**: Find available time slots based on your schedule
|
|
12
|
-
- **Smart Routing**: Automatically route tasks to Apple Reminders (≤7 days) or Notion (8+ days)
|
|
5
|
+
[](https://www.npmjs.com/package/@shin1ohno/sage)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
13
7
|
|
|
14
|
-
##
|
|
8
|
+
## Overview
|
|
15
9
|
|
|
16
|
-
|
|
10
|
+
sage is an intelligent task management assistant that helps you:
|
|
17
11
|
|
|
18
|
-
|
|
12
|
+
- **Analyze tasks** - Automatically assign priorities (P0-P3), estimate time, and extract stakeholders
|
|
13
|
+
- **Split complex tasks** - Break down large tasks into actionable subtasks
|
|
14
|
+
- **Smart routing** - Route tasks to Apple Reminders (≤7 days) or Notion (8+ days)
|
|
15
|
+
- **Calendar awareness** - Find available time slots based on your schedule
|
|
19
16
|
|
|
20
|
-
|
|
21
|
-
{
|
|
22
|
-
"mcpServers": {
|
|
23
|
-
"sage": {
|
|
24
|
-
"command": "npx",
|
|
25
|
-
"args": ["-y", "@shin1ohno/sage"]
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
```
|
|
17
|
+
## Quick Start
|
|
30
18
|
|
|
31
|
-
### Claude Code
|
|
19
|
+
### For Claude Desktop / Claude Code (Local MCP)
|
|
32
20
|
|
|
33
21
|
```bash
|
|
22
|
+
# Claude Code - one command setup
|
|
34
23
|
claude mcp add sage -- npx -y @shin1ohno/sage
|
|
35
24
|
```
|
|
36
25
|
|
|
37
|
-
|
|
26
|
+
For Claude Desktop, see [Local MCP Setup Guide](docs/SETUP-LOCAL.md).
|
|
38
27
|
|
|
39
|
-
|
|
40
|
-
npm install -g @shin1ohno/sage
|
|
41
|
-
```
|
|
28
|
+
### For iOS / iPadOS / Web (Remote MCP)
|
|
42
29
|
|
|
43
|
-
|
|
30
|
+
See [Remote MCP Setup Guide](docs/SETUP-REMOTE.md).
|
|
44
31
|
|
|
45
|
-
|
|
32
|
+
## Documentation
|
|
46
33
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
34
|
+
| Document | Description |
|
|
35
|
+
|----------|-------------|
|
|
36
|
+
| [Local MCP Setup](docs/SETUP-LOCAL.md) | Step-by-step guide for Claude Desktop/Code |
|
|
37
|
+
| [Remote MCP Setup](docs/SETUP-REMOTE.md) | Step-by-step guide for iOS/iPadOS/Web |
|
|
38
|
+
| [Configuration Guide](docs/CONFIGURATION.md) | Detailed configuration options |
|
|
39
|
+
| [Architecture](docs/ARCHITECTURE.md) | System design and components |
|
|
40
|
+
| [Troubleshooting](docs/TROUBLESHOOTING.md) | Common issues and solutions |
|
|
51
41
|
|
|
52
|
-
|
|
42
|
+
## Features
|
|
53
43
|
|
|
54
|
-
|
|
44
|
+
### Task Analysis
|
|
55
45
|
|
|
56
|
-
|
|
46
|
+
Analyze text input (emails, meeting notes, etc.) and get structured task information:
|
|
57
47
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
| `check_setup_status` | Check if sage has been configured |
|
|
61
|
-
| `start_setup_wizard` | Start the interactive setup wizard |
|
|
62
|
-
| `answer_wizard_question` | Answer a setup wizard question |
|
|
63
|
-
| `save_config` | Save configuration after setup |
|
|
64
|
-
| `update_config` | Update sage configuration |
|
|
48
|
+
```
|
|
49
|
+
User: analyze_tasks with input: "田中さんからの依頼: 明日までに報告書を提出。来週の会議資料も準備してください。"
|
|
65
50
|
|
|
66
|
-
|
|
51
|
+
sage:
|
|
52
|
+
Task 1: 報告書を提出
|
|
53
|
+
- Priority: P0 (due tomorrow)
|
|
54
|
+
- Estimated: 50 minutes
|
|
55
|
+
- Stakeholder: 田中さん
|
|
67
56
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
| `find_available_slots` | Find available time slots in calendar |
|
|
73
|
-
| `sync_to_notion` | Sync a task to Notion database |
|
|
57
|
+
Task 2: 会議資料を準備
|
|
58
|
+
- Priority: P2 (due next week)
|
|
59
|
+
- Estimated: 90 minutes
|
|
60
|
+
```
|
|
74
61
|
|
|
75
|
-
|
|
62
|
+
### Smart Reminder Routing
|
|
76
63
|
|
|
77
|
-
|
|
64
|
+
Tasks are automatically routed to the appropriate system:
|
|
78
65
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
- title: "Prepare quarterly report"
|
|
84
|
-
description: "Q4 summary for manager"
|
|
85
|
-
```
|
|
66
|
+
| Deadline | Destination | Reason |
|
|
67
|
+
|----------|-------------|--------|
|
|
68
|
+
| ≤ 7 days | Apple Reminders | Short-term, actionable |
|
|
69
|
+
| 8+ days | Notion | Long-term planning |
|
|
86
70
|
|
|
87
|
-
###
|
|
71
|
+
### Platform Support
|
|
88
72
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
```
|
|
73
|
+
| クライアント | サーバー | Apple Reminders | Calendar | Notion |
|
|
74
|
+
|--------------|----------|----------------|----------|--------|
|
|
75
|
+
| Claude Desktop/Code | macOS (直接) | AppleScript | AppleScript | MCP |
|
|
76
|
+
| Claude iOS/iPadOS | macOS (Remote MCP) | AppleScript | AppleScript | MCP |
|
|
77
|
+
| Claude Web | macOS (Remote MCP) | AppleScript | AppleScript | MCP |
|
|
95
78
|
|
|
96
|
-
|
|
79
|
+
**すべてのケースで macOS が必要です**(AppleScript のため)。
|
|
97
80
|
|
|
98
|
-
|
|
99
|
-
find_available_slots with:
|
|
100
|
-
- durationMinutes: 60
|
|
101
|
-
- preferDeepWork: true
|
|
102
|
-
```
|
|
81
|
+
## Tools
|
|
103
82
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
|
107
|
-
|
|
108
|
-
|
|
|
109
|
-
|
|
|
110
|
-
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
"workingHours": {
|
|
124
|
-
"start": "09:00",
|
|
125
|
-
"end": "18:00"
|
|
126
|
-
},
|
|
127
|
-
"deepWorkDays": ["Tuesday", "Thursday"],
|
|
128
|
-
"meetingHeavyDays": ["Monday", "Friday"]
|
|
129
|
-
},
|
|
130
|
-
"integrations": {
|
|
131
|
-
"appleReminders": {
|
|
132
|
-
"enabled": true,
|
|
133
|
-
"defaultList": "Reminders"
|
|
134
|
-
},
|
|
135
|
-
"notion": {
|
|
136
|
-
"enabled": true,
|
|
137
|
-
"databaseId": "your-database-id",
|
|
138
|
-
"threshold": 8
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
```
|
|
83
|
+
### Setup & Configuration
|
|
84
|
+
|
|
85
|
+
| Tool | Description |
|
|
86
|
+
|------|-------------|
|
|
87
|
+
| `check_setup_status` | Check if sage is configured |
|
|
88
|
+
| `start_setup_wizard` | Start interactive setup |
|
|
89
|
+
| `save_config` | Save configuration |
|
|
90
|
+
| `update_config` | Update configuration |
|
|
91
|
+
|
|
92
|
+
### Task Management
|
|
93
|
+
|
|
94
|
+
| Tool | Description |
|
|
95
|
+
|------|-------------|
|
|
96
|
+
| `analyze_tasks` | Analyze tasks for priority, time, stakeholders |
|
|
97
|
+
| `set_reminder` | Create a reminder |
|
|
98
|
+
| `list_todos` | List all tasks from all sources |
|
|
99
|
+
| `update_task_status` | Update task status |
|
|
100
|
+
| `find_available_slots` | Find free time in calendar |
|
|
101
|
+
| `sync_to_notion` | Sync task to Notion |
|
|
143
102
|
|
|
144
103
|
## Requirements
|
|
145
104
|
|
|
105
|
+
- **macOS** (必須 - AppleScript で Apple Reminders/Calendar と統合)
|
|
146
106
|
- Node.js >= 18.0.0
|
|
147
|
-
-
|
|
148
|
-
|
|
107
|
+
- Notion MCP server (任意、Notion 統合用)
|
|
108
|
+
|
|
109
|
+
**注意**: sage は macOS 専用です。Remote MCP Server を使用する場合も、サーバーは macOS 上で実行する必要があります。
|
|
149
110
|
|
|
150
111
|
## Development
|
|
151
112
|
|
|
152
113
|
```bash
|
|
114
|
+
# Clone repository
|
|
115
|
+
git clone https://github.com/shin1ohno/sage.git
|
|
116
|
+
cd sage
|
|
117
|
+
|
|
153
118
|
# Install dependencies
|
|
154
119
|
npm install
|
|
155
120
|
|
|
@@ -165,4 +130,4 @@ npm run build
|
|
|
165
130
|
|
|
166
131
|
## License
|
|
167
132
|
|
|
168
|
-
MIT
|
|
133
|
+
MIT - see [LICENSE](LICENSE) for details.
|
|
@@ -2,12 +2,16 @@
|
|
|
2
2
|
* Config Storage Factory
|
|
3
3
|
* Creates appropriate storage based on platform
|
|
4
4
|
* Requirements: 1.1, 1.5, 10.1
|
|
5
|
+
*
|
|
6
|
+
* 実装:
|
|
7
|
+
* - desktop_mcp: ファイルベースストレージ
|
|
8
|
+
* - remote_mcp: クラウドストレージ(セッションフォールバック)
|
|
5
9
|
*/
|
|
6
10
|
import type { ConfigStorage, PlatformType } from '../../platform/types.js';
|
|
7
11
|
/**
|
|
8
12
|
* Storage type enumeration
|
|
9
13
|
*/
|
|
10
|
-
export type StorageType = 'file' | 'session' | '
|
|
14
|
+
export type StorageType = 'file' | 'session' | 'cloud';
|
|
11
15
|
/**
|
|
12
16
|
* Factory for creating platform-specific config storage
|
|
13
17
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage-factory.d.ts","sourceRoot":"","sources":["../../../src/config/storage/storage-factory.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"storage-factory.d.ts","sourceRoot":"","sources":["../../../src/config/storage/storage-factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAI3E;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AAEvD;;GAEG;AACH,qBAAa,oBAAoB;IAC/B;;OAEG;IACH,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,YAAY,GAAG,aAAa;IAcxD;;OAEG;IACH,MAAM,CAAC,cAAc,CAAC,YAAY,EAAE,YAAY,GAAG,WAAW;IAa9D;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO;IAcxD;;OAEG;IACH,MAAM,CAAC,qBAAqB,CAAC,YAAY,EAAE,YAAY,GAAG,MAAM;CAYjE"}
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
* Config Storage Factory
|
|
3
3
|
* Creates appropriate storage based on platform
|
|
4
4
|
* Requirements: 1.1, 1.5, 10.1
|
|
5
|
+
*
|
|
6
|
+
* 実装:
|
|
7
|
+
* - desktop_mcp: ファイルベースストレージ
|
|
8
|
+
* - remote_mcp: クラウドストレージ(セッションフォールバック)
|
|
5
9
|
*/
|
|
6
10
|
import { FileConfigStorage } from './file-storage.js';
|
|
7
11
|
import { SessionConfigStorage } from './session-storage.js';
|
|
@@ -16,12 +20,8 @@ export class ConfigStorageFactory {
|
|
|
16
20
|
switch (platformType) {
|
|
17
21
|
case 'desktop_mcp':
|
|
18
22
|
return new FileConfigStorage();
|
|
19
|
-
case '
|
|
20
|
-
|
|
21
|
-
// For now, use session storage
|
|
22
|
-
// In future, could implement iCloud sync
|
|
23
|
-
return new SessionConfigStorage();
|
|
24
|
-
case 'web_skills':
|
|
23
|
+
case 'remote_mcp':
|
|
24
|
+
// Remote MCP uses cloud storage (session fallback for now)
|
|
25
25
|
return new SessionConfigStorage();
|
|
26
26
|
default:
|
|
27
27
|
return new SessionConfigStorage();
|
|
@@ -34,11 +34,8 @@ export class ConfigStorageFactory {
|
|
|
34
34
|
switch (platformType) {
|
|
35
35
|
case 'desktop_mcp':
|
|
36
36
|
return 'file';
|
|
37
|
-
case '
|
|
38
|
-
|
|
39
|
-
// iCloud sync planned for future
|
|
40
|
-
return 'session';
|
|
41
|
-
case 'web_skills':
|
|
37
|
+
case 'remote_mcp':
|
|
38
|
+
return 'cloud';
|
|
42
39
|
default:
|
|
43
40
|
return 'session';
|
|
44
41
|
}
|
|
@@ -50,11 +47,9 @@ export class ConfigStorageFactory {
|
|
|
50
47
|
switch (platformType) {
|
|
51
48
|
case 'desktop_mcp':
|
|
52
49
|
return true;
|
|
53
|
-
case '
|
|
54
|
-
|
|
55
|
-
// iCloud sync makes it persistent
|
|
50
|
+
case 'remote_mcp':
|
|
51
|
+
// Cloud storage is persistent
|
|
56
52
|
return true;
|
|
57
|
-
case 'web_skills':
|
|
58
53
|
default:
|
|
59
54
|
return false;
|
|
60
55
|
}
|
|
@@ -66,10 +61,8 @@ export class ConfigStorageFactory {
|
|
|
66
61
|
switch (platformType) {
|
|
67
62
|
case 'desktop_mcp':
|
|
68
63
|
return '設定は ~/.sage/config.json に永続保存されます';
|
|
69
|
-
case '
|
|
70
|
-
|
|
71
|
-
return '設定はセッションに保存され、将来的にはiCloud同期が可能になります';
|
|
72
|
-
case 'web_skills':
|
|
64
|
+
case 'remote_mcp':
|
|
65
|
+
return '設定はクラウドストレージに同期されます';
|
|
73
66
|
default:
|
|
74
67
|
return '設定はセッション終了時に消去されます。次回使用時に再設定が必要です';
|
|
75
68
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage-factory.js","sourceRoot":"","sources":["../../../src/config/storage/storage-factory.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"storage-factory.js","sourceRoot":"","sources":["../../../src/config/storage/storage-factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,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management
|
|
4
4
|
* Requirements: 2.1, 2.2, 11.1, 7.3, 7.4
|
|
5
|
+
*
|
|
6
|
+
* sage は macOS 専用で、以下の方式で動作します:
|
|
7
|
+
* - desktop_mcp: Claude Desktop/Code から直接実行(AppleScript統合)
|
|
8
|
+
* - remote_mcp: macOS 上の Remote MCP Server 経由でアクセス(iOS/Web クライアント用)
|
|
9
|
+
*
|
|
10
|
+
* 注意: Remote MCP Server も macOS 上で実行する必要があります(AppleScript のため)
|
|
5
11
|
*/
|
|
6
12
|
import type { PlatformAdapter, PlatformInfo, FeatureSet } from '../platform/types.js';
|
|
7
13
|
import type { Task, UserConfig } from '../types/index.js';
|
|
8
14
|
import type { AnalysisResult } from '../tools/analyze-tasks.js';
|
|
9
15
|
/**
|
|
10
|
-
* Integration recommendation for
|
|
16
|
+
* Integration recommendation for the platform
|
|
11
17
|
*/
|
|
12
18
|
export interface IntegrationRecommendation {
|
|
13
19
|
integration: 'reminders' | 'calendar' | 'notion';
|
|
14
20
|
available: boolean;
|
|
15
|
-
method: '
|
|
16
|
-
fallback?: string;
|
|
21
|
+
method: 'applescript' | 'mcp' | 'remote';
|
|
17
22
|
description: string;
|
|
18
23
|
}
|
|
19
24
|
/**
|
|
20
25
|
* SageCore - The main entry point for sage functionality
|
|
21
|
-
* Works with
|
|
26
|
+
* Works with platform adapters to provide task management
|
|
22
27
|
*/
|
|
23
28
|
export declare class SageCore {
|
|
24
29
|
private adapter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sage-core.d.ts","sourceRoot":"","sources":["../../src/core/sage-core.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"sage-core.d.ts","sourceRoot":"","sources":["../../src/core/sage-core.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACtF,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU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
|
1
1
|
/**
|
|
2
2
|
* SageCore
|
|
3
|
-
*
|
|
3
|
+
* Core logic for sage task management
|
|
4
4
|
* Requirements: 2.1, 2.2, 11.1, 7.3, 7.4
|
|
5
|
+
*
|
|
6
|
+
* sage は macOS 専用で、以下の方式で動作します:
|
|
7
|
+
* - desktop_mcp: Claude Desktop/Code から直接実行(AppleScript統合)
|
|
8
|
+
* - remote_mcp: macOS 上の Remote MCP Server 経由でアクセス(iOS/Web クライアント用)
|
|
9
|
+
*
|
|
10
|
+
* 注意: Remote MCP Server も macOS 上で実行する必要があります(AppleScript のため)
|
|
5
11
|
*/
|
|
6
12
|
import { TaskAnalyzer } from '../tools/analyze-tasks.js';
|
|
7
13
|
import { DEFAULT_CONFIG } from '../types/config.js';
|
|
8
14
|
/**
|
|
9
15
|
* SageCore - The main entry point for sage functionality
|
|
10
|
-
* Works with
|
|
16
|
+
* Works with platform adapters to provide task management
|
|
11
17
|
*/
|
|
12
18
|
export class SageCore {
|
|
13
19
|
adapter;
|
|
@@ -94,80 +100,51 @@ export class SageCore {
|
|
|
94
100
|
if (platformType === 'desktop_mcp') {
|
|
95
101
|
recommendations.push({
|
|
96
102
|
integration: 'reminders',
|
|
97
|
-
available:
|
|
103
|
+
available: features.appleReminders,
|
|
98
104
|
method: 'applescript',
|
|
99
105
|
description: 'AppleScript経由でApple Remindersに連携',
|
|
100
106
|
});
|
|
101
107
|
}
|
|
102
|
-
else if (platformType === '
|
|
108
|
+
else if (platformType === 'remote_mcp') {
|
|
103
109
|
recommendations.push({
|
|
104
110
|
integration: 'reminders',
|
|
105
|
-
available:
|
|
106
|
-
method: '
|
|
107
|
-
description: '
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
else {
|
|
111
|
-
recommendations.push({
|
|
112
|
-
integration: 'reminders',
|
|
113
|
-
available: false,
|
|
114
|
-
method: 'manual_copy',
|
|
115
|
-
fallback: 'manual_copy',
|
|
116
|
-
description: 'Apple Remindersへは手動コピーで追加してください',
|
|
111
|
+
available: features.appleReminders,
|
|
112
|
+
method: 'remote',
|
|
113
|
+
description: 'Remote MCP Server経由でApple Remindersに連携',
|
|
117
114
|
});
|
|
118
115
|
}
|
|
119
116
|
// Calendar integration
|
|
120
117
|
if (platformType === 'desktop_mcp') {
|
|
121
118
|
recommendations.push({
|
|
122
119
|
integration: 'calendar',
|
|
123
|
-
available:
|
|
120
|
+
available: features.calendarIntegration,
|
|
124
121
|
method: 'applescript',
|
|
125
122
|
description: 'AppleScript経由でCalendar.appから予定を取得',
|
|
126
123
|
});
|
|
127
124
|
}
|
|
128
|
-
else if (platformType === '
|
|
125
|
+
else if (platformType === 'remote_mcp') {
|
|
129
126
|
recommendations.push({
|
|
130
127
|
integration: 'calendar',
|
|
131
|
-
available:
|
|
132
|
-
method: '
|
|
133
|
-
description: '
|
|
128
|
+
available: features.calendarIntegration,
|
|
129
|
+
method: 'remote',
|
|
130
|
+
description: 'Remote MCP Server経由でカレンダーイベントを取得',
|
|
134
131
|
});
|
|
135
132
|
}
|
|
136
|
-
|
|
133
|
+
// Notion integration
|
|
134
|
+
if (platformType === 'desktop_mcp') {
|
|
137
135
|
recommendations.push({
|
|
138
|
-
integration: '
|
|
139
|
-
available:
|
|
140
|
-
method: '
|
|
141
|
-
|
|
142
|
-
description: 'カレンダー情報は手動で入力してください',
|
|
136
|
+
integration: 'notion',
|
|
137
|
+
available: features.notionIntegration,
|
|
138
|
+
method: 'mcp',
|
|
139
|
+
description: 'MCP経由でNotionデータベースに連携',
|
|
143
140
|
});
|
|
144
141
|
}
|
|
145
|
-
|
|
146
|
-
if (features.notionIntegration) {
|
|
147
|
-
if (platformType === 'desktop_mcp') {
|
|
148
|
-
recommendations.push({
|
|
149
|
-
integration: 'notion',
|
|
150
|
-
available: true,
|
|
151
|
-
method: 'mcp',
|
|
152
|
-
description: 'MCP経由でNotionデータベースに連携',
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
else if (platformType === 'ios_skills' || platformType === 'ipados_skills') {
|
|
156
|
-
recommendations.push({
|
|
157
|
-
integration: 'notion',
|
|
158
|
-
available: true,
|
|
159
|
-
method: 'connector',
|
|
160
|
-
description: 'Notion Connector経由でNotionデータベースに連携',
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
else {
|
|
142
|
+
else if (platformType === 'remote_mcp') {
|
|
165
143
|
recommendations.push({
|
|
166
144
|
integration: 'notion',
|
|
167
|
-
available:
|
|
168
|
-
method: '
|
|
169
|
-
|
|
170
|
-
description: 'Notionへは手動コピーで追加してください',
|
|
145
|
+
available: features.notionIntegration,
|
|
146
|
+
method: 'remote',
|
|
147
|
+
description: 'Remote MCP Server経由でNotionデータベースに連携',
|
|
171
148
|
});
|
|
172
149
|
}
|
|
173
150
|
return recommendations;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sage-core.js","sourceRoot":"","sources":["../../src/core/sage-core.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"sage-core.js","sourceRoot":"","sources":["../../src/core/sage-core.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAYpD;;;GAGG;AACH,MAAM,OAAO,QAAQ;IACX,OAAO,CAAkB;IACzB,MAAM,GAAsB,IAAI,CAAC;IACjC,WAAW,GAAG,KAAK,CAAC;IAE5B,YAAY,OAAwB;QAClC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,UAAU,CAAC,MAAmB;QAClC,MAAM,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;QAChC,IAAI,CAAC,MAAM,GAAG,MAAM,IAAI,EAAE,GAAG,cAAc,EAAE,CAAC;QAC9C,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;IAC1B,CAAC;IAED;;O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