Dedupe SDK option contracts and type folder helpers
Summary
- Reuse the type-registry default-folder primitive from store path resolution so custom item folders are single-sourced.
- Deduplicate shared SDK tool option contract slices while preserving the generated contract snapshot.
- Replace unnecessary
anycallback payload typings in Sentry helper tests. - Record pm evidence on
pm-92if, including file/test links, temp smoke, changelog/package doctor, GitHub security sweep, Sentry/telemetry, and the public-scope deferral note forpm-rj3wignored production telemetry files.
Verification
pnpm buildnode scripts/run-tests.mjs test -- tests/unit/core/store/store-paths.spec.ts tests/unit/core/sentry/sentry-helpers.spec.ts tests/unit/commands/contracts-command.spec.ts tests/unit/sdk/sdk-index.spec.ts(4 files / 197 tests)node scripts/run-tests.mjs coverage(256 files / 5138 tests / 100% statements, branches, functions, lines)pnpm typecheckpnpm lintpnpm quality:staticpnpm contracts:checkpnpm security:scanpnpm audit --audit-level moderategit diff --checkpm test pm-92if --run --progress(14/14 sandbox-compatible linked commands)- Manual temp smoke at
/tmp/tmp.TlcR1qJCP0/work/.agents/pm: init, research preset, customresearch-notetype, Task/custom item create+list, health, validate, andresearch-notes/storage verification. pnpm changelog:pm:checkwithpm-changelog2026.6.27:CHANGELOG.mdunchanged,item_count=1363.pm health --check-only --summary --json: ok, warning_count 0.pm validate --check-resolution --check-history-drift --json: history drift ok; existing resolution metadata backlog remainsvalidate_resolution_missing_fields:258.node dist/cli.js package doctor --project --detail deep --json: ok, zero warnings.node scripts/release/sentry-telemetry-gate.mjs --json --telemetry-mode best-effort: Sentry critical=0 high=0; telemetry finish_error_rate_pct=0.76, failures_without_error_code_rows=0.
GitHub / Security Sweep
- No open PRs before this branch.
- No open Dependabot, code scanning, or secret scanning alerts.
pnpm audit --audit-level moderate: no known vulnerabilities.- Open issue #374 remains externally blocked on missing
RELEASE_PATin the release environment.
Notes
node scripts/run-tests.mjs coverage and pnpm contracts:check are intentionally documented as direct repo gates rather than linked pm tests. The linked-test schema sandbox changes runtime context for those repo-wide checks; the direct current-tree commands pass and are recorded on pm-92if.
Summary by Sourcery
Deduplicate shared SDK tool option flag contracts and align store path type folder resolution with the type registry, while tightening Sentry helper test typings and updating pm tracking artifacts.
Enhancements:
- Introduce shared option contract sets for SDK list, aggregate, dedupe audit, and search tools to centralize common item filter flags.
- Reuse the type registry default folder helper in store path resolution so custom item type folders are derived from a single source.
- Refine Sentry helper test callback typings by replacing broad any-based payload types with a dedicated structured payload alias.
Tests:
- Update pm agent epic, issue, history, and managed-extensions artifacts to record verification and telemetry evidence for pm-92if and pm-rj3w.
Summary by cubic
Single-sourced default folders for custom item types through the type registry and deduped SDK tool option contracts with clear, named groups. Exported arrays now clone shared entries only at export boundaries to prevent cross-array mutation; the contract snapshot is unchanged and Sentry test hooks use @sentry/node Event/Breadcrumb types.
- Refactors
- Store paths use
toDefaultFolderfor custom item directories. - Replaced slice-based composition with named base/window/relation groups;
TOOL_*_OPTION_CONTRACTSkeep flag order. - Shared groups are readonly and cloned at export boundaries to avoid leakage and double cloning; added side-effect-free isolation tests.
- Removed an unused private filter group from the SDK contract helpers.
- Added docstrings for the cloning helper and test lookup; Sentry helper tests use
@sentry/nodeEvent/Breadcrumb types.
- Store paths use