sh-mcp/packages/reminders/src/index.ts
Adam Moussa 8d3de8a447 Phase 0b slice: monorepo scaffold + shared core + integration packages
The 0a-INDEPENDENT code slice (one-shot via af-0b-package-slice workflow: Haiku
scaffold + Sonnet packages, Sonnet fix-to-green). Nothing deploys; no CDK/servers.

- Monorepo scaffold: npm workspaces, strict TS (NodeNext), vitest (80% gate),
  eslint 9 flat config, prettier; ci.yaml/deploy.yaml callers (Node 24, enable-qemu).
- @sh-mcp/shared: transport-agnostic core — Scope/AuthContext/ToolDef, ToolRegistry,
  redact()+maskValue() (PII), OpenAPI 3.1 generator. AUTH STUBBED behind an AuthProvider
  interface (TODO auth-layer-0a); JWT/aud/client_id/JWKS/deny-list deferred per design.md §2.
- 9 integration packages (qbo, google-maps, internal-data, payments, knowledge-base,
  gmail, calendar, tasks, reminders): tools against shared, external deps mocked behind
  injected client interfaces; finance handlers call redact().

Verified green: tsc -b clean, vitest 245/245, eslint 0 errors. Auth mechanism intentionally
deferred until the 0a spike resolves it (G16/§0.4).
2026-06-11 14:36:28 -04:00

33 lines
1.4 KiB
TypeScript

/**
* @sh-mcp/reminders
*
* Exports the reminders tool array pre-wired with the production AwsSchedulerClient.
* Server bundles import this directly. Tests import buildReminderTools and inject
* a mock client instead.
*
* NOTE: The production AwsSchedulerClient constructor reads REMINDER_TARGET_ARN and
* SCHEDULER_ROLE_ARN from environment variables, which are injected by CDK at deploy
* time. Importing this module without those env vars set (e.g. in unit tests) is safe
* because the real client is never called — tests inject their own mock via
* buildReminderTools().
*/
export { buildReminderTools } from './tools.js';
export type { CreateReminderInput, CreateReminderOutput } from './tools.js';
export type { SchedulerClient, CreateScheduleInput, CreateScheduleOutput } from './client.js';
export { AwsSchedulerClient } from './client.js';
import { buildReminderTools } from './tools.js';
import { AwsSchedulerClient } from './client.js';
/**
* Default tool array — uses the production AwsSchedulerClient.
* The client's constructor does NOT call AWS; the call only happens in the handler.
* Import at server startup only after CDK env vars are available.
*/
export const tools = buildReminderTools({
client: new AwsSchedulerClient({
targetArn: process.env['REMINDER_TARGET_ARN'] ?? '',
roleArn: process.env['SCHEDULER_ROLE_ARN'] ?? '',
}),
});