@fungi.computer/bonsai 0.2.5 → 0.3.0

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,51 @@
1
1
  # @fungi.computer/bonsai
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Changes since 0.2.6:
8
+
9
+ - feat(repository): scope docs-only gates
10
+ - fix(oyster): close every anonymous door
11
+ - fix(oyster): route every host request through one authorization owner
12
+ - fix(oyster): keep every door closed through authorization.ts
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies
17
+ - Updated dependencies
18
+ - Updated dependencies
19
+ - Updated dependencies
20
+ - Updated dependencies
21
+ - Updated dependencies
22
+ - Updated dependencies
23
+ - @fungi.computer/agar@0.6.0
24
+ - @fungi.computer/braid@0.3.0
25
+ - @fungi.computer/caps@0.5.0
26
+ - @fungi.computer/oyster@0.7.0
27
+ - @fungi.computer/puffball@0.3.0
28
+ - @fungi.computer/trellis@0.5.0
29
+ - @fungi.computer/workflows-wire@0.3.0
30
+ - @fungi.computer/nacre@0.1.1
31
+
32
+ ## 0.2.6
33
+
34
+ ### Patch Changes
35
+
36
+ - Updated dependencies
37
+ - Updated dependencies
38
+ - Updated dependencies
39
+ - Updated dependencies
40
+ - Updated dependencies
41
+ - @fungi.computer/agar@0.5.0
42
+ - @fungi.computer/caps@0.4.0
43
+ - @fungi.computer/nacre@0.1.0
44
+ - @fungi.computer/oyster@0.6.0
45
+ - @fungi.computer/trellis@0.4.0
46
+ - @fungi.computer/braid@0.2.4
47
+ - @fungi.computer/workflows-wire@0.2.4
48
+
3
49
  ## 0.2.5
4
50
 
5
51
  ### Patch Changes
package/README.md CHANGED
@@ -8,10 +8,10 @@ agent gets its own fork, pushes with ordinary `git`, and shows up live.
8
8
  Bonsai is one of the starter Apps of
