@50arms/platform-mcp 0.1.441 → 0.1.442
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/checkout-docs-root.js +9 -0
- package/dist/index.js +2 -1
- package/dist/machine-toolkit.js +1 -1
- package/dist/session-access.js +2 -0
- package/package.json +1 -1
|
@@ -19,6 +19,15 @@ export function githubSlugOf(remote) {
|
|
|
19
19
|
return match === null ? null : `${match[2]}/${match[3]}`;
|
|
20
20
|
}
|
|
21
21
|
const runGit = async (cwd, args) => (await execFileAsync("git", [...args], { cwd, windowsHide: true })).stdout.trim();
|
|
22
|
+
/** DX-6888: `owner/name` of the GitHub repo `cwd`'s checkout was cloned from, or null for a folder with no checkout, no `origin`, or a remote that is not on GitHub. Sent with the session's sign-in request so the guide and the approver can name the repo. */
|
|
23
|
+
export async function readCheckoutRepo(cwd, git = runGit) {
|
|
24
|
+
try {
|
|
25
|
+
return githubSlugOf(await git(cwd, ["remote", "get-url", "origin"]));
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return null; // `git` failed: no checkout or no `origin`, which is the same answer as a remote not on GitHub
|
|
29
|
+
}
|
|
30
|
+
}
|
|
22
31
|
/** What `cwd`'s checkout says, or null for a folder that is not a checkout of a GitHub repo. */
|
|
23
32
|
export async function readCheckoutDocsRoot(cwd, git = runGit, exists = existsSync) {
|
|
24
33
|
try {
|
package/dist/index.js
CHANGED
|
@@ -95,7 +95,7 @@ import { SessionAccess } from "./session-access.js";
|
|
|
95
95
|
import { PermissionRequests } from "./permission-request.js";
|
|
96
96
|
import { makeGuardedCalls } from "./guarded-calls.js";
|
|
97
97
|
import { readOwnVersion } from "./version-floor.js";
|
|
98
|
-
import { createCheckoutDocsRootReporter } from "./checkout-docs-root.js";
|
|
98
|
+
import { createCheckoutDocsRootReporter, readCheckoutRepo } from "./checkout-docs-root.js";
|
|
99
99
|
import { isPickupConnect, projectKeyOf, recordSessionConnectionAfterConnect, removeSessionConnectionAfterLeave } from "./session-connection.js";
|
|
100
100
|
import { createListenerReminder, isPlanConnectedOnThisMachine, } from "./listener-reminder.js";
|
|
101
101
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
@@ -219,6 +219,7 @@ function boot() {
|
|
|
219
219
|
sessionId: session?.id,
|
|
220
220
|
clientVersion: readOwnVersion(),
|
|
221
221
|
team: readTeamRef(),
|
|
222
|
+
readRepo: () => readCheckoutRepo(process.cwd()),
|
|
222
223
|
setToken: (token) => dashboardClient.setToken(token),
|
|
223
224
|
initial: resolveInitialCredential(dashboardUrl, session?.id),
|
|
224
225
|
log: (line) => console.error(line),
|
package/dist/machine-toolkit.js
CHANGED
|
@@ -250,7 +250,7 @@ function resolveToolkitVersion(stamped, readManifest) {
|
|
|
250
250
|
return stamped ?? readManifest();
|
|
251
251
|
}
|
|
252
252
|
var readOwnManifest = () => JSON.parse(readFileSync2(new URL("../../package.json", import.meta.url), "utf8")).version;
|
|
253
|
-
var TOOLKIT_VERSION = resolveToolkitVersion(false ? void 0 : "0.1.
|
|
253
|
+
var TOOLKIT_VERSION = resolveToolkitVersion(false ? void 0 : "0.1.442", readOwnManifest);
|
|
254
254
|
function envelope(now) {
|
|
255
255
|
return { contract_version: CONTRACT_VERSION, toolkit_version: TOOLKIT_VERSION, profile: PROFILE, measured_at: now.toISOString() };
|
|
256
256
|
}
|
package/dist/session-access.js
CHANGED
|
@@ -295,12 +295,14 @@ export class SessionAccess {
|
|
|
295
295
|
return created;
|
|
296
296
|
}
|
|
297
297
|
async createRequest(sessionId, title, note) {
|
|
298
|
+
const repo = this.deps.readRepo === undefined ? null : await this.deps.readRepo();
|
|
298
299
|
const created = await createAccessRequest(this.fetchImpl, this.deps.dashboardUrl, {
|
|
299
300
|
kind: "session",
|
|
300
301
|
labelId: sessionId,
|
|
301
302
|
title: title ?? sessionId.slice(0, TITLE_FALLBACK_LENGTH),
|
|
302
303
|
machine: this.deps.machine ?? hostname(),
|
|
303
304
|
clientVersion: this.deps.clientVersion,
|
|
305
|
+
...(repo === null ? {} : { repo }),
|
|
304
306
|
...(this.deps.team === undefined ? {} : { team: this.deps.team }),
|
|
305
307
|
});
|
|
306
308
|
switch (created.kind) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@50arms/platform-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.442",
|
|
4
4
|
"description": "Stdio MCP server fronting the 50 Arms dashboard API for agents (operator sessions and dispatched workers alike): the generic 50arms_api/50arms_api_list/50arms_api_spec tools reach any route the caller's credential may call, plus dedicated agent-specific tools (plan_connect, request_permission, attach_file, and 50arms_slack_reply) (DX-3465, PLN-11 R-25).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|