@yawlabs/mcp 0.67.1 → 0.70.1

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/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All notable changes to `@yawlabs/mcp` (formerly `@yawlabs/mcph`) are documented here. This project uses [semantic versioning](https://semver.org) and a script-gated release flow: `./release.sh <version>` runs lint + tests + build, bumps, tags, publishes to npm, and creates the GitHub release.
4
4
 
5
+ ## 0.70.1 -- `yaw-mcp token` subcommand for trusted local apps
6
+
7
+ Adds a `token` subcommand that prints this machine's Yaw Team session token (the raw `yaw_team` cookie) on stdout, for a TRUSTED LOCAL app to present to a Yaw endpoint that verifies the same HMAC session -- e.g. Vew Meetings' `POST /api/meeting`. Makes NO network call: reads the session persisted by `login` and emits it only when still valid (exp-checked via `team-sync`'s `loadStoredState`), else exits 1 with nothing on stdout.
8
+
9
+ - **`team-sync`:** new `getSessionWithCookie()` reads + exp-validates the stored `{ cookie, session }` and returns it (or `null`); no network call.
10
+ - **Registered everywhere a subcommand must be:** `index.ts` dispatch + help, `KNOWN_SUBCOMMANDS`, and `SUBCOMMAND_SPEC` (the completion-coverage test enforces no drift). `--json` emits `{ ok, token, email, exp }`; plain prints the raw token (treat stdout as sensitive -- it's a bearer credential).
11
+ - **Completion spec dedup.** `SUBCOMMAND_SPEC` had a stale duplicate `token` entry from a prior WIP; removed so the spec stays one-entry-per-subcommand. Caught by `biome check` formatting the now-double entry, not by the coverage test -- the spec coverage test should arguably also assert uniqueness, file a follow-up.
12
+
5
13
  ## 0.63.2 -- release pipeline: publish npm from CI
6
14
 
7
15
  No changes to the package runtime or CLI -- this release exists to exercise the
@@ -407,6 +407,11 @@ function getCachedCookie(home = homedir2()) {
407
407
  const s = cachedState?.state ?? null;
408
408
  return s ? s.cookie : null;
409
409
  }
410
+ async function getSessionWithCookie(opts = {}) {
411
+ const filePath = opts.filePath ?? sessionStatePath(opts.home);
412
+ const state = await loadStoredState(filePath);
413
+ return state ? { cookie: state.cookie, session: state.session } : null;
414
+ }
410
415
  function _resetForTests() {
411
416
  invalidateState();
412
417
  }
@@ -432,5 +437,6 @@ export {
432
437
  postAnalyticsEvent,
433
438
  listAnalyticsEvents,
434
439
  getCachedCookie,
440
+ getSessionWithCookie,
435
441
  _resetForTests
436
442
  };