9
9
  [Oyster](https://github.com/fungi-computer/oyster), the open App host that runs
10
10
  on your own Cloudflare account. Its repositories live in Cloudflare Artifacts,
11
- so a repository per agent is cheap. Try it at
12
- <https://oyster.shiit.app/apps/bonsai/>: that installation is public and
13
- read-only, so you can browse repositories, the graph, Changes and issues with no
14
- sign-in.
11
+ so a repository per agent is cheap. The live instance at
12
+ [oyster.shiit.app](https://oyster.shiit.app/) requires an Oyster key. To try
13
+ Oyster without a Cloudflare account,
14
+ [run it locally](https://docs.fungi.computer/guides/run-your-own-oyster/#run-it-on-your-laptop).
15
15
 
16
16
  ## What you can do
17
17
 
@@ -58,7 +58,7 @@ Oyster with `git push`, builds them on your Computer and installs them. Sign in
58
58
  at `$OYSTER_URL/login` with the owner key and open Bonsai from the Tourtois
59
59
  desktop. Run `install-apps` again to update; each App keeps its data.
60
60
 
61
- To let anyone browse your Bonsai read-only, as the live demo does:
61
+ To let anyone browse your Bonsai read-only:
62
62
 
63
63
  ```sh
64
64
  curl -X PUT -H "Authorization: Bearer $OYSTER_OWNER_KEY" -H 'content-type: application/json' \
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@fungi.computer/bonsai",
3
- "version": "0.2.5",
3
+ "version": "0.3.0",
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.4.0",
9
- "@fungi.computer/caps": "0.3.1",
8
+ "@fungi.computer/agar": "0.6.0",
9
+ "@fungi.computer/caps": "0.5.0",
10
10
  "@fungi.computer/issues": "0.2.0",
11
- "@fungi.computer/oyster": "0.5.0",
12
- "@fungi.computer/puffball": "0.2.0",
11
+ "@fungi.computer/oyster": "0.7.0",
12
+ "@fungi.computer/puffball": "0.3.0",
13
13
  "@fungi.computer/sigils": "0.2.0",
14
14
  "@fungi.computer/stipe": "0.1.0",
15
15
  "@pierre/diffs": "1.3.6",
@@ -29,10 +29,10 @@
29
29
  "@fungi.computer/maosaico": "0.1.0",
30
30
  "@visx/hierarchy": "3.12.0",
31
31
  "@fungi.computer/gills": "0.2.0",
32
- "@fungi.computer/nacre": "0.0.3",
33
- "@fungi.computer/trellis": "0.3.0",
34
- "@fungi.computer/braid": "0.2.3",
35
- "@fungi.computer/workflows-wire": "0.2.3"
32
+ "@fungi.computer/nacre": "0.1.1",
33
+ "@fungi.computer/trellis": "0.5.0",
34
+ "@fungi.computer/braid": "0.3.0",
35
+ "@fungi.computer/workflows-wire": "0.3.0"
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.0.4"
55
+ "@fungi.computer/computer-contract": "0.0.6"
56
56
  },
57
57
  "botanical": {
58
58
  "role": "app",
@@ -12,6 +12,13 @@ import { BonsaiState, ensureBonsaiTables } from "../backend/state.js";
12
12
  import type { Bonsai } from "../backend/service.js";
13
13
  import { realGit } from "@fungi.computer/agar/test-kit/git";
14
14
 
15
+ /** A Git door answers whole requests; resolve a path against one origin. */
16
+ const gitFetch = (
17
+ door: { fetch: (request: Request) => Promise<Response> },
18
+ path: string,
19
+ init?: RequestInit,
20
+ ) => door.fetch(new Request(new URL(path, "https://oyster.test"), init));
21
+
15
22
  function fixture() {
16
23
  const database = new DatabaseSync(":memory:");
17
24
  const sql = fromNodeSqlite(database);
@@ -84,7 +91,7 @@ it("refuses repository deletion before state or provider writes for every non-ow
84
91
  }
85
92
  });
86
93
 
87
- it("withdraws the public listing and anonymous clone after owner deletion", async () => {
94
+ it("withdraws the listing and owner clone after owner deletion", async () => {
88
95
  const f = fixture();
89
96
  const provider = realGit();
90
97
  try {
@@ -113,7 +120,7 @@ it("withdraws the public listing and anonymous clone after owner deletion", asyn
113
120
  grants: { admits: () => Promise.resolve(true) },
114
121
  policy: {
115
122
  authorize: () =>
116
- Promise.reject(new Error("Anonymous clone never authorizes a push")),
123
+ Promise.reject(new Error("A clone never authorizes a push")),
117
124
  },
118
125
  journal: {
119
126
  tip: () => Promise.reject(new Error("Clone has no write journal")),
@@ -121,12 +128,16 @@ it("withdraws the public listing and anonymous clone after owner deletion", asyn
121
128
  },
122
129
  });
123
130
  const door = createGitDoor({
124
- authenticate: () => Promise.resolve(null),
125
- isPublic: () => Promise.resolve(true),
131
+ authenticate: () =>
132
+ Promise.resolve({
133
+ kind: "actor",
134
+ actor: { kind: "member", memberId: "owner" },
135
+ role: "owner",
136
+ }),
126
137
  git: () => Promise.resolve(git),
127
138
  });
128
139
  const path = "/git/bonsai/pond.git/info/refs?service=git-upload-pack";
129
- expect((await door.request(path)).status).toBe(200);
140
+ expect((await gitFetch(door, path)).status).toBe(200);
130
141
  await expect(
131
142
  appBackend.call("repos.list", {}, { bonsai }, owner),
132
143
  ).resolves.toMatchObject({ repos: [{ name: "pond" }] });
@@ -136,11 +147,11 @@ it("withdraws the public listing and anonymous clone after owner deletion", asyn
136
147
  await expect(
137
148
  appBackend.call("repos.list", {}, { bonsai }, owner),
138
149
  ).resolves.toEqual({ repos: [] });
139
- expect((await door.request(path)).status).toBe(404);
150
+ expect((await gitFetch(door, path)).status).toBe(404);
140
151
  await expect(
141
152
  appBackend.call("repos.delete", { repo: "pond" }, { bonsai }, owner),
142
153
  ).resolves.toEqual({ deleted: true });
143
- expect((await door.request(path)).status).toBe(404);
154
+ expect((await gitFetch(door, path)).status).toBe(404);
144
155
  } finally {
145
156
  provider.close();
146
157
  f.database.close();
package/turbo.jsonc CHANGED
@@ -19,6 +19,10 @@
19
19
  "$TURBO_ROOT$/.agents/skills/orchestrate-multi-lane-work/scripts/proof-time-bound.sh",
20
20
  "$TURBO_ROOT$/tooling/celld-platform/runtime/**",
21
21
  "$TURBO_ROOT$/apps/trellis/templates/**",
22
+ "!$TURBO_ROOT$/apps/docs/release-claims/**",
23
+ "!**/*.{md,mdx}",
24
+ "!$TURBO_ROOT$/**/*.{md,mdx}",
25
+ "!release-claims/**",
22
26
  ],
23
27
  },
24
28
  },