@mrrlin-dev/mcp 0.4.177 → 0.4.178

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.
Files changed (2) hide show
  1. package/dist/bin.cjs +19 -4
  2. package/package.json +1 -1
package/dist/bin.cjs CHANGED
@@ -67442,7 +67442,7 @@ Do NOT derail the current task - if the operator has an in-flight question, answ
67442
67442
  }
67443
67443
 
67444
67444
  // src/_generated/version.ts
67445
- var PKG_VERSION = "0.4.177";
67445
+ var PKG_VERSION = "0.4.178";
67446
67446
 
67447
67447
  // src/bridge-allowed-origins.ts
67448
67448
  var DEFAULT_DIRECTOR_BRIDGE_ALLOWED_ORIGINS = [
@@ -82449,7 +82449,7 @@ function buildThreadStartParams(msg, config2, desiredModel) {
82449
82449
  "- Reply in the operator's language for the whole turn (questions, task scopes, summaries).",
82450
82450
  "- 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.",
82451
82451
  "- Spec pages in folder Specs must contain `## Acceptance criteria` followed by `- [ ]` items.",
82452
- "- 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 (no host: local repo; register_local_checkout w/o repo; init_local_repo after a yes; a done local run lands on main by itself, apply_local_run retries, get_execution_run's localLanding says if it landed; NEVER edit or commit 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).",
82452
+ "- 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 (no host: local repo; register_local_checkout w/o repo; init_local_repo after a yes; a done local run lands on main by itself, apply_local_run retries, get_execution_run's localLanding says if it landed; NEVER edit or commit 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). A page goes live only via a publish route, and a new project has none until the operator adds a publisher on the Integrations page: never promise or give a live link until publishing has produced one.",
82453
82453
  "- 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.",
82454
82454
  "- 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.",
82455
82455
  "- 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.",
@@ -83437,6 +83437,17 @@ var BOOTSTRAP_SEAT_REFRESH_TIMEOUT_MS = 3e3;
83437
83437
  function freshThreadNotice(operatorText, recentOperatorMessages = []) {
83438
83438
  return operatorWritesCyrillic(operatorText, recentOperatorMessages) ? "\u041F\u0440\u043E\u0434\u043E\u0432\u0436\u0443\u044E \u0440\u043E\u0437\u043C\u043E\u0432\u0443 \u0437 \u0447\u0438\u0441\u0442\u043E\u0433\u043E \u0430\u0440\u043A\u0443\u0448\u0430. \u041F\u043E\u043F\u0435\u0440\u0435\u0434\u043D\u0456 \u043F\u043E\u0432\u0456\u0434\u043E\u043C\u043B\u0435\u043D\u043D\u044F \u0446\u044C\u043E\u0433\u043E \u0447\u0430\u0442\u0443 \u044F \u043F\u0456\u0434\u0442\u044F\u0433\u043D\u0443 \u0437 \u0456\u0441\u0442\u043E\u0440\u0456\u0457, \u043D\u0430\u0441\u043A\u0456\u043B\u044C\u043A\u0438 \u0446\u0435 \u043C\u043E\u0436\u043B\u0438\u0432\u043E." : "Continuing this chat in a fresh conversation. Earlier messages are brought over from history where possible.";
83439
83439
  }
83440
+ function chatHasEarlierHistory(msg) {
83441
+ if (Array.isArray(msg.priorSessionIds) && msg.priorSessionIds.some((id) => typeof id === "string" && id.length > 0)) {
83442
+ return true;
83443
+ }
83444
+ const entries = (msg.context?.contextMessages ?? []).filter(
83445
+ (entry) => (entry?.role === "user" || entry?.role === "assistant") && typeof entry?.content === "string"
83446
+ );
83447
+ if (entries.some((entry) => entry?.role === "assistant")) return true;
83448
+ const current2 = entries.some((entry) => entry?.content === msg.message) ? 1 : 0;
83449
+ return entries.length - current2 > 0;
83450
+ }
83440
83451
  var NOTICE_LANGUAGE_RECENT_MESSAGES = 5;
83441
83452
  function operatorWritesCyrillic(operatorText, recentOperatorMessages) {
83442
83453
  const cyrillic = new RegExp("\\p{Script=Cyrillic}", "u");
@@ -84048,6 +84059,7 @@ function createBridgeMessageHandler(deps) {
84048
84059
  const desiredEffort = normalizeReasoningEffort(msg.reasoningEffort);
84049
84060
  const resolvedProviderId = turnSeat.id;
84050
84061
  let startedFreshThread = false;
84062
+ let replacedStoredThread = false;
84051
84063
  let desiredInstructionHash = null;
84052
84064
  try {
84053
84065
  const startParams = deps.buildStartParams(msg, desiredModel);
@@ -84103,7 +84115,10 @@ function createBridgeMessageHandler(deps) {
84103
84115
  }
84104
84116
  existingThread.threadId = result.threadId;
84105
84117
  existingThread.provider = resolvedProviderId;
84106
- if (!resumed) startedFreshThread = true;
84118
+ if (!resumed) {
84119
+ startedFreshThread = true;
84120
+ replacedStoredThread = true;
84121
+ }
84107
84122
  existingThread.model = desiredModel;
84108
84123
  existingThread.reasoningEffort = desiredEffort;
84109
84124
  }
@@ -84146,7 +84161,7 @@ function createBridgeMessageHandler(deps) {
84146
84161
  directorSessionId,
84147
84162
  turnId: thread.replay.turnId
84148
84163
  });
84149
- if (startedFreshThread) {
84164
+ if (startedFreshThread && (replacedStoredThread || chatHasEarlierHistory(msg))) {
84150
84165
  sendForSpan({
84151
84166
  type: "event",
84152
84167
  directorSessionId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrrlin-dev/mcp",
3
- "version": "0.4.177",
3
+ "version": "0.4.178",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "mrrlin-mcp": "dist/bin.cjs"