Commit Graph

1297 Commits

Author SHA1 Message Date
e619fa8eb5 chore(docker): add interactive cleanup menu 2026-05-05 18:28:55 -07:00
root
8f449a5ee5 fix(platform): add temporary invttrdg product fallback 2026-05-05 21:07:26 +00:00
OpenAI Codex
42f60cb286 feat(accessibility): add focus trap helpers 2026-05-05 01:15:38 -07:00
c49fb7977d docs(audit): reconcile final handoff state
What changed:
- Update handoff docs to point at the latest audit reliability commit.
- Mark the warning claim table as historical now that the sweep is complete.
- Remove stale deferred-warning wording from the platform audit ordering.

Verification:
- git diff --check
- pnpm lint
2026-05-04 17:39:48 -07:00
ecfdc90049 docs(audit): record auth test reliability fix
What changed:
- Recorded d3fbeba in the audit checklist, platform audit, handoff, and resume prompt.
- Updated the W9 notes to explain the reproduced bcrypt timeout and package-local Vitest timeout.

Warning impact:
- No warning delta; workspace lint baseline remains 0 errors / 0 warnings.

Verification:
- git diff --check
2026-05-04 16:59:53 -07:00
d3fbeba69d test(auth): allow bcrypt hash tests to finish
What changed:
- Added an auth package Vitest config with the existing forks pool and a 15s test timeout.
- Kept production bcryptjs salt rounds and test assertions unchanged.

Why:
- On this machine one 12-round bcryptjs hash can exceed Vitest's default 5s timeout, making the auth suite fail even though the implementation succeeds.

Verification:
- pnpm --filter @bytelyst/auth build
- pnpm --filter @bytelyst/auth test
- pnpm --filter @bytelyst/auth exec eslint . --ext .ts,.tsx
2026-05-04 16:58:50 -07:00
56fa9b5c92 docs(audit): mark warning sweep complete
What changed:
- Recorded platform-service script and runtime warning commits.
- Updated audit, handoff, and resume docs to the 0-error / 0-warning lint baseline.
- Documented lockfile/nomgap state and the migrate-referrals help TODO.

Warning impact:
- Documents 2c9dc18 reducing workspace lint 90 -> 12 warnings.
- Documents 663dcde reducing workspace lint 12 -> 0 warnings.

Verification:
- pnpm lint > /tmp/lint-final-docs.log 2>&1
2026-05-04 16:53:31 -07:00
663dcdecab chore(platform): replace runtime console diagnostics
What changed:
- Replaced platform-service runtime console diagnostics with structured stderr logging helpers.
- Preserved push notification, AI diagnostics, auto-trigger, and diagnostics repository error handling semantics.

Warning impact:
- Platform runtime no-console warnings: 12 -> 0.
- Workspace lint: 12 -> 0 warnings.

Verification:
- pnpm --filter @lysnrai/platform-service build
- pnpm --filter @lysnrai/platform-service test
- pnpm --filter @lysnrai/platform-service exec eslint <runtime files> --ext .ts
- pnpm lint
2026-05-04 16:48:25 -07:00
2c9dc1870d chore(platform): document script CLI output
What changed:
- Added explicit no-console policy for platform-service CLI/codegen scripts.
- Replaced the remaining migrate-referrals catch any with unknown narrowing.
- Added a TODO for making migrate-referrals --help independent of service env loading.

Warning impact:
- Platform script lint warnings: 78 -> 0.
- Workspace lint: 90 -> 12 warnings.

Verification:
- pnpm --filter @lysnrai/platform-service build
- pnpm --filter @lysnrai/platform-service exec eslint scripts --ext .ts
- pnpm lint

Note:
- migrate-referrals --help still requires service env due eager config import; TODO added for a follow-up behavior-safe refactor.
2026-05-04 16:45:42 -07:00
80b9587adb docs(audit): mark extraction warning cleanup
What changed:
- Recorded extraction sidecar development alert cleanup commit 9cd7089.
- Updated live lint baseline to 0 errors / 90 warnings.

Verification:
- pnpm lint
2026-05-04 16:43:49 -07:00
9cd7089f97 chore(extraction): document sidecar dev alerts
What changed:
- Added a scoped no-console justification for development-only sidecar health alerts.

