@yagni-app/code-staging 1.2.14-staging.2351.1 → 1.2.14-staging.2357.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.
@@ -143,6 +143,11 @@ export interface TurnFacts {
143
143
  preview?: boolean;
144
144
  /** Who writes the change, as the host said (`codeWriter.ts`); absent, the session. */
145
145
  codeWriter?: CodeWriter;
146
+ /**
147
+ * `conversation-put-back.md`, as the host wrote it: the conversation was put
148
+ * back on a new machine before this turn, and what that machine lacks.
149
+ */
150
+ conversationPutBack?: string | null;
146
151
  /**
147
152
  * The input folder has `own-plans.md`: this yak approves its own plans, so
148
153
  * no person answers the plan's questions. Only ever on a plan turn.
@@ -153,6 +158,12 @@ export interface TurnFacts {
153
158
  export declare const OWN_PLANS_FILE_NAME = "own-plans.md";
154
159
  /** The file the host writes a person's note for the next step to (`attempts/inputs.ts`). */
155
160
  export declare const NEXT_STEP_NOTE_FILE_NAME = "next-step-note.md";
161
+ /**
162
+ * The file the host writes when it put the conversation back on a new
163
+ * machine before this turn (`attempts/conversationPutBack.ts`): what is gone
164
+ * from the machine. Only on the turn it was put back for.
165
+ */
166
+ export declare const CONVERSATION_PUT_BACK_FILE_NAME = "conversation-put-back.md";
156
167
  /** The file the host writes a yak's new messages to (`attempts/inputs.ts`, `yaks/turns.ts`). */
157
168
  export declare const NEW_SINCE_LAST_TURN_FILE_NAME = "new-since-last-turn.md";
158
169
  /** The file the host names a yak's System's other repositories in (`attempts/inputs.ts`, YAG-1211). */
@@ -181,6 +181,12 @@ function feedStage(stage) {
181
181
  export const OWN_PLANS_FILE_NAME = "own-plans.md";
182
182
  /** The file the host writes a person's note for the next step to (`attempts/inputs.ts`). */
183
183
  export const NEXT_STEP_NOTE_FILE_NAME = "next-step-note.md";
184
+ /**
185
+ * The file the host writes when it put the conversation back on a new
186
+ * machine before this turn (`attempts/conversationPutBack.ts`): what is gone
187
+ * from the machine. Only on the turn it was put back for.
188
+ */
189
+ export const CONVERSATION_PUT_BACK_FILE_NAME = "conversation-put-back.md";
184
190
  /** The file the host writes a yak's new messages to (`attempts/inputs.ts`, `yaks/turns.ts`). */
185
191
  export const NEW_SINCE_LAST_TURN_FILE_NAME = "new-since-last-turn.md";
186
192
  /** The file the host names a yak's System's other repositories in (`attempts/inputs.ts`, YAG-1211). */
@@ -317,6 +323,11 @@ export function turnMessage(facts) {
317
323
  // your last turn" and carries each message fenced, so the session hears
318
324
  // them in this turn's message, ahead of the rules it ends on.
319
325
  const newSince = facts.newSinceLastTurn?.trim();
326
+ // The host's file opens with "# This machine is new": said first, before
327
+ // anything the turn reads or runs on the machine.
328
+ const putBack = facts.resumed ? facts.conversationPutBack?.trim() : undefined;
329
+ if (putBack)
330
+ parts.push(putBack);
320
331
  if (facts.stage === "plan") {
321
332
  if (facts.resumed && facts.sentBack) {
322
333
  parts.push(`A person sent your plan back. What they asked is in ${at("ticket.md")}, and the plan they sent back is ${at("sent-back-plan.md")}. Plan again: keep what they did not ask to change. ${PLANNED_ANYWAY}`);
@@ -780,6 +791,7 @@ async function runTurn(input, deps, pulse) {
780
791
  sentBack: exists(join(input.inputDir, "sent-back-plan.md")),
781
792
  nextStepNote: input.stage === "plan" ? null : readOrNull(join(input.inputDir, NEXT_STEP_NOTE_FILE_NAME)),
782
793
  newSinceLastTurn: readOrNull(join(input.inputDir, NEW_SINCE_LAST_TURN_FILE_NAME)),
794
+ conversationPutBack: readOrNull(join(input.inputDir, CONVERSATION_PUT_BACK_FILE_NAME)),
783
795
  ...(drawsPreview ? { preview: true } : {}),
784
796
  ...(input.stage === "plan" && exists(join(input.inputDir, OWN_PLANS_FILE_NAME))
785
797
  ? { ownPlans: true }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yagni-app/code-staging",
3
- "version": "1.2.14-staging.2351.1",
3
+ "version": "1.2.14-staging.2357.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": "59922a7f75610bfa512989a2a60beb9921f016a8"
61
+ "yagniSourceSha": "3477ac1a89118aa5a29d65ff8e9f572cfa7148fb"
62
62
  }