@ateam-ai/mcp 0.3.38 → 0.3.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/tools.js +8 -1
package/package.json
CHANGED
package/src/tools.js
CHANGED
|
@@ -32,10 +32,17 @@ import { renderAgentDocHeader, mergeAgentDoc, AGENT_DOC_SENTINEL } from "./agent
|
|
|
32
32
|
async function pollDeployJob(jobId, sid, { label = 'deploy', maxMs = 15 * 60_000, intervalMs = 2000 } = {}) {
|
|
33
33
|
const start = Date.now();
|
|
34
34
|
let lastStatus = null;
|
|
35
|
+
// URL-encode jobId — older skill-validators returned composite job IDs
|
|
36
|
+
// with literal `/` (e.g. `redeploy-skill-personal-adas/pa-orchestrator-...`)
|
|
37
|
+
// which broke the Express route /deploy/jobs/:jobId. Polling silently
|
|
38
|
+
// 404'd every iteration until the MCP host's stdio idle timeout fired
|
|
39
|
+
// (~30s) and dropped the connection. Encoding here is defense-in-depth
|
|
40
|
+
// even after the server-side fix that replaced `/` with `--`.
|
|
41
|
+
const encodedJobId = encodeURIComponent(jobId);
|
|
35
42
|
while (Date.now() - start < maxMs) {
|
|
36
43
|
await new Promise(r => setTimeout(r, intervalMs));
|
|
37
44
|
try {
|
|
38
|
-
const job = await get(`/deploy/jobs/${
|
|
45
|
+
const job = await get(`/deploy/jobs/${encodedJobId}`, sid);
|
|
39
46
|
lastStatus = job?.status;
|
|
40
47
|
if (job?.status === 'done' || job?.status === 'failed') {
|
|
41
48
|
return job; // job entry has the full result merged in
|