716ef407fe
Wire Portal and TKMind proxy to loopback Goose v1.49 via canary env blocks, with verification scripts, Phase 2/3 evidence baselines, and rollback runbooks so local upgrade stays isolated from stable 1.41 and production. Co-authored-by: Cursor <cursoragent@cursor.com>
57 lines
1.9 KiB
JavaScript
57 lines
1.9 KiB
JavaScript
#!/usr/bin/env node
|
|
/**
|
|
* Smoke: upstream skills extension exposes load_skill (web-search skill path).
|
|
*/
|
|
import { createV149Client } from './goose-v149-sse.mjs';
|
|
|
|
const client = createV149Client();
|
|
const workingDir = process.env.GOOSE_V149_WORKING_DIR || process.cwd();
|
|
const pollMs = Number(process.env.GOOSE_V149_SKILLS_POLL_MS || 500);
|
|
const timeoutMs = Number(process.env.GOOSE_V149_SKILLS_TIMEOUT_MS || 15_000);
|
|
|
|
async function waitForSkillsTools(sessionId) {
|
|
const deadline = Date.now() + timeoutMs;
|
|
while (Date.now() < deadline) {
|
|
const response = await client.apiFetch(
|
|
`/agent/tools?session_id=${encodeURIComponent(sessionId)}&extension_name=skills`,
|
|
);
|
|
const text = await response.text();
|
|
if (!response.ok) {
|
|
throw new Error(`/agent/tools ${response.status}: ${text.slice(0, 400)}`);
|
|
}
|
|
const tools = JSON.parse(text);
|
|
const names = tools.map((tool) => tool.name);
|
|
const hasLoadSkill = names.some((name) => /load_skill/i.test(name));
|
|
if (hasLoadSkill) return names;
|
|
await new Promise((resolve) => setTimeout(resolve, pollMs));
|
|
}
|
|
throw new Error(`skills load_skill not ready within ${timeoutMs}ms`);
|
|
}
|
|
|
|
async function main() {
|
|
const session = await client.apiJson('/agent/start', {
|
|
working_dir: workingDir,
|
|
extension_overrides: [
|
|
{
|
|
type: 'platform',
|
|
name: 'skills',
|
|
description: 'Skills extension (upstream web-search path)',
|
|
display_name: 'Skills',
|
|
bundled: false,
|
|
available_tools: ['load_skill'],
|
|
},
|
|
],
|
|
});
|
|
if (!session?.id) throw new Error('missing session id');
|
|
|
|
const toolNames = await waitForSkillsTools(session.id);
|
|
console.log(
|
|
`GOOSE_V149_SKILLS_OK: session=${session.id} tools=${toolNames.length} builtin=web-search-via-load_skill`,
|
|
);
|
|
}
|
|
|
|
main().catch((error) => {
|
|
console.error(`GOOSE_V149_SKILLS_FAIL: ${error.message}`);
|
|
process.exit(1);
|
|
});
|