Skip to content

Commit c2aaf6c

Browse files
Merge pull request #21 from jonathanMLDev/dev-8
#15-update mcp with several tools
2 parents ffe6121 + e81bbc5 commit c2aaf6c

37 files changed

Lines changed: 2733 additions & 388 deletions

.dockerignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
node_modules
2+
dist
3+
.git
4+
.github
5+
.cursor
6+
npm-debug.log
7+
*.log
8+
.env
9+
.env.*
10+
coverage
11+
*.tsbuildinfo

.github/workflows/ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches: [main]
66
push:
77
branches: [main]
8-
workflow_call: # Allow this workflow to be called by other workflows
8+
workflow_call: # Allow this workflow to be called by other workflows
99

1010
jobs:
1111
build-and-test:
@@ -38,6 +38,9 @@ jobs:
3838
- name: Build
3939
run: npm run build
4040

41+
- name: Smoke test CLI
42+
run: node dist/index.js --help
43+
4144
- name: Run tests
4245
run: npm test
4346

@@ -58,3 +61,6 @@ jobs:
5861
- name: Security audit
5962
run: npm audit --audit-level=moderate
6063
continue-on-error: true
64+
65+
- name: Package dry run
66+
run: npm pack --dry-run

CHANGELOG.md

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## [Unreleased]
99

1010
### Added
11-
- N/A
1211

13-
### Changed
14-
- N/A
12+
- `list_namespaces` tool: discovers all namespaces with record counts and sampled metadata fields
13+
- `namespace_router` tool: ranks namespaces by relevance to a natural-language query
14+
- `suggest_query_params` tool: mandatory flow gate that recommends fields and tool variant before queries
15+
- `count` tool: counts unique documents matching a query, with `truncated` flag when results exceed `COUNT_TOP_K`
16+
- `query_fast` tool: lightweight chunk-level search with minimal field set
17+
- `query_detailed` tool: chunk-level search with optional semantic reranking
18+
- `query` tool: unified query entry-point supporting `query_fast` and `query_detailed` modes
19+
- `guided_query` tool: single-call orchestrator that runs routing → suggestion → execution, returning a `decision_trace`
20+
- `generate_urls` tool: synthesizes URLs for records whose metadata lacks a `url` field
21+
- `query_documents` tool: reassembles full documents from chunks grouped by document identifier
22+
- Centralized structured logger (`src/logger.ts`) with level-gated stderr output and stack-trace capture
23+
- Dockerfile for containerised deployment
24+
- `About.md` project documentation covering architecture, tools, and operating principles
1525

16-
### Deprecated
17-
- N/A
26+
### Changed
1827

19-
### Removed
20-
- N/A
28+
- Modularised server into focused files under `src/server/` (tools, caches, formatters, suggestion flow)
29+
- CI workflow updated: multi-node matrix (`18.x`, `20.x`, `22.x`), separate quality job with `continue-on-error`
30+
- Replaced all `console.error` calls in `pinecone-client.ts` with typed `logInfo` / `logDebug` / `logError`
2131

2232
### Fixed
23-
- N/A
33+
34+
- Timestamp-based metadata filter now correctly handles numeric epoch values
2435

2536
### Security
37+
2638
- N/A
2739

2840
## [0.1.1] - 2026-01-27
2941

3042
### Changed
43+
3144
- Enhanced TypeScript strict mode with additional compiler checks:
3245
- Added `noUncheckedIndexedAccess` for safer array/object access
3346
- Added `noImplicitOverride` to require explicit override keywords
@@ -36,12 +49,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3649
- Simplified build script to use standard `tsc` command
3750

3851
### Fixed
52+
3953
- Fixed build script that was suppressing TypeScript compilation errors with `|| exit 0`
4054
- Fixed all type safety issues to comply with stricter TypeScript checks
4155

4256
## [0.1.0] - 2026-01-26
4357

4458
### Added
59+
4560
- Initial release of TypeScript version
4661
- Feature parity with Python version
4762
- Production-ready implementation with:

Dockerfile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM node:20-bookworm-slim AS build
2+
3+
WORKDIR /app
4+
5+
COPY package*.json ./
6+
RUN npm ci
7+
8+
COPY . .
9+
RUN npm run build
10+
11+
FROM node:20-bookworm-slim AS runtime
12+
13+
WORKDIR /app
14+
ENV NODE_ENV=production
15+
16+
# Create non-root runtime user
17+
RUN useradd --create-home --uid 10001 mcpuser
18+
19+
COPY package*.json ./
20+
RUN npm ci --omit=dev && npm cache clean --force
21+
22+
COPY --from=build /app/dist ./dist
23+
COPY README.md LICENSE CHANGELOG.md ./
24+
25+
USER mcpuser
26+
27+
ENTRYPOINT ["node", "dist/index.js"]

0 commit comments

Comments
 (0)