fix devvit logs#15
Conversation
| "clean": "rm -rf ./dist ./fixtures ./db ./fixtures.tar.gz", | ||
| "dev": "concurrently -p \"[{name}]\" -n \"ESBUILD,INSPECTOR\" -c \"blue,green\" \"npm run build:watch\" \"npm run dev:inspector\"", | ||
| "dev:inspector": "npx @modelcontextprotocol/inspector node ./dist/index.js", | ||
| "dev:inspector": "DANGEROUSLY_OMIT_AUTH=true npx --yes @modelcontextprotocol/inspector@0.14.3 node ./dist/index.js", |
There was a problem hiding this comment.
stdio is broken on the latest lol
| "dependencies": { | ||
| "@modelcontextprotocol/sdk": "1.11.0", | ||
| "@modelcontextprotocol/inspector": "0.14.2", | ||
| "@modelcontextprotocol/sdk": "1.17.3", |
There was a problem hiding this comment.
go to latest sdk, no breaking changes, the 1.0 was cosmetic
| { subreddit: "r/myTestSubreddit", app: "my-app", since: "15m" }`, | ||
| inputSchema: z.object({ | ||
| subreddit: z.string().describe('Provide the subreddit name. The "r/" prefix is optional'), | ||
| since: z.string().describe('Start time for logs (e.g. "15s", "2w1d", "30m").'), |
|
|
||
| return await new Promise((resolve) => { | ||
| const child = spawn('devvit', args, { | ||
| const child = spawn('npx', args, { |
There was a problem hiding this comment.
npx since people could have global 0.11.x installations floating around
| }); | ||
|
|
||
| const KILL_TIMEOUT_MS = 2_000; // Prevent indefinite hanging by killing process after 10s | ||
| const KILL_TIMEOUT_MS = 4_000; // Prevent indefinite hanging by killing process after 4s |
There was a problem hiding this comment.
bump it to make sure all the logs come in. It net slows down the tool call but these agents are super slow as is. This will be one of the fastest parts
| }, | ||
| "dependencies": { | ||
| "@modelcontextprotocol/sdk": "1.11.0", | ||
| "@modelcontextprotocol/inspector": "0.14.2", |
There was a problem hiding this comment.
❓ Should this be a dev dependency?
There was a problem hiding this comment.
Good find! I thought about pinning it here instead but the NPX pin above works so we can remove altogether
ben-harris-5
left a comment
There was a problem hiding this comment.
Got a Q about a dependency but assuming that's fine the rest seems fine
Closes #
💸 TL;DR
I gave llms too much power and it kept messing up stuff. Also, since is required because we only stream this from the logs and I need to stop it forcibly since we need a more rest styled request.
📜 Details
Design Doc
Jira
🧪 Testing Steps / Validation
✅ Checks