@50arms/platform-mcp 0.1.459 → 0.1.461
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/listen.js +29 -5
- package/dist/machine-toolkit.js +1 -1
- package/package.json +1 -1
package/dist/listen.js
CHANGED
|
@@ -272,10 +272,10 @@ function isPersonsComment(event) {
|
|
|
272
272
|
return event.origin === "operator" && event.release !== true;
|
|
273
273
|
}
|
|
274
274
|
/**
|
|
275
|
-
* DX-5799: what the agent does with a person's comment. The person's comment shows the agent that received it, and the
|
|
276
|
-
* twice: first a short acknowledgement of its own (`phase: "ack"`, so the person sees the comment was received), then its
|
|
277
|
-
*
|
|
278
|
-
* updates this package follows it without a plugin change.
|
|
275
|
+
* DX-5799: what the agent does with a person's comment. The person's comment shows the agent that received it, and the answer is a comment of its own under it
|
|
276
|
+
* (DX-7100, DEC-742) that the agent writes twice: first a short acknowledgement of its own (`phase: "ack"`, so the person sees the comment was received), then its
|
|
277
|
+
* full answer (`phase: "reply"`) written over that acknowledgement. A further answer is a new one of its own, never written over the first. The text is written here,
|
|
278
|
+
* with the line the agent reads, so every session that updates this package follows it without a plugin change.
|
|
279
279
|
*/
|
|
280
280
|
export function replyInstruction(cardId, commentId) {
|
|
281
281
|
return replyInstructionAt(`/api/issues/${cardId}/comments/${commentId}/reply`);
|
|
@@ -289,7 +289,7 @@ function subjectRef(event) {
|
|
|
289
289
|
return typeof event.planId === "number" ? event.planRef : event.cardId;
|
|
290
290
|
}
|
|
291
291
|
function replyInstructionAt(path) {
|
|
292
|
-
return `Answer it through its reply
|
|
292
|
+
return `Answer it through its reply route: first call 50arms_api POST ${path} with {"phase":"ack","body":"<one short sentence of your own acknowledging it>"} so the person sees it was received, then do the work and call POST ${path} again with {"phase":"reply","body":"<your full answer>"}, which replaces your acknowledgement. Another event for a comment you already answered (a follow-up the person added to it before your answer) takes only another {"phase":"reply","body":"<your answer to the follow-up>"}, which is a new answer of its own under the comment, never written over the one you gave; never send "ack" after an answer, and never answer through the plain comment route`;
|
|
293
293
|
}
|
|
294
294
|
/** DX-6064: what a session does with a person's answer (or changed answer), so a decision never lives only in its conversation. */
|
|
295
295
|
export const UPDATE_RECORDS_NOW = "Update every plan record and card this answer changes, this turn";
|
|
@@ -411,9 +411,15 @@ export function formatActivityLine(event) {
|
|
|
411
411
|
const FILED_NOT_READIED_INSTRUCTION = "Ready each now (order: depends_on), or open a problem if only a person can decide.";
|
|
412
412
|
/** DX-6277 - the label the filed ids sit under; the same words as the dashboard's `FILED_NOT_READIED_LABEL` (src/issues/agent-pause.ts). */
|
|
413
413
|
const FILED_NOT_READIED_LABEL = "Filed, not readied";
|
|
414
|
+
/** DX-7127 - the label the review-runnable ids sit under, and what to do about them: the gate is no build and no person's answer, so a dependency never holds it. */
|
|
415
|
+
const REVIEWABLE_LABEL = "Review runnable now";
|
|
416
|
+
const REVIEWABLE_INSTRUCTION = "start each card's named gate review (its next PRE gate) now: a depends_on never holds a review";
|
|
414
417
|
function isNudgeCardRef(value) {
|
|
415
418
|
return isRecord(value) && typeof value.id === "string" && typeof value.title === "string";
|
|
416
419
|
}
|
|
420
|
+
function isReviewableNudgeCardRefArray(value) {
|
|
421
|
+
return Array.isArray(value) && value.every((c) => isNudgeCardRef(c) && typeof c.gate === "string");
|
|
422
|
+
}
|
|
417
423
|
function isNudgeCardRefArray(value) {
|
|
418
424
|
return Array.isArray(value) && value.every(isNudgeCardRef);
|
|
419
425
|
}
|
|
@@ -433,11 +439,26 @@ export function invalidNudgeReason(value) {
|
|
|
433
439
|
return "held is not a {id,title}[] array";
|
|
434
440
|
if (!isNudgeCardRefArray(value.unreadied))
|
|
435
441
|
return "unreadied is not a {id,title}[] array";
|
|
442
|
+
if (!isReviewableNudgeCardRefArray(value.reviewable))
|
|
443
|
+
return "reviewable is not a {id,title,gate}[] array";
|
|
444
|
+
if (value.freeSlots !== null && !(typeof value.freeSlots === "number" && Number.isInteger(value.freeSlots) && value.freeSlots >= 0))
|
|
445
|
+
return "freeSlots is not a count or null";
|
|
436
446
|
return null;
|
|
437
447
|
}
|
|
438
448
|
function cardList(cards) {
|
|
439
449
|
return cards.map((c) => `${c.id} "${c.title}"`).join(", ");
|
|
440
450
|
}
|
|
451
|
+
function reviewableCardList(cards) {
|
|
452
|
+
return cards.map((c) => `${c.id} "${c.title}" [${c.gate}]`).join(", ");
|
|
453
|
+
}
|
|
454
|
+
/** DX-7127 - what the free slot count says about starting the reviews: how many may start at once, or that none may yet, or that nothing caps them. */
|
|
455
|
+
function freeSlotsSentence(freeSlots) {
|
|
456
|
+
if (freeSlots === null)
|
|
457
|
+
return "Pacing sets no agent cap for this account.";
|
|
458
|
+
if (freeSlots === 0)
|
|
459
|
+
return "No agent slot is free now: start them as slots free.";
|
|
460
|
+
return `${freeSlots} agent slot${freeSlots === 1 ? " is" : "s are"} free now: start up to that many at once.`;
|
|
461
|
+
}
|
|
441
462
|
function queuedCardList(cards) {
|
|
442
463
|
return cards.map((c) => `${c.id} "${c.title}" [${c.queueState}]`).join(", ");
|
|
443
464
|
}
|
|
@@ -478,6 +499,9 @@ export function formatNudgeLine(event) {
|
|
|
478
499
|
const parts = [];
|
|
479
500
|
if (event.unreadied.length > 0)
|
|
480
501
|
parts.push(`${FILED_NOT_READIED_LABEL} (${FILED_NOT_READIED_INSTRUCTION}): ${cardList(event.unreadied)}`);
|
|
502
|
+
// DX-7127 - the label and instruction come before the ids, like the filed part, so a cut never takes the instruction.
|
|
503
|
+
if (event.reviewable.length > 0)
|
|
504
|
+
parts.push(`${REVIEWABLE_LABEL} (${REVIEWABLE_INSTRUCTION}; ${freeSlotsSentence(event.freeSlots)}): ${reviewableCardList(event.reviewable)}`);
|
|
481
505
|
if (event.startable.length > 0)
|
|
482
506
|
parts.push(`startable: ${queuedCardList(event.startable)}`);
|
|
483
507
|
if (event.held.length > 0)
|
package/dist/machine-toolkit.js
CHANGED
|
@@ -443,7 +443,7 @@ function resolveToolkitVersion(stamped, readManifest) {
|
|
|
443
443
|
return stamped ?? readManifest();
|
|
444
444
|
}
|
|
445
445
|
var readOwnManifest = () => JSON.parse(readFileSync2(new URL("../../package.json", import.meta.url), "utf8")).version;
|
|
446
|
-
var TOOLKIT_VERSION = resolveToolkitVersion(false ? void 0 : "0.1.
|
|
446
|
+
var TOOLKIT_VERSION = resolveToolkitVersion(false ? void 0 : "0.1.461", readOwnManifest);
|
|
447
447
|
function envelope(now) {
|
|
448
448
|
return { contract_version: CONTRACT_VERSION, toolkit_version: TOOLKIT_VERSION, profile: PROFILE, measured_at: now.toISOString() };
|
|
449
449
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@50arms/platform-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.461",
|
|
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",
|