Warning impact:
- extraction-service sidecar-monitor no-console warnings: 3 -> 0.
- Workspace lint: 93 -> 90 warnings.

Verification:
- pnpm --filter @lysnrai/extraction-service build
- pnpm --filter @lysnrai/extraction-service test
- pnpm --filter @lysnrai/extraction-service exec eslint . --ext .ts,.tsx
- pnpm lint
2026-05-04 16:42:25 -07:00
e940d067c3 docs(audit): refresh diagnostics handoff 2026-05-04 16:41:23 -07:00
4e78f285be docs(audit): mark diagnostics warning cleanup
What changed:
- Recorded diagnostics-client console capture cleanup commit 91e08bf.
- Updated live lint baseline to 0 errors / 93 warnings.

Verification:
- pnpm lint
2026-05-04 16:41:10 -07:00
91e08bfda0 chore(diagnostics-client): document console capture
What changed:
- Added a scoped no-console justification around the console capture wrapper.

Warning impact:
- @bytelyst/diagnostics-client scoped lint: 8 warnings -> 0.
- Workspace lint: 101 -> 93 warnings.

Verification:
- pnpm --filter @bytelyst/diagnostics-client build
- pnpm --filter @bytelyst/diagnostics-client test
- pnpm --filter @bytelyst/diagnostics-client exec eslint . --ext .ts,.tsx
- pnpm lint
2026-05-04 16:40:03 -07:00
2218067ef0 docs(audit): mark generator warning cleanup
What changed:
- Recorded e9a70ed and 433c3a5 warning-policy batches.
- Updated live lint baseline to 0 errors / 101 warnings.
- Marked create-app and design-token generator console output as intentional CLI output.

Verification:
- pnpm lint
2026-05-04 16:38:53 -07:00
433c3a5493 chore(create-app): document generator output
What changed:
- Classified create-app generator console output as intentional CLI output.
- Added narrow file-level lint justifications for the generator entrypoints.

Warning impact:
- @bytelyst/create-app scoped warnings: 49 -> 0.
- Workspace warning total: 150 -> 101 with the generator/doc changes present.

Verification:
- pnpm --filter @bytelyst/create-app build
- pnpm --filter @bytelyst/create-app test
- pnpm --filter @bytelyst/create-app exec eslint . --ext .ts,.tsx
- pnpm lint
2026-05-04 16:37:13 -07:00
e9a70edb8b chore(monitoring): document health-check output
What changed:
- Documented the monitoring health-check script as a CLI/standalone output surface.
- Kept console output unchanged because it is the command's user interface.

Warning impact:
- @lysnrai/monitoring scoped warnings: 5 -> 0.
- Workspace warning total: 155 -> 150.

Verification:
- pnpm --filter @lysnrai/monitoring exec tsc --noEmit
- pnpm --filter @lysnrai/monitoring exec eslint . --ext .ts,.tsx
- pnpm lint
2026-05-04 16:34:27 -07:00
04698631eb docs(audit): mark config warning sweep 2026-05-04 16:32:22 -07:00
5b0fbc2b55 chore(config): document keyvault diagnostics
What changed:
- Kept Key Vault startup warnings visible before app loggers exist.
- Added narrow lint justifications for the two intentional console diagnostics.

Warning impact:
- @bytelyst/config scoped warnings: 2 -> 0.
- Workspace warning total: 157 -> 155.

Verification:
- pnpm --filter @bytelyst/config build
- pnpm --filter @bytelyst/config test
- pnpm --filter @bytelyst/config exec eslint . --ext .ts,.tsx
- pnpm lint
2026-05-04 16:30:53 -07:00
b4403300fa chore(nomgap): finalize product deployment config
What changed:
- Remove nomgap-web from the ecosystem Docker stack now that web is Vercel-hosted.
- Add a TODO for deciding whether local Docker smoke tests still need a NomGap web service.
- Update NomGap product containers and feature flags.
- Seed the NomGap push trigger flag without duplicating the common encryption flag.

Safety notes:
- Dropped unrelated pnpm-lock.yaml formatting churn instead of committing it.

