@50arms/platform-mcp 0.1.450 → 0.1.452
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/danxbot-api-examples.js +3 -1
- package/dist/index.js +1 -1
- package/dist/machine-toolkit.js +1 -1
- package/dist/session-access.js +20 -9
- package/package.json +1 -1
|
@@ -87,7 +87,9 @@ function render(example) {
|
|
|
87
87
|
/** The description sentence `50arms_api` carries. */
|
|
88
88
|
export function danxbotApiExamplesText() {
|
|
89
89
|
const e = DANXBOT_API_EXAMPLES;
|
|
90
|
-
return (
|
|
90
|
+
return (
|
|
91
|
+
// DX-7003: a card read answers each comment's shorter version; the tool's description says how to reach the originals.
|
|
92
|
+
`Correct first calls: card read ${render(e.cardRead)} (\`fields\` is an object, never a comma string; \`comments\` answers each comment's shorter version when it has one: \`comments: {"expanded": true}\` reads the originals, the ones a decision's provenance quote is copied from, and \`comments: {"q": "<words>"}\` searches them); ` +
|
|
91
93
|
`card create ${render(e.cardCreate)} (\`plan\` required: "mine" or null; \`summary\` required, on every phase_children[] item too); ` +
|
|
92
94
|
`card edit ${render(e.cardEdit)} (only the keys you change; \`ac\` replaces the list); ` +
|
|
93
95
|
`AC tick ${render(e.acTick)}; ` +
|
package/dist/index.js
CHANGED
|
@@ -893,7 +893,7 @@ strictTool("session_connect",
|
|
|
893
893
|
.optional()
|
|
894
894
|
.describe(
|
|
895
895
|
// DX-6939: read only by a call that makes a sign-in claim; a signed-in session's call ignores it.
|
|
896
|
-
"The key of the team role this session's key is minted with when this call signs it in: default `
|
|
896
|
+
"The key of the team role this session's key is minted with when this call signs it in: default `session`, the system agent role every team has that a Member holds within. Name `agent` (what a dispatched worker runs on) only when a person said so: it holds keys a Member lacks, so the sign-in is refused unless that person holds them too. It must be an agent role within what the person this machine is registered to holds, or the sign-in is refused. Omit it unless a person named another role."),
|
|
897
897
|
launch_token: z
|
|
898
898
|
.string()
|
|
899
899
|
.min(1)
|
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.452", 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
|
@@ -63,18 +63,29 @@ const DASHBOARD_OUTDATED_ERROR = "this dashboard does not support request-and-ap
|
|
|
63
63
|
"it must be updated before this session can sign in";
|
|
64
64
|
const RATE_LIMITED_ERROR = "too many access requests from this address; wait, then call session_connect again";
|
|
65
65
|
/**
|
|
66
|
-
* DX-6939 - the role a session's sign-in claim asks for unless `session_connect` names another: the system agent role every team holds
|
|
67
|
-
* (`src/auth/permissions.ts`),
|
|
66
|
+
* DX-6939 / DX-7020 - the role a session's sign-in claim asks for unless `session_connect` names another: the system `session` agent role every team holds
|
|
67
|
+
* and cannot delete (`src/auth/permissions.ts`). It holds nothing a default Member lacks, so a Member's session signs in on it; a dispatched worker runs on
|
|
68
|
+
* the `agent` role, which a session names only when a person said so.
|
|
69
|
+
*/
|
|
70
|
+
export const DEFAULT_SESSION_ROLE = "session";
|
|
71
|
+
/**
|
|
72
|
+
* DX-6939 / DX-7020 - why the dashboard refused a sign-in claim, in words the agent can act on; null for a refusal it does not name. A `role_exceeds_owner`
|
|
73
|
+
* on the default role says the person's own role is too small for any agent session and what to ask for; on a role a person named, it says to choose another.
|
|
68
74
|
*/
|
|
69
|
-
export const DEFAULT_SESSION_ROLE = "agent";
|
|
70
|
-
/** DX-6939 - why the dashboard refused a sign-in claim, in words the agent can act on; null for a refusal it does not name. */
|
|
71
75
|
function claimRefusalError(body, role) {
|
|
72
|
-
const
|
|
73
|
-
switch (error) {
|
|
76
|
+
const refusal = body;
|
|
77
|
+
switch (refusal?.error) {
|
|
74
78
|
case "unknown_role":
|
|
75
|
-
return `the team has no role "${role}"; call session_connect again without \`role\` (the default
|
|
76
|
-
case "role_exceeds_owner":
|
|
77
|
-
|
|
79
|
+
return `the team has no role "${role}"; call session_connect again without \`role\` (the default "${DEFAULT_SESSION_ROLE}" role) or with a role key the team has`;
|
|
80
|
+
case "role_exceeds_owner": {
|
|
81
|
+
const missing = Array.isArray(refusal?.missingPermissions) ? refusal.missingPermissions.filter((k) => typeof k === "string") : [];
|
|
82
|
+
const lacks = missing.length === 0 ? "" : ` (their role lacks ${missing.join(", ")})`;
|
|
83
|
+
if (role === DEFAULT_SESSION_ROLE) {
|
|
84
|
+
return (`the person this machine is registered to cannot sign in an agent session on this team: their role is smaller than the "${DEFAULT_SESSION_ROLE}" role a session signs in on${lacks}. ` +
|
|
85
|
+
"Tell them to ask a team admin to give them the Member role or higher on this team, then call session_connect again. Do not retry before that.");
|
|
86
|
+
}
|
|
87
|
+
return `the role "${role}" holds permissions the person this machine is registered to lacks${lacks}, so the dashboard refused the sign-in; call session_connect again without \`role\` (the default "${DEFAULT_SESSION_ROLE}" role, which a Member holds within), or ask them to have a team admin widen their own role`;
|
|
88
|
+
}
|
|
78
89
|
case "session_role_must_be_agent":
|
|
79
90
|
return `the role "${role}" is a person's role, not an agent role; call session_connect again with an agent role, or without \`role\``;
|
|
80
91
|
case "claim_target_required":
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@50arms/platform-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.452",
|
|
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 (session_connect, request_permission, attach_file, and 50arms_slack_reply) (DX-3465, PLN-11 R-25).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|