@yagni-app/code-staging 1.2.15-staging.2656.1 → 1.2.15-staging.2661.1

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.
@@ -164,6 +164,8 @@ export interface AttemptResult extends CloudIdentity {
164
164
  uiPreview?: "drawn" | "none" | "not_drawn";
165
165
  /** The session lane's ask on a `needs_person` stop (`needsPerson.ts`). */
166
166
  ask?: AttemptAsk;
167
+ /** A turn that committed nothing: why nothing needed to change (`sessionLane.ts`, YAG-1598). */
168
+ nothingNeeded?: string;
167
169
  }
168
170
  /** The findings the result reports, blocking first. */
169
171
  export declare function openFindings(findings: readonly Finding[]): OpenFinding[];
@@ -131,6 +131,8 @@ function incompleteHandoff(r) {
131
131
  * against stderr/errorMessage only — never a stage's real output.
132
132
  */
133
133
  const CREDIT_EXHAUSTION_RE = /out of credits|insufficient_quota|payment required|\b402\b/;
134
+ /** The proxy's 402 where the workspace can buy credits (`BUY_CREDITS_SENTENCE`). */
135
+ const BUY_CREDITS_RE = /Buy more on Settings/;
134
136
  /**
135
137
  * The run-scoped budget shapes: a Run's own approved budget or model-request
136
138
  * limit, which the proxy refuses with a 429 typed `insufficient_quota`. The
@@ -169,9 +171,14 @@ export function creditExhaustionReason(r) {
169
171
  }
170
172
  if (!CREDIT_EXHAUSTION_RE.test(hay))
171
173
  return undefined;
172
- // "out of YAGNI credits" is the backend's marker; nothing is for sale in
173
- // the app, so the act is the email.
174
- return "the workspace is out of YAGNI credits (the model proxy returned 402). Email support@yagni.app for more credits, then re-run /go.";
174
+ // "out of YAGNI credits" is the backend's marker. The act is the proxy's
175
+ // own (`moreCreditsSentence` in the backend): where credit packs are for
176
+ // sale its 402 says to buy them on Settings → Spending (YAG-1604), else
177
+ // to email.
178
+ const act = BUY_CREDITS_RE.test(hay)
179
+ ? "Buy more on Settings → Spending, or email support@yagni.app"
180
+ : "Email support@yagni.app for more credits";
181
+ return `the workspace is out of YAGNI credits (the model proxy returned 402). ${act}, then re-run /go.`;
175
182
  }
176
183
  /** How a reviewer is named in the round's record: its lens, or the lane's one reviewer. */
177
184
  function reviewerName(lens) {
@@ -251,6 +251,8 @@ export interface SessionReport {
251
251
  notVerified: string[];
252
252
  /** The steps it did differently than plan.md says, or left out (spec 2026-11-02 §4). */
253
253
  planChanges: PlanChange[];
254
+ /** A turn that committed nothing: why nothing needed to change (YAG-1598). */
255
+ nothingNeeded?: string;
254
256
  }
255
257
  /**
256
258
  * `session-report.json` as this process folds it, or null when it is missing
@@ -312,7 +312,8 @@ const REPORT_CONTRACT = (outDir) => `Last, write ${join(outDir, SESSION_REPORT_F
312
312
  '"baseline": "runnable | fails_on_base | cannot_run"}], ' +
313
313
  '"notVerified": ["<what you could not verify, and why>"], ' +
314
314
  '"planChanges": [{"step": <the step\'s number in plan.md, or null for the plan as a whole>, ' +
315
- '"instead": "<what you did instead>", "why": "<why>"}]}. ' +
315
+ '"instead": "<what you did instead>", "why": "<why>"}], ' +
316
+ '"nothingNeeded": "<only when you committed nothing: why nothing needed to change, in one or two plain sentences a person reads in the thread, naming the file or commit that already does it>"}. ' +
316
317
  "List every check you ran on the final tree with its real exit code; a check you did not run is " +
317
318
  'not a pass, and goes in "notVerified". "baseline" is "fails_on_base" only when the check failed on ' +
318
319
  "the unchanged code in a run this attempt made, yours or one checks.json's baseMeasured names; a " +
@@ -628,7 +629,14 @@ export function parseSessionReport(text, known = new Map()) {
628
629
  .filter((entry) => entry !== null)
629
630
  .slice(0, MAX_REPORT_LINES);
630
631
  const planChanges = parsePlanChanges(data.planChanges);
631
- return { summary: line(data.summary, 1_500), checks, notVerified, planChanges };
632
+ const nothingNeeded = line(data.nothingNeeded, 1_500);
633
+ return {
634
+ summary: line(data.summary, 1_500),
635
+ checks,
636
+ notVerified,
637
+ planChanges,
638
+ ...(nothingNeeded ? { nothingNeeded } : {}),
639
+ };
632
640
  }
633
641
  /** The checks the host named in `checks.json`, by their command, with how each stands on the base. */
634
642
  function knownBaselines(inputDir, readFile) {
@@ -662,6 +670,10 @@ export function withReport(attempt, report) {
662
670
  checks: report.checks.length > 0 ? report.checks : attempt.checks,
663
671
  notes,
664
672
  ...(report.planChanges.length > 0 ? { planChanges: report.planChanges } : {}),
673
+ // The host reads it only of a turn that committed nothing.
674
+ ...(report.nothingNeeded && attempt.commits.length === 0
675
+ ? { nothingNeeded: report.nothingNeeded }
676
+ : {}),
665
677
  };
666
678
  }
667
679
  /** The most of a child's stderr a failed turn's note carries. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yagni-app/code-staging",
3
- "version": "1.2.15-staging.2656.1",
3
+ "version": "1.2.15-staging.2661.1",
4
4
  "description": "YAGNI Code: a terminal coding agent that already knows your company. One YAGNI login routes the model and grounds the agent in your team's context.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "YAGNI, Inc. <jack@yagni.app> (https://yagni.app)",
@@ -58,5 +58,5 @@
58
58
  "turndown": "^7.2.4",
59
59
  "typebox": "^1.3.15"
60
60
  },
61
- "yagniSourceSha": "440e61cba163e4f8b2d15a6692338bdb5c440e9d"
61
+ "yagniSourceSha": "891908951ce7f3ebe498ef06c319cf1d50b9a852"
62
62
  }