mcp-macos 3.0.0 → 4.0.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/dist/server/handlers.js +1 -20
- package/dist/server/handlers.js.map +1 -1
- package/dist/server/server.d.ts +1 -18
- package/dist/server/server.js +1 -33
- package/dist/server/server.js.map +1 -1
- package/dist/types/index.d.ts +1 -5
- package/package.json +2 -1
- package/dist/server/promptAbstractions.d.ts +0 -74
- package/dist/server/promptAbstractions.js +0 -150
- package/dist/server/promptAbstractions.js.map +0 -1
- package/dist/server/prompts.d.ts +0 -8
- package/dist/server/prompts.js +0 -480
- package/dist/server/prompts.js.map +0 -1
- package/dist/types/prompts.d.ts +0 -84
- package/dist/types/prompts.js +0 -6
- package/dist/types/prompts.js.map +0 -1
package/dist/server/handlers.js
CHANGED
|
@@ -2,15 +2,13 @@
|
|
|
2
2
|
* server/handlers.ts
|
|
3
3
|
* Request handlers for the MCP server
|
|
4
4
|
*/
|
|
5
|
-
import { CallToolRequestSchema,
|
|
5
|
+
import { CallToolRequestSchema, ListToolsRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
6
6
|
import { handleToolCall, TOOLS } from '../tools/index.js';
|
|
7
|
-
import { buildPromptResponse, getPromptDefinition, PROMPT_LIST, } from './prompts.js';
|
|
8
7
|
/**
|
|
9
8
|
* Registers all request handlers for the MCP server
|
|
10
9
|
* @param server - The MCP server instance
|
|
11
10
|
*/
|
|
12
11
|
export function registerHandlers(server) {
|
|
13
|
-
// Handler for listing available tools
|
|
14
12
|
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
15
13
|
process.stderr.write(`${JSON.stringify({
|
|
16
14
|
timestamp: new Date().toISOString(),
|
|
@@ -21,23 +19,6 @@ export function registerHandlers(server) {
|
|
|
21
19
|
})}\n`);
|
|
22
20
|
return { tools: TOOLS };
|
|
23
21
|
});
|
|
24
|
-
// Handler for calling a tool
|
|
25
22
|
server.setRequestHandler(CallToolRequestSchema, async (request) => handleToolCall(request.params.name, request.params.arguments ?? {}));
|
|
26
|
-
// Handler for listing available prompts
|
|
27
|
-
server.setRequestHandler(ListPromptsRequestSchema, async () => ({
|
|
28
|
-
prompts: PROMPT_LIST,
|
|
29
|
-
}));
|
|
30
|
-
// Handler for getting a specific prompt
|
|
31
|
-
server.setRequestHandler(GetPromptRequestSchema, async (request) => {
|
|
32
|
-
const { name, arguments: args } = request.params;
|
|
33
|
-
if (typeof name !== 'string') {
|
|
34
|
-
throw new Error('Prompt name must be a string.');
|
|
35
|
-
}
|
|
36
|
-
const promptDefinition = getPromptDefinition(name);
|
|
37
|
-
if (!promptDefinition) {
|
|
38
|
-
throw new Error(`Unknown prompt: ${name}`);
|
|
39
|
-
}
|
|
40
|
-
return buildPromptResponse(promptDefinition, args);
|
|
41
|
-
});
|
|
42
23
|
}
|
|
43
24
|
//# sourceMappingURL=handlers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlers.js","sourceRoot":"","sources":["../../src/server/handlers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACL,qBAAqB,EACrB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"handlers.js","sourceRoot":"","sources":["../../src/server/handlers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAO1D;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAc;IAC7C,MAAM,CAAC,iBAAiB,CAAC,sBAAsB,EAAE,KAAK,IAAI,EAAE;QAC1D,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,GAAG,IAAI,CAAC,SAAS,CAAC;YAChB,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACnC,KAAK,EAAE,MAAM;YACb,KAAK,EAAE,mBAAmB;YAC1B,SAAS,EAAE,KAAK,CAAC,MAAM;YACvB,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;SAChC,CAAC,IAAI,CACP,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,iBAAiB,CAAC,qBAAqB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,CAChE,cAAc,CACZ,OAAO,CAAC,MAAM,CAAC,IAAI,EAClB,OAAO,CAAC,MAAM,CAAC,SAGK,IAAI,EAAE,CAC5B,CACF,CAAC;AACJ,CAAC"}
|
package/dist/server/server.d.ts
CHANGED
|
@@ -1,28 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* server/server.ts
|
|
3
|
-
*
|
|
3
|
+
* MCP server factory
|
|
4
4
|
*/
|
|
5
5
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
6
|
-
import type { ServerConfig } from '../types/index.js';
|
|
7
|
-
/**
|
|
8
|
-
* Server configuration interface for createServer
|
|
9
|
-
* Accepts either basic ServerConfig or FullServerConfig (which extends it)
|
|
10
|
-
*/
|
|
11
6
|
interface CreateServerConfig {
|
|
12
7
|
name: string;
|
|
13
8
|
version: string;
|
|
14
9
|
}
|
|
15
|
-
/**
|
|
16
|
-
* Creates and configures an MCP server instance
|
|
17
|
-
* @param config - Server configuration (basic or full)
|
|
18
|
-
* @returns Configured server instance
|
|
19
|
-
*/
|
|
20
10
|
export declare function createServer(config: CreateServerConfig): Server;
|
|
21
|
-
/**
|
|
22
|
-
* Starts the MCP server with stdio transport
|
|
23
|
-
* @deprecated Use index.ts entry point with loadConfig() for multi-transport support
|
|
24
|
-
* @param config - Server configuration
|
|
25
|
-
* @returns A promise that resolves when the server starts
|
|
26
|
-
*/
|
|
27
|
-
export declare function startServer(config: ServerConfig): Promise<void>;
|
|
28
11
|
export {};
|
package/dist/server/server.js
CHANGED
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* server/server.ts
|
|
3
|
-
*
|
|
3
|
+
* MCP server factory
|
|
4
4
|
*/
|
|
5
5
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
6
|
-
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
7
6
|
import { registerHandlers } from './handlers.js';
|
|
8
7
|
// Gracefully exit on EPIPE (broken pipe) when the MCP client disconnects.
|
|
9
|
-
// Replaces the `exit-on-epipe` npm package with an inline equivalent.
|
|
10
8
|
process.stdout?.on?.('error', (err) => {
|
|
11
9
|
if (err.code === 'EPIPE')
|
|
12
10
|
process.exit(0);
|
|
13
11
|
});
|
|
14
|
-
/**
|
|
15
|
-
* Creates and configures an MCP server instance
|
|
16
|
-
* @param config - Server configuration (basic or full)
|
|
17
|
-
* @returns Configured server instance
|
|
18
|
-
*/
|
|
19
12
|
export function createServer(config) {
|
|
20
13
|
const server = new Server({
|
|
21
14
|
name: config.name,
|
|
@@ -24,34 +17,9 @@ export function createServer(config) {
|
|
|
24
17
|
capabilities: {
|
|
25
18
|
resources: {},
|
|
26
19
|
tools: {},
|
|
27
|
-
prompts: {},
|
|
28
20
|
},
|
|
29
21
|
});
|
|
30
|
-
// Register request handlers
|
|
31
22
|
registerHandlers(server);
|
|
32
23
|
return server;
|
|
33
24
|
}
|
|
34
|
-
/**
|
|
35
|
-
* Starts the MCP server with stdio transport
|
|
36
|
-
* @deprecated Use index.ts entry point with loadConfig() for multi-transport support
|
|
37
|
-
* @param config - Server configuration
|
|
38
|
-
* @returns A promise that resolves when the server starts
|
|
39
|
-
*/
|
|
40
|
-
export async function startServer(config) {
|
|
41
|
-
try {
|
|
42
|
-
const server = createServer(config);
|
|
43
|
-
const transport = new StdioServerTransport();
|
|
44
|
-
// Handle process signals for graceful shutdown
|
|
45
|
-
process.on('SIGINT', () => {
|
|
46
|
-
process.exit(0);
|
|
47
|
-
});
|
|
48
|
-
process.on('SIGTERM', () => {
|
|
49
|
-
process.exit(0);
|
|
50
|
-
});
|
|
51
|
-
await server.connect(transport);
|
|
52
|
-
}
|
|
53
|
-
catch {
|
|
54
|
-
process.exit(1);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
25
|
//# sourceMappingURL=server.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/server/server.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/server/server.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,0EAA0E;AAC1E,OAAO,CAAC,MAAM,EAAE,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,GAA0B,EAAE,EAAE;IAC3D,IAAI,GAAG,CAAC,IAAI,KAAK,OAAO;QAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC5C,CAAC,CAAC,CAAC;AAOH,MAAM,UAAU,YAAY,CAAC,MAA0B;IACrD,MAAM,MAAM,GAAG,IAAI,MAAM,CACvB;QACE,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,OAAO,EAAE,MAAM,CAAC,OAAO;KACxB,EACD;QACE,YAAY,EAAE;YACZ,SAAS,EAAE,EAAE;YACb,KAAK,EAAE,EAAE;SACV;KACF,CACF,CAAC;IAEF,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAEzB,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -258,8 +258,4 @@ export interface ContactsToolArgs extends BaseToolArgs {
|
|
|
258
258
|
limit?: number;
|
|
259
259
|
offset?: number;
|
|
260
260
|
}
|
|
261
|
-
|
|
262
|
-
* Prompt-related type exports for consumers that need to interact with the
|
|
263
|
-
* structured MCP prompt registry.
|
|
264
|
-
*/
|
|
265
|
-
export type { DailyTaskOrganizerArgs, PromptArgsByName, PromptArgumentDefinition, PromptMessage, PromptMessageContent, PromptMetadata, PromptName, PromptResponse, PromptTemplate, ReminderReviewAssistantArgs, SmartReminderCreatorArgs, WeeklyPlanningWorkflowArgs, } from './prompts.js';
|
|
261
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-macos",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "MCP server for Reminders, Calendar, Notes, Mail, Messages, and Contacts on macOS.",
|
|
5
5
|
"author": "Kyle Jensen",
|
|
6
6
|
"contributors": [
|
|
@@ -80,6 +80,7 @@
|
|
|
80
80
|
"tsx": "^4.21.0",
|
|
81
81
|
"babel-plugin-transform-import-meta": "^2.3.3",
|
|
82
82
|
"jest": "^30.2.0",
|
|
83
|
+
"jest-environment-node": "^30.2.0",
|
|
83
84
|
"semantic-release": "^25.0.3",
|
|
84
85
|
"ts-jest": "^29.4.6",
|
|
85
86
|
"typescript": "^5.9.3"
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Shared abstractions for prompt templates
|
|
3
|
-
* @module server/promptAbstractions
|
|
4
|
-
* @description Output formats and constraints shared across all prompt templates
|
|
5
|
-
* Provides consistent behavior for action execution based on confidence thresholds
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Standard confidence system constraints
|
|
9
|
-
* Decision priority: (1) If scope is ambiguous → confirm, (2) Then apply confidence thresholds
|
|
10
|
-
*/
|
|
11
|
-
export declare const CONFIDENCE_CONSTRAINTS: string[];
|
|
12
|
-
/**
|
|
13
|
-
* Standard note formatting constraints (compressed from 14 lines to 5 lines)
|
|
14
|
-
*/
|
|
15
|
-
export declare const NOTE_FORMATTING_CONSTRAINTS: string[];
|
|
16
|
-
/**
|
|
17
|
-
* Standard batching and idempotency constraints
|
|
18
|
-
*/
|
|
19
|
-
export declare const BATCHING_CONSTRAINTS: string[];
|
|
20
|
-
export declare const TASK_BATCHING_CONSTRAINTS: string[];
|
|
21
|
-
/**
|
|
22
|
-
* Standard calibration guidance for overwhelming workloads
|
|
23
|
-
*/
|
|
24
|
-
export declare const WORKLOAD_CALIBRATION: string[];
|
|
25
|
-
/**
|
|
26
|
-
* Standard calibration for missing context
|
|
27
|
-
*/
|
|
28
|
-
export declare const CONTEXT_CALIBRATION: string[];
|
|
29
|
-
/**
|
|
30
|
-
* Apple Reminders limitations reminder
|
|
31
|
-
*/
|
|
32
|
-
export declare const APPLE_REMINDERS_LIMITATIONS: string[];
|
|
33
|
-
/**
|
|
34
|
-
* Core constraints applied to all prompts
|
|
35
|
-
*/
|
|
36
|
-
export declare const CORE_CONSTRAINTS: string[];
|
|
37
|
-
/**
|
|
38
|
-
* Deep work time block execution details (trigger rules moved to TIME_BLOCK_CREATION_CONSTRAINTS)
|
|
39
|
-
*/
|
|
40
|
-
export declare const DEEP_WORK_CONSTRAINTS: string[];
|
|
41
|
-
/**
|
|
42
|
-
* Shallow tasks time block creation guidelines
|
|
43
|
-
* Encompasses all non-deep-work activities: quick wins, routine tasks, administrative work
|
|
44
|
-
*/
|
|
45
|
-
export declare const SHALLOW_TASKS_CONSTRAINTS: string[];
|
|
46
|
-
/**
|
|
47
|
-
* Daily capacity and workload balancing constraints
|
|
48
|
-
* Includes implicit 20% buffer time allocation
|
|
49
|
-
*/
|
|
50
|
-
export declare const DAILY_CAPACITY_CONSTRAINTS: string[];
|
|
51
|
-
/**
|
|
52
|
-
* Time format specification (single source of truth)
|
|
53
|
-
* Format includes explicit timezone offset to prevent ambiguity in containerized environments
|
|
54
|
-
*/
|
|
55
|
-
export declare const TIME_FORMAT_SPEC = "YYYY-MM-DD HH:mm:ss\u00B1HH:MM (with explicit timezone offset, e.g., \"2025-11-17 14:00:00-05:00\" for 2PM EST)";
|
|
56
|
-
/**
|
|
57
|
-
* Time block creation strict rules (includes trigger conditions from former DEEP_WORK_CONSTRAINTS)
|
|
58
|
-
*/
|
|
59
|
-
export declare const TIME_BLOCK_CREATION_CONSTRAINTS: string[];
|
|
60
|
-
/**
|
|
61
|
-
* Standard action queue output format
|
|
62
|
-
*/
|
|
63
|
-
export declare const getActionQueueFormat: (_currentDate: string) => string[];
|
|
64
|
-
/**
|
|
65
|
-
* Standard verification log format
|
|
66
|
-
*/
|
|
67
|
-
export declare const getVerificationLogFormat: (currentDate: string) => string;
|
|
68
|
-
/**
|
|
69
|
-
* Build standard output format sections
|
|
70
|
-
*/
|
|
71
|
-
export declare const buildStandardOutputFormat: (currentDate: string) => {
|
|
72
|
-
actionQueue: string[];
|
|
73
|
-
verificationLog: string;
|
|
74
|
-
};
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Shared abstractions for prompt templates
|
|
3
|
-
* @module server/promptAbstractions
|
|
4
|
-
* @description Output formats and constraints shared across all prompt templates
|
|
5
|
-
* Provides consistent behavior for action execution based on confidence thresholds
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Standard confidence system constraints
|
|
9
|
-
* Decision priority: (1) If scope is ambiguous → confirm, (2) Then apply confidence thresholds
|
|
10
|
-
*/
|
|
11
|
-
export const CONFIDENCE_CONSTRAINTS = [
|
|
12
|
-
'Assess confidence levels for each potential action (high >80%, medium 60-80%, low <60%).',
|
|
13
|
-
'Decision priority: First check if scope is ambiguous (if yes, request confirmation). Then apply confidence thresholds for clear-scope actions.',
|
|
14
|
-
'For high-confidence actions (>80%), immediately call the tool to execute. For medium-confidence actions, provide recommendations in tool call format. For low-confidence actions, ask for user confirmation.',
|
|
15
|
-
'Provide brief rationale for medium-confidence decisions before taking action.',
|
|
16
|
-
];
|
|
17
|
-
/**
|
|
18
|
-
* Standard note formatting constraints (compressed from 14 lines to 5 lines)
|
|
19
|
-
*/
|
|
20
|
-
export const NOTE_FORMATTING_CONSTRAINTS = [
|
|
21
|
-
'Existing reminders: ONLY edit notes when ALL conditions met: (a) adding essential info (duration/links), (b) confidence >80%, (c) essential for completion, (d) user has not objected.',
|
|
22
|
-
'New reminders: Freely add execution context as long as formatting rules below are followed.',
|
|
23
|
-
'Allowed keywords (one per line + plain text): See: [reference/URL], Note: [brief context], Duration: [time estimate].',
|
|
24
|
-
'Forbidden syntax: No markdown (no "- [ ]", "**bold**", "# headers", etc.). Apple Reminders does NOT render markdown.',
|
|
25
|
-
'Correct format: Use "-" for bullets, "\\n" for line breaks, plain text only.',
|
|
26
|
-
];
|
|
27
|
-
/**
|
|
28
|
-
* Standard batching and idempotency constraints
|
|
29
|
-
*/
|
|
30
|
-
export const BATCHING_CONSTRAINTS = [
|
|
31
|
-
'Run idempotency checks before creating anything: search for likely duplicates by normalized title (lowercase, trimmed, punctuation removed). Prefer updating an existing reminder over creating a duplicate.',
|
|
32
|
-
'Batch tool calls when executing multiple changes to reduce overhead and keep actions atomic by concern (e.g., all creates, then updates).',
|
|
33
|
-
];
|
|
34
|
-
export const TASK_BATCHING_CONSTRAINTS = [
|
|
35
|
-
'**Task batching strategy**: Group similar tasks together and complete in dedicated time blocks to minimize context switching.',
|
|
36
|
-
' - Examples: Batch all code reviews together, all emails together, all meetings together',
|
|
37
|
-
' - Naming pattern: "Code Review Batch — 3 PRs", "Email Processing — Inbox Zero", "Admin Batch — 5 tasks"',
|
|
38
|
-
' - Reduces context switching by 60-80% compared to handling tasks individually',
|
|
39
|
-
' - Schedule batches: Similar cognitive requirements, tools, or workflows = good batch candidates',
|
|
40
|
-
' - Avoid: Batching unrelated tasks that require different mental modes',
|
|
41
|
-
];
|
|
42
|
-
/**
|
|
43
|
-
* Standard calibration guidance for overwhelming workloads
|
|
44
|
-
*/
|
|
45
|
-
export const WORKLOAD_CALIBRATION = [
|
|
46
|
-
'When workload appears overwhelming, prioritize critical path tasks (using urgent due dates and important lists) and suggest deferring non-essential items.',
|
|
47
|
-
'If multiple similar tasks exist, recommend consolidation or batching strategies.',
|
|
48
|
-
];
|
|
49
|
-
/**
|
|
50
|
-
* Standard calibration for missing context
|
|
51
|
-
*/
|
|
52
|
-
export const CONTEXT_CALIBRATION = [
|
|
53
|
-
'When creating reminders for unknown tasks, use clear, descriptive titles and suggest appropriate list placement.',
|
|
54
|
-
];
|
|
55
|
-
/**
|
|
56
|
-
* Apple Reminders limitations reminder
|
|
57
|
-
*/
|
|
58
|
-
export const APPLE_REMINDERS_LIMITATIONS = [
|
|
59
|
-
'Remember: Apple Reminders does not support priority fields. Use due date urgency and list importance to convey task importance.',
|
|
60
|
-
];
|
|
61
|
-
/**
|
|
62
|
-
* Core constraints applied to all prompts
|
|
63
|
-
*/
|
|
64
|
-
export const CORE_CONSTRAINTS = [
|
|
65
|
-
...CONFIDENCE_CONSTRAINTS,
|
|
66
|
-
...NOTE_FORMATTING_CONSTRAINTS,
|
|
67
|
-
...BATCHING_CONSTRAINTS,
|
|
68
|
-
];
|
|
69
|
-
/**
|
|
70
|
-
* Deep work time block execution details (trigger rules moved to TIME_BLOCK_CREATION_CONSTRAINTS)
|
|
71
|
-
*/
|
|
72
|
-
export const DEEP_WORK_CONSTRAINTS = [
|
|
73
|
-
'**Deep work execution details** (apply when TIME_BLOCK_CREATION_CONSTRAINTS triggers are met):',
|
|
74
|
-
' - Time block length: Minimum 60 minutes, with 90-120 minutes recommended to sustain flow. Split anything beyond 120 minutes into multiple sessions.',
|
|
75
|
-
' - Flow state entry: Takes ~20 minutes to enter deep focus. Longer blocks (2 hours) maximize productive time in flow state.',
|
|
76
|
-
' - Scheduling: Peak energy hours (9am-12pm). Plan 2 blocks per day (e.g., two 2-hour sessions = 4 hours total).',
|
|
77
|
-
' - Break intervals: 15-30 minutes between blocks. Longer breaks (60+ minutes) after 4 hours of deep work.',
|
|
78
|
-
' - Clear objectives: Each block has specific goal in notes.',
|
|
79
|
-
' - Anchor to due times: Start time = due time - duration. If past, move forward.',
|
|
80
|
-
' - Naming pattern: "Deep Work — [Project Name]" (for tasks meeting deep work criteria).',
|
|
81
|
-
];
|
|
82
|
-
/**
|
|
83
|
-
* Shallow tasks time block creation guidelines
|
|
84
|
-
* Encompasses all non-deep-work activities: quick wins, routine tasks, administrative work
|
|
85
|
-
*/
|
|
86
|
-
export const SHALLOW_TASKS_CONSTRAINTS = [
|
|
87
|
-
'**Shallow tasks time block guidelines**:',
|
|
88
|
-
' - Time block length: 15-60 minutes for all non-deep-work activities including quick wins, routine tasks, and administrative work',
|
|
89
|
-
' - Task examples: Email processing, status updates, meeting preparation, quick code reviews, administrative paperwork, scheduling, light coordination, quick fixes',
|
|
90
|
-
' - Scheduling strategy: Fill gaps between deep work blocks, schedule during lower energy periods (typically 2-4pm), batch similar tasks together',
|
|
91
|
-
' - Batching encouraged: Group similar shallow tasks into single blocks when possible (e.g., "Email & Admin" combining multiple small tasks)',
|
|
92
|
-
' - Calendar naming pattern: "Shallow Task — [Task Description]" or batch as "Shallow Tasks — [Category]" (e.g., "Shallow Tasks — Admin & Email")',
|
|
93
|
-
' - Energy awareness: Schedule during post-lunch dip, end-of-day, or gaps between meetings when cognitive capacity is lower',
|
|
94
|
-
];
|
|
95
|
-
/**
|
|
96
|
-
* Daily capacity and workload balancing constraints
|
|
97
|
-
* Includes implicit 20% buffer time allocation
|
|
98
|
-
*/
|
|
99
|
-
export const DAILY_CAPACITY_CONSTRAINTS = [
|
|
100
|
-
'**Daily capacity limits and workload balancing**:',
|
|
101
|
-
' - Deep Work maximum: 4 hours per day (typically 2-3 blocks of 60-90 minutes). Research shows this is the sustainable maximum for focused cognitive work',
|
|
102
|
-
' - Implicit buffer allocation: When scheduling, automatically leave ~20% of working hours unscheduled (approximately 1.5-2 hours in 8-hour workday) as gaps between blocks and at day end',
|
|
103
|
-
' - Shallow Tasks fill remaining time after deep work allocation and implicit buffer time',
|
|
104
|
-
' - Total validation: Deep Work + Shallow Tasks + implicit buffer (~20%) should equal working hours (typically 8 hours)',
|
|
105
|
-
' - Energy alignment: Schedule deep work during peak energy (9am-12pm), shallow tasks during lower energy periods (2-4pm), with natural transition gaps',
|
|
106
|
-
' - Warn when overcommitted: If total scheduled work exceeds available hours or deep work exceeds 4 hours, flag the issue and suggest prioritization',
|
|
107
|
-
' - Buffer time handling: Do not create explicit "Buffer Time" calendar events. Instead, leave natural gaps (15-30 minutes) between major blocks for transitions, unexpected work, and flexibility',
|
|
108
|
-
];
|
|
109
|
-
/**
|
|
110
|
-
* Time format specification (single source of truth)
|
|
111
|
-
* Format includes explicit timezone offset to prevent ambiguity in containerized environments
|
|
112
|
-
*/
|
|
113
|
-
export const TIME_FORMAT_SPEC = 'YYYY-MM-DD HH:mm:ss±HH:MM (with explicit timezone offset, e.g., "2025-11-17 14:00:00-05:00" for 2PM EST)';
|
|
114
|
-
/**
|
|
115
|
-
* Time block creation strict rules (includes trigger conditions from former DEEP_WORK_CONSTRAINTS)
|
|
116
|
-
*/
|
|
117
|
-
export const TIME_BLOCK_CREATION_CONSTRAINTS = [
|
|
118
|
-
'**Time block creation triggers**: CREATE calendar_events time blocks when tasks meet ANY criteria:',
|
|
119
|
-
' - Task has duration estimate ≥60 minutes with due date today (applies DEEP_WORK_CONSTRAINTS for execution details)',
|
|
120
|
-
' - Task title suggests cognitively demanding work (开发, 设计, 分析, 规划, 重构, 架构) with duration ≥60min',
|
|
121
|
-
' - Multiple related tasks with explicit times due today, totaling ≥60 minutes, that can be batched',
|
|
122
|
-
' - Task notes mention "deep work", "focused time", "uninterrupted"',
|
|
123
|
-
' - Task explicitly marked as requiring focused/uninterrupted time',
|
|
124
|
-
' - Task benefits from calendar visibility to prevent double-booking',
|
|
125
|
-
` - Always use ${TIME_FORMAT_SPEC} format for startDate and endDate (e.g., "2025-11-04 14:00:00-05:00" for 2PM EST)`,
|
|
126
|
-
' - Anchor calendar events to reminder due timestamps by subtracting duration to determine startDate. If start would be in the past, move forward but preserve duration.',
|
|
127
|
-
' - When multiple tasks share a project, use single block with shared objective in notes.',
|
|
128
|
-
' - For confidence levels and execution: Follow standard CONFIDENCE_CONSTRAINTS (>80% execute, 60-80% recommend, <60% confirm). Apply DEEP_WORK_CONSTRAINTS for block sizing and scheduling.',
|
|
129
|
-
];
|
|
130
|
-
/**
|
|
131
|
-
* Standard action queue output format
|
|
132
|
-
*/
|
|
133
|
-
export const getActionQueueFormat = (_currentDate) => [
|
|
134
|
-
'### Action queue — prioritized list of actions organized by confidence level (high/medium/low) and impact. IMPORTANT: High-confidence actions (>80%) should be EXECUTED immediately using MCP tool calls, not just described. Each action should specify:',
|
|
135
|
-
' - HIGH CONFIDENCE (>80%): Execute using tool calls. MEDIUM CONFIDENCE (60-80%): Provide recommendations in tool call format. LOW CONFIDENCE (<60%): Text description only, ask for confirmation.',
|
|
136
|
-
' - Each action must include: confidence level, action type (create/update/recommendation), exact properties (title, list, dueDate, note, url if applicable), and brief rationale',
|
|
137
|
-
` - Use ${TIME_FORMAT_SPEC} format for dueDate (e.g., "2025-11-04 18:00:00-05:00").`,
|
|
138
|
-
];
|
|
139
|
-
/**
|
|
140
|
-
* Standard verification log format
|
|
141
|
-
*/
|
|
142
|
-
export const getVerificationLogFormat = (currentDate) => `### Verification log — bullet list confirming that each executed due date marked "today" uses ${currentDate} in the tool call output and persisted value (include reminder title + due date).`;
|
|
143
|
-
/**
|
|
144
|
-
* Build standard output format sections
|
|
145
|
-
*/
|
|
146
|
-
export const buildStandardOutputFormat = (currentDate) => ({
|
|
147
|
-
actionQueue: getActionQueueFormat(currentDate),
|
|
148
|
-
verificationLog: getVerificationLogFormat(currentDate),
|
|
149
|
-
});
|
|
150
|
-
//# sourceMappingURL=promptAbstractions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promptAbstractions.js","sourceRoot":"","sources":["../../src/server/promptAbstractions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;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GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,mDAAmD;IACnD,2JAA2J;IAC3J,4LAA4L;IAC5L,2FAA2F;IAC3F,yHAAyH;IACzH,yJAAyJ;IACzJ,sJAAsJ;IACtJ,oMAAoM;CACrM,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAC3B,0GAA0G,CAAC;AAE7G;;GAEG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,oGAAoG;IACpG,sHAAsH;IACtH,kGAAkG;IAClG,qGAAqG;IACrG,qEAAqE;IACrE,oEAAoE;IACpE,sEAAsE;IACtE,kBAAkB,gBAAgB,mFAAmF;IACrH,0KAA0K;IAC1K,2FAA2F;IAC3F,8LAA8L;CAC/L,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,YAAoB,EAAY,EAAE,CAAC;IACtE,2PAA2P;IAC3P,oMAAoM;IACpM,mLAAmL;IACnL,WAAW,gBAAgB,0DAA0D;CACtF,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,WAAmB,EAAU,EAAE,CACtE,iGAAiG,WAAW,mFAAmF,CAAC;AAElM;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACvC,WAAmB,EAInB,EAAE,CAAC,CAAC;IACJ,WAAW,EAAE,oBAAoB,CAAC,WAAW,CAAC;IAC9C,eAAe,EAAE,wBAAwB,CAAC,WAAW,CAAC;CACvD,CAAC,CAAC"}
|
package/dist/server/prompts.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* server/prompts.ts
|
|
3
|
-
* Central registry for MCP prompts and their runtime helpers
|
|
4
|
-
*/
|
|
5
|
-
import type { PromptMetadata, PromptName, PromptResponse, PromptTemplate } from '../types/prompts.js';
|
|
6
|
-
export declare const PROMPT_LIST: PromptMetadata[];
|
|
7
|
-
export declare const getPromptDefinition: (name: string) => PromptTemplate<PromptName> | undefined;
|
|
8
|
-
export declare const buildPromptResponse: <Name extends PromptName>(template: PromptTemplate<Name>, rawArgs: Record<string, unknown> | null | undefined) => PromptResponse;
|
package/dist/server/prompts.js
DELETED
|
@@ -1,480 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* server/prompts.ts
|
|
3
|
-
* Central registry for MCP prompts and their runtime helpers
|
|
4
|
-
*/
|
|
5
|
-
import { getFuzzyTimeSuggestions, getTimeContext, } from '../utils/timeHelpers.js';
|
|
6
|
-
import { APPLE_REMINDERS_LIMITATIONS, buildStandardOutputFormat, CONTEXT_CALIBRATION, CORE_CONSTRAINTS, DAILY_CAPACITY_CONSTRAINTS, DEEP_WORK_CONSTRAINTS, SHALLOW_TASKS_CONSTRAINTS, TASK_BATCHING_CONSTRAINTS, TIME_BLOCK_CREATION_CONSTRAINTS, TIME_FORMAT_SPEC, WORKLOAD_CALIBRATION, } from './promptAbstractions.js';
|
|
7
|
-
const createMessage = (text) => ({
|
|
8
|
-
role: 'user',
|
|
9
|
-
content: {
|
|
10
|
-
type: 'text',
|
|
11
|
-
text,
|
|
12
|
-
},
|
|
13
|
-
});
|
|
14
|
-
/**
|
|
15
|
-
* Creates a structured prompt template with consistent formatting
|
|
16
|
-
* @param {StructuredPromptConfig} config - Configuration for prompt structure
|
|
17
|
-
* @param {string} config.mission - The core mission statement
|
|
18
|
-
* @param {string[]} config.contextInputs - Context inputs for the prompt
|
|
19
|
-
* @param {string[]} config.process - Step-by-step process instructions
|
|
20
|
-
* @param {string[]} config.outputFormat - Expected output format guidelines
|
|
21
|
-
* @param {string[]} config.qualityBar - Quality criteria and standards
|
|
22
|
-
* @param {string[]} [config.constraints] - Optional constraints and limitations
|
|
23
|
-
* @param {string[]} [config.calibration] - Optional calibration guidelines
|
|
24
|
-
* @returns {string} Formatted prompt string with all sections
|
|
25
|
-
* @private
|
|
26
|
-
*/
|
|
27
|
-
const createStructuredPrompt = ({ mission, contextInputs, process, outputFormat, qualityBar, constraints = [], calibration = [], }) => {
|
|
28
|
-
const sections = [
|
|
29
|
-
'You are an Apple Reminders strategist and productivity coach.',
|
|
30
|
-
mission,
|
|
31
|
-
'Context inputs:',
|
|
32
|
-
...contextInputs.map((input) => `- ${input}`),
|
|
33
|
-
'Process:',
|
|
34
|
-
...process.map((step, index) => `${index + 1}. ${step}`),
|
|
35
|
-
];
|
|
36
|
-
if (constraints.length > 0) {
|
|
37
|
-
sections.push('Constraints:', ...constraints.map((line) => `- ${line}`));
|
|
38
|
-
}
|
|
39
|
-
sections.push('Output format:', ...outputFormat.map((line) => `- ${line}`));
|
|
40
|
-
sections.push('Quality bar:', ...qualityBar.map((line) => `- ${line}`));
|
|
41
|
-
if (calibration.length > 0) {
|
|
42
|
-
sections.push('Calibration:', ...calibration.map((line) => `- ${line}`));
|
|
43
|
-
}
|
|
44
|
-
return sections.join('\n');
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
* Type guard to check if a value is a non-empty string
|
|
48
|
-
* @param {unknown} value - Value to check
|
|
49
|
-
* @returns {boolean} True if value is a non-empty string
|
|
50
|
-
* @private
|
|
51
|
-
*/
|
|
52
|
-
const isNonEmptyString = (value) => typeof value === 'string' && value.trim().length > 0;
|
|
53
|
-
/**
|
|
54
|
-
* Parses optional string values, filtering out empty strings
|
|
55
|
-
* @param {unknown} value - Value to parse
|
|
56
|
-
* @returns {string | undefined} Trimmed string if non-empty, undefined otherwise
|
|
57
|
-
* @private
|
|
58
|
-
*/
|
|
59
|
-
const parseOptionalString = (value) => isNonEmptyString(value) ? value : undefined;
|
|
60
|
-
/**
|
|
61
|
-
* Build daily task organizer prompt for same-day task management
|
|
62
|
-
*
|
|
63
|
-
* Creates an intelligent daily task organization prompt that analyzes existing
|
|
64
|
-
* reminders, identifies gaps, and proactively creates or optimizes reminders
|
|
65
|
-
* with appropriate time-based properties.
|
|
66
|
-
*
|
|
67
|
-
* @param {DailyTaskOrganizerArgs} args - Organization arguments
|
|
68
|
-
* @param {string} [args.today_focus] - Optional focus area (e.g., "urgency-based", "gap filling")
|
|
69
|
-
* @returns {PromptResponse} Structured prompt response with executable action queue
|
|
70
|
-
*
|
|
71
|
-
* @example
|
|
72
|
-
* ```typescript
|
|
73
|
-
* // Comprehensive organization
|
|
74
|
-
* const prompt = buildDailyTaskOrganizerPrompt({});
|
|
75
|
-
*
|
|
76
|
-
* // Focused on urgent tasks
|
|
77
|
-
* const urgentPrompt = buildDailyTaskOrganizerPrompt({
|
|
78
|
-
* today_focus: 'urgency-based organization'
|
|
79
|
-
* });
|
|
80
|
-
* ```
|
|
81
|
-
*/
|
|
82
|
-
const buildDailyTaskOrganizerPrompt = (args) => {
|
|
83
|
-
const todayFocus = args.today_focus ?? '';
|
|
84
|
-
const timeContext = getTimeContext();
|
|
85
|
-
const fuzzyTimes = getFuzzyTimeSuggestions();
|
|
86
|
-
const standardOutput = buildStandardOutputFormat(timeContext.currentDate);
|
|
87
|
-
return {
|
|
88
|
-
description: 'Proactive daily task organization with intelligent reminder creation and optimization',
|
|
89
|
-
messages: [
|
|
90
|
-
createMessage(createStructuredPrompt({
|
|
91
|
-
mission: 'Mission: Transform daily tasks into organized, actionable reminders by analyzing urgency patterns, identifying gaps, and taking initiative to create or optimize reminders with appropriate properties.',
|
|
92
|
-
contextInputs: [
|
|
93
|
-
`Focus: ${todayFocus ||
|
|
94
|
-
'same-day organizing with urgency, gap filling, and reminder cleanup'}`,
|
|
95
|
-
`Time horizon: ${timeContext.currentDate} only — never plan beyond today without explicit approval.`,
|
|
96
|
-
"Action scope: existing reminders tied to today's calendar plus missing preparatory or follow-up steps.",
|
|
97
|
-
`Current time context: ${timeContext.timeDescription} (${timeContext.currentDate}), fuzzy window later today (${fuzzyTimes.laterToday}).`,
|
|
98
|
-
],
|
|
99
|
-
process: [
|
|
100
|
-
'Audit all reminders, keep only items due today, and list every other reminder under Out-of-scope notes without editing them.',
|
|
101
|
-
'Classify in-scope tasks: Deep Work blocks follow the shared guidelines (minimum 60 minutes, aim for 90-120) while Shallow tasks stay 15-60 minutes with automatic ~20% buffer; split anything longer than 120 minutes into multiple blocks or reminders.',
|
|
102
|
-
'Create calendar blocks for in-scope tasks lasting ≥60 minutes (title format "Deep Work — [Project]") and align them to today’s due windows.',
|
|
103
|
-
'Create missing gap reminders or optimize existing ones only when the due date stays today and duplicates are avoided.',
|
|
104
|
-
`Generate due date strings using ${TIME_FORMAT_SPEC} format (e.g., "${timeContext.currentDate} 14:00:00-05:00" for 2PM EST). Push overdue times into the next viable slot.`,
|
|
105
|
-
'Batch actions by type while applying the confidence-gating policy from the core constraints.',
|
|
106
|
-
],
|
|
107
|
-
constraints: [
|
|
108
|
-
// Daily-task-organizer specific constraints
|
|
109
|
-
'Take initiative based on urgency signals but stay within today unless the user explicitly approves deferring.',
|
|
110
|
-
`Operate under a strict today-only policy: mention non-today reminders in "Out-of-scope items" and leave them untouched.`,
|
|
111
|
-
'Ask before creating any reminder or calendar block that would land after today.',
|
|
112
|
-
`Use ${TIME_FORMAT_SPEC} format for every due date (e.g., "${timeContext.currentDate} 14:00:00-05:00").`,
|
|
113
|
-
'Do not modify recurrence rules, attachments, or sub-tasks unless explicitly requested.',
|
|
114
|
-
'Assume standard working hours (9am-6pm) and reasonable task durations unless context suggests otherwise.',
|
|
115
|
-
'Do not place concept-only analysis or planning notes inside the action queue; keep them under Current state, Gaps found, Questions, or Out-of-scope.',
|
|
116
|
-
'Action queue is exclusively for executable reminder or calendar changes with tool-ready arguments, confidence labels, and rationale.',
|
|
117
|
-
// Shared constraint patterns
|
|
118
|
-
...CORE_CONSTRAINTS,
|
|
119
|
-
...TASK_BATCHING_CONSTRAINTS,
|
|
120
|
-
...TIME_BLOCK_CREATION_CONSTRAINTS,
|
|
121
|
-
...DEEP_WORK_CONSTRAINTS,
|
|
122
|
-
...SHALLOW_TASKS_CONSTRAINTS,
|
|
123
|
-
...DAILY_CAPACITY_CONSTRAINTS,
|
|
124
|
-
],
|
|
125
|
-
outputFormat: [
|
|
126
|
-
'### Current state — metrics for today: total reminders in scope, overdue items, urgent items, and key blockers.',
|
|
127
|
-
'### Gaps found — preparatory steps, follow-ups, or related reminders that must exist today.',
|
|
128
|
-
'### Out-of-scope items — reminders noted but not due today (reference only).',
|
|
129
|
-
...standardOutput.actionQueue,
|
|
130
|
-
'### Questions — concise list of missing context needed before executing low-confidence actions.',
|
|
131
|
-
standardOutput.verificationLog,
|
|
132
|
-
'### Deep work blocks — list of created or proposed ≥60-minute focus sessions (title, list, duration, objective).',
|
|
133
|
-
'### Shallow tasks — grouped routine work (15-60 minutes) with proposed sequencing and batching cues.',
|
|
134
|
-
],
|
|
135
|
-
qualityBar: [
|
|
136
|
-
'Current state highlights today-only metrics and the reasoning behind the plan.',
|
|
137
|
-
'Actions respect the confidence-gating policy and each entry states its confidence and rationale.',
|
|
138
|
-
'Calendar tool is used for every ≥60-minute task confirmed for today (no placeholders).',
|
|
139
|
-
'Deep work blocks follow the shared deep-work guidelines (≥60 minutes, ideal 90-120, max 4 hours total) and shallow tasks stay 15-60 minutes with batching hints.',
|
|
140
|
-
`All due dates labeled "today" use ${TIME_FORMAT_SPEC} format (e.g., "${timeContext.currentDate} 14:00:00-05:00").`,
|
|
141
|
-
'Out-of-scope section quickly explains what was skipped and why.',
|
|
142
|
-
],
|
|
143
|
-
calibration: [
|
|
144
|
-
...WORKLOAD_CALIBRATION,
|
|
145
|
-
...CONTEXT_CALIBRATION,
|
|
146
|
-
...APPLE_REMINDERS_LIMITATIONS,
|
|
147
|
-
],
|
|
148
|
-
})),
|
|
149
|
-
],
|
|
150
|
-
};
|
|
151
|
-
};
|
|
152
|
-
/**
|
|
153
|
-
* Build smart reminder creator prompt for single reminder creation
|
|
154
|
-
*
|
|
155
|
-
* Creates a focused prompt for crafting a single Apple Reminder with optimal
|
|
156
|
-
* scheduling, context, and metadata based on a task idea.
|
|
157
|
-
*
|
|
158
|
-
* @param args - Reminder creation arguments
|
|
159
|
-
* @param args.task_idea - Optional task description to convert into reminder
|
|
160
|
-
* @returns Structured prompt response for creating a single reminder
|
|
161
|
-
*
|
|
162
|
-
* @example
|
|
163
|
-
* ```typescript
|
|
164
|
-
* // Create reminder from task idea
|
|
165
|
-
* const prompt = buildSmartReminderCreatorPrompt({
|
|
166
|
-
* task_idea: 'Submit quarterly report by Friday'
|
|
167
|
-
* });
|
|
168
|
-
* ```
|
|
169
|
-
*/
|
|
170
|
-
const buildSmartReminderCreatorPrompt = (args) => {
|
|
171
|
-
const taskIdea = args.task_idea ?? '';
|
|
172
|
-
const timeContext = getTimeContext();
|
|
173
|
-
const standardOutput = buildStandardOutputFormat(timeContext.currentDate);
|
|
174
|
-
return {
|
|
175
|
-
description: 'Intelligent reminder creation with optimal scheduling and context',
|
|
176
|
-
messages: [
|
|
177
|
-
createMessage(createStructuredPrompt({
|
|
178
|
-
mission: `Mission: Craft a single Apple Reminder for "${taskIdea || "today's key task"}" that names the primary execution scope, avoids duplicates, and sets the user up to follow through.`,
|
|
179
|
-
contextInputs: [
|
|
180
|
-
`Task idea: ${taskIdea || 'none provided — propose a sensible framing and ask for confirmation'}`,
|
|
181
|
-
'Existing reminder landscape to cross-check for duplicates or related work.',
|
|
182
|
-
`Current time context: ${timeContext.timeDescription} (${timeContext.currentDate})`,
|
|
183
|
-
],
|
|
184
|
-
process: [
|
|
185
|
-
'Identify the primary execution scope, reference any overlapping reminders, and only request intent confirmation when the scope remains ambiguous after applying the confidence policy.',
|
|
186
|
-
'Probe for missing critical context (location, collaborators, blockers, effort) so the reminder captures everything needed to start.',
|
|
187
|
-
"Shape the reminder title, list placement, and fuzzy timing so it fits the user's schedule and urgency signals.",
|
|
188
|
-
'Define supporting metadata—notes, subtasks, attachments—that clarify success criteria without inflating scope.',
|
|
189
|
-
'Run idempotency checks: search for likely duplicates by normalized title before creating.',
|
|
190
|
-
'Apply the global confidence-gating policy before executing, recommending, or asking for confirmation.',
|
|
191
|
-
'Outline optional follow-up nudges only if the user has opted in, keeping them tied to the same objective.',
|
|
192
|
-
],
|
|
193
|
-
constraints: [
|
|
194
|
-
'Use fuzzy time expressions for scheduling (for example, "later today" or "end of week") and clarify only when precision is mandatory.',
|
|
195
|
-
'Ask for missing critical details only when they prevent you from reaching ≥60% confidence; otherwise document assumptions inline.',
|
|
196
|
-
'Only rely on capabilities shipped with Apple Reminders without assuming third-party integrations.',
|
|
197
|
-
'Limit the workflow to the specific reminder the user has asked about—do not create additional tasks unless they explicitly request them.',
|
|
198
|
-
'Present follow-up or escalation reminders as opt-in suggestions and only when they serve the primary execution scope.',
|
|
199
|
-
'Explicitly surface the primary execution focus before detailing the reminder structure.',
|
|
200
|
-
...CORE_CONSTRAINTS,
|
|
201
|
-
],
|
|
202
|
-
outputFormat: [
|
|
203
|
-
'### Primary focus — one sentence naming the reminder objective and scope.',
|
|
204
|
-
...standardOutput.actionQueue,
|
|
205
|
-
'### Support details — bullet list covering notes, subtasks, and relevant metadata.',
|
|
206
|
-
'### Follow-up sequence — ordered list of optional next nudges (omit if the user declined additional reminders).',
|
|
207
|
-
standardOutput.verificationLog,
|
|
208
|
-
'### Risks — short bullet list of potential failure points, assumptions, and mitigation ideas.',
|
|
209
|
-
],
|
|
210
|
-
qualityBar: [
|
|
211
|
-
'Reminder timing aligns with importance and respects existing commitments.',
|
|
212
|
-
'All dependencies are either satisfied or have explicit opt-in follow-up reminders.',
|
|
213
|
-
'Output highlights any assumptions the user must confirm before saving the reminder.',
|
|
214
|
-
'Each suggestion is actionable, tied to a specific reminder list, and anchored in the declared scope.',
|
|
215
|
-
'Actions comply with the confidence-gating policy (execute >80%, recommend 60-80, confirm below 60) and include brief rationale.',
|
|
216
|
-
'Recommendations remain lightweight and sustainable to execute.',
|
|
217
|
-
'Response honors the no-extra-reminders rule, keeps optional items clearly labelled, and reiterates the main execution scope.',
|
|
218
|
-
'No duplicate reminders are created; similar items are merged or updated.',
|
|
219
|
-
],
|
|
220
|
-
calibration: [
|
|
221
|
-
'If context is insufficient to schedule confidently, respond with targeted clarification questions before delivering the final structure.',
|
|
222
|
-
'When the user has not opted into extra reminders, replace the follow-up section with a short note encouraging a future check-in instead of proposing new tasks.',
|
|
223
|
-
],
|
|
224
|
-
})),
|
|
225
|
-
],
|
|
226
|
-
};
|
|
227
|
-
};
|
|
228
|
-
/**
|
|
229
|
-
* Build reminder review assistant prompt for cleanup and optimization
|
|
230
|
-
*
|
|
231
|
-
* Creates a prompt that audits current reminders and delivers actionable
|
|
232
|
-
* clean-up, scheduling, and habit recommendations to boost completion rates.
|
|
233
|
-
*
|
|
234
|
-
* @param args - Review arguments
|
|
235
|
-
* @param args.review_focus - Optional focus area (e.g., "overdue", list name)
|
|
236
|
-
* @returns Structured prompt response with cleanup recommendations
|
|
237
|
-
*
|
|
238
|
-
* @example
|
|
239
|
-
* ```typescript
|
|
240
|
-
* // Review all reminders
|
|
241
|
-
* const prompt = buildReminderReviewAssistantPrompt({});
|
|
242
|
-
*
|
|
243
|
-
* // Focus on overdue items
|
|
244
|
-
* const overduePrompt = buildReminderReviewAssistantPrompt({
|
|
245
|
-
* review_focus: 'overdue reminders'
|
|
246
|
-
* });
|
|
247
|
-
* ```
|
|
248
|
-
*/
|
|
249
|
-
const buildReminderReviewAssistantPrompt = (args) => {
|
|
250
|
-
const reviewFocus = args.review_focus ?? '';
|
|
251
|
-
const timeContext = getTimeContext();
|
|
252
|
-
const standardOutput = buildStandardOutputFormat(timeContext.currentDate);
|
|
253
|
-
return {
|
|
254
|
-
description: 'Analyze and optimize existing reminders for better productivity',
|
|
255
|
-
messages: [
|
|
256
|
-
createMessage(createStructuredPrompt({
|
|
257
|
-
mission: 'Mission: Audit current reminders and deliver actionable clean-up, scheduling, and habit recommendations that boost completion rates.',
|
|
258
|
-
contextInputs: [
|
|
259
|
-
`Review focus: ${reviewFocus || 'none provided — default to all lists and common hotspots'}`,
|
|
260
|
-
`Current time context: ${timeContext.timeDescription} (${timeContext.currentDate})`,
|
|
261
|
-
],
|
|
262
|
-
process: [
|
|
263
|
-
'Inventory reminders by status, list, and due window to surface hotspots.',
|
|
264
|
-
'Diagnose root causes behind overdue or low-value reminders.',
|
|
265
|
-
'Prioritize clean-up actions: archive, consolidate, retitle, or re-sequence reminders.',
|
|
266
|
-
'Apply the confidence-gating policy before executing cleanup actions, providing recommendations, or asking for confirmation.',
|
|
267
|
-
'Optimise scheduling with fuzzy time adjustments and batching opportunities.',
|
|
268
|
-
'Recommend routines and automation that maintain a healthy reminder system.',
|
|
269
|
-
],
|
|
270
|
-
constraints: [
|
|
271
|
-
'Reference fuzzy time adjustments when suggesting new schedules or follow-ups.',
|
|
272
|
-
'If critical context (volume, recurring tasks, shared lists) is missing, request it before final guidance.',
|
|
273
|
-
'Keep recommendations grounded in Apple Reminders native functionality and settings.',
|
|
274
|
-
'Do not invent brand-new reminders or tasks—limit guidance to curating and refining the existing set unless the user explicitly opts in.',
|
|
275
|
-
'Call out the primary review scope or list focus before diving into detailed recommendations.',
|
|
276
|
-
...CORE_CONSTRAINTS,
|
|
277
|
-
],
|
|
278
|
-
outputFormat: [
|
|
279
|
-
'### Focus alignment — short paragraph identifying the primary review scope and headline issues.',
|
|
280
|
-
'### Current state — brief overview with key metrics: total reminders reviewed, overdue items, stale reminders, main issues identified.',
|
|
281
|
-
'### Findings — bullet list of key insights about the current reminder landscape.',
|
|
282
|
-
...standardOutput.actionQueue,
|
|
283
|
-
standardOutput.verificationLog,
|
|
284
|
-
],
|
|
285
|
-
qualityBar: [
|
|
286
|
-
'Every suggested action ties back to a specific reminder list or identifiable pattern.',
|
|
287
|
-
'Action queue entries follow the confidence-gating policy (execute >80%, recommend 60-80, confirm below 60) and note the rationale.',
|
|
288
|
-
'Proposed routines are lightweight enough to sustain weekly without tool fatigue.',
|
|
289
|
-
'Risks or dependencies (shared ownership, mandatory notifications) are surfaced with mitigation ideas.',
|
|
290
|
-
'Response adheres to the no-new-reminders rule and makes the main review scope unmistakable.',
|
|
291
|
-
'No duplicate reminders are created; similar items are merged or updated.',
|
|
292
|
-
],
|
|
293
|
-
calibration: [
|
|
294
|
-
'If the inventory reveals more work than can be actioned immediately, flag phased recommendations with prioritized batches.',
|
|
295
|
-
],
|
|
296
|
-
})),
|
|
297
|
-
],
|
|
298
|
-
};
|
|
299
|
-
};
|
|
300
|
-
/**
|
|
301
|
-
* Build weekly planning workflow prompt for scheduling reminders
|
|
302
|
-
*
|
|
303
|
-
* Creates a prompt for building a resilient weekly execution playbook by
|
|
304
|
-
* assigning appropriate due dates to existing reminders, aligned with user
|
|
305
|
-
* planning ideas and current priorities.
|
|
306
|
-
*
|
|
307
|
-
* @param args - Weekly planning arguments
|
|
308
|
-
* @param args.user_ideas - Optional planning thoughts for the week
|
|
309
|
-
* @returns Structured prompt response with weekly scheduling plan
|
|
310
|
-
*
|
|
311
|
-
* @example
|
|
312
|
-
* ```typescript
|
|
313
|
-
* // Plan week with user ideas
|
|
314
|
-
* const prompt = buildWeeklyPlanningWorkflowPrompt({
|
|
315
|
-
* user_ideas: 'Focus on project launch and client presentations'
|
|
316
|
-
* });
|
|
317
|
-
*
|
|
318
|
-
* // Auto-plan based on existing reminders
|
|
319
|
-
* const autoPrompt = buildWeeklyPlanningWorkflowPrompt({});
|
|
320
|
-
* ```
|
|
321
|
-
*/
|
|
322
|
-
const buildWeeklyPlanningWorkflowPrompt = (args) => {
|
|
323
|
-
const userIdeas = args.user_ideas ?? '';
|
|
324
|
-
const timeContext = getTimeContext();
|
|
325
|
-
const standardOutput = buildStandardOutputFormat(timeContext.currentDate);
|
|
326
|
-
return {
|
|
327
|
-
description: 'Assign due dates to existing reminders based on weekly planning ideas',
|
|
328
|
-
messages: [
|
|
329
|
-
createMessage(createStructuredPrompt({
|
|
330
|
-
mission: 'Mission: Build a resilient weekly execution playbook by assigning appropriate due dates to existing reminders this week, aligned with user planning ideas and current priorities.',
|
|
331
|
-
contextInputs: [
|
|
332
|
-
`User planning ideas for this week: ${userIdeas || 'none provided - analyze existing reminders and suggest reasonable distribution'}`,
|
|
333
|
-
'Time horizon: current calendar week — keep scheduling inside this range and surface overflow separately.',
|
|
334
|
-
'Existing reminders without due dates that need scheduling.',
|
|
335
|
-
'Existing reminders with due dates this week (anchor events).',
|
|
336
|
-
'Overdue reminders that may need rescheduling.',
|
|
337
|
-
'Calendar events or fixed commitments that create time constraints.',
|
|
338
|
-
`Current time context: ${timeContext.timeDescription} - ${timeContext.dayOfWeek}, ${timeContext.currentDate}`,
|
|
339
|
-
],
|
|
340
|
-
process: [
|
|
341
|
-
'Analyze user ideas to identify key priorities, themes, and desired outcomes for the week.',
|
|
342
|
-
'Audit all existing reminders: categorize by list, urgency signals (due dates, list assignments), dependencies, and current due date status.',
|
|
343
|
-
'Map fixed anchor events (existing due dates, calendar commitments) to create immovable time blocks.',
|
|
344
|
-
'Match reminders to user priorities: assign fuzzy due dates to reminders that align with user ideas.',
|
|
345
|
-
'Distribute remaining reminders across the week using intelligent scheduling: balance workload, avoid overloaded days, group similar tasks.',
|
|
346
|
-
'Apply the confidence-gating policy before executing scheduling updates, recommending changes, or asking for confirmation.',
|
|
347
|
-
'Identify scheduling conflicts, overloaded days, or reminders that need clarification before assigning dates.',
|
|
348
|
-
'Recommend review checkpoints and adjustments for maintaining the plan throughout the week.',
|
|
349
|
-
],
|
|
350
|
-
constraints: [
|
|
351
|
-
'DO NOT create any new reminders—only assign or update due dates for existing reminders.',
|
|
352
|
-
'If user ideas suggest new work that cannot map to existing reminders, acknowledge it but do not create reminders.',
|
|
353
|
-
'Use fuzzy time expressions (for example, "Monday morning", "mid-week", "Friday afternoon") when suggesting due dates.',
|
|
354
|
-
'Respect existing due dates unless there is a clear conflict or the user ideas suggest reprioritization.',
|
|
355
|
-
'Ensure suggested due dates are realistic and account for workload balance across days.',
|
|
356
|
-
'Prioritize reminders that clearly align with user planning ideas when making scheduling decisions.',
|
|
357
|
-
'Keep all recommendations achievable within Apple Reminders native functionality.',
|
|
358
|
-
'If critical context (workload capacity, hard deadlines, shared lists) is missing, request it before final guidance.',
|
|
359
|
-
'State the primary weekly focus or themes up front so the user sees where the plan is anchored.',
|
|
360
|
-
'Keep scheduling decisions inside the current week and flag anything that must move beyond it for separate follow-up.',
|
|
361
|
-
'Do not assign due dates beyond this week unless the user explicitly directs it.',
|
|
362
|
-
...CORE_CONSTRAINTS,
|
|
363
|
-
],
|
|
364
|
-
outputFormat: [
|
|
365
|
-
'### Weekly focus — brief summary of primary themes and priorities for the week based on user ideas.',
|
|
366
|
-
'### Current state — overview with metrics: total reminders to schedule, already scheduled, overdue items.',
|
|
367
|
-
...standardOutput.actionQueue,
|
|
368
|
-
'### Immediate next steps — what to do today and tomorrow to get the week started effectively.',
|
|
369
|
-
'### Workload insights — key observations about task distribution, conflicts, or dependencies that need attention.',
|
|
370
|
-
standardOutput.verificationLog,
|
|
371
|
-
],
|
|
372
|
-
qualityBar: [
|
|
373
|
-
'Weekly focus clearly identifies primary themes and priorities based on user input.',
|
|
374
|
-
'Current state provides clear metrics about the scheduling landscape.',
|
|
375
|
-
'Action queue entries follow the confidence-gating policy (execute >80%, recommend 60-80, confirm below 60) and include rationale.',
|
|
376
|
-
'Each action includes specific reminder titles, lists, and fuzzy due dates.',
|
|
377
|
-
'Immediate next steps give clear guidance for today and tomorrow actions.',
|
|
378
|
-
'Workload insights highlight important patterns, conflicts, or dependencies without being overwhelming.',
|
|
379
|
-
'Plan maintains realistic workload distribution across the week.',
|
|
380
|
-
'Response focuses on execution rather than extensive analysis.',
|
|
381
|
-
'No duplicate reminders are created; similar items are merged or updated.',
|
|
382
|
-
],
|
|
383
|
-
calibration: [
|
|
384
|
-
'If user ideas cannot be mapped to existing reminders, summarize these as "future planning notes" without creating reminders.',
|
|
385
|
-
'When workload appears excessive, propose explicit prioritization: which reminders are essential this week vs. can be deferred.',
|
|
386
|
-
'If user provides no ideas, infer priorities from reminder patterns (urgency signals, list organization, dependencies) and ask for confirmation only when confidence stays below 60%.',
|
|
387
|
-
],
|
|
388
|
-
})),
|
|
389
|
-
],
|
|
390
|
-
};
|
|
391
|
-
};
|
|
392
|
-
const PROMPTS = {
|
|
393
|
-
'daily-task-organizer': {
|
|
394
|
-
metadata: {
|
|
395
|
-
name: 'daily-task-organizer',
|
|
396
|
-
description: 'Proactive daily task organization with intelligent reminder creation and optimization',
|
|
397
|
-
arguments: [
|
|
398
|
-
{
|
|
399
|
-
name: 'today_focus',
|
|
400
|
-
description: 'Organization focus area (e.g., urgency-based organization, gap filling, reminder setup, or comprehensive organization)',
|
|
401
|
-
required: false,
|
|
402
|
-
},
|
|
403
|
-
],
|
|
404
|
-
},
|
|
405
|
-
parseArgs(rawArgs) {
|
|
406
|
-
const args = (rawArgs ?? {});
|
|
407
|
-
return {
|
|
408
|
-
today_focus: parseOptionalString(args.today_focus),
|
|
409
|
-
};
|
|
410
|
-
},
|
|
411
|
-
buildPrompt: buildDailyTaskOrganizerPrompt,
|
|
412
|
-
},
|
|
413
|
-
'smart-reminder-creator': {
|
|
414
|
-
metadata: {
|
|
415
|
-
name: 'smart-reminder-creator',
|
|
416
|
-
description: 'Intelligently create reminders with optimal scheduling and context',
|
|
417
|
-
arguments: [
|
|
418
|
-
{
|
|
419
|
-
name: 'task_idea',
|
|
420
|
-
description: 'A short description of what you want to do',
|
|
421
|
-
required: false,
|
|
422
|
-
},
|
|
423
|
-
],
|
|
424
|
-
},
|
|
425
|
-
parseArgs(rawArgs) {
|
|
426
|
-
const args = (rawArgs ?? {});
|
|
427
|
-
return {
|
|
428
|
-
task_idea: parseOptionalString(args.task_idea),
|
|
429
|
-
};
|
|
430
|
-
},
|
|
431
|
-
buildPrompt: buildSmartReminderCreatorPrompt,
|
|
432
|
-
},
|
|
433
|
-
'reminder-review-assistant': {
|
|
434
|
-
metadata: {
|
|
435
|
-
name: 'reminder-review-assistant',
|
|
436
|
-
description: 'Analyze and review existing reminders for productivity optimization',
|
|
437
|
-
arguments: [
|
|
438
|
-
{
|
|
439
|
-
name: 'review_focus',
|
|
440
|
-
description: 'A short note on what to review (e.g., overdue, a list name)',
|
|
441
|
-
required: false,
|
|
442
|
-
},
|
|
443
|
-
],
|
|
444
|
-
},
|
|
445
|
-
parseArgs(rawArgs) {
|
|
446
|
-
const args = (rawArgs ?? {});
|
|
447
|
-
return {
|
|
448
|
-
review_focus: parseOptionalString(args.review_focus),
|
|
449
|
-
};
|
|
450
|
-
},
|
|
451
|
-
buildPrompt: buildReminderReviewAssistantPrompt,
|
|
452
|
-
},
|
|
453
|
-
'weekly-planning-workflow': {
|
|
454
|
-
metadata: {
|
|
455
|
-
name: 'weekly-planning-workflow',
|
|
456
|
-
description: 'Assign due dates to existing reminders based on your weekly planning ideas',
|
|
457
|
-
arguments: [
|
|
458
|
-
{
|
|
459
|
-
name: 'user_ideas',
|
|
460
|
-
description: 'Your thoughts and ideas for what you want to accomplish this week',
|
|
461
|
-
required: false,
|
|
462
|
-
},
|
|
463
|
-
],
|
|
464
|
-
},
|
|
465
|
-
parseArgs(rawArgs) {
|
|
466
|
-
const args = (rawArgs ?? {});
|
|
467
|
-
return {
|
|
468
|
-
user_ideas: parseOptionalString(args.user_ideas),
|
|
469
|
-
};
|
|
470
|
-
},
|
|
471
|
-
buildPrompt: buildWeeklyPlanningWorkflowPrompt,
|
|
472
|
-
},
|
|
473
|
-
};
|
|
474
|
-
export const PROMPT_LIST = Object.values(PROMPTS).map((prompt) => prompt.metadata);
|
|
475
|
-
export const getPromptDefinition = (name) => PROMPTS[name];
|
|
476
|
-
export const buildPromptResponse = (template, rawArgs) => {
|
|
477
|
-
const parsedArgs = template.parseArgs(rawArgs);
|
|
478
|
-
return template.buildPrompt(parsedArgs);
|
|
479
|
-
};
|
|
480
|
-
//# sourceMappingURL=prompts.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../src/server/prompts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAYH,OAAO,EACL,uBAAuB,EACvB,cAAc,GACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,2BAA2B,EAC3B,yBAAyB,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AE,0BAA0B;YAChC,WAAW,EACT,4EAA4E;YAC9E,SAAS,EAAE;gBACT;oBACE,IAAI,EAAE,YAAY;oBAClB,WAAW,EACT,mEAAmE;oBACrE,QAAQ,EAAE,KAAK;iBAChB;aACF;SACF;QACD,SAAS,CAAC,OAAmD;YAC3D,MAAM,IAAI,GAAG,CAAC,OAAO,IAAI,EAAE,CAAwC,CAAC;YACpE,OAAO;gBACL,UAAU,EAAE,mBAAmB,CAAC,IAAI,CAAC,UAAU,CAAC;aACjD,CAAC;QACJ,CAAC;QACD,WAAW,EAAE,iCAAiC;KAC/C;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAqB,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CACrE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAC5B,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,IAAY,EAC4B,EAAE,CACzC,OAAsD,CAAC,IAAI,CAAC,CAAC;AAEhE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,QAA8B,EAC9B,OAAmD,EACnC,EAAE;IAClB,MAAM,UAAU,GAAG,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAC/C,OAAO,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;AAC1C,CAAC,CAAC"}
|
package/dist/types/prompts.d.ts
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* types/prompts.ts
|
|
3
|
-
* Type definitions for MCP prompt templates and arguments
|
|
4
|
-
*/
|
|
5
|
-
export type PromptName = 'daily-task-organizer' | 'smart-reminder-creator' | 'reminder-review-assistant' | 'weekly-planning-workflow';
|
|
6
|
-
/**
|
|
7
|
-
* Describes an individual prompt argument exposed to MCP clients.
|
|
8
|
-
*/
|
|
9
|
-
export interface PromptArgumentDefinition {
|
|
10
|
-
name: string;
|
|
11
|
-
description: string;
|
|
12
|
-
required: boolean;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Prompt metadata that is surfaced through the `ListPrompts` endpoint.
|
|
16
|
-
*/
|
|
17
|
-
export interface PromptMetadata<Name extends PromptName = PromptName> {
|
|
18
|
-
name: Name;
|
|
19
|
-
description: string;
|
|
20
|
-
arguments: PromptArgumentDefinition[];
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Content definition for a single prompt message.
|
|
24
|
-
*/
|
|
25
|
-
export interface PromptMessageContent {
|
|
26
|
-
type: 'text';
|
|
27
|
-
text: string;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* User-facing prompt message structure used when constructing prompt templates.
|
|
31
|
-
*/
|
|
32
|
-
export interface PromptMessage {
|
|
33
|
-
role: 'user';
|
|
34
|
-
content: PromptMessageContent;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Response payload returned from `GetPrompt` requests.
|
|
38
|
-
*/
|
|
39
|
-
export interface PromptResponse {
|
|
40
|
-
description: string;
|
|
41
|
-
messages: PromptMessage[];
|
|
42
|
-
[key: string]: unknown;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Arguments accepted by the `daily-task-organizer` prompt.
|
|
46
|
-
*/
|
|
47
|
-
export interface DailyTaskOrganizerArgs {
|
|
48
|
-
today_focus?: string;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Arguments accepted by the `smart-reminder-creator` prompt.
|
|
52
|
-
*/
|
|
53
|
-
export interface SmartReminderCreatorArgs {
|
|
54
|
-
task_idea?: string;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Arguments accepted by the `reminder-review-assistant` prompt.
|
|
58
|
-
*/
|
|
59
|
-
export interface ReminderReviewAssistantArgs {
|
|
60
|
-
review_focus?: string;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Arguments accepted by the `weekly-planning-workflow` prompt.
|
|
64
|
-
*/
|
|
65
|
-
export interface WeeklyPlanningWorkflowArgs {
|
|
66
|
-
user_ideas?: string;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Mapped helper type that links prompt names with their argument signatures.
|
|
70
|
-
*/
|
|
71
|
-
export interface PromptArgsByName {
|
|
72
|
-
'daily-task-organizer': DailyTaskOrganizerArgs;
|
|
73
|
-
'smart-reminder-creator': SmartReminderCreatorArgs;
|
|
74
|
-
'reminder-review-assistant': ReminderReviewAssistantArgs;
|
|
75
|
-
'weekly-planning-workflow': WeeklyPlanningWorkflowArgs;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Describes an individual prompt template with parsing and builder helpers.
|
|
79
|
-
*/
|
|
80
|
-
export interface PromptTemplate<Name extends PromptName> {
|
|
81
|
-
metadata: PromptMetadata<Name>;
|
|
82
|
-
parseArgs(rawArgs: Record<string, unknown> | null | undefined): PromptArgsByName[Name];
|
|
83
|
-
buildPrompt(args: PromptArgsByName[Name]): PromptResponse;
|
|
84
|
-
}
|
package/dist/types/prompts.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../src/types/prompts.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|