Skip to content

Commit

Permalink
Merge pull request #14 from Braffolk/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Braffolk authored Jan 22, 2025
2 parents b10a0b0 + e74a339 commit e5fc0c8
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 17 deletions.
108 changes: 92 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mcp-summarization-functions",
"version": "0.1.2",
"version": "0.1.3",
"description": "Provides summarised output from various actions that could otherwise eat up tokens and cause crashes",
"type": "module",
"main": "build/index.js",
Expand All @@ -26,6 +26,7 @@
"@modelcontextprotocol/sdk": "^0.6.0",
"dotenv": "^16.4.7",
"execa": "^9.5.2",
"node-fetch": "^3.3.2",
"uuid": "^11.0.3"
},
"devDependencies": {
Expand Down
9 changes: 9 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
#!/usr/bin/env node
// Set up fetch polyfill before any other imports
import fetch, { Headers, Request, Response } from 'node-fetch';
if (!globalThis.fetch) {
globalThis.fetch = fetch as unknown as typeof globalThis.fetch;
globalThis.Headers = Headers as unknown as typeof globalThis.Headers;
globalThis.Request = Request as unknown as typeof globalThis.Request;
globalThis.Response = Response as unknown as typeof globalThis.Response;
}

import { config } from 'dotenv';
import { createAnthropicModel } from './models/anthropic.js';

Expand Down

0 comments on commit e5fc0c8

Please sign in to comment.