muse-crew 0.4.1 → 0.4.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muse-crew",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Opinionated orchestration for Muse \u2014 workflows, identities, and tooling for autonomous software development.",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,
@@ -320,6 +320,7 @@ while (i < STEPS.length) {
320
320
  "Run: npm view muse-crew version 2>/dev/null || echo NOT_FOUND\n" +
321
321
  "If NOT_FOUND, use the local package.json version as the base instead.\n\n" +
322
322
  "STEP 3: Apply the version_bump scope (" + releaseDecision.version_bump + ") to the base version: patch increments the last segment; minor increments the middle and resets the last to 0; major increments the first and resets the rest to 0. Example: base 1.2.3 + minor → 1.3.0. Call the result <new-version>.\n" +
323
+ "STEP 3B: Make the version math auditable. State the computed target version explicitly — your summary MUST include the line: TARGET_VERSION=<new-version> computed as <base> + <scope> → <new-version> (example: TARGET_VERSION=0.3.1 computed as 0.3.0 + patch → 0.3.1). Every later step uses exactly this version. Do not improvise the arithmetic: 0.3.0 + patch is 0.3.1, never 0.4.0.\n" +
323
324
  "STEP 4: Write <new-version> into package.json (only the `version` field), then commit it under the still-held merge lock: cd " + REPO_PATH + " && git add package.json && git commit -m \"release: muse-crew@<new-version>\". The lock serializes Publish per repo, so two tasks can never pick the same version.\n" +
324
325
  "STEP 5: Pack and publish.\n" +
325
326
  "Run: cd " + REPO_PATH + " && npm pack\n" +
@@ -333,7 +334,9 @@ while (i < STEPS.length) {
333
334
  "Run: CREW_REPO=" + REPO_PATH + " " + LIFECYCLE + " post-deploy " + taskId + "\n" +
334
335
  "If the output contains DEPLOYED, finalization is complete.\n\n" +
335
336
  "Do NOT compare the local package.json version to the registry version: with versions assigned at publish time, local==registry is the normal steady state before assignment — not a signal to skip. Execute every step above.\n\n" +
336
- "End your summary with exactly this line: published: muse-crew@<new-version>\n\n" +
337
+ "End your summary with exactly these two lines, in this order lowercase, no trailing period, do not rephrase (the QA backstop extracts them by pattern):\n" +
338
+ "TARGET_VERSION=<new-version> computed as <base> + <scope> → <new-version>\n" +
339
+ "published: muse-crew@<new-version>\n\n" +
337
340
  "Your final response MUST be valid JSON and nothing else: { \"summary\": \"result\", \"passed\": true }.\n" +
338
341
  "No prose, no markdown, just the JSON object.";
339
342
  } else if (PUBLISH_TYPE === "artifact") {
@@ -374,7 +377,10 @@ while (i < STEPS.length) {
374
377
  // declared release: yes, QA verifies the registry actually moved. A silent
375
378
  // publish skip becomes a loud QA failure with evidence, not a pass.
376
379
  var npmPublishCheck = (PUBLISH_TYPE === "npm" && releaseDecision && releaseDecision.release === "yes")
377
- ? "NPM PUBLISH CHECK: the accepted Build summary declared release: yes, so this run's Publish phase must have published. Find this task's recorded Publish result: call artifact_invoke_action on slug \"" + DASHBOARD_SLUG + "\", action \"getstate\", args: { \"events_limit\": 1 }, then find the session for this task_id with step \"Publish\" (status completed) in the returned sessions array and extract its `published: muse-crew@<version>` line from the session notes (the Publish agent ends its summary with exactly that line — event history does NOT carry it). Then run: npm view muse-crew version. The registry version MUST equal the published version. If there is no completed Publish session with a published: line, or the registry version does not match, FAIL with { \"passed\": false, \"summary\": \"npm publish verification failed: [details]\" }.\n"
380
+ ? "NPM PUBLISH CHECK: the accepted Build summary declared release: yes, so this run's Publish phase must have published. Find this task's recorded Publish result: call artifact_invoke_action on slug \"" + DASHBOARD_SLUG + "\", action \"getstate\", args: { \"events_limit\": 1 }, then find the session for this task_id with step \"Publish\" (status completed) in the returned sessions array and read its session notes (the Publish agent's summary — event history does NOT carry it).\n" +
381
+ "Extract the line matching TARGET_VERSION=<new-version> computed as <base> + <scope> → <new-version>. If the line is missing, FAIL with { \"passed\": false, \"summary\": \"npm publish verification failed: Publish summary did not echo its computed target version (STEP 3B)\" }.\n" +
382
+ "Verify the bump SCOPE: the <scope> in that line MUST equal the accepted version_bump scope \"" + releaseDecision.version_bump + "\" — if the Publish agent applied a different scope, FAIL. Verify the ARITHMETIC: <base> + <scope> must equal <new-version> (patch increments the last segment only, e.g. 0.3.0 + patch → 0.3.1; minor increments the middle and resets the last to 0; major increments the first and resets the rest to 0) — if the math is wrong, FAIL.\n" +
383
+ "Extract the published version from the notes line matching published: muse-crew@<version> (match case-insensitively and ignore any trailing period — agents sometimes rephrase it). It MUST equal <new-version> from the TARGET_VERSION line. Then run: npm view muse-crew version. The registry version MUST equal <new-version>. If any of these checks fails, FAIL with { \"passed\": false, \"summary\": \"npm publish verification failed: [details]\" }.\n"
378
384
  : "";
379
385
  instructions = "Final QA testing. You are CODE-BLIND — do NOT read source code.\n" +
380
386
  "Public docs (API.md, README, published action schemas) are NOT source code — read them freely, exactly as a user would.\n" +
@@ -302,6 +302,7 @@ while (i < STEPS.length) {
302
302
  "Run: npm view muse-crew version 2>/dev/null || echo NOT_FOUND\n" +
303
303
  "If NOT_FOUND, use the local package.json version as the base instead.\n\n" +
304
304
  "STEP 3: Apply the version_bump scope (" + releaseDecision.version_bump + ") to the base version: patch increments the last segment; minor increments the middle and resets the last to 0; major increments the first and resets the rest to 0. Example: base 1.2.3 + minor → 1.3.0. Call the result <new-version>.\n" +
305
+ "STEP 3B: Make the version math auditable. State the computed target version explicitly — your summary MUST include the line: TARGET_VERSION=<new-version> computed as <base> + <scope> → <new-version> (example: TARGET_VERSION=0.3.1 computed as 0.3.0 + patch → 0.3.1). Every later step uses exactly this version. Do not improvise the arithmetic: 0.3.0 + patch is 0.3.1, never 0.4.0.\n" +
305
306
  "STEP 4: Write <new-version> into package.json (only the `version` field), then commit it under the still-held merge lock: cd " + REPO_PATH + " && git add package.json && git commit -m \"release: muse-crew@<new-version>\". The lock serializes Publish per repo, so two tasks can never pick the same version.\n" +
306
307
  "STEP 5: Pack and publish.\n" +
307
308
  "Run: cd " + REPO_PATH + " && npm pack\n" +
@@ -315,7 +316,9 @@ while (i < STEPS.length) {
315
316
  "Run: CREW_REPO=" + REPO_PATH + " " + LIFECYCLE + " post-deploy " + taskId + "\n" +
316
317
  "If the output contains DEPLOYED, finalization is complete.\n\n" +
317
318
  "Do NOT compare the local package.json version to the registry version: with versions assigned at publish time, local==registry is the normal steady state before assignment — not a signal to skip. Execute every step above.\n\n" +
318
- "End your summary with exactly this line: published: muse-crew@<new-version>\n\n" +
319
+ "End your summary with exactly these two lines, in this order lowercase, no trailing period, do not rephrase (the QA backstop extracts them by pattern):\n" +
320
+ "TARGET_VERSION=<new-version> computed as <base> + <scope> → <new-version>\n" +
321
+ "published: muse-crew@<new-version>\n\n" +
319
322
  "Your final response MUST be valid JSON and nothing else: { \"summary\": \"result\", \"passed\": true }.\n" +
320
323
  "No prose, no markdown, just the JSON object.";
321
324
  } else if (PUBLISH_TYPE === "artifact") {
@@ -318,6 +318,7 @@ while (i < STEPS.length) {
318
318
  "Run: npm view muse-crew version 2>/dev/null || echo NOT_FOUND\n" +
319
319
  "If NOT_FOUND, use the local package.json version as the base instead.\n\n" +
320
320
  "STEP 3: Apply the version_bump scope (" + releaseDecision.version_bump + ") to the base version: patch increments the last segment; minor increments the middle and resets the last to 0; major increments the first and resets the rest to 0. Example: base 1.2.3 + minor → 1.3.0. Call the result <new-version>.\n" +
321
+ "STEP 3B: Make the version math auditable. State the computed target version explicitly — your summary MUST include the line: TARGET_VERSION=<new-version> computed as <base> + <scope> → <new-version> (example: TARGET_VERSION=0.3.1 computed as 0.3.0 + patch → 0.3.1). Every later step uses exactly this version. Do not improvise the arithmetic: 0.3.0 + patch is 0.3.1, never 0.4.0.\n" +
321
322
  "STEP 4: Write <new-version> into package.json (only the `version` field), then commit it under the still-held merge lock: cd " + REPO_PATH + " && git add package.json && git commit -m \"release: muse-crew@<new-version>\". The lock serializes Publish per repo, so two tasks can never pick the same version.\n" +
322
323
  "STEP 5: Pack and publish.\n" +
323
324
  "Run: cd " + REPO_PATH + " && npm pack\n" +
@@ -331,7 +332,9 @@ while (i < STEPS.length) {
331
332
  "Run: CREW_REPO=" + REPO_PATH + " " + LIFECYCLE + " post-deploy " + taskId + "\n" +
332
333
  "If the output contains DEPLOYED, finalization is complete.\n\n" +
333
334
  "Do NOT compare the local package.json version to the registry version: with versions assigned at publish time, local==registry is the normal steady state before assignment — not a signal to skip. Execute every step above.\n\n" +
334
- "End your summary with exactly this line: published: muse-crew@<new-version>\n\n" +
335
+ "End your summary with exactly these two lines, in this order lowercase, no trailing period, do not rephrase (the QA backstop extracts them by pattern):\n" +
336
+ "TARGET_VERSION=<new-version> computed as <base> + <scope> → <new-version>\n" +
337
+ "published: muse-crew@<new-version>\n\n" +
335
338
  "Your final response MUST be valid JSON and nothing else: { \"summary\": \"result\", \"passed\": true }.\n" +
336
339
  "No prose, no markdown, just the JSON object.";
337
340
  } else if (PUBLISH_TYPE === "artifact") {
@@ -372,7 +375,10 @@ while (i < STEPS.length) {
372
375
  // declared release: yes, QA verifies the registry actually moved. A silent
373
376
  // publish skip becomes a loud QA failure with evidence, not a pass.
374
377
  var npmPublishCheck = (PUBLISH_TYPE === "npm" && releaseDecision && releaseDecision.release === "yes")
375
- ? "NPM PUBLISH CHECK: the accepted Build summary declared release: yes, so this run's Publish phase must have published. Find this task's recorded Publish result: call artifact_invoke_action on slug \"" + DASHBOARD_SLUG + "\", action \"getstate\", args: { \"events_limit\": 1 }, then find the session for this task_id with step \"Publish\" (status completed) in the returned sessions array and extract its `published: muse-crew@<version>` line from the session notes (the Publish agent ends its summary with exactly that line — event history does NOT carry it). Then run: npm view muse-crew version. The registry version MUST equal the published version. If there is no completed Publish session with a published: line, or the registry version does not match, FAIL with { \"passed\": false, \"summary\": \"npm publish verification failed: [details]\" }.\n"
378
+ ? "NPM PUBLISH CHECK: the accepted Build summary declared release: yes, so this run's Publish phase must have published. Find this task's recorded Publish result: call artifact_invoke_action on slug \"" + DASHBOARD_SLUG + "\", action \"getstate\", args: { \"events_limit\": 1 }, then find the session for this task_id with step \"Publish\" (status completed) in the returned sessions array and read its session notes (the Publish agent's summary — event history does NOT carry it).\n" +
379
+ "Extract the line matching TARGET_VERSION=<new-version> computed as <base> + <scope> → <new-version>. If the line is missing, FAIL with { \"passed\": false, \"summary\": \"npm publish verification failed: Publish summary did not echo its computed target version (STEP 3B)\" }.\n" +
380
+ "Verify the bump SCOPE: the <scope> in that line MUST equal the accepted version_bump scope \"" + releaseDecision.version_bump + "\" — if the Publish agent applied a different scope, FAIL. Verify the ARITHMETIC: <base> + <scope> must equal <new-version> (patch increments the last segment only, e.g. 0.3.0 + patch → 0.3.1; minor increments the middle and resets the last to 0; major increments the first and resets the rest to 0) — if the math is wrong, FAIL.\n" +
381
+ "Extract the published version from the notes line matching published: muse-crew@<version> (match case-insensitively and ignore any trailing period — agents sometimes rephrase it). It MUST equal <new-version> from the TARGET_VERSION line. Then run: npm view muse-crew version. The registry version MUST equal <new-version>. If any of these checks fails, FAIL with { \"passed\": false, \"summary\": \"npm publish verification failed: [details]\" }.\n"
376
382
  : "";
377
383
  if (PUBLISH_TYPE === "artifact") {
378
384
  var safeDesc = taskDescription.replace(/"/g, "'").replace(/\\/g, "\\\\").slice(0, 500);