pipebrain-mcp 0.37.1 → 0.37.3
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/main.js +100 -9
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -357,12 +357,35 @@ var require_main = __commonJS({
|
|
|
357
357
|
});
|
|
358
358
|
|
|
359
359
|
// ../../libs/agent-shared/dist/agent-config.js
|
|
360
|
+
import { createHash } from "node:crypto";
|
|
360
361
|
import { existsSync, readFileSync } from "node:fs";
|
|
361
362
|
import { homedir } from "node:os";
|
|
362
363
|
import { join } from "node:path";
|
|
363
364
|
|
|
364
365
|
// ../../libs/agent-shared/dist/agent-config-manifest.js
|
|
365
|
-
var
|
|
366
|
+
var AGENT_CONFIG_ENTRIES = [
|
|
367
|
+
{ target: "agents/blind-spot-pass.md", sha256: "564751a751f7896e89c67e0d20788aff873e599766a3c30360073ba74e4c6099" },
|
|
368
|
+
{ target: "agents/code-verifier.md", sha256: "5a09f0f9d6b4c4d75068bfc5e314b3d1250de9328806e709d0c32d1369394124" },
|
|
369
|
+
{ target: "agents/heavy-implementer.md", sha256: "7d3af78d4241aaa67c283db245dd4065af6e8f55efce54c2f8623c1f83879830" },
|
|
370
|
+
{ target: "agents/spec-reviewer.md", sha256: "a46dc637006d1f810081046c57edcd731406727810ccc5e0b1c7d7b9b98be5ef" },
|
|
371
|
+
{ target: "agents/surgical-editor.md", sha256: "c8b7fe2ec8d76c396c0c698f36b0523be430b31e4b73b902409479a52d42ea5c" },
|
|
372
|
+
{ target: "pipebrain/hooks/block-bash4-features.js", sha256: "383b38169a1795d9da34aa1c939349b6a1f76bba1359d0af7fd14c11ea5da25f" },
|
|
373
|
+
{ target: "pipebrain/hooks/block-browser-dialogs.js", sha256: "b4f16a249881e6bd3c8d7f270c955270047a0636ffa99b89ad409fefd44b2b2f" },
|
|
374
|
+
{ target: "pipebrain/hooks/block-credential-echo.js", sha256: "a22ad6746158df0b6cc80039b82ab9a9ba269aab535d5c01b6c917223b10c15c" },
|
|
375
|
+
{ target: "pipebrain/hooks/pre-commit-publication-fitness.js", sha256: "f2917cd369c03004a8d02410f695efa3400bcd4f2044d1d389e5ad2c7a9dae5f" },
|
|
376
|
+
{ target: "pipebrain/hooks/pre-commit-secret-scan.js", sha256: "1bc634774184e66748b3152016e806ef974449e976920fd710732170fdb4ad6b" },
|
|
377
|
+
{ target: "pipebrain/hooks/stop-orphaned-servers.js", sha256: "c3b847832c60605278e54ca1067c216bee073ab0a4bb046439b5f184b728792a" },
|
|
378
|
+
{ target: "pipebrain/team.md", sha256: "341c72843253f594632f3c0762e3ee045bdb8703189b80c71d0ab58cbf07eb82" },
|
|
379
|
+
{ target: "rules/react-tailwind.md", sha256: "80bb51b2d8fd5782b7c742526544e7841ee38aa575faf7a8c7b4217ba5731989" },
|
|
380
|
+
{ target: "rules/shell.md", sha256: "499aac60b6419acb0bb362c0267b9399139dcceafb0eaf67702e40f3118b5c04" },
|
|
381
|
+
{ target: "rules/typescript.md", sha256: "c55eab0c243e38cdf903ab50b1e9d6d621516b893e602e1abff9a999a14e72d4" },
|
|
382
|
+
{ target: "skills/capture-correction/SKILL.md", sha256: "ebd2ee680a623f54a2a35b2ac75471902f30bd17013c34557fd4ae4a9add3f68" },
|
|
383
|
+
{ target: "skills/pipebrain-secrets/SKILL.md", sha256: "1b873f0a12c1384fbb84d071c4f46554cbff22fc502223ad58acd29578912ca6" },
|
|
384
|
+
{ target: "skills/pipebrain-work-session/SKILL.md", sha256: "1051dd142f61b8b4a3c4f8be11874a3d2541fd905763350ff3ef05e586c9bc8d" },
|
|
385
|
+
{ target: "skills/pipebrain-writing/SKILL.md", sha256: "92422f4ab49a83f470625c62dce070d0cd1caf1212f1bb2668b1bbba5428c5b6" },
|
|
386
|
+
{ target: "skills/pipebrain/SKILL.md", sha256: "d30b133f64edb5fbd018eac4f8cd7316cb02fef39c9b5d2f275b5b9c1b20b6a2" },
|
|
387
|
+
{ target: "skills/requirements-altitude/SKILL.md", sha256: "05524877946cb1d25b32cac33f30617ba317207cd0862526e4cfbb944b18c181" }
|
|
388
|
+
];
|
|
366
389
|
|
|
367
390
|
// ../../libs/agent-shared/dist/agent-config.js
|
|
368
391
|
function agentConfigDir(env = process.env) {
|
|
@@ -388,11 +411,18 @@ function readInstalledStamp(dir) {
|
|
|
388
411
|
return null;
|
|
389
412
|
}
|
|
390
413
|
}
|
|
391
|
-
function agentConfigStatus(dir,
|
|
392
|
-
|
|
393
|
-
if (stamp === null)
|
|
414
|
+
function agentConfigStatus(dir, entries = AGENT_CONFIG_ENTRIES) {
|
|
415
|
+
if (readInstalledStamp(dir) === null)
|
|
394
416
|
return "absent";
|
|
395
|
-
|
|
417
|
+
for (const entry of entries) {
|
|
418
|
+
const file2 = join(dir, entry.target);
|
|
419
|
+
if (!existsSync(file2))
|
|
420
|
+
return "behind";
|
|
421
|
+
if (createHash("sha256").update(readFileSync(file2)).digest("hex") !== entry.sha256) {
|
|
422
|
+
return "behind";
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
return "current";
|
|
396
426
|
}
|
|
397
427
|
var UPDATE_COMMAND = "ppb setup";
|
|
398
428
|
function agentConfigNotice(status) {
|
|
@@ -400,7 +430,7 @@ function agentConfigNotice(status) {
|
|
|
400
430
|
}
|
|
401
431
|
|
|
402
432
|
// ../../libs/agent-shared/dist/asset-transfer.js
|
|
403
|
-
import { createHash } from "node:crypto";
|
|
433
|
+
import { createHash as createHash2 } from "node:crypto";
|
|
404
434
|
import { existsSync as existsSync2, readFileSync as readFileSync2, writeFileSync } from "node:fs";
|
|
405
435
|
import { basename, extname } from "node:path";
|
|
406
436
|
var MIME_BY_EXT = {
|
|
@@ -429,7 +459,7 @@ async function uploadAssetFromPath(client2, apiBaseUrl, input) {
|
|
|
429
459
|
const bytes = readFileSync2(input.path);
|
|
430
460
|
const filename = basename(input.path);
|
|
431
461
|
const contentType = input.contentType ?? guessContentType(filename);
|
|
432
|
-
const sha256 =
|
|
462
|
+
const sha256 = createHash2("sha256").update(bytes).digest("hex");
|
|
433
463
|
const { asset, uploadUrl } = await client2.createAsset({
|
|
434
464
|
project: input.project,
|
|
435
465
|
filename,
|
|
@@ -459,7 +489,7 @@ async function downloadAssetToPath(client2, input) {
|
|
|
459
489
|
throw new Error(`asset ${input.asset} is ${asset.status}, not active \u2014 no bytes to download.`);
|
|
460
490
|
}
|
|
461
491
|
const buf = Buffer.from(await client2.downloadAsset(input.asset));
|
|
462
|
-
const got =
|
|
492
|
+
const got = createHash2("sha256").update(buf).digest("hex");
|
|
463
493
|
if (got !== asset.sha256) {
|
|
464
494
|
throw new Error(`integrity check failed: downloaded sha256 ${got} != recorded ${asset.sha256}.`);
|
|
465
495
|
}
|
|
@@ -15049,6 +15079,13 @@ var instructionScopeSchema = external_exports.enum([
|
|
|
15049
15079
|
"work.bug",
|
|
15050
15080
|
"work.feedback"
|
|
15051
15081
|
]);
|
|
15082
|
+
var notificationEventKindSchema = external_exports.enum([
|
|
15083
|
+
"question_asked",
|
|
15084
|
+
"work_at_verify",
|
|
15085
|
+
"feedback_received",
|
|
15086
|
+
"chat_message"
|
|
15087
|
+
]);
|
|
15088
|
+
var NOTIFICATION_EVENT_KINDS = notificationEventKindSchema.options;
|
|
15052
15089
|
|
|
15053
15090
|
// ../../libs/domain/dist/primitives.js
|
|
15054
15091
|
var uuidSchema = external_exports.uuid();
|
|
@@ -15740,6 +15777,23 @@ var orgInstructionSchema = external_exports.object({
|
|
|
15740
15777
|
updatedAt: external_exports.iso.datetime({ offset: true }),
|
|
15741
15778
|
deletedAt: external_exports.iso.datetime({ offset: true }).nullable()
|
|
15742
15779
|
});
|
|
15780
|
+
var pushSubscriptionSchema = external_exports.object({
|
|
15781
|
+
id: uuidSchema,
|
|
15782
|
+
orgId: uuidSchema,
|
|
15783
|
+
userId: uuidSchema,
|
|
15784
|
+
endpoint: external_exports.string().min(1),
|
|
15785
|
+
p256dh: external_exports.string().min(1),
|
|
15786
|
+
auth: external_exports.string().min(1),
|
|
15787
|
+
userAgent: external_exports.string().nullable(),
|
|
15788
|
+
lastUsedAt: external_exports.iso.datetime({ offset: true }).nullable(),
|
|
15789
|
+
createdAt: external_exports.iso.datetime({ offset: true }),
|
|
15790
|
+
updatedAt: external_exports.iso.datetime({ offset: true }),
|
|
15791
|
+
deletedAt: external_exports.iso.datetime({ offset: true }).nullable()
|
|
15792
|
+
});
|
|
15793
|
+
var notificationPreferenceSchema = external_exports.object({
|
|
15794
|
+
eventKind: external_exports.string().min(1),
|
|
15795
|
+
enabled: external_exports.boolean()
|
|
15796
|
+
});
|
|
15743
15797
|
|
|
15744
15798
|
// ../../libs/domain/dist/inputs.js
|
|
15745
15799
|
var int4Schema = positiveIntSchema.max(2147483647, {
|
|
@@ -16235,6 +16289,43 @@ var setOrgInstructionInputSchema = external_exports.strictObject({
|
|
|
16235
16289
|
var deleteOrgInstructionInputSchema = external_exports.strictObject({
|
|
16236
16290
|
scope: instructionScopeSchema
|
|
16237
16291
|
});
|
|
16292
|
+
var IPV4_LITERAL_RE = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;
|
|
16293
|
+
var REFUSED_IPV4_RE = /^(?:0|10|100\.(?:6[4-9]|[7-9]\d|1[01]\d|12[0-7])|127|169\.254|172\.(?:1[6-9]|2\d|3[01])|192\.0\.0|192\.168|198\.1[89]|22[4-9]|23\d)\.|^255\.255\.255\.255$/;
|
|
16294
|
+
function normalisedHost(hostname3) {
|
|
16295
|
+
const lowered = hostname3.toLowerCase();
|
|
16296
|
+
return lowered.endsWith(".") ? lowered.slice(0, -1) : lowered;
|
|
16297
|
+
}
|
|
16298
|
+
function isSendablePushEndpoint(raw) {
|
|
16299
|
+
let url2;
|
|
16300
|
+
try {
|
|
16301
|
+
url2 = new URL(raw);
|
|
16302
|
+
} catch {
|
|
16303
|
+
return false;
|
|
16304
|
+
}
|
|
16305
|
+
if (url2.protocol !== "https:")
|
|
16306
|
+
return false;
|
|
16307
|
+
const host = normalisedHost(url2.hostname);
|
|
16308
|
+
if (host === "localhost" || host.endsWith(".localhost"))
|
|
16309
|
+
return false;
|
|
16310
|
+
if (host.includes(":"))
|
|
16311
|
+
return false;
|
|
16312
|
+
if (IPV4_LITERAL_RE.test(host))
|
|
16313
|
+
return !REFUSED_IPV4_RE.test(host);
|
|
16314
|
+
return true;
|
|
16315
|
+
}
|
|
16316
|
+
var PUSH_ENDPOINT_MESSAGE = "endpoint must be the https:// URL a browser push subscription carries \u2014 a public push service address, never a loopback, private, or link-local one";
|
|
16317
|
+
var registerPushDeviceInputSchema = external_exports.strictObject({
|
|
16318
|
+
endpoint: external_exports.url({ message: PUSH_ENDPOINT_MESSAGE }).refine(isSendablePushEndpoint, { message: PUSH_ENDPOINT_MESSAGE }),
|
|
16319
|
+
p256dh: external_exports.string().min(1, { message: "p256dh is required" }),
|
|
16320
|
+
auth: external_exports.string().min(1, { message: "auth is required" }),
|
|
16321
|
+
userAgent: external_exports.string().min(1).max(500).optional()
|
|
16322
|
+
});
|
|
16323
|
+
var setNotificationPreferencesInputSchema = external_exports.strictObject({
|
|
16324
|
+
preferences: external_exports.array(external_exports.strictObject({
|
|
16325
|
+
eventKind: notificationEventKindSchema,
|
|
16326
|
+
enabled: external_exports.boolean()
|
|
16327
|
+
})).min(1, { message: "at least one preference is required" })
|
|
16328
|
+
});
|
|
16238
16329
|
|
|
16239
16330
|
// ../../libs/agent-shared/dist/token-shape.js
|
|
16240
16331
|
function isAcceptedTokenShape(value) {
|
|
@@ -17833,7 +17924,7 @@ function loadMcpConfig() {
|
|
|
17833
17924
|
}
|
|
17834
17925
|
|
|
17835
17926
|
// src/version.ts
|
|
17836
|
-
var VERSION = "0.37.
|
|
17927
|
+
var VERSION = "0.37.3";
|
|
17837
17928
|
|
|
17838
17929
|
// src/main.ts
|
|
17839
17930
|
var config2 = loadMcpConfig();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pipebrain-mcp",
|
|
3
|
-
"version": "0.37.
|
|
3
|
+
"version": "0.37.3",
|
|
4
4
|
"description": "Pipebrain MCP server for Claude Code and Claude Desktop — issues, requirements, content, assets, and metadata-only secrets over the Pipebrain API.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|