@mrrlin-dev/mcp 0.4.114 → 0.4.116
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 +63 -6
- package/package.json +1 -1
package/dist/bin.cjs
CHANGED
|
@@ -38515,6 +38515,43 @@ var mrrlinDeclaredOutcomeSchema = mrrlinDeclaredOutcomeShapeSchema.superRefine((
|
|
|
38515
38515
|
});
|
|
38516
38516
|
}
|
|
38517
38517
|
});
|
|
38518
|
+
var MRRLIN_PROJECT_CODE_HOSTS = ["github", "gitlab", "local"];
|
|
38519
|
+
var mrrlinProjectCodeHostSchema = external_exports.enum(MRRLIN_PROJECT_CODE_HOSTS);
|
|
38520
|
+
var GIT_SHA_PATTERN = /^(?:[0-9a-f]{40}|[0-9a-f]{64})$/;
|
|
38521
|
+
var SHA256_HEX_PATTERN = /^[0-9a-f]{64}$/;
|
|
38522
|
+
var MRRLIN_LOCAL_DELIVERY_REF_PATTERN = /^git\+local:\/\/([^/\s@]+)\/(mrrlin\/run-ER-[A-Za-z0-9-]+)@([0-9a-f]{40}|[0-9a-f]{64})$/;
|
|
38523
|
+
var mrrlinLocalDeliveryRefSchema = external_exports.string().regex(MRRLIN_LOCAL_DELIVERY_REF_PATTERN, "deliveryRef must be git+local://<projectSlug>/mrrlin/run-<runId>@<sha>");
|
|
38524
|
+
var mrrlinLocalBuildStepSchema = external_exports.object({
|
|
38525
|
+
command: external_exports.string().trim().min(1).max(200),
|
|
38526
|
+
exitCode: external_exports.number().int(),
|
|
38527
|
+
logDigest: external_exports.string().regex(SHA256_HEX_PATTERN)
|
|
38528
|
+
});
|
|
38529
|
+
var mrrlinLocalBuildEvidenceSchema = external_exports.object({
|
|
38530
|
+
branch: external_exports.string().regex(/^mrrlin\/run-ER-[A-Za-z0-9-]+$/),
|
|
38531
|
+
baseSha: external_exports.string().regex(GIT_SHA_PATTERN),
|
|
38532
|
+
headSha: external_exports.string().regex(GIT_SHA_PATTERN),
|
|
38533
|
+
commitCount: external_exports.number().int(),
|
|
38534
|
+
steps: external_exports.array(mrrlinLocalBuildStepSchema).max(4),
|
|
38535
|
+
noBuildStep: external_exports.boolean(),
|
|
38536
|
+
checkoutDigest: external_exports.string().regex(SHA256_HEX_PATTERN)
|
|
38537
|
+
});
|
|
38538
|
+
function checkLocalBuildEvidence(evidence, local) {
|
|
38539
|
+
if (evidence.type !== "build")
|
|
38540
|
+
return `localBuild evidence requires evidence.type "build", got "${evidence.type}"`;
|
|
38541
|
+
if (evidence.value !== local.headSha)
|
|
38542
|
+
return "evidence.value must equal localBuild.headSha";
|
|
38543
|
+
if (local.commitCount <= 0)
|
|
38544
|
+
return "localBuild.commitCount must be > 0: a run with no commits never closes a task";
|
|
38545
|
+
if (local.headSha === local.baseSha)
|
|
38546
|
+
return "localBuild.headSha equals baseSha: nothing was committed";
|
|
38547
|
+
if (local.noBuildStep !== (local.steps.length === 0)) {
|
|
38548
|
+
return "localBuild.noBuildStep must be true exactly when no build/test command was detected";
|
|
38549
|
+
}
|
|
38550
|
+
const failed = local.steps.find((step) => step.exitCode !== 0);
|
|
38551
|
+
if (failed)
|
|
38552
|
+
return `localBuild step "${failed.command}" exited ${failed.exitCode}`;
|
|
38553
|
+
return null;
|
|
38554
|
+
}
|
|
38518
38555
|
var mrrlinReceiptSchema = external_exports.object({
|
|
38519
38556
|
kind: external_exports.enum(["outcome", "attempt"]),
|
|
38520
38557
|
evidence: external_exports.object({
|
|
@@ -38522,7 +38559,17 @@ var mrrlinReceiptSchema = external_exports.object({
|
|
|
38522
38559
|
value: external_exports.string().trim().min(1)
|
|
38523
38560
|
}),
|
|
38524
38561
|
observedAt: external_exports.string().datetime(),
|
|
38525
|
-
requiresCovered: external_exports.array(artifactKindSchema)
|
|
38562
|
+
requiresCovered: external_exports.array(artifactKindSchema),
|
|
38563
|
+
// local-git-delivery: what the BRIDGE observed for a code_change delivered into a local git repo.
|
|
38564
|
+
// Optional, so every existing receipt is untouched; when present it is checked by
|
|
38565
|
+
// checkLocalBuildEvidence below, which is the single receipt rule of the design.
|
|
38566
|
+
localBuild: mrrlinLocalBuildEvidenceSchema.optional()
|
|
38567
|
+
}).superRefine((value, ctx) => {
|
|
38568
|
+
if (!value.localBuild)
|
|
38569
|
+
return;
|
|
38570
|
+
const problem = checkLocalBuildEvidence(value.evidence, value.localBuild);
|
|
38571
|
+
if (problem)
|
|
38572
|
+
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["localBuild"], message: problem });
|
|
38526
38573
|
});
|
|
38527
38574
|
function buildReceipt(input) {
|
|
38528
38575
|
return {
|
|
@@ -38982,7 +39029,10 @@ var mrrlinProjectSummarySchema = external_exports.object({
|
|
|
38982
39029
|
// workspace-context-isolation (OQ-091): explicit client name and scope description
|
|
38983
39030
|
// for multi-tenant workspace containment. Output-optional and nullable for backwards compatibility.
|
|
38984
39031
|
clientName: external_exports.string().trim().max(80).nullable().optional(),
|
|
38985
|
-
scopeDescription: external_exports.string().trim().max(240).nullable().optional()
|
|
39032
|
+
scopeDescription: external_exports.string().trim().max(240).nullable().optional(),
|
|
39033
|
+
// local-git-delivery: where this project's code lives. Null means "not asked yet" -- see
|
|
39034
|
+
// mrrlinProjectCodeHostSchema. Output-optional so existing fixtures need no churn.
|
|
39035
|
+
codeHost: mrrlinProjectCodeHostSchema.nullable().optional()
|
|
38986
39036
|
});
|
|
38987
39037
|
var mrrlinProjectOperatorInputSchema = external_exports.string().regex(/^@[!-~]+$/, "operator must be '@' followed by printable ASCII with no whitespace");
|
|
38988
39038
|
var mrrlinProjectUpsertSchema = mrrlinProjectSummarySchema.omit({
|
|
@@ -38995,7 +39045,8 @@ var mrrlinProjectRenameSchema = external_exports.object({
|
|
|
38995
39045
|
displayName: external_exports.string().trim().min(1).max(120).optional(),
|
|
38996
39046
|
intentJudgeEnabled: external_exports.boolean().optional(),
|
|
38997
39047
|
clientName: external_exports.string().trim().max(80).nullable().optional(),
|
|
38998
|
-
scopeDescription: external_exports.string().trim().max(240).nullable().optional()
|
|
39048
|
+
scopeDescription: external_exports.string().trim().max(240).nullable().optional(),
|
|
39049
|
+
codeHost: mrrlinProjectCodeHostSchema.nullable().optional()
|
|
38999
39050
|
});
|
|
39000
39051
|
var ONBOARDING_KICKOFF_TRANSITIONS = [
|
|
39001
39052
|
{ from: null, to: "pending" },
|
|
@@ -39032,7 +39083,8 @@ var mrrlinProjectSnapshotSchema = external_exports.object({
|
|
|
39032
39083
|
emoji: mrrlinProjectEmojiSchema,
|
|
39033
39084
|
slug: mrrlinProjectSlugSchema,
|
|
39034
39085
|
clientName: external_exports.string().trim().max(80).nullable().optional(),
|
|
39035
|
-
scopeDescription: external_exports.string().trim().max(240).nullable().optional()
|
|
39086
|
+
scopeDescription: external_exports.string().trim().max(240).nullable().optional(),
|
|
39087
|
+
codeHost: mrrlinProjectCodeHostSchema.nullable().optional()
|
|
39036
39088
|
}),
|
|
39037
39089
|
taskDependencies: external_exports.array(mrrlinTaskDependencySchema).default([]),
|
|
39038
39090
|
taskEvents: external_exports.array(mrrlinTaskEventSchema).default([]),
|
|
@@ -39552,6 +39604,9 @@ var mrrlinExecutionRunSchema = external_exports.object({
|
|
|
39552
39604
|
projectSlug: mrrlinProjectSlugSchema,
|
|
39553
39605
|
provider: external_exports.string().min(1),
|
|
39554
39606
|
pullRequestUrl: external_exports.string().min(1).nullable(),
|
|
39607
|
+
// local-git-delivery: set instead of pullRequestUrl when a run delivered into a local git repo.
|
|
39608
|
+
// Optional + nullable: absent on every pre-existing run and on every GitHub run.
|
|
39609
|
+
deliveryRef: mrrlinLocalDeliveryRefSchema.nullable().optional(),
|
|
39555
39610
|
startedAt: external_exports.string().datetime().nullable(),
|
|
39556
39611
|
status: mrrlinExecutionRunStatusSchema,
|
|
39557
39612
|
taskId: mrrlinTaskIdSchema,
|
|
@@ -39646,6 +39701,7 @@ var mrrlinExecutionRunUpdateSchema = external_exports.object({
|
|
|
39646
39701
|
prodPublishRef: external_exports.string().min(1).nullable().optional(),
|
|
39647
39702
|
prodWorkflowId: external_exports.number().int().positive().nullable().optional(),
|
|
39648
39703
|
pullRequestUrl: external_exports.string().min(1).nullable().optional(),
|
|
39704
|
+
deliveryRef: mrrlinLocalDeliveryRefSchema.nullable().optional(),
|
|
39649
39705
|
status: mrrlinExecutionRunStatusSchema.optional(),
|
|
39650
39706
|
worktreeId: external_exports.string().min(1).nullable().optional(),
|
|
39651
39707
|
// Slice 6 (cost telemetry) + Slice 7 (effort). All nullable and optional: per D6, NULL means
|
|
@@ -58732,7 +58788,7 @@ var mcpToolDescriptions = {
|
|
|
58732
58788
|
[mcpToolNames.searchWikiPages]: "Search project Wiki pages using ranked full-text search. Returns excerpts suitable for grounding Director decisions.",
|
|
58733
58789
|
[mcpToolNames.searchKnowledge]: "Search the rendered Mrrlin docs wiki using the lexical RAG index. Returns cited chunks with stable wiki_url fields.",
|
|
58734
58790
|
[mcpToolNames.updatePlan]: "Update a plan/epic.",
|
|
58735
|
-
[mcpToolNames.updateTask]: `Update a task. Honors DB invariants: closed_no_result requires linked Evidence wiki pages. Set directorThreadId here to persist the worker's resumable provider thread handle. specApproved: "approved" requires declaredOutcome (set it in the same call or earlier): an object {sentence, requires, verification} stating what must exist when the task is done.`,
|
|
58791
|
+
[mcpToolNames.updateTask]: `Update a task. Honors DB invariants: closed_no_result requires linked Evidence wiki pages. Set directorThreadId here to persist the worker's resumable provider thread handle. specApproved: "approved" requires declaredOutcome (set it in the same call or earlier): an object {sentence, requires, verification} stating what must exist when the task is done. The Director sets it itself when writing the spec. requires holds one kind; verification is "machine" for page, code_change or message, "human_tap" for document, file_set or structured_data.`,
|
|
58736
58792
|
[mcpToolNames.resetDirectorThread]: "Clear a task's persisted Director execution thread handle so the next execution run starts a fresh provider thread. Records a director_thread_reset task event.",
|
|
58737
58793
|
[mcpToolNames.archiveTask]: "Archive a task: hides it from default reads, removes it from plan progress and scheduler consideration, cancels its non-terminal execution runs, and closes its open inbox items. Reversible \u2014 the project owner can restore it with unarchive_task. Records an 'archived' task event.",
|
|
58738
58794
|
[mcpToolNames.unarchiveTask]: "Restore an archived task to its original status and visibility. Owner-only \u2014 refused with NOT_PROJECT_OWNER for any other caller. Does not resurrect the execution runs or inbox items that were cancelled/closed when the task was archived. Records a 'restored' task event.",
|
|
@@ -61764,7 +61820,7 @@ Do NOT derail the current task - if the operator has an in-flight question, answ
|
|
|
61764
61820
|
}
|
|
61765
61821
|
|
|
61766
61822
|
// src/_generated/version.ts
|
|
61767
|
-
var PKG_VERSION = "0.4.
|
|
61823
|
+
var PKG_VERSION = "0.4.116";
|
|
61768
61824
|
|
|
61769
61825
|
// src/receipt-signing.ts
|
|
61770
61826
|
var import_node_crypto13 = __toESM(require("node:crypto"), 1);
|
|
@@ -74560,6 +74616,7 @@ function buildThreadStartParams(msg, config2, desiredModel) {
|
|
|
74560
74616
|
"- MUST include `## Verification`: the exact tests, commands, or checks that prove each criterion holds.",
|
|
74561
74617
|
"- Keep behavior contracts in the spec; implementation details belong in `## Implementation Plan`.",
|
|
74562
74618
|
"- Apply this format ONLY to Specs/{id} pages; do not retro-fit it onto other wiki page types.",
|
|
74619
|
+
"- With each spec, set the task's `declaredOutcome` via `update_task` yourself; approval needs it.",
|
|
74563
74620
|
'- Spec consensus runs ASYNCHRONOUSLY. Call `run_spec_consensus` for a `Specs/{id}` page; it returns IMMEDIATELY. On `already_converged`, the spec is already marked ready \u2014 proceed straight to `create_execution_run`; do NOT call `mark_spec_ready` and do NOT re-run consensus. On `queued` or `already_running`, tell the user it was launched and END your turn \u2014 do NOT poll or call it again; the result arrives in the inbox (an `info` item on CONVERGED, a `handoff` item if it was blocked/failed). When a `handoff` says it was blocked, address the recorded issues in the spec (any edit re-arms the gate) and call `run_spec_consensus` once more. For a NON-code task (domain seo/marketing/content, ADR 0020): the low-risk lanes `seo`, `marketing`, and `content` proceed to `create_execution_run` after consensus converges, using the same flow as code tasks. When the review agrees, tell the operator "the reviewers agreed on the spec" and proceed to create_execution_run. When it does not, tell them the reviewers could not agree and that there is a decision question in the inbox. Never say "consensus", "converged", or "CONVERGED" to the operator; those are internal words.',
|
|
74564
74621
|
"- When creating a task, classify and supply the `domain` field explicitly based on the nature of the work: pass `domain:'code'` for software engineering work, `domain:'seo'` for SEO/optimization, `domain:'marketing'` for marketing/growth, or `domain:'content'` for content creation/writing \u2014 the same way you select category/subcategory. A follow-up task spawned with `parentTaskId` inherits its parent's domain automatically and requires no explicit domain.",
|
|
74565
74622
|
'- When a task needs a browser (login flows, UI verification/clicks, scraping), pass `prerequisites:[{mcp:"mrrlin-browser",reason:"..."}]` to `create_execution_run`. If that run later fails into a handoff, the operator gets a one-click "Launch browser & resume" that brings up the dedicated browser as the turn starts.',
|