mirror of
https://github.com/Ryder-Sun/Meldwork.git
synced 2026-11-07 06:56:03 -10:00
fix: allow slow Pi protocol probes
This commit is contained in:
1 parent
411d0f92d1
commit
2c0857a85b
2 files changed
+4
-3
No files matched your search
@@ -66,7 +66,7 @@ const AGENT_COMPATIBILITY = Object.freeze({
|
||||
const event = JSON.parse(line)
|
||||
return event?.type === 'session' || event?.type === 'message_update' || event?.type === 'message_end'
|
||||
} catch { return false }
|
||||
})),
|
||||
}), 60000),
|
||||
]),
|
||||
kimi: profile('0.19.2', '0.32.0', [
|
||||
probe('kimi-stream', ['--help'], [
|
||||
@@ -108,12 +108,13 @@ const AGENT_COMPATIBILITY = Object.freeze({
|
||||
]),
|
||||
})
|
||||
|
||||
function probe(id, args, requiredText, validateOutput = null) {
|
||||
function probe(id, args, requiredText, validateOutput = null, timeout = null) {
|
||||
return Object.freeze({
|
||||
id,
|
||||
args: Object.freeze([...args]),
|
||||
requiredText: Object.freeze([...requiredText]),
|
||||
validateOutput,
|
||||
timeout,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -350,7 +350,7 @@ async function probeAgentCapabilities(kind, executable, options = {}) {
|
||||
const recentCompatible = identity && prior?.identity === identity
|
||||
&& Date.now() - prior.checkedAt < CAPABILITY_CACHE_TTL_MS
|
||||
const results = await Promise.all(capabilityProbes(kind).map(async (probe) => {
|
||||
for (const timeout of [8000, 16000]) {
|
||||
for (const timeout of probe.timeout ? [probe.timeout] : [8000, 16000]) {
|
||||
try {
|
||||
const command = prepareCommandFn(executable, probe.args, options)
|
||||
const result = await execFileFn(command.command, command.args, {
|
||||
|
||||
Reference in new issue
Block a user