@shin1ohno/sage 0.1.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/LICENSE +21 -0
- package/README.md +168 -0
- package/dist/config/loader.d.ts +37 -0
- package/dist/config/loader.d.ts.map +1 -0
- package/dist/config/loader.js +95 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/storage/file-storage.d.ts +35 -0
- package/dist/config/storage/file-storage.d.ts.map +1 -0
- package/dist/config/storage/file-storage.js +76 -0
- package/dist/config/storage/file-storage.js.map +1 -0
- package/dist/config/storage/index.d.ts +8 -0
- package/dist/config/storage/index.d.ts.map +1 -0
- package/dist/config/storage/index.js +8 -0
- package/dist/config/storage/index.js.map +1 -0
- package/dist/config/storage/session-storage.d.ts +35 -0
- package/dist/config/storage/session-storage.d.ts.map +1 -0
- package/dist/config/storage/session-storage.js +44 -0
- package/dist/config/storage/session-storage.js.map +1 -0
- package/dist/config/storage/storage-factory.d.ts +32 -0
- package/dist/config/storage/storage-factory.d.ts.map +1 -0
- package/dist/config/storage/storage-factory.js +78 -0
- package/dist/config/storage/storage-factory.js.map +1 -0
- package/dist/core/index.d.ts +6 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +6 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/sage-core.d.ts +80 -0
- package/dist/core/sage-core.d.ts.map +1 -0
- package/dist/core/sage-core.js +190 -0
- package/dist/core/sage-core.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +901 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations/apple-reminders.d.ts +96 -0
- package/dist/integrations/apple-reminders.d.ts.map +1 -0
- package/dist/integrations/apple-reminders.js +250 -0
- package/dist/integrations/apple-reminders.js.map +1 -0
- package/dist/integrations/calendar-service.d.ts +126 -0
- package/dist/integrations/calendar-service.d.ts.map +1 -0
- package/dist/integrations/calendar-service.js +295 -0
- package/dist/integrations/calendar-service.js.map +1 -0
- package/dist/integrations/notion-mcp.d.ts +121 -0
- package/dist/integrations/notion-mcp.d.ts.map +1 -0
- package/dist/integrations/notion-mcp.js +281 -0
- package/dist/integrations/notion-mcp.js.map +1 -0
- package/dist/integrations/reminder-manager.d.ts +90 -0
- package/dist/integrations/reminder-manager.d.ts.map +1 -0
- package/dist/integrations/reminder-manager.js +182 -0
- package/dist/integrations/reminder-manager.js.map +1 -0
- package/dist/platform/adapter-factory.d.ts +22 -0
- package/dist/platform/adapter-factory.d.ts.map +1 -0
- package/dist/platform/adapter-factory.js +41 -0
- package/dist/platform/adapter-factory.js.map +1 -0
- package/dist/platform/adapters/mcp-adapter.d.ts +32 -0
- package/dist/platform/adapters/mcp-adapter.d.ts.map +1 -0
- package/dist/platform/adapters/mcp-adapter.js +52 -0
- package/dist/platform/adapters/mcp-adapter.js.map +1 -0
- package/dist/platform/adapters/skills-adapter-ios.d.ts +38 -0
- package/dist/platform/adapters/skills-adapter-ios.d.ts.map +1 -0
- package/dist/platform/adapters/skills-adapter-ios.js +59 -0
- package/dist/platform/adapters/skills-adapter-ios.js.map +1 -0
- package/dist/platform/adapters/skills-adapter-web.d.ts +36 -0
- package/dist/platform/adapters/skills-adapter-web.d.ts.map +1 -0
- package/dist/platform/adapters/skills-adapter-web.js +56 -0
- package/dist/platform/adapters/skills-adapter-web.js.map +1 -0
- package/dist/platform/detector.d.ts +60 -0
- package/dist/platform/detector.d.ts.map +1 -0
- package/dist/platform/detector.js +217 -0
- package/dist/platform/detector.js.map +1 -0
- package/dist/platform/index.d.ts +11 -0
- package/dist/platform/index.d.ts.map +1 -0
- package/dist/platform/index.js +11 -0
- package/dist/platform/index.js.map +1 -0
- package/dist/platform/types.d.ts +205 -0
- package/dist/platform/types.d.ts.map +1 -0
- package/dist/platform/types.js +33 -0
- package/dist/platform/types.js.map +1 -0
- package/dist/setup/questions.d.ts +15 -0
- package/dist/setup/questions.d.ts.map +1 -0
- package/dist/setup/questions.js +131 -0
- package/dist/setup/questions.js.map +1 -0
- package/dist/setup/wizard.d.ts +51 -0
- package/dist/setup/wizard.d.ts.map +1 -0
- package/dist/setup/wizard.js +210 -0
- package/dist/setup/wizard.js.map +1 -0
- package/dist/tools/analyze-tasks.d.ts +61 -0
- package/dist/tools/analyze-tasks.d.ts.map +1 -0
- package/dist/tools/analyze-tasks.js +258 -0
- package/dist/tools/analyze-tasks.js.map +1 -0
- package/dist/types/config.d.ts +126 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +118 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/errors.d.ts +39 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/errors.js +83 -0
- package/dist/types/errors.js.map +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +7 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/task.d.ts +69 -0
- package/dist/types/task.d.ts.map +1 -0
- package/dist/types/task.js +5 -0
- package/dist/types/task.js.map +1 -0
- package/dist/utils/estimation.d.ts +49 -0
- package/dist/utils/estimation.d.ts.map +1 -0
- package/dist/utils/estimation.js +244 -0
- package/dist/utils/estimation.js.map +1 -0
- package/dist/utils/priority.d.ts +68 -0
- package/dist/utils/priority.d.ts.map +1 -0
- package/dist/utils/priority.js +243 -0
- package/dist/utils/priority.js.map +1 -0
- package/dist/utils/retry.d.ts +62 -0
- package/dist/utils/retry.d.ts.map +1 -0
- package/dist/utils/retry.js +161 -0
- package/dist/utils/retry.js.map +1 -0
- package/dist/utils/stakeholders.d.ts +61 -0
- package/dist/utils/stakeholders.d.ts.map +1 -0
- package/dist/utils/stakeholders.js +301 -0
- package/dist/utils/stakeholders.js.map +1 -0
- package/dist/utils/task-splitter.d.ts +45 -0
- package/dist/utils/task-splitter.d.ts.map +1 -0
- package/dist/utils/task-splitter.js +321 -0
- package/dist/utils/task-splitter.js.map +1 -0
- package/package.json +66 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config Storage Factory
|
|
3
|
+
* Creates appropriate storage based on platform
|
|
4
|
+
* Requirements: 1.1, 1.5, 10.1
|
|
5
|
+
*/
|
|
6
|
+
import { FileConfigStorage } from './file-storage.js';
|
|
7
|
+
import { SessionConfigStorage } from './session-storage.js';
|
|
8
|
+
/**
|
|
9
|
+
* Factory for creating platform-specific config storage
|
|
10
|
+
*/
|
|
11
|
+
export class ConfigStorageFactory {
|
|
12
|
+
/**
|
|
13
|
+
* Create storage based on platform type
|
|
14
|
+
*/
|
|
15
|
+
static create(platformType) {
|
|
16
|
+
switch (platformType) {
|
|
17
|
+
case 'desktop_mcp':
|
|
18
|
+
return new FileConfigStorage();
|
|
19
|
+
case 'ios_skills':
|
|
20
|
+
case 'ipados_skills':
|
|
21
|
+
// For now, use session storage
|
|
22
|
+
// In future, could implement iCloud sync
|
|
23
|
+
return new SessionConfigStorage();
|
|
24
|
+
case 'web_skills':
|
|
25
|
+
return new SessionConfigStorage();
|
|
26
|
+
default:
|
|
27
|
+
return new SessionConfigStorage();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Get storage type for a platform
|
|
32
|
+
*/
|
|
33
|
+
static getStorageType(platformType) {
|
|
34
|
+
switch (platformType) {
|
|
35
|
+
case 'desktop_mcp':
|
|
36
|
+
return 'file';
|
|
37
|
+
case 'ios_skills':
|
|
38
|
+
case 'ipados_skills':
|
|
39
|
+
// iCloud sync planned for future
|
|
40
|
+
return 'session';
|
|
41
|
+
case 'web_skills':
|
|
42
|
+
default:
|
|
43
|
+
return 'session';
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Check if storage is persistent across sessions
|
|
48
|
+
*/
|
|
49
|
+
static isPersistent(platformType) {
|
|
50
|
+
switch (platformType) {
|
|
51
|
+
case 'desktop_mcp':
|
|
52
|
+
return true;
|
|
53
|
+
case 'ios_skills':
|
|
54
|
+
case 'ipados_skills':
|
|
55
|
+
// iCloud sync makes it persistent
|
|
56
|
+
return true;
|
|
57
|
+
case 'web_skills':
|
|
58
|
+
default:
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Get storage description for user display
|
|
64
|
+
*/
|
|
65
|
+
static getStorageDescription(platformType) {
|
|
66
|
+
switch (platformType) {
|
|
67
|
+
case 'desktop_mcp':
|
|
68
|
+
return '設定は ~/.sage/config.json に永続保存されます';
|
|
69
|
+
case 'ios_skills':
|
|
70
|
+
case 'ipados_skills':
|
|
71
|
+
return '設定はセッションに保存され、将来的にはiCloud同期が可能になります';
|
|
72
|
+
case 'web_skills':
|
|
73
|
+
default:
|
|
74
|
+
return '設定はセッション終了時に消去されます。次回使用時に再設定が必要です';
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=storage-factory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage-factory.js","sourceRoot":"","sources":["../../../src/config/storage/storage-factory.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAO5D;;GAEG;AACH,MAAM,OAAO,oBAAoB;IAC/B;;OAEG;IACH,MAAM,CAAC,MAAM,CAAC,YAA0B;QACtC,QAAQ,YAAY,EAAE,CAAC;YACrB,KAAK,aAAa;gBAChB,OAAO,IAAI,iBAAiB,EAAE,CAAC;YAEjC,KAAK,YAAY,CAAC;YAClB,KAAK,eAAe;gBAClB,+BAA+B;gBAC/B,yCAAyC;gBACzC,OAAO,IAAI,oBAAoB,EAAE,CAAC;YAEpC,KAAK,YAAY;gBACf,OAAO,IAAI,oBAAoB,EAAE,CAAC;YAEpC;gBACE,OAAO,IAAI,oBAAoB,EAAE,CAAC;QACtC,CAAC;IACH,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,cAAc,CAAC,YAA0B;QAC9C,QAAQ,YAAY,EAAE,CAAC;YACrB,KAAK,aAAa;gBAChB,OAAO,MAAM,CAAC;YAEhB,KAAK,YAAY,CAAC;YAClB,KAAK,eAAe;gBAClB,iCAAiC;gBACjC,OAAO,SAAS,CAAC;YAEnB,KAAK,YAAY,CAAC;YAClB;gBACE,OAAO,SAAS,CAAC;QACrB,CAAC;IACH,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,YAA0B;QAC5C,QAAQ,YAAY,EAAE,CAAC;YACrB,KAAK,aAAa;gBAChB,OAAO,IAAI,CAAC;YAEd,KAAK,YAAY,CAAC;YAClB,KAAK,eAAe;gBAClB,kCAAkC;gBAClC,OAAO,IAAI,CAAC;YAEd,KAAK,YAAY,CAAC;YAClB;gBACE,OAAO,KAAK,CAAC;QACjB,CAAC;IACH,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,qBAAqB,CAAC,YAA0B;QACrD,QAAQ,YAAY,EAAE,CAAC;YACrB,KAAK,aAAa;gBAChB,OAAO,mCAAmC,CAAC;YAE7C,KAAK,YAAY,CAAC;YAClB,KAAK,eAAe;gBAClB,OAAO,qCAAqC,CAAC;YAE/C,KAAK,YAAY,CAAC;YAClB;gBACE,OAAO,mCAAmC,CAAC;QAC/C,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SageCore
|
|
3
|
+
* Platform-independent core logic for sage task management
|
|
4
|
+
* Requirements: 2.1, 2.2, 11.1, 7.3, 7.4
|
|
5
|
+
*/
|
|
6
|
+
import type { PlatformAdapter, PlatformInfo, FeatureSet } from '../platform/types.js';
|
|
7
|
+
import type { Task, UserConfig } from '../types/index.js';
|
|
8
|
+
import type { AnalysisResult } from '../tools/analyze-tasks.js';
|
|
9
|
+
/**
|
|
10
|
+
* Integration recommendation for a specific platform
|
|
11
|
+
*/
|
|
12
|
+
export interface IntegrationRecommendation {
|
|
13
|
+
integration: 'reminders' | 'calendar' | 'notion';
|
|
14
|
+
available: boolean;
|
|
15
|
+
method: 'native' | 'applescript' | 'mcp' | 'connector' | 'manual_copy';
|
|
16
|
+
fallback?: string;
|
|
17
|
+
description: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* SageCore - The main entry point for sage functionality
|
|
21
|
+
* Works with any platform adapter to provide consistent task management
|
|
22
|
+
*/
|
|
23
|
+
export declare class SageCore {
|
|
24
|
+
private adapter;
|
|
25
|
+
private config;
|
|
26
|
+
private initialized;
|
|
27
|
+
constructor(adapter: PlatformAdapter);
|
|
28
|
+
/**
|
|
29
|
+
* Initialize the core with configuration
|
|
30
|
+
*/
|
|
31
|
+
initialize(config?: UserConfig): Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* Check if core is initialized
|
|
34
|
+
*/
|
|
35
|
+
isInitialized(): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Get platform information
|
|
38
|
+
*/
|
|
39
|
+
getPlatformInfo(): PlatformInfo;
|
|
40
|
+
/**
|
|
41
|
+
* Get available features on current platform
|
|
42
|
+
*/
|
|
43
|
+
getAvailableFeatures(): FeatureSet;
|
|
44
|
+
/**
|
|
45
|
+
* Get current configuration
|
|
46
|
+
*/
|
|
47
|
+
getConfig(): UserConfig;
|
|
48
|
+
/**
|
|
49
|
+
* Update configuration
|
|
50
|
+
*/
|
|
51
|
+
updateConfig(updates: Partial<UserConfig>): Promise<void>;
|
|
52
|
+
/**
|
|
53
|
+
* Analyze a list of tasks
|
|
54
|
+
* Requirement: 2.1, 2.2
|
|
55
|
+
*/
|
|
56
|
+
analyzeTasks(tasks: Task[]): Promise<AnalysisResult>;
|
|
57
|
+
/**
|
|
58
|
+
* Analyze tasks from text input
|
|
59
|
+
* Requirement: 11.1
|
|
60
|
+
*/
|
|
61
|
+
analyzeFromText(input: string): Promise<AnalysisResult>;
|
|
62
|
+
/**
|
|
63
|
+
* Format analysis result for display
|
|
64
|
+
*/
|
|
65
|
+
formatResult(result: AnalysisResult): string;
|
|
66
|
+
/**
|
|
67
|
+
* Get integration recommendations based on current platform
|
|
68
|
+
* Requirement: 7.3, 7.4
|
|
69
|
+
*/
|
|
70
|
+
getIntegrationRecommendations(): IntegrationRecommendation[];
|
|
71
|
+
/**
|
|
72
|
+
* Check if a specific capability is available
|
|
73
|
+
*/
|
|
74
|
+
isCapabilityAvailable(capability: string): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Ensure core is initialized before operations
|
|
77
|
+
*/
|
|
78
|
+
private ensureInitialized;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=sage-core.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sage-core.d.ts","sourceRoot":"","sources":["../../src/core/sage-core.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACZ,UAAU,EACX,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAGhE;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,WAAW,EAAE,WAAW,GAAG,UAAU,GAAG,QAAQ,CAAC;IACjD,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,QAAQ,GAAG,aAAa,GAAG,KAAK,GAAG,WAAW,GAAG,aAAa,CAAC;IACvE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,qBAAa,QAAQ;IACnB,OAAO,CAAC,OAAO,CAAkB;IACjC,OAAO,CAAC,MAAM,CAA2B;IACzC,OAAO,CAAC,WAAW,CAAS;gBAEhB,OAAO,EAAE,eAAe;IAIpC;;OAEG;IACG,UAAU,CAAC,MAAM,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAMpD;;OAEG;IACH,aAAa,IAAI,OAAO;IAIxB;;OAEG;IACH,eAAe,IAAI,YAAY;IAI/B;;OAEG;IACH,oBAAoB,IAAI,UAAU;IAIlC;;OAEG;IACH,SAAS,IAAI,UAAU;IAKvB;;OAEG;IACG,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAS/D;;;OAGG;IACG,YAAY,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC;IAK1D;;;OAGG;IACG,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAK7D;;OAEG;IACH,YAAY,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM;IAI5C;;;OAGG;IACH,6BAA6B,IAAI,yBAAyB,EAAE;IAqF5D;;OAEG;IACH,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAIlD;;OAEG;IACH,OAAO,CAAC,iBAAiB;CAK1B"}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SageCore
|
|
3
|
+
* Platform-independent core logic for sage task management
|
|
4
|
+
* Requirements: 2.1, 2.2, 11.1, 7.3, 7.4
|
|
5
|
+
*/
|
|
6
|
+
import { TaskAnalyzer } from '../tools/analyze-tasks.js';
|
|
7
|
+
import { DEFAULT_CONFIG } from '../types/config.js';
|
|
8
|
+
/**
|
|
9
|
+
* SageCore - The main entry point for sage functionality
|
|
10
|
+
* Works with any platform adapter to provide consistent task management
|
|
11
|
+
*/
|
|
12
|
+
export class SageCore {
|
|
13
|
+
adapter;
|
|
14
|
+
config = null;
|
|
15
|
+
initialized = false;
|
|
16
|
+
constructor(adapter) {
|
|
17
|
+
this.adapter = adapter;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Initialize the core with configuration
|
|
21
|
+
*/
|
|
22
|
+
async initialize(config) {
|
|
23
|
+
await this.adapter.initialize();
|
|
24
|
+
this.config = config ?? { ...DEFAULT_CONFIG };
|
|
25
|
+
this.initialized = true;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Check if core is initialized
|
|
29
|
+
*/
|
|
30
|
+
isInitialized() {
|
|
31
|
+
return this.initialized;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Get platform information
|
|
35
|
+
*/
|
|
36
|
+
getPlatformInfo() {
|
|
37
|
+
return this.adapter.getPlatformInfo();
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Get available features on current platform
|
|
41
|
+
*/
|
|
42
|
+
getAvailableFeatures() {
|
|
43
|
+
return this.adapter.getAvailableFeatures();
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Get current configuration
|
|
47
|
+
*/
|
|
48
|
+
getConfig() {
|
|
49
|
+
this.ensureInitialized();
|
|
50
|
+
return this.config;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Update configuration
|
|
54
|
+
*/
|
|
55
|
+
async updateConfig(updates) {
|
|
56
|
+
this.ensureInitialized();
|
|
57
|
+
this.config = {
|
|
58
|
+
...this.config,
|
|
59
|
+
...updates,
|
|
60
|
+
lastUpdated: new Date().toISOString(),
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Analyze a list of tasks
|
|
65
|
+
* Requirement: 2.1, 2.2
|
|
66
|
+
*/
|
|
67
|
+
async analyzeTasks(tasks) {
|
|
68
|
+
this.ensureInitialized();
|
|
69
|
+
return TaskAnalyzer.analyzeTasks(tasks, this.config);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Analyze tasks from text input
|
|
73
|
+
* Requirement: 11.1
|
|
74
|
+
*/
|
|
75
|
+
async analyzeFromText(input) {
|
|
76
|
+
this.ensureInitialized();
|
|
77
|
+
return TaskAnalyzer.analyzeFromText(input, this.config);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Format analysis result for display
|
|
81
|
+
*/
|
|
82
|
+
formatResult(result) {
|
|
83
|
+
return TaskAnalyzer.formatResult(result);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Get integration recommendations based on current platform
|
|
87
|
+
* Requirement: 7.3, 7.4
|
|
88
|
+
*/
|
|
89
|
+
getIntegrationRecommendations() {
|
|
90
|
+
const features = this.adapter.getAvailableFeatures();
|
|
91
|
+
const platformType = this.adapter.getPlatformInfo().type;
|
|
92
|
+
const recommendations = [];
|
|
93
|
+
// Reminders integration
|
|
94
|
+
if (platformType === 'desktop_mcp') {
|
|
95
|
+
recommendations.push({
|
|
96
|
+
integration: 'reminders',
|
|
97
|
+
available: true,
|
|
98
|
+
method: 'applescript',
|
|
99
|
+
description: 'AppleScript経由でApple Remindersに連携',
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
else if (platformType === 'ios_skills' || platformType === 'ipados_skills') {
|
|
103
|
+
recommendations.push({
|
|
104
|
+
integration: 'reminders',
|
|
105
|
+
available: true,
|
|
106
|
+
method: 'native',
|
|
107
|
+
description: 'ネイティブAPIでApple Remindersに直接連携',
|
|
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へは手動コピーで追加してください',
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
// Calendar integration
|
|
120
|
+
if (platformType === 'desktop_mcp') {
|
|
121
|
+
recommendations.push({
|
|
122
|
+
integration: 'calendar',
|
|
123
|
+
available: true,
|
|
124
|
+
method: 'applescript',
|
|
125
|
+
description: 'AppleScript経由でCalendar.appから予定を取得',
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
else if (platformType === 'ios_skills' || platformType === 'ipados_skills') {
|
|
129
|
+
recommendations.push({
|
|
130
|
+
integration: 'calendar',
|
|
131
|
+
available: true,
|
|
132
|
+
method: 'native',
|
|
133
|
+
description: 'ネイティブAPIでカレンダーイベントを取得',
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
recommendations.push({
|
|
138
|
+
integration: 'calendar',
|
|
139
|
+
available: false,
|
|
140
|
+
method: 'manual_copy',
|
|
141
|
+
fallback: 'manual_input',
|
|
142
|
+
description: 'カレンダー情報は手動で入力してください',
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
// Notion integration
|
|
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 {
|
|
165
|
+
recommendations.push({
|
|
166
|
+
integration: 'notion',
|
|
167
|
+
available: false,
|
|
168
|
+
method: 'manual_copy',
|
|
169
|
+
fallback: 'manual_copy',
|
|
170
|
+
description: 'Notionへは手動コピーで追加してください',
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
return recommendations;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Check if a specific capability is available
|
|
177
|
+
*/
|
|
178
|
+
isCapabilityAvailable(capability) {
|
|
179
|
+
return this.adapter.isCapabilityAvailable(capability);
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Ensure core is initialized before operations
|
|
183
|
+
*/
|
|
184
|
+
ensureInitialized() {
|
|
185
|
+
if (!this.initialized || !this.config) {
|
|
186
|
+
throw new Error('SageCore not initialized. Call initialize() first.');
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
//# sourceMappingURL=sage-core.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sage-core.js","sourceRoot":"","sources":["../../src/core/sage-core.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAapD;;;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;;OAEG;IACH,aAAa;QACX,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED;;OAEG;IACH,eAAe;QACb,OAAO,IAAI,CAAC,O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qB;QACrB,IAAI,QAAQ,CAAC,iBAAiB,EAAE,CAAC;YAC/B,IAAI,YAAY,KAAK,aAAa,EAAE,CAAC;gBACnC,eAAe,CAAC,IAAI,CAAC;oBACnB,WAAW,EAAE,QAAQ;oBACrB,SAAS,EAAE,IAAI;oBACf,MAAM,EAAE,KAAK;oBACb,WAAW,EAAE,uBAAuB;iBACrC,CAAC,CAAC;YACL,CAAC;iBAAM,IAAI,YAAY,KAAK,YAAY,IAAI,YAAY,KAAK,eAAe,EAAE,CAAC;gBAC7E,eAAe,CAAC,IAAI,CAAC;oBACnB,WAAW,EAAE,QAAQ;oBACrB,SAAS,EAAE,IAAI;oBACf,MAAM,EAAE,WAAW;oBACnB,WAAW,EAAE,oCAAoC;iBAClD,CAAC,CAAC;YACL,CAAC;QACH,CAAC;aAAM,CAAC;YACN,eAAe,CAAC,IAAI,CAAC;gBACnB,WAAW,EAAE,QAAQ;gBACrB,SAAS,EAAE,KAAK;gBAChB,MAAM,EAAE,aAAa;gBACrB,QAAQ,EAAE,aAAa;gBACvB,WAAW,EAAE,wBAAwB;aACtC,CAAC,CAAC;QACL,CAAC;QAED,OAAO,eAAe,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,qBAAqB,CAAC,UAAkB;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;IACxD,CAAC;IAED;;OAEG;IACK,iBAAiB;QACvB,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACtC,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;QACxE,CAAC;IACH,CAAC;CACF"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* sage - AI Task Management Assistant MCP Server
|
|
4
|
+
*
|
|
5
|
+
* An MCP server for Claude Desktop and Claude Code that provides
|
|
6
|
+
* task management, prioritization, and reminder integration.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;GAKG"}
|