Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,11 @@ jobs:
- name: Lint (core)
run: pnpm --filter @vllnt/convex-analytics lint

- name: Typecheck (core + mcp)
run: pnpm --filter @vllnt/convex-analytics typecheck && pnpm --filter convex-analytics-mcp typecheck
- name: Typecheck (core)
run: pnpm --filter @vllnt/convex-analytics typecheck

- name: Test core (100% coverage)
run: pnpm --filter @vllnt/convex-analytics test:coverage

- name: Test mcp
run: pnpm --filter convex-analytics-mcp test

- name: Build (core)
run: pnpm --filter @vllnt/convex-analytics build
16 changes: 0 additions & 16 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ jobs:
- run: pnpm install --frozen-lockfile
- run: pnpm --filter @vllnt/convex-analytics lint
- run: pnpm --filter @vllnt/convex-analytics typecheck
- run: pnpm --filter convex-analytics-mcp typecheck
- run: pnpm --filter @vllnt/convex-analytics test:coverage
- run: pnpm --filter convex-analytics-mcp test
- run: pnpm build

canary:
Expand Down Expand Up @@ -80,20 +78,6 @@ jobs:
# returns 401 under OIDC — so @latest is left untouched. Install the newest canary
# with `npm i @vllnt/convex-analytics@canary`.
npx -y npm@11 publish --tag canary --provenance --access public --ignore-scripts
- name: Publish canary — convex-analytics-mcp
# Best-effort: the secondary MCP package needs its own npm Trusted Publisher
# configured before OIDC publish works. Don't fail the canary on it — the
# component (above) is the deliverable.
continue-on-error: true
working-directory: packages/convex-analytics-mcp
run: |
sed -i '/_authToken/d' "$NPM_CONFIG_USERCONFIG" 2>/dev/null || true
unset NODE_AUTH_TOKEN
BASE_VERSION=$(node -p "require('./package.json').version")
SHORT_SHA=$(echo "$GITHUB_SHA" | cut -c1-7)
CANARY="${BASE_VERSION}-canary.${SHORT_SHA}"
npm version "$CANARY" --no-git-tag-version --ignore-scripts
npx -y npm@11 publish --tag canary --provenance --access public --ignore-scripts

