@mrrlin-dev/mcp 0.4.120 → 0.4.121
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/bin.cjs +39 -10
- package/package.json +1 -1
package/dist/bin.cjs
CHANGED
|
@@ -62102,7 +62102,7 @@ Do NOT derail the current task - if the operator has an in-flight question, answ
|
|
|
62102
62102
|
}
|
|
62103
62103
|
|
|
62104
62104
|
// src/_generated/version.ts
|
|
62105
|
-
var PKG_VERSION = "0.4.
|
|
62105
|
+
var PKG_VERSION = "0.4.121";
|
|
62106
62106
|
|
|
62107
62107
|
// src/receipt-signing.ts
|
|
62108
62108
|
var import_node_crypto13 = __toESM(require("node:crypto"), 1);
|
|
@@ -66102,7 +66102,27 @@ function completionTurnMinBudgetMs() {
|
|
|
66102
66102
|
function isCompletionTurnDisabled() {
|
|
66103
66103
|
return (process.env.MRRLIN_COMPLETION_TURN_DISABLED ?? "").trim() === "1";
|
|
66104
66104
|
}
|
|
66105
|
-
function buildCompletionTurnPrompt(taskId, currentStatus) {
|
|
66105
|
+
function buildCompletionTurnPrompt(taskId, currentStatus, options = {}) {
|
|
66106
|
+
if (options.localGit) {
|
|
66107
|
+
return [
|
|
66108
|
+
`Your work turn ended but task ${taskId} is still in status "${currentStatus}".`,
|
|
66109
|
+
"",
|
|
66110
|
+
"This project's code lives only on the operator's computer; the bridge verifies and closes the task.",
|
|
66111
|
+
"",
|
|
66112
|
+
"If the work IS genuinely complete:",
|
|
66113
|
+
"1. Make sure every change is committed on the current run branch (never push, never touch the default branch).",
|
|
66114
|
+
"2. Update the task notes with a markdown summary of what you accomplished.",
|
|
66115
|
+
"3. Call update_task with status=awaiting_verification (NOT closed_done) \u2014 the bridge then runs the",
|
|
66116
|
+
" build and tests itself and closes the task on a signed receipt.",
|
|
66117
|
+
"",
|
|
66118
|
+
"If the work is NOT complete \u2014 be honest, do not close incomplete work:",
|
|
66119
|
+
"1. If you are blocked and need an operator decision, call update_task with status=handoff_needed and",
|
|
66120
|
+
" explain what remains in the notes.",
|
|
66121
|
+
"2. Append a handoff_judgement artifact explaining what the operator needs to do.",
|
|
66122
|
+
"",
|
|
66123
|
+
"You must pick one of these paths \u2014 do not leave the task in_progress."
|
|
66124
|
+
].join("\n");
|
|
66125
|
+
}
|
|
66106
66126
|
return [
|
|
66107
66127
|
`Your work turn ended but task ${taskId} is still in status "${currentStatus}".`,
|
|
66108
66128
|
"",
|
|
@@ -66320,8 +66340,9 @@ var LOCAL_GIT_EXECUTOR_INSTRUCTIONS = [
|
|
|
66320
66340
|
"This project's code lives only in a git repository on the operator's own computer; it has no",
|
|
66321
66341
|
"remote. Your worktree is on the run branch. Commit your work on THIS branch. Never run `git push`,",
|
|
66322
66342
|
"never add a remote, never open a pull request, and never switch to or merge into the default branch.",
|
|
66323
|
-
"When
|
|
66324
|
-
"
|
|
66343
|
+
"When the work is done, set the task to status awaiting_verification (never closed_done): the bridge",
|
|
66344
|
+
"then commits anything left uncommitted, runs the project's build and tests itself, and closes the",
|
|
66345
|
+
"task on a signed receipt \u2014 you do not need to report a link."
|
|
66325
66346
|
].join("\n");
|
|
66326
66347
|
var EXECUTOR_LOCAL_GIT_BASE_INSTRUCTIONS = `${EXECUTOR_BASE_INSTRUCTIONS}
|
|
66327
66348
|
${LOCAL_GIT_EXECUTOR_INSTRUCTIONS}`;
|
|
@@ -66343,6 +66364,7 @@ function artifactKindForEvent(event) {
|
|
|
66343
66364
|
}
|
|
66344
66365
|
var COMPLETED_TASK_STATUSES = /* @__PURE__ */ new Set(["closed_done"]);
|
|
66345
66366
|
var CODE_PR_READY_TASK_STATUSES = /* @__PURE__ */ new Set(["closed_done", "awaiting_verification"]);
|
|
66367
|
+
var LOCAL_GIT_READY_TASK_STATUSES = /* @__PURE__ */ new Set(["awaiting_verification"]);
|
|
66346
66368
|
var COMPLETION_EVIDENCE_KINDS = /* @__PURE__ */ new Set([
|
|
66347
66369
|
"checkpoint",
|
|
66348
66370
|
"test_result",
|
|
@@ -66476,7 +66498,7 @@ async function gatherContext(client, projectSlug, task, openRunId, rawProjectInp
|
|
|
66476
66498
|
autonomyEvents
|
|
66477
66499
|
};
|
|
66478
66500
|
}
|
|
66479
|
-
async function assertRunCompletionReady(deps, projectSlug, taskId, runId, allowedStatuses) {
|
|
66501
|
+
async function assertRunCompletionReady(deps, projectSlug, taskId, runId, allowedStatuses, options = {}) {
|
|
66480
66502
|
const task = await deps.client.getTask(projectSlug, taskId);
|
|
66481
66503
|
if (!allowedStatuses.has(task.status)) {
|
|
66482
66504
|
return {
|
|
@@ -66485,6 +66507,7 @@ async function assertRunCompletionReady(deps, projectSlug, taskId, runId, allowe
|
|
|
66485
66507
|
task
|
|
66486
66508
|
};
|
|
66487
66509
|
}
|
|
66510
|
+
if (options.bridgeVerifiesDelivery) return { ok: true, task };
|
|
66488
66511
|
const runs = await deps.client.listExecutionRuns(projectSlug, { taskId });
|
|
66489
66512
|
const runIds = new Set(runs.map((run3) => run3.id));
|
|
66490
66513
|
runIds.add(runId);
|
|
@@ -67243,8 +67266,10 @@ Continue executing task ${task.id}. Make the next concrete increment of progress
|
|
|
67243
67266
|
);
|
|
67244
67267
|
return;
|
|
67245
67268
|
}
|
|
67246
|
-
const prReadyStatuses = useExecutor ? CODE_PR_READY_TASK_STATUSES : COMPLETED_TASK_STATUSES;
|
|
67247
|
-
let readiness = await assertRunCompletionReady(deps, projectSlug, task.id, runId, prReadyStatuses
|
|
67269
|
+
const prReadyStatuses = useExecutor ? localGitMode ? LOCAL_GIT_READY_TASK_STATUSES : CODE_PR_READY_TASK_STATUSES : COMPLETED_TASK_STATUSES;
|
|
67270
|
+
let readiness = await assertRunCompletionReady(deps, projectSlug, task.id, runId, prReadyStatuses, {
|
|
67271
|
+
bridgeVerifiesDelivery: useExecutor && localGitMode === true
|
|
67272
|
+
});
|
|
67248
67273
|
if (!readiness.ok) {
|
|
67249
67274
|
const completionBudget = Math.min(completionTurnBudgetMs(), remainingTurnBudgetMs());
|
|
67250
67275
|
if (isCompletionTurnDisabled() || completionBudget < completionTurnMinBudgetMs()) {
|
|
@@ -67260,7 +67285,9 @@ Continue executing task ${task.id}. Make the next concrete increment of progress
|
|
|
67260
67285
|
previousStatus: readiness.task.status
|
|
67261
67286
|
})
|
|
67262
67287
|
);
|
|
67263
|
-
const completionPrompt = buildCompletionTurnPrompt(task.id, readiness.task.status
|
|
67288
|
+
const completionPrompt = buildCompletionTurnPrompt(task.id, readiness.task.status, {
|
|
67289
|
+
localGit: useExecutor && localGitMode === true
|
|
67290
|
+
});
|
|
67264
67291
|
const completionOutcome = recordTurn2(
|
|
67265
67292
|
await driveTurn(
|
|
67266
67293
|
deps,
|
|
@@ -67280,7 +67307,9 @@ Continue executing task ${task.id}. Make the next concrete increment of progress
|
|
|
67280
67307
|
await failRun(deps, projectSlug, readiness.task, runId, leaseId, completionOutcome.error);
|
|
67281
67308
|
return;
|
|
67282
67309
|
}
|
|
67283
|
-
readiness = await assertRunCompletionReady(deps, projectSlug, task.id, runId, prReadyStatuses
|
|
67310
|
+
readiness = await assertRunCompletionReady(deps, projectSlug, task.id, runId, prReadyStatuses, {
|
|
67311
|
+
bridgeVerifiesDelivery: useExecutor && localGitMode === true
|
|
67312
|
+
});
|
|
67284
67313
|
if (!readiness.ok) {
|
|
67285
67314
|
await failRun(deps, projectSlug, readiness.task, runId, leaseId, readiness.reason);
|
|
67286
67315
|
return;
|
|
@@ -75129,7 +75158,7 @@ function buildThreadStartParams(msg, config2, desiredModel) {
|
|
|
75129
75158
|
"- Reply in the operator's language for the whole turn (questions, task scopes, summaries).",
|
|
75130
75159
|
"- Keep chat short and human. No code blocks, DDL, terminal output, local filesystem paths, internal job/inbox UUIDs or alert markers in chat \u2014 put long content into a wiki page and link it.",
|
|
75131
75160
|
"- Spec pages in folder Specs must contain `## Acceptance criteria` followed by `- [ ]` items.",
|
|
75132
|
-
"- AGNOSTIC DELIVERY MANDATE: Mrrlin is an Agnostic Delivery Platform decoupled from mandatory GitHub. Delivery is routed strictly by artifact kind: (1) document -> wiki; (2) page -> publish (web pages, landing pages, interactive HTML previews); (3) file_set -> artifacts (file uploads, bundles, build zips); (4) message -> send (outbound webhooks, Slack, notifications); (5) code_change -> repo_host (GitHub
|
|
75161
|
+
"- AGNOSTIC DELIVERY MANDATE: Mrrlin is an Agnostic Delivery Platform decoupled from mandatory GitHub. Delivery is routed strictly by artifact kind: (1) document -> wiki; (2) page -> publish (web pages, landing pages, interactive HTML previews); (3) file_set -> artifacts (file uploads, bundles, build zips); (4) message -> send (outbound webhooks, Slack, notifications); (5) code_change -> repo_host (GitHub, or with none a local repo: register_local_checkout without repo; init_local_repo only after a yes; push choice via set_project_code_host; NEVER edit or commit project code yourself, only a code run does). NEVER stall or refuse non-code tasks by demanding a Git repository. Non-code tasks deliver directly via page (Publish) or document (Wiki).",
|
|
75133
75162
|
"- 3-TIER COMMERCIAL SCOPE GOVERNANCE: Treat tasks by domain governance tier. (1) Tier 1 Core Tech Delivery (backend, frontend, SRE, databases): decompose autonomously into repository code changes (when a repo is bound) or code artifacts. (2) Tier 2 Planning & Content (landing pages, SEO, marketing): create actionable drafts; when details such as a phone number, brand name or copy are missing, do not loop on questions \u2014 create the task, record `## Placeholders: [NEED_INPUT: <item>]` in the Wiki spec, and set `autonomyLevel: 'human_review'`. (3) Tier 3 Guardrailed Advisory (high risk: privacy/GDPR, security/SOC 2, billing, production database migrations, infrastructure): always set `autonomyLevel: 'human_review'`, put the domain's standard safety controls into the spec, and state that irreversible actions need human sign-off.",
|
|
75134
75163
|
"- INBOX QUESTION RETIREMENT MANDATE \u2014 Retiring answered questions: Before creating a task/plan, retire only pending Inbox questions the operator actually answered. Call `decide_inbox_item(itemId: <exact id>, decidedBy: 'director', verdict: 'acknowledged', answer: <actual answer>)`. Use `verdict: 'rejected', reason: ...` only if moot. Never close an unrelated item.",
|
|
75135
75164
|
"- CHAT CLARIFICATIONS ARE IN CHAT ONLY: During synchronous interactive Director chat, ask clarifying questions directly in your chat response. DO NOT call `create_inbox_item(kind: 'question')` for routine conversational clarifications in Turn 1 \u2014 Inbox questions are reserved for autonomous background workers or asynchronous gate pauses that occur while the operator is away.",
|