@fungi.computer/bonsai 0.12.1 → 0.12.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/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @fungi.computer/bonsai
2
2
 
3
+ ## 0.12.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Changes since 0.12.1:
8
+
9
+ - fix(shed): name why a Shed, Bonsai, Inkcap or TUI action failed
10
+
11
+ - Updated dependencies
12
+ - Updated dependencies
13
+ - @fungi.computer/agar@0.27.1
14
+ - @fungi.computer/oyster@0.56.2
15
+ - @fungi.computer/trellis@0.28.2
16
+ - @fungi.computer/braid@0.6.9
17
+ - @fungi.computer/nacre@0.9.2
18
+ - @fungi.computer/workflows-wire@0.7.10
19
+
3
20
  ## 0.12.1
4
21
 
5
22
  ### Patch Changes
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@fungi.computer/bonsai",
3
- "version": "0.12.1",
3
+ "version": "0.12.2",
4
4
  "author": "Levi <levi@technomancy.dev>",
5
5
  "type": "module",
6
6
  "description": "Bonsai: a git platform for many agents working at once, on Workers and Artifacts",
7
7
  "dependencies": {
8
- "@fungi.computer/agar": "0.27.0",
8
+ "@fungi.computer/agar": "0.27.1",
9
9
  "@fungi.computer/caps": "0.12.8",
10
10
  "@fungi.computer/issues": "0.2.0",
11
- "@fungi.computer/oyster": "0.56.1",
11
+ "@fungi.computer/oyster": "0.56.2",
12
12
  "@fungi.computer/puffball": "0.15.0",
13
13
  "@fungi.computer/sigils": "0.3.2",
14
14
  "@fungi.computer/stipe": "0.1.1",
@@ -29,10 +29,10 @@
29
29
  "@fungi.computer/maosaico": "0.1.2",
30
30
  "@visx/hierarchy": "3.12.0",
31
31
  "@fungi.computer/gills": "0.4.0",
32
- "@fungi.computer/nacre": "0.9.1",
33
- "@fungi.computer/trellis": "0.28.1",
34
- "@fungi.computer/braid": "0.6.8",
35
- "@fungi.computer/workflows-wire": "0.7.9"
32
+ "@fungi.computer/nacre": "0.9.2",
33
+ "@fungi.computer/trellis": "0.28.2",
34
+ "@fungi.computer/braid": "0.6.9",
35
+ "@fungi.computer/workflows-wire": "0.7.10"
36
36
  },
37
37
  "devDependencies": {
38
38
  "playwright": "1.62.1",
@@ -52,7 +52,7 @@
52
52
  "eslint": "10.9.1",
53
53
  "oxlint": "1.78.0",
54
54
  "jsdom": "29.0.1",
55
- "@fungi.computer/computer-contract": "0.6.2"
55
+ "@fungi.computer/computer-contract": "0.6.3"
56
56
  },
57
57
  "botanical": {
58
58
  "role": "app",
@@ -575,7 +575,7 @@ describe("Bonsai change page", () => {
575
575
  await Promise.resolve();
576
576
  });
577
577
  expect(container.querySelector('[role="status"]')?.textContent).toBe(
578
- "The merge did not complete. Review the Change and try again.",
578
+ "The merge did not complete: the Change is still open and reported no conflict. Review it before merging again.",
579
579
  );
580
580
  });
581
581
 
@@ -875,7 +875,7 @@ describe("Bonsai change page", () => {
875
875
  await Promise.resolve();
876
876
  });
877
877
  expect(container.querySelector('[role="status"]')?.textContent).toBe(
878
- "The merge did not complete. Review the Change and try again.",
878
+ "The merge did not complete: the Change is still open and reported no conflict. Review it before merging again.",
879
879
  );
880
880
 
881
881
  // Second click: sawMerging must reset, or this click's own optimistic
@@ -910,7 +910,7 @@ describe("Bonsai change page", () => {
910
910
  await Promise.resolve();
911
911
  });
912
912
  expect(container.querySelector('[role="status"]')?.textContent).toBe(
913
- "The merge did not complete. Review the Change and try again.",
913
+ "The merge did not complete: the Change is still open and reported no conflict. Review it before merging again.",
914
914
  );
915
915
  });
916
916
  });
@@ -105,7 +105,7 @@ it.each<FileSaveResult>([
105
105
  async (result) => {
106
106
  const f = fixture(empty, result);
107
107
  await expect(writeFirstIssue("pond", "main")).rejects.toThrow(
108
- "could not be created",
108
+ "The issue could not be created: ",
109
109
  );
110
110
  expect(f.open).not.toHaveBeenCalled();
111
111
  },
@@ -230,7 +230,7 @@ export function ChangePage({ repo, number }: { repo: string; number: number }) {
230
230
  change.head,
231
231
  )
232
232
  : sawMerging.current
233
- ? "The merge did not complete. Review the Change and try again."
233
+ ? "The merge did not complete: the Change is still open and reported no conflict. Review it before merging again."
234
234
  : outcome
235
235
  : outcome;
236
236
  const perform = async (action: "merge" | "approve" | "close") => {
@@ -1,6 +1,28 @@
1
- import { fileContent, fileSaveResult } from "@fungi.computer/agar/roles/files";
1
+ import {
2
+ fileContent,
3
+ fileSaveResult,
4
+ type FileSaveResult,
5
+ } from "@fungi.computer/agar/roles/files";
2
6
  import { callMethod, editInFilesEditor, filesEditor } from "./transport.js";
3
7
 
8
+ const saveReasons = {
9
+ branch_missing: "the branch no longer exists",
10
+ access_changed: "your access to it changed",
11
+ sync_failed: "the save could not be synced to the branch",
12
+ permanent_material: "the file holds material that can never be saved",
13
+ "not-source-writer": "you cannot write to this Source",
14
+ "background-unavailable": "background saving is unavailable",
15
+ } as const;
16
+
17
+ /** Why a save that did not land did not land, in plain words. */
18
+ function saveRefusal(
19
+ result: Exclude<FileSaveResult, { kind: "saved" | "synced" }>,
20
+ ): string {
21
+ return result.kind === "conflict"
22
+ ? "the file changed while it was being created"
23
+ : saveReasons[result.reason];
24
+ }
25
+
4
26
  export const firstIssuePath = "issues/general/01-first-issue.md";
5
27
 
6
28
  /** Create the first issue through the editor's save door, then open it there. */
@@ -57,7 +79,9 @@ Add any details that will help someone understand the issue.
57
79
  fileSaveResult,
58
80
  );
59
81
  if (result.kind !== "saved" && result.kind !== "synced")
60
- throw new Error("The issue could not be created. Try again.");
82
+ throw new Error(
83
+ `The issue could not be created: ${saveRefusal(result)}.`,
84
+ );
61
85
  }
62
86
  await editInFilesEditor(repo, branch, firstIssuePath);
63
87
  }