learning_ai_common_plat/scripts
saravanakumardb1 8ffe361623 feat(mcp-client): TODO-3 \u2014 expose pluggable logger via McpLogger interface
Previously the @bytelyst/mcp-client package logged directly to the global
`console`, which made its output invisible to consumers running under
Fastify/pino or any structured logger. The scanner exempted the whole
package for console-log findings with a TODO-3 marker; this commit
resolves the marker.

packages/mcp-client/src/index.ts:
  + Added `McpLogger` interface (debug/info/warn/error, variadic) which
    is structurally compatible with the global console, pino, and
    Fastify's `request.log`.
  + Added optional `logger?: McpLogger` field on MCPConfig with a JSDoc
    explaining when consumers should supply their own.
  + MCPClient now stores a `private readonly log: McpLogger` field
    initialised from `config.logger ?? console` in the constructor.
  + All 17 internal logging sites switched from `console.X(...)` to
    `this.log.X(...)`. Mapping: console.log \u2192 this.log.info (pino
    does not have a 'log' method).

scripts/check-rule-violations.sh:
  - Removed the blanket /packages/mcp-client/ exemption from the
    console-log scanner (TODO-3 marker comment retained for history).
  - The ts-any-type exemption stays \u2014 mcp-client still uses `any` at
    the JSON-RPC payload boundary (different concern).

Verification:
  packages/mcp-client \u2192 `pnpm build` clean (tsc).
  `bash scripts/check-rule-violations.sh` \u2192 total still 88, no new
  console-log findings (mcp-client is now genuinely clean instead of
  blanket-exempted).
2026-05-23 19:09:32 -07:00
..
gitea chore(packages): publish @bytelyst/kill-switch-client@0.1.6 to Gitea registry 2026-05-23 12:32:49 -07:00
backup-main.sh ci: update CI/CD configuration 2026-03-10 11:32:25 -07:00
check-agent-docs-drift.sh feat(drift-check): forbid per-tool subdirectory AGENTS.md duplicates 2026-05-23 13:07:26 -07:00
check-npmrc-drift.sh feat(scripts): add .npmrc template + sync/drift-check scripts (DRY) 2026-04-14 11:48:55 -07:00
check-prototype-env.sh Add prototype deployment workflow 2026-03-14 05:01:09 +00:00
check-rule-violations.sh feat(mcp-client): TODO-3 \u2014 expose pluggable logger via McpLogger interface 2026-05-23 19:09:32 -07:00
check-token-drift.sh chore(ci): add local token drift check script 2026-03-28 01:01:06 -07:00
commit-workspace.sh ci: update CI/CD configuration 2026-03-29 10:50:53 -07:00
cosmos-telemetry-indexes.sh feat(telemetry): Phase 3 — cluster resolve/ignore, audit logging, webhook alerts, metrics endpoint, Cosmos indexes 2026-02-17 10:50:29 -08:00
create-encryption-keys.sh feat(field-encrypt): create @bytelyst/field-encrypt package with AES-256-GCM envelope encryption 2026-03-21 09:18:10 -07:00
deploy-admin-hotcopy.sh feat(admin-web): adopt trading web deployment model with docker-compose 2026-05-11 03:24:33 +00:00
docker-clean.sh chore(docker): add interactive cleanup menu 2026-05-05 18:28:55 -07:00
docker-prep.sh feat(platform-service): update Dockerfile for pnpm workspace support 2026-02-12 23:43:40 -08:00
encrypt-migrate.ts feat(devops): encryption migration CLI with embedded product configs 2026-03-21 13:19:55 -07:00
export-lysnr-kv.sh chore: add kv export audit 2026-02-15 00:43:29 -08:00
fix-npmrc-all-repos.sh fix: standardize common-plat .npmrc + publish script for corp network 2026-04-13 10:51:12 -07:00
godaddy-sync-bytelyst-dns.sh feat(dns): add ollama hostname support 2026-03-31 10:07:38 +00:00
lint-infra.sh chore(scripts): add lint-infra, typecheck-all, test-all cross-repo scripts 2026-03-26 23:15:16 -07:00
npmrc.template feat(scripts): add .npmrc template + sync/drift-check scripts (DRY) 2026-04-14 11:48:55 -07:00
package.json feat(devops): encryption migration CLI with embedded product configs 2026-03-21 13:19:55 -07:00
prep-consumer.sh fix(docker): preserve peer deps in packed packages 2026-03-23 18:24:57 -07:00
prototype-self-test.sh Add prototype storage diagnostics and smoke test 2026-03-14 06:06:35 +00:00
prototype-up.sh Add Cosmos emulator prototype support 2026-03-14 05:24:01 +00:00
secret-scan-repo.sh chore(security): add secret scanning + playbook 2026-02-14 00:24:41 -08:00
secret-scan-staged.sh chore(security): add secret scanning + playbook 2026-02-14 00:24:41 -08:00
seed-keyvault.sh feat: add AKV seed script and AZURE_KEYVAULT_URL to .env.example 2026-02-14 22:25:04 -08:00
seed-lysnr-kv.sh ci: add lysnr kv seeder 2026-02-15 00:31:31 -08:00
setup-husky.sh chore(husky): run hooks from repo root and avoid npx 2026-02-14 12:55:41 -08:00
switch-network.sh feat(scripts): make GITEA_NPM_HOST conditional on NETWORK 2026-03-24 15:45:59 -07:00
sync-npmrc.sh feat(scripts): add .npmrc template + sync/drift-check scripts (DRY) 2026-04-14 11:48:55 -07:00
sync-workflows.sh fix(workflows): normalize repo management coverage 2026-03-24 16:05:12 -07:00
test-all.sh chore(scripts): add lint-infra, typecheck-all, test-all cross-repo scripts 2026-03-26 23:15:16 -07:00
tsconfig.json fix(scripts): add tsconfig.json — fixes pnpm typecheck failure 2026-03-21 15:55:27 -07:00
typecheck-all.sh chore(scripts): add lint-infra, typecheck-all, test-all cross-repo scripts 2026-03-26 23:15:16 -07:00
update-agent-docs.sh fix(agent-docs): update AI.dev guides + script UX after single-source migration 2026-05-23 12:06:28 -07:00