@yagni-app/code-staging 1.2.12-staging.2152.1 → 1.2.12-staging.2153.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.
@@ -101,11 +101,12 @@ export declare const SANDBOX_SECTION: string;
101
101
  * --cloud`, the one-attempt lane), in place of {@link SANDBOX_SECTION}: `gh`
102
102
  * works through YAGNI's forwarder (the run token stands in for a GitHub
103
103
  * token, and the forwarder holds the real one), ticket images are files, and
104
- * sibling repositories clone on demand. The only absolute paths it names are
105
- * the browser's, which {@link SANDBOX_SECTION} names too, so the pi image
106
- * smoke's check of that section covers them; the input folder and the clone
107
- * folder are named relative to the ticket and the home directory, since the
108
- * host creates them per session and they are not on the image.
104
+ * sibling repositories are read with `gh api` on demand: the session holds no
105
+ * git credential, so a clone of one fails (ENG-3033). The only absolute paths
106
+ * it names are the browser's, which {@link SANDBOX_SECTION} names too, so the
107
+ * pi image smoke's check of that section covers them; the input folder is
108
+ * named relative to the ticket, since the host creates it per session and it
109
+ * is not on the image.
109
110
  *
110
111
  * Content constraints (parity with {@link TICKET_IMAGE_RULE}): must not
111
112
  * contain the standalone word "pi", no `- ` bullet lines, no emojis.
@@ -212,11 +212,12 @@ export const SANDBOX_SECTION = `${SANDBOX_SECTION_HEADER}\n` +
212
212
  * --cloud`, the one-attempt lane), in place of {@link SANDBOX_SECTION}: `gh`
213
213
  * works through YAGNI's forwarder (the run token stands in for a GitHub
214
214
  * token, and the forwarder holds the real one), ticket images are files, and
215
- * sibling repositories clone on demand. The only absolute paths it names are
216
- * the browser's, which {@link SANDBOX_SECTION} names too, so the pi image
217
- * smoke's check of that section covers them; the input folder and the clone
218
- * folder are named relative to the ticket and the home directory, since the
219
- * host creates them per session and they are not on the image.
215
+ * sibling repositories are read with `gh api` on demand: the session holds no
216
+ * git credential, so a clone of one fails (ENG-3033). The only absolute paths
217
+ * it names are the browser's, which {@link SANDBOX_SECTION} names too, so the
218
+ * pi image smoke's check of that section covers them; the input folder is
219
+ * named relative to the ticket, since the host creates it per session and it
220
+ * is not on the image.
220
221
  *
221
222
  * Content constraints (parity with {@link TICKET_IMAGE_RULE}): must not
222
223
  * contain the standalone word "pi", no `- ` bullet lines, no emojis.
@@ -228,7 +229,7 @@ export const SANDBOX_CLOUD_SECTION = `${SANDBOX_SECTION_HEADER}\n` +
228
229
  "\n" +
229
230
  "GitHub: `gh` works. It talks to YAGNI's forwarder, which makes each call as " +
230
231
  "this Team's GitHub App, so no token you could write with is in this " +
231
- "sandbox. It reads the repositories the installation can see, and it writes " +
232
+ "sandbox. It reads this Team's repositories, and it writes " +
232
233
  "only to this attempt's branch and pull request; merging and approving a " +
233
234
  "review are refused. Commit your work and do not push: YAGNI pushes the " +
234
235
  "branch and opens the pull request after you finish.\n" +
@@ -246,10 +247,12 @@ export const SANDBOX_CLOUD_SECTION = `${SANDBOX_SECTION_HEADER}\n` +
246
247
  "Installs: the network is open, and you may install what the work needs.\n" +
247
248
  "\n" +
248
249
  "Other repositories: the ticket lists this account's other repositories. When " +
249
- "the work depends on one, clone it read-only on demand with " +
250
- "`git clone --filter=blob:none --depth 1` into `~/context/<repo>`: file " +
251
- "contents arrive as you read them, so a clone takes seconds. Nothing there is " +
252
- "part of your change.";
250
+ "the work depends on one, read it with gh on demand, never with git clone: " +
251
+ "this sandbox has no git credential, so a clone fails. List its files with " +
252
+ "`gh api 'repos/<owner>/<repo>/git/trees/HEAD?recursive=1' --jq '.tree[].path'` " +
253
+ "and read one with " +
254
+ "`gh api -H 'Accept: application/vnd.github.raw' 'repos/<owner>/<repo>/contents/<path>'`. " +
255
+ "Nothing there is part of your change.";
253
256
  /**
254
257
  * File-tool steering: prefer the first-class write/edit tools over bash file
255
258
  * writes, one write call per file instead of a heredoc batch, and never create
@@ -206,7 +206,7 @@ function cloudPlanTask(inputDir) {
206
206
  `- ${at("checks.json")}: the repository's checks, and which already fail on the unchanged code.\n` +
207
207
  `- ${at("playbook.md")}: the Team's planning rules. Always follow them.\n` +
208
208
  `- ${at("plan-line.md")}: this Team's instructions for planning.\n` +
209
- `- The repositories under "Read these repositories first" in ${at("ticket.md")}: clone each read-only ` +
209
+ `- The repositories under "Read these repositories first" in ${at("ticket.md")}: read each with gh ` +
210
210
  "as it says, and read the pages it names before you plan; they are this team's own account of how " +
211
211
  "the code works.\n\n" +
212
212
  "Planning is reading code, nothing else. Settle a fact by reading files, grepping, listing folders, and " +
@@ -217,8 +217,10 @@ function cloudPlanTask(inputDir) {
217
217
  "plan's checks, which the build runs.\n\n" +
218
218
  'If a command fails with "no space left on device", the disk is full: stop there. Do not delete files, ' +
219
219
  "prune Docker or retry. Write the plan and say what you could not check.\n\n" +
220
- "When the work depends on another repository the ticket's Other repositories section lists, clone it " +
221
- "read-only on demand with `git clone --filter=blob:none --depth 1` into ~/context/<repo> and read it there. " +
220
+ "When the work depends on another repository the ticket's Other repositories section lists, read it on " +
221
+ "demand with gh, never git clone (this session has no git credential): list its files with " +
222
+ "`gh api 'repos/<owner>/<repo>/git/trees/HEAD?recursive=1' --jq '.tree[].path'`, then read one with " +
223
+ "`gh api -H 'Accept: application/vnd.github.raw' 'repos/<owner>/<repo>/contents/<path>'`. " +
222
224
  "When the change itself needs writes in one of those repositories (an API this repository calls, a " +
223
225
  "package it consumes), say so in the plan's repositoriesNeeded, in build order: the ticket is then " +
224
226
  "split into one ticket per repository, built in that order, and each step for another repository " +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yagni-app/code-staging",
3
- "version": "1.2.12-staging.2152.1",
3
+ "version": "1.2.12-staging.2153.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": "c3ae13f6e1610823d8be87de23f2ac67f1b65f83"
61
+ "yagniSourceSha": "fdf464d8acc19ee17793ac575b7d93ec29f5e984"
62
62
  }