release:
name: Publish Release
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ dist/
!.env.example
# Ignore app _generated but NOT component _generated (needed for convex-test)
convex/_generated/
demo/convex/_generated/
.turbo/
*.tsbuildinfo
coverage/
Expand Down
5 changes: 1 addition & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Any event, any dimension, any domain. Follows the vllnt Component Standard (see

## Package structure

This repo is a small monorepo (turbo): the core component, an MCP server, and a demo host.
This repo is a small monorepo (turbo) holding the core analytics component.

```
packages/
Expand All @@ -27,8 +27,6 @@ packages/
internal_mutations.ts # crons: prune, closeSessions; backfill
http.ts # five generic x-api-key REST routes
validators.ts # shared validators (typed scalar props — no v.any())
convex-analytics-mcp/ # MCP server (npm: convex-analytics-mcp) — 7 tools
demo/convex/ # host harness (convex.config.ts + example.ts) — exercises the client
```

## Ownership boundary
Expand Down Expand Up @@ -118,7 +116,6 @@ pnpm lint # lint all packages
| `docs/web-preset.md` | Opt-in web dimensions + UA/geo helpers + React note |
| `docs/multi-product.md` | The opaque `scope` partition |
| `docs/architecture.md` | Rollup-on-write, child components, crons |
| `docs/mcp-tools.md` | The 7 MCP tools |
| `docs/quick-start.md` | Install → mount → track → read walkthrough |
| `llms.txt` | curated index — `convex@>=1.21.0` must match `package.json` `peerDependencies.convex` |
| `llms-full.txt` | generated by `pnpm --filter @vllnt/convex-analytics generate:llms` — regenerate on every API/schema/README change |
Expand Down
2 changes: 0 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,5 @@ is folded into this single `0.1.0` entry.
`useTimeseries`, `useUniques` over the host's re-exported aggregate query refs.
- **REST API** — five generic `x-api-key`-authed routes (/track, /metric, /top, /timeseries,
/uniques), timing-safe key comparison.
- **MCP server** — 7 tools (`track`, `get_metric`, `get_top`, `get_timeseries`, `get_uniques`,
`detect_anomalies`, `query_analytics`).
- **Testing** — `@vllnt/convex-analytics/test` export for convex-test, registering the child
components so `track` is exercised end-to-end.
5 changes: 1 addition & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Any event, any dimension, any domain. Follows the vllnt Component Standard (see

## Package structure

This repo is a small monorepo (turbo): the core component, an MCP server, and a demo host.
This repo is a small monorepo (turbo) holding the core analytics component.

```
packages/
Expand All @@ -27,8 +27,6 @@ packages/
internal_mutations.ts # crons: prune, closeSessions; backfill
http.ts # five generic x-api-key REST routes
validators.ts # shared validators (typed scalar props — no v.any())
convex-analytics-mcp/ # MCP server (npm: convex-analytics-mcp) — 7 tools
demo/convex/ # host harness (convex.config.ts + example.ts) — exercises the client
```

## Ownership boundary
Expand Down Expand Up @@ -118,7 +116,6 @@ pnpm lint # lint all packages
| `docs/web-preset.md` | Opt-in web dimensions + UA/geo helpers + React note |
| `docs/multi-product.md` | The opaque `scope` partition |
| `docs/architecture.md` | Rollup-on-write, child components, crons |
| `docs/mcp-tools.md` | The 7 MCP tools |
| `docs/quick-start.md` | Install → mount → track → read walkthrough |
| `llms.txt` | curated index — `convex@>=1.21.0` must match `package.json` `peerDependencies.convex` |
| `llms-full.txt` | generated by `pnpm --filter @vllnt/convex-analytics generate:llms` — regenerate on every API/schema/README change |
Expand Down
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pnpm test
4. **Commit** using [Conventional Commits](https://www.conventionalcommits.org/):
```
feat(analytics): add new breakdown dimension
fix(mcp): handle empty timeseries response
fix(analytics): handle empty timeseries response
docs: update API reference
chore: bump dependencies
```
Expand Down Expand Up @@ -96,7 +96,6 @@ When changing public API or behavior, update the relevant files in `docs/`:
| Client SDK method change | `docs/client-sdk.md` |
| Schema change | `docs/schema.md` |
| New cron or write path change | `docs/architecture.md` |
| New MCP tool | `docs/mcp-tools.md` |
| New scoping field | `docs/multi-product.md` |

After updating `docs/`, also update `llms-full.txt` (concatenation of all docs).
Expand Down
13 changes: 1 addition & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,17 +152,6 @@ const byPlan = useTop(api.analytics.top, { name: "signup", dimension: "plan" });
Thin reactive wrappers over the host's re-exported query refs (`metric`, `top`, `timeseries`,
`uniques`). `react` + `convex` are optional peer deps; backend-only consumers pull no React.

## MCP (Claude Code)

```bash
claude mcp add convex-analytics-mcp \
--env CONVEX_URL=https://your-deployment.convex.cloud \
--env ANALYTICS_API_KEY=your-key
```

7 tools: `track`, `get_metric`, `get_top`, `get_timeseries`, `get_uniques`, `detect_anomalies`,
`query_analytics` (NL router). See [docs/mcp-tools.md](docs/mcp-tools.md).

## Security

- Auth-agnostic mount — the host gates access and passes opaque `subjectRef` / `sessionRef` in.
Expand All @@ -189,7 +178,7 @@ analyticsTest.register(t);

[Schema](docs/schema.md) · [Client SDK](docs/client-sdk.md) · [REST API](docs/api-reference.md) ·
[Web Preset](docs/web-preset.md) · [Multi-Product](docs/multi-product.md) ·
[Architecture](docs/architecture.md) · [MCP Tools](docs/mcp-tools.md). For AI agents:
[Architecture](docs/architecture.md). For AI agents:
[`llms.txt`](llms.txt) · [`llms-full.txt`](llms-full.txt).

## Contributing
Expand Down
2 changes: 0 additions & 2 deletions demo/.gitignore

This file was deleted.

6 changes: 0 additions & 6 deletions demo/convex/convex.config.ts

This file was deleted.

118 changes: 0 additions & 118 deletions demo/convex/example.ts

This file was deleted.

25 changes: 0 additions & 25 deletions demo/convex/tsconfig.json

This file was deleted.

13 changes: 0 additions & 13 deletions demo/package.json

This file was deleted.

70 changes: 0 additions & 70 deletions docs/mcp-tools.md

This file was deleted.

Loading
Loading