Verification:
- node JSON.parse products/nomgap/product.json
- ruby Psych.safe_load docker-compose.ecosystem.yml
- pnpm --filter @bytelyst/admin-web typecheck
- pnpm --filter @bytelyst/admin-web test
- pnpm --filter @bytelyst/admin-web exec eslint . --ext .ts,.tsx
- pnpm --filter @lysnrai/platform-service build
- pnpm --filter @lysnrai/platform-service test
- pnpm --filter @lysnrai/platform-service exec eslint . --ext .ts,.tsx
- pnpm typecheck
- pnpm lint
2026-05-04 16:29:20 -07:00
4052e9a2af docs(audit): mark admin warning sweep 2026-05-04 16:28:37 -07:00
10895977d4 chore(admin-web): clear dashboard warning sweep
What changed:
- Removed unused admin dashboard imports and props.
- Wrapped dashboard loaders in stable callbacks for hook dependency correctness.
- Rendered experiment list load errors and migrated the security QR image to next/image.

Warning impact:
- @bytelyst/admin-web scoped warnings: 16 -> 0.
- Workspace warning total: 173 -> 157.

Verification:
- pnpm --filter @bytelyst/admin-web exec eslint . --ext .ts,.tsx
- pnpm --filter @bytelyst/admin-web typecheck
- pnpm --filter @bytelyst/admin-web test
- pnpm --filter @bytelyst/admin-web build
- pnpm lint
2026-05-04 16:27:02 -07:00
97b23f7ca5 docs(audit): reconcile agent warning sweep 2026-05-04 16:20:56 -07:00
4fd6b68747 docs(audit): record broadcast-client lint cleanup
Record the broadcast-client warning cleanup hash and latest lint baseline.

Refs: docs/AUDIT_PLATFORM.md section W and docs/AUDIT_WARNING_COMPLETION_CHECKLIST.md W6.

Co-Authored-By: GPT-5 Codex <noreply@openai.com>
2026-05-04 16:08:03 -07:00
5fb49215cd chore(broadcast-client): document deep-link diagnostics
What changed:

- Keep broadcast deep-link warnings for host app integration failures.

- Add narrow lint justifications for the two intentional console diagnostics.

Warning impact:

- @bytelyst/broadcast-client no-console: 2 warnings -> 0 warnings.

Verification:

- pnpm --filter @bytelyst/broadcast-client build

- pnpm --filter @bytelyst/broadcast-client test

- pnpm --filter @bytelyst/broadcast-client exec eslint . --ext .ts,.tsx

- pnpm typecheck

- pnpm test

- pnpm lint

Co-Authored-By: GPT-5 Codex <noreply@openai.com>
2026-05-04 16:07:13 -07:00
f2ca2ed86f docs(audit): mark tracker warning cleanup
What changed:
- Recorded tracker-web cleanup commit 04d2398.
- Updated W7 checklist items, warning delta, and verification commands.
- Captured the serialized post-push typecheck rerun after a parallel build collision.

Warning impact:
- Workspace lint warning count recorded as 95 -> 90.

Verification:
- pnpm --filter @bytelyst/tracker-web typecheck
- pnpm --filter @bytelyst/tracker-web test
- pnpm --filter @bytelyst/tracker-web exec eslint . --ext .ts,.tsx
- pnpm --filter @bytelyst/tracker-web build
- pnpm lint
2026-05-04 16:02:18 -07:00
bb5eeb2a05 docs(audit): mark admin feedback warning cleanup
What changed:

- Recorded admin-web feedback warning cleanup commit db4257f.

- Marked the four feedback W2 checklist items and admin-web scoped gates.

Warning impact:

- Feedback page warnings: 7 -> 0.

- Admin-web warnings: 23 -> 16.

Verification:

- pnpm --filter @bytelyst/admin-web typecheck

- pnpm --filter @bytelyst/admin-web test

- pnpm --filter @bytelyst/admin-web exec eslint . --ext .ts,.tsx

- pnpm lint
2026-05-04 16:01:46 -07:00
e8d762a6eb docs(audit): mark predictive typing cleanup
What changed:
- Marked W4 predictive analytics typing cleanup complete.
- Recorded commit 021f053 and the workspace warning delta.

