-
Notifications
You must be signed in to change notification settings - Fork 301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mcp #478
base: main
Are you sure you want to change the base?
Mcp #478
Changes from all commits
e02bcd4
c20136c
2258970
aaf7f16
2d26fc5
1401fac
4e54d5f
ef20a58
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
// Mock implementation for node:child_process | ||
export const spawn = () => { | ||
throw new Error('child_process.spawn is not supported in browser environment'); | ||
}; | ||
|
||
const process = { | ||
env: {}, | ||
platform: 'browser', | ||
cwd: () => '/', | ||
versions: { | ||
node: '0.0.0', | ||
}, | ||
}; | ||
|
||
export default process; | ||
|
||
export const fs = { | ||
readFileSync: () => { | ||
throw new Error('fs.readFileSync is not supported in browser environment'); | ||
}, | ||
writeFileSync: () => { | ||
throw new Error('fs.writeFileSync is not supported in browser environment'); | ||
}, | ||
}; | ||
|
||
export const path = { | ||
join: (...paths: string[]) => paths.join('/'), | ||
resolve: (...paths: string[]) => paths.join('/'), | ||
dirname: (path: string) => path.split('/').slice(0, -1).join('/'), | ||
}; | ||
|
||
export const os = { | ||
platform: () => 'browser', | ||
homedir: () => '/', | ||
}; | ||
|
||
export const stream = { | ||
Readable: class { | ||
pipe() { return this; } | ||
}, | ||
Writable: class {}, | ||
Transform: class {}, | ||
}; | ||
|
||
export const util = { | ||
promisify: (fn: Function) => fn, | ||
}; | ||
|
||
export const events = { | ||
EventEmitter: class { | ||
on() {} | ||
emit() {} | ||
}, | ||
}; | ||
|
||
export const buffer = { | ||
Buffer: { | ||
from: () => new Uint8Array(), | ||
}, | ||
}; | ||
|
||
export const crypto = { | ||
randomBytes: () => new Uint8Array(), | ||
createHash: () => ({ | ||
update: () => ({ | ||
digest: () => '', | ||
}), | ||
}), | ||
}; | ||
|
||
export const querystring = { | ||
stringify: (obj: any) => new URLSearchParams(obj).toString(), | ||
parse: (str: string) => Object.fromEntries(new URLSearchParams(str)), | ||
}; | ||
|
||
export const url = { | ||
parse: (urlStr: string) => new URL(urlStr), | ||
resolve: (from: string, to: string) => new URL(to, from).toString(), | ||
}; | ||
|
||
export const http = { | ||
request: () => { | ||
throw new Error('http.request is not supported in browser environment'); | ||
}, | ||
}; | ||
|
||
export const https = { | ||
request: () => { | ||
throw new Error('https.request is not supported in browser environment'); | ||
}, | ||
}; | ||
|
||
export const net = { | ||
Socket: class {}, | ||
}; | ||
|
||
export const tls = { | ||
connect: () => { | ||
throw new Error('tls.connect is not supported in browser environment'); | ||
}, | ||
}; | ||
|
||
export const assert = { | ||
ok: () => {}, | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,10 +15,28 @@ export default defineConfig({ | |
}, | ||
resolve: { | ||
preserveSymlinks: true, | ||
|
||
alias: { | ||
'@ironclad/rivet-core': resolve('../core/src/index.ts'), | ||
'@ironclad/trivet': resolve('../trivet/src/index.ts'), | ||
'node:child_process': resolve('./src/mocks/node-polyfills.ts'), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why were these added back in? |
||
'node:process': resolve('./src/mocks/node-polyfills.ts'), | ||
'child_process': resolve('./src/mocks/node-polyfills.ts'), | ||
'process': resolve('./src/mocks/node-polyfills.ts'), | ||
'fs': resolve('./src/mocks/node-polyfills.ts'), | ||
'path': resolve('./src/mocks/node-polyfills.ts'), | ||
'os': resolve('./src/mocks/node-polyfills.ts'), | ||
'stream': resolve('./src/mocks/node-polyfills.ts'), | ||
'util': resolve('./src/mocks/node-polyfills.ts'), | ||
'events': resolve('./src/mocks/node-polyfills.ts'), | ||
'buffer': resolve('./src/mocks/node-polyfills.ts'), | ||
'crypto': resolve('./src/mocks/node-polyfills.ts'), | ||
'querystring': resolve('./src/mocks/node-polyfills.ts'), | ||
'url': resolve('./src/mocks/node-polyfills.ts'), | ||
'http': resolve('./src/mocks/node-polyfills.ts'), | ||
'https': resolve('./src/mocks/node-polyfills.ts'), | ||
'net': resolve('./src/mocks/node-polyfills.ts'), | ||
'tls': resolve('./src/mocks/node-polyfills.ts'), | ||
'assert': resolve('./src/mocks/node-polyfills.ts'), | ||
}, | ||
}, | ||
build: { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,6 +48,8 @@ | |
"@google-cloud/vertexai": "^0.1.3", | ||
"@google/generative-ai": "^0.21.0", | ||
"@huggingface/inference": "^2.6.4", | ||
"@modelcontextprotocol/sdk": "^1.5.0", | ||
"@tauri-apps/api": "^1.5.3", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Core cannot depend on tauri |
||
"assemblyai": "^4.6.0", | ||
"autoevals": "^0.0.26", | ||
"cron-parser": "^4.9.0", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we don't need this file any more?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it came back