@armature-tech/mcp-analytics 0.6.31 → 0.6.32
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/dist/cjs/doctor.d.ts +1 -1
- package/dist/cjs/doctor.js +22 -1
- package/dist/esm/doctor.d.ts +1 -1
- package/dist/esm/doctor.js +22 -1
- package/package.json +1 -1
package/dist/cjs/doctor.d.ts
CHANGED
package/dist/cjs/doctor.js
CHANGED
|
@@ -256,6 +256,25 @@ const detectLocalSdks = async (cwd) => {
|
|
|
256
256
|
?.match(/github\.com\/armature-tech\/mcp-analytics-go(?:\/[^\s]+)?\s+v[^\s)]+/)?.[0];
|
|
257
257
|
if (goDeclaration)
|
|
258
258
|
found.push({ language: "go", declaration: goDeclaration });
|
|
259
|
+
const composerJson = await readIfPresent((0, node_path_1.resolve)(cwd, "composer.json"));
|
|
260
|
+
if (composerJson) {
|
|
261
|
+
try {
|
|
262
|
+
const parsed = JSON.parse(composerJson);
|
|
263
|
+
const sections = [parsed.require, parsed["require-dev"]];
|
|
264
|
+
for (const section of sections) {
|
|
265
|
+
if (isRecord(section) && typeof section["armature/mcp-analytics"] === "string") {
|
|
266
|
+
found.push({
|
|
267
|
+
language: "php",
|
|
268
|
+
declaration: `armature/mcp-analytics ${section["armature/mcp-analytics"]}`,
|
|
269
|
+
});
|
|
270
|
+
break;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
catch {
|
|
275
|
+
// A malformed composer.json will be reported by Composer.
|
|
276
|
+
}
|
|
277
|
+
}
|
|
259
278
|
return found;
|
|
260
279
|
};
|
|
261
280
|
exports.detectLocalSdks = detectLocalSdks;
|
|
@@ -325,8 +344,10 @@ const wrapApiFor = (language) => {
|
|
|
325
344
|
return "instrument_fastmcp (or an Armature recorder)";
|
|
326
345
|
case "typescript":
|
|
327
346
|
return "withMcpAnalytics (or an Armature recorder)";
|
|
347
|
+
case "php":
|
|
348
|
+
return "Analytics::instrument (or an Armature Recorder)";
|
|
328
349
|
default:
|
|
329
|
-
return "the SDK's tool instrumentation (InstrumentTool / withMcpAnalytics / instrument_fastmcp)";
|
|
350
|
+
return "the SDK's tool instrumentation (InstrumentTool / withMcpAnalytics / instrument_fastmcp / Analytics::instrument)";
|
|
330
351
|
}
|
|
331
352
|
};
|
|
332
353
|
const pass = (id, label, detail) => ({
|
package/dist/esm/doctor.d.ts
CHANGED
package/dist/esm/doctor.js
CHANGED
|
@@ -247,6 +247,25 @@ export const detectLocalSdks = async (cwd) => {
|
|
|
247
247
|
?.match(/github\.com\/armature-tech\/mcp-analytics-go(?:\/[^\s]+)?\s+v[^\s)]+/)?.[0];
|
|
248
248
|
if (goDeclaration)
|
|
249
249
|
found.push({ language: "go", declaration: goDeclaration });
|
|
250
|
+
const composerJson = await readIfPresent(resolve(cwd, "composer.json"));
|
|
251
|
+
if (composerJson) {
|
|
252
|
+
try {
|
|
253
|
+
const parsed = JSON.parse(composerJson);
|
|
254
|
+
const sections = [parsed.require, parsed["require-dev"]];
|
|
255
|
+
for (const section of sections) {
|
|
256
|
+
if (isRecord(section) && typeof section["armature/mcp-analytics"] === "string") {
|
|
257
|
+
found.push({
|
|
258
|
+
language: "php",
|
|
259
|
+
declaration: `armature/mcp-analytics ${section["armature/mcp-analytics"]}`,
|
|
260
|
+
});
|
|
261
|
+
break;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
catch {
|
|
266
|
+
// A malformed composer.json will be reported by Composer.
|
|
267
|
+
}
|
|
268
|
+
}
|
|
250
269
|
return found;
|
|
251
270
|
};
|
|
252
271
|
export const verifyIngest = async (endpoint, apiKey, timeoutMs) => {
|
|
@@ -314,8 +333,10 @@ const wrapApiFor = (language) => {
|
|
|
314
333
|
return "instrument_fastmcp (or an Armature recorder)";
|
|
315
334
|
case "typescript":
|
|
316
335
|
return "withMcpAnalytics (or an Armature recorder)";
|
|
336
|
+
case "php":
|
|
337
|
+
return "Analytics::instrument (or an Armature Recorder)";
|
|
317
338
|
default:
|
|
318
|
-
return "the SDK's tool instrumentation (InstrumentTool / withMcpAnalytics / instrument_fastmcp)";
|
|
339
|
+
return "the SDK's tool instrumentation (InstrumentTool / withMcpAnalytics / instrument_fastmcp / Analytics::instrument)";
|
|
319
340
|
}
|
|
320
341
|
};
|
|
321
342
|
const pass = (id, label, detail) => ({
|