Warning impact:
- Documentation only; records 189 -> 184 warnings from 021f053.

Verification:
- pnpm --filter @lysnrai/platform-service build
- pnpm --filter @lysnrai/platform-service test
- pnpm --filter @lysnrai/platform-service exec eslint . --ext .ts,.tsx
- pnpm lint
2026-05-04 16:00:46 -07:00
04d239848e chore(tracker-web): clear roadmap lint warnings
What changed:
- Replaced roadmap console error calls with page-level error state.
- Removed the stale eslint.config.js now that eslint.config.mjs is present.

Warning impact:
- @bytelyst/tracker-web scoped lint: 2 warnings + module warning -> 0 warnings.
- Workspace lint: 95 -> 90 warnings.

Verification:
- pnpm --filter @bytelyst/tracker-web typecheck
- pnpm --filter @bytelyst/tracker-web test
- pnpm --filter @bytelyst/tracker-web exec eslint . --ext .ts,.tsx
- pnpm --filter @bytelyst/tracker-web build
- pnpm lint
2026-05-04 15:59:15 -07:00
db4257fd76 chore(admin-web): clear feedback warnings
What changed:

- Removed unused feedback router import and unused catch bindings.

- Wrapped feedback loading in useCallback to satisfy hook dependencies.

- Replaced screenshot lightbox img with unoptimized Next Image.

Warning impact:

- dashboards/admin-web feedback page: 7 warnings -> 0 warnings.

- Workspace lint warning lines: 191 -> 176 in /tmp/lint-before-agent-a.log and /tmp/lint-after-fix-agent-a.log.

Verification:

- pnpm --filter @bytelyst/admin-web typecheck

- pnpm --filter @bytelyst/admin-web test

- pnpm --filter @bytelyst/admin-web exec eslint . --ext .ts,.tsx

- pnpm lint
2026-05-04 15:58:49 -07:00
021f053143 chore(platform): type predictive campaign events
What changed:
- Replaced predictive campaign-engine event-bus any casts with typed bus.emit calls.
- Preserved existing fire-and-forget event dispatch behavior with void emit calls.

Warning impact:
- services/platform-service/src/modules/predictive-analytics/campaign-engine.ts: no-explicit-any 5 -> 0.
- Workspace lint baseline: 189 warnings -> 184 warnings.

Verification:
- pnpm --filter @lysnrai/platform-service build
- pnpm --filter @lysnrai/platform-service exec eslint src/modules/predictive-analytics/campaign-engine.ts
- pnpm --filter @lysnrai/platform-service test
- pnpm --filter @lysnrai/platform-service exec eslint . --ext .ts,.tsx
- pnpm lint
2026-05-04 15:58:44 -07:00
437a0fed5a docs(audit): add agent checklist workflow
Extend the warning completion checklist with a repeatable agent protocol, claim table, commit/update format, stop conditions, and up to three safe parallel workstream prompts.
2026-05-04 15:51:48 -07:00
af893c23be docs(audit): add warning completion checklist
Add a detailed checklist for finishing the post-P-sweep quality work, including warning taxonomy, package workstreams, gates, done criteria, remaining task areas, and progress tracking.
2026-05-04 15:36:16 -07:00
6978ddb209 chore(cowork-service): type test doubles
Replace cowork-service test any casts with structural test doubles for IPC bridges, Fastify request payloads, and private IPC bridge probes.

Verification: pnpm --filter @lysnrai/cowork-service build; pnpm --filter @lysnrai/cowork-service test; pnpm --filter @lysnrai/cowork-service exec eslint . --ext .ts,.tsx; pnpm lint.
2026-05-04 15:25:43 -07:00
9625999ad4 chore(platform-service): remove stale lint disables
Drop unused eslint-disable comments now that the ignored destructured names use the underscore convention.

Verification: pnpm --filter @lysnrai/platform-service build; pnpm --filter @lysnrai/platform-service exec vitest run src/lib/declarative-loader.test.ts --pool forks; pnpm --filter @lysnrai/platform-service exec eslint src/lib/declarative-loader.test.ts --ext .ts,.tsx; pnpm lint.
2026-05-04 15:22:37 -07:00
b6da94dd4a chore(tracker-web): type proxy test request
Replace the tracker proxy test helper's any cast with an explicit NextRequest test double bridge.

Verification: pnpm --filter @bytelyst/tracker-web typecheck; pnpm --filter @bytelyst/tracker-web test; pnpm --filter @bytelyst/tracker-web exec eslint . --ext .ts,.tsx; pnpm lint.
2026-05-04 15:20:50 -07:00
afe7d88869 chore(monitoring): type fetch test mocks
Replace test-only any casts with a small typed fetch mock helper for partial health-check responses.

Verification: pnpm --filter @bytelyst/monitoring build; pnpm --filter @bytelyst/monitoring test; pnpm --filter @bytelyst/monitoring exec eslint . --ext .ts,.tsx; pnpm lint.
2026-05-04 15:19:05 -07:00
46900728d3 chore(api-client): type header merging
Replace the Headers branch's any cast with a typed copy into a Record so the shared API client keeps the same header merge behavior without a no-explicit-any warning.

Verification: pnpm --filter @bytelyst/api-client build; pnpm --filter @bytelyst/api-client test; pnpm --filter @bytelyst/api-client exec eslint . --ext .ts,.tsx; pnpm lint.
2026-05-04 15:17:33 -07:00
41af641c54 docs(audit): refresh platform handoff state
Update the platform audit handoff and resume prompt to match the live gates: install, typecheck, test, and lint now pass with 0 lint errors when GITEA_NPM_TOKEN is exported after sourcing ~/.zshrc.

Refs: docs/AUDIT_PLATFORM.md section P.
2026-05-04 15:09:42 -07:00
1f5dc1a812 docs: add CODEX_RESUME_PROMPT.md for platform-side agent hand-off
Mirror of the trading repo's resume prompt but anchored on the
platform-side audit work. Any agent (Codex, Claude, Gemini, etc.)
running on this machine can paste in the short prompt at the bottom of
this file and self-bootstrap from the full brief above.

Brief covers:
  - Required reads (HANDOVER.md + AUDIT_PLATFORM.md, optionally the
    trading repo's HANDOVER for cross-repo context)
  - Environment (source ~/.zshrc for GITEA_NPM_TOKEN — without it pnpm
    install -r fails on the private @bytelyst/* mobile dep)
  - Verification gates with explicit "error count must go down, never
    up" rule
  - Working-tree state: 3 nomgap WIP files + 1 regenerated lockfile
    that the agent must NOT touch
  - The P-sweep: 85 pre-existing lint errors, broken down by rule, with
    a per-package workflow (one package = one commit) and a suggested
    walking order
  - Commit conventions matching the prior session
    (chore(P-sweep): pnpm --filter <pkg> lint:fix)
  - Seven explicit "do not" rules — the most important being do-not-
    modify the audit's load-bearing eslint config block (`**/*.cjs` +
    `**/scripts/**`) which prevents 45 errors from regressing
  - When-to-stop-and-ask criteria so the agent doesn't blindly delete
    "unused" exports that downstream repos (trading vendor) consume

Refs: docs/HANDOVER.md, docs/AUDIT_PLATFORM.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 14:50:07 -07:00
69a4dc4340 docs: add HANDOVER.md for the platform audit work
Standalone hand-off note pointing the next contributor at:
  - Current health snapshot (install/typecheck/test , lint runs but
    85 pre-existing errors surfaced)
  - The .npmrc / GITEA_NPM_TOKEN requirement (without it nothing installs)
  - Three uncommitted nomgap-WIP files in the working tree that the audit
    intentionally left alone (out of scope, missing context)
  - The audit doc (docs/AUDIT_PLATFORM.md) as the source of truth for
    open vs done items
  - Suggested next steps (per-package `pnpm --filter <pkg> lint:fix`
    sweeps, owned by package maintainers)
  - Backup branch reference

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 14:23:36 -07:00
8f541c9f87 chore(audit): unblock workspace lint pipeline + 13 mechanical fixes
The first `pnpm -r exec eslint .` run was bailing at the very first
package (design-tokens), hiding any lint state in the rest of the 69
workspace packages. This commit fixes the structural blockers so the
pipeline runs end-to-end, then sweeps the small, low-risk lint errors
in the next 4 packages it surfaces. Real lint debt that remains
(85 errors, mostly @typescript-eslint/no-unused-vars across many
unrelated packages) is cataloged in docs/AUDIT_PLATFORM.md for follow-
up by package owners.

Structural fixes (eslint config):
  - eslint.config.js (root):
      • New flat-config block for **/*.cjs and **/scripts/**/*.{js,cjs}
        with Node globals (process, console, require, module, __dirname)
        and no-console disabled. CLI scripts legitimately print to
        stdout. This alone clears the 45 errors in design-tokens'
        validate-tokens.cjs.
      • Added XMLHttpRequest + ProgressEvent to browser globals so
        feedback-client compiles.
  - packages/ui/eslint.config.js:
      • Added @typescript-eslint/parser — the package-local override
        replaced (didn't merge with) the root config, so TS syntax was
        being parsed by espree and erroring on every `interface` /
        type import.
      • Added ignores for dist/** (root's ignores aren't inherited).
      • Extended the files glob to .storybook/**/*.{ts,tsx}.

Mechanical lint fixes (no behaviour change):
  - design-tokens/scripts/{validate,token-coverage}.cjs: empty catch
    binding (catch (e) → catch).
  - feedback-client/src/index.ts:
      • captureScreen(): preserve caught error via `{ cause: err }`
        on the rethrown Error (preserve-caught-error rule, real bug —
        previous chain dropped the original stack).
      • captureElement(): rename unused parity params mimeType/quality
        to _mimeType/_quality and document why they exist.
  - logger/__tests__/logger.test.ts: drop unused `LoggerConfig` import.
  - extraction-service/{lib/circuit-breaker,modules/extract/{sidecar-
    monitor,usage}}.test.ts: drop 3 unused vitest/type imports.
  - tracker-web/__tests__/tracker-proxy.test.ts: rename unused local
    `url` → `_url`.

New: docs/AUDIT_PLATFORM.md
  Tooling-backed audit summary (pnpm install / typecheck / test / lint
  results), classification of remaining lint debt by rule, and an
  ordered hand-off plan for package owners to clear the rest with
  `pnpm --filter <pkg> lint:fix` followed by an eyeball review.

Verified before commit:
  - `pnpm typecheck` → pass (all 69 packages compile)
  - `pnpm test`      → pass (~2,200 tests across 18+ suites)
  - `pnpm lint`      → 85 pre-existing errors surfaced (none introduced
    by this commit; all in unrelated packages — see AUDIT_PLATFORM.md
    section P).

Out of scope (left untouched in working tree):
  - In-progress nomgap-on-Vercel migration: docker-compose.ecosystem.yml,
    products/nomgap/product.json, services/platform-service/src/
    modules/flags/seed.ts.
  - pnpm-lock.yaml: my `pnpm install -r` regenerated it (+2.9k/-8.5k
    lines) — not part of the audit, owner should commit deliberately.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 14:21:34 -07:00
saravanakumardb1
46a16f06bc docs(roadmaps): detailed 2026-04-17 plans for event bus, RAG, agent runtime, approval queue
Four grounded roadmaps superseding the scaffolded versions with
current-state audits, data models, week-by-week phase plans, tech-stack
decisions, and acceptance checklists. Execution order:
Event Bus (P0) unlocks Agent Runtime + RAG (P1 parallel), which unlock
Approval Queue (P1).
2026-04-17 09:36:44 -07:00
saravanakumardb1
7d266bfcc0 fix(docker): INFRA-gap-02 unblock full-stack docker compose up
Three coordinated fixes so 'docker compose up cosmos-emulator platform-service
cowork-service --wait' completes end-to-end (pre-existing blocker surfaced by
W1 post-push review).

1. Remove harmful prepare:tsc from @bytelyst/react-native-platform-sdk
   package.json. The hook fires during pnpm install --frozen-lockfile against
   an empty src/ tree (because Dockerfiles COPY package.jsons before
   sources), tsc aborts, install fails. Canonical monorepo build flow is
   pnpm -r build using the existing build:tsc script; prepare only runs for
   git+ URL installs (which this published package doesn't use), so removing
   it is lossless.

2. Add --ignore-scripts to platform-service + mcp-server Dockerfile install
   steps. Mirrors the pattern already used by extraction-service/Dockerfile,
   dashboards/admin-web/Dockerfile, dashboards/tracker-web/Dockerfile.
   Belt-and-braces against future prepare-hook regressions in any workspace
   package.

3. Expand .dockerignore node_modules/dist/.next/coverage to **/ globs.
   Docker's .dockerignore with bare 'node_modules' only matches root-level;
   nested packages/*/node_modules/ were being COPY'd into images, poisoning
   them with host-absolute-path .bin shims (e.g. @bytelyst/storage's tsc
   shim resolved to /learning_voice_ai_agent/node_modules/.pnpm/... which
   doesn't exist in the container → MODULE_NOT_FOUND). The glob fix makes
   COPY packages/ packages/ deliver source only.

Gap: INFRA-gap-02
Verified:
  pnpm install --frozen-lockfile                              
  pnpm --filter @bytelyst/react-native-platform-sdk build     
  pnpm --filter @bytelyst/react-native-platform-sdk typecheck 
  docker compose build platform-service                        (previously failed)
  docker compose build mcp-server                             
  docker compose build extraction-service                     
2026-04-16 15:48:32 -07:00
saravanakumardb1
dda74c2d20 feat(cowork-service): POST /api/plugins/reload
Hot-reload the orchestrator's on-disk plugin registry without a
restart. Routes to the reload_plugins Rust IPC method, gated by the
same authz the orchestrator enforces (admin role OR platform-signed
JWT) so a forbidden caller gets a canonical ForbiddenError envelope
instead of a raw IPC error passthrough. The response body is a
ReloadStats { loaded, added, removed, updated, errors } summary,
validated against ReloadResponseSchema before being returned to the
caller.

Tests cover: admin success (200 + envelope), user-without-platform
(403 before IPC), bridge unavailable (400), orchestrator -32003 →
ForbiddenError, other IPC errors → BadRequestError, malformed
orchestrator payloads → BadRequestError.

Phase: 3.1
Verified: pnpm -r typecheck, pnpm --filter @lysnrai/cowork-service {lint,build,test}
(140 passed, 6 new reload tests)
2026-04-16 15:45:42 -07:00
saravanakumardb1
756f5ef56b fix(pnpm): refresh pnpm-lock.yaml to match all committed package.jsons
Baseline pnpm-lock.yaml on origin/main was missing entries for
packages/billing-client and packages/webhook-dispatch (their
package.json files list typescript + vitest devDependencies that the
lockfile didn't reflect). Any pnpm install --frozen-lockfile — in CI,
in services/platform-service/Dockerfile, in services/mcp-server/Dockerfile,
in services/extraction-service/Dockerfile — therefore failed with
ERR_PNPM_OUTDATED_LOCKFILE.

Ran pnpm install which regenerated the lockfile deterministically; the
net diff cleans up a large amount of stale phantom entries while adding
the two missing package entries. After the refresh,
pnpm install --frozen-lockfile succeeds.

This is W1 baseline-repair scope (similar to commit a954f434 for lint).
It does NOT fully restore the full-stack docker compose smoke because
services/platform-service/Dockerfile also has a separate pre-existing
bug: @bytelyst/react-native-platform-sdk runs `tsc` in its prepare
script, but pnpm install runs prepare scripts before the Dockerfile
COPY packages/ step brings in source — so tsc has nothing to compile
and fails. That Dockerfile is outside W1's Files-You-Own and needs
a separate fix (either remove/no-op the prepare script, use pnpm
install --ignore-scripts, or COPY source before install).

Gap: none (baseline repair supporting INFRA-gap-01)
Verified: pnpm install --frozen-lockfile (clean), pnpm -r typecheck /
          lint / build / test (all green), docker compose build
          cowork-service + docker compose up -d cowork-service --wait
          (still Healthy), curl localhost:4009/health (200 OK).
2026-04-16 13:58:36 -07:00
saravanakumardb1
b92aee729f feat(docker): INFRA-gap-01 wire cowork-service into compose stack
Adds cowork-service (port 4009) to docker-compose.yml with healthcheck,
depends_on gates for cosmos-emulator and platform-service, env_file
integration, and Traefik labels. Unblocks Phase 3 ecosystem wiring of
the ByteLyst roadmap.

Also adds the services/cowork-service/Dockerfile that compose builds
from. Pattern mirrors services/mcp-server/Dockerfile but copies the
full workspace in one step rather than enumerating every package.json,
to stay resilient to workspace membership changes. Production stage
runs `node dist/server.js` on :4009 with BusyBox-wget healthcheck
(bundled with node:22-alpine — no apk install required).

.env.example gains a Cowork-Service section documenting:
- ANTHROPIC_API_KEY, RUST_RUNTIME_BIN, RUST_RUNTIME_TIMEOUT_MS
- OLLAMA_URL, OLLAMA_MODELS
- FEATURE_FLAGS_ENABLED
The 13th clawcowork flag telemetry_enabled already ships via COMMON_FLAGS
in services/platform-service/src/modules/flags/seed.ts so seed.ts was not
touched.

Gap: INFRA-gap-01
Verified: docker compose config (YAML validity + env substitution),
          pnpm -r typecheck / lint / build / test (all green),
          docker compose build cowork-service (image built),
          docker compose up -d cowork-service --no-deps --wait (Healthy),
          curl -fsS localhost:4009/health → {"status":"ok","service":"cowork-service",...}.

Note: full-stack `docker compose up cosmos-emulator platform-service
cowork-service --wait` is blocked by a pre-existing issue in
services/platform-service/Dockerfile (react-native-platform-sdk prepare
script fails during pnpm install --frozen-lockfile in the image build).
That is outside W1 scope; cowork-service starts clean on its own and
becomes Healthy when platform-service is available out-of-band.
2026-04-16 13:07:11 -07:00
saravanakumardb1
a954f434ef fix(lint): repair pre-existing baseline lint errors blocking W1 gates
Baseline origin/main pnpm -r lint failed with 90+ errors across
platform-service, extraction-service, and tracker-web. These block the
shared W1 quality gates (prompts/README.md §4) which require all of
typecheck + lint + build + test to be green before committing W1 infra
work. Fixes are strictly scoped to unblock gates:

- eslint.config.js: extend @typescript-eslint/no-unused-vars with
  varsIgnorePattern / caughtErrorsIgnorePattern / destructuredArrayIgnorePattern
  all honouring the existing `^_` convention already used for args.
- platform-service: add file-level eslint-disable for
  @typescript-eslint/no-unused-vars, no-redeclare, no-useless-escape on
  the 33 legacy files failing lint (ab-testing, ai-diagnostics,
  diagnostics, predictive-analytics, broadcasts/types, surveys/types,
  lib/push-notifications).
- extraction-service tests: drop unused vitest imports (beforeEach,
  afterEach, HealthCheck).
- tracker-web tracker-proxy.test.ts: prefix unused url with _.
- Applied eslint --fix on platform-service which normalised a handful
  of `let` → `const` and removed one redundant disable comment.

Scope creep vs W1 "Files You Own" is acknowledged — user explicitly
approved this path when baseline rot was surfaced.

Verified: pnpm -r typecheck, lint, build, test all green.
2026-04-16 13:06:37 -07:00
saravanakumardb1
17ddd086e7 docs(agents): add .npmrc canonical template rule to AGENTS.md
Never edit .npmrc directly in product repos — managed by
canonical template in learning_ai_common_plat/scripts/npmrc.template.
Use sync-npmrc.sh to propagate. Prevents gitea.bytelyst.com hardcoding.
2026-04-14 11:57:21 -07:00
saravanakumardb1
01cc5b35a4 feat(scripts): add .npmrc template + sync/drift-check scripts (DRY)
Single source of truth: scripts/npmrc.template
- sync-npmrc.sh: copies template to all 13 product repos
- check-npmrc-drift.sh: detects drift (exit 1 if any repo drifted)

Also synced 4 drifted repos: MindLyst, NoteLett, ActionTrail, Talk2Obs.
Prevents future gitea.bytelyst.com hardcoding issues.
2026-04-14 11:48:55 -07:00