Skip to content

feat: public API — createObserver() factory + selective exports#8

Merged
AxaySharma merged 1 commit into
developfrom
feature/public-api
Jun 9, 2026
Merged

feat: public API — createObserver() factory + selective exports#8
AxaySharma merged 1 commit into
developfrom
feature/public-api

Conversation

@AxaySharma

Copy link
Copy Markdown
Contributor

What this adds

  • src/index.ts — public entry point for @wrkmark/observer
  • tests/index.test.ts — 10 integration tests
  • README.md — Quick Start + Individual Imports sections

Public API surface

createObserver() — fully wired observer in one call
createDatabase() — for custom wiring
SessionManager, VSCodeCollector, AuditLog,
SignalAnonymizer, SignalExtractor, WrkmarkObserverError
VERSION = '0.1.0'

Intentionally NOT exported

Internal DB row types, audit entry types, schema SQL —
implementation details that may change without semver bump.

Tests

69/69 root passing | 17/17 extension passing
Full lifecycle smoke test: session → signals → features → audit chain

src/index.ts — selective exports, public surface area only:
  Types: SignalType, RawSignal, AnonymizedSignal, ActiveSession,
         CompletedSession, FeatureVector, ObserverStatus,
         ObserverState, ICollector, WrkmarkObserverError
  Classes: AuditLog, SignalAnonymizer, SignalExtractor,
           SessionManager, VSCodeCollector
  Functions: createDatabase, createObserver
  Constants: VERSION = '0.1.0'

createObserver(dbPath): wires all dependencies in one call.
Internal types (AuditEntry, DB row types, schema SQL) not exported.

README: Quick Start + Individual Imports usage examples

Tests: 10 integration tests including full lifecycle smoke test
  (start session → record signals → end session → verify audit chain)

Root: 69/69 passing | Extension: 17/17 passing
@AxaySharma
AxaySharma merged commit d332aa3 into develop Jun 9, 2026
2 checks passed
@AxaySharma
AxaySharma deleted the feature/public-api branch June 9, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant