@zodiaceco/create 2.7.0 → 2.8.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zodiaceco/create",
3
- "version": "2.7.0",
3
+ "version": "2.8.0",
4
4
  "description": "Start a Zodiac constellation project: npm create @zodiaceco",
5
5
  "author": "Zodiac Labs GmbH",
6
6
  "license": "LGPL-3.0-only",
@@ -1,28 +1,12 @@
1
- # Zodiac Constellation — agent notes
2
-
3
- This repo is a **Zodiac constellation**: a TypeScript description of an org's smart-account graph (Safes, mods, users, permissions). `npm run push` sends the spec to Zodiac, which diffs it against onchain state and gives a UI to review + sign the transactions.
4
-
5
- User-facing docs are in `README.md` — read it before suggesting edits to `constellation/`.
6
-
7
- ## Project map
8
-
9
- - `constellation/index.ts` — entrypoint. **Only exported values get pushed.**
10
- - `constellation/roles/<role>/` — `members.ts` (addresses) + `permissions.ts`
11
- (a list of entries: `custom`, `defikit`, `swap`, `transfer` from
12
- `@zodiaceco/sdk/actions`, or a bare `allow` kit permission).
13
- - `constellation/allowances/` — reusable Roles allowance objects (key, refill, period, ...).
14
- A permission draws on one by naming its key: `c.withinAllowance("usdc_payouts")`.
15
- - `zodiac.config.ts` — contracts the `allow` kit should know about.
16
- - `.zodiac/` — generated codegen; **never edit by hand**. Re-run `npm run pull` (or `pull-org` / `pull-contracts`) to refresh.
17
-
18
- ## Conventions
19
-
20
- - Entries **describe, they never compile**. `defikit` stores a protocol, verb
21
- and parameters; `swap` stores its token lists. The permissions are built when
22
- the constellation is deployed, so a stored revision never carries a copy of
23
- what a preset meant on the day it was written.
24
-
25
- - Import `constellation`, `allow`, `c` and the `Members` / `Permissions` types from `@zodiaceco/sdk`, the entries from `@zodiaceco/sdk/actions`.
26
- - After editing `zodiac.config.ts` (contracts) or anything that changes referenced accounts/users, run `npm run pull` so the generated types match.
27
- - Any package manager works: run the scripts with `npm run`, `pnpm`, `yarn` or `bun run`. The `zodiac` CLI loads `.env` itself.
28
- - `npx zodiac push --dry-run` prints what would be pushed, without pulling or an API key: use it to check an edit.
1
+ # Agent notes
2
+
3
+ A Zodiac constellation: TypeScript describing an org's Safes, Roles mods and permissions. `README.md` has the full API.
4
+
5
+ - Only values exported from `constellation/index.ts` are pushed.
6
+ - A new role needs its folder under `constellation/roles/`, an export in `constellation/roles/index.ts`, and an entry in the Roles mod's `roles`.
7
+ - `c.withinAllowance("<key>")` only works if that allowance is in the Roles mod's `allowances`.
8
+ - `allow.<chain>.<contract>` only knows contracts listed in `zodiac.config.ts`. After changing them, run `npm run pull-contracts`.
9
+ - Never edit `.zodiac/` or `abis/`: they're generated. Run `npm run pull` to refresh them.
10
+ - Import `constellation`, `allow`, `c` and the types from `@zodiaceco/sdk`; `custom`, `defikit`, `swap` and `transfer` from `@zodiaceco/sdk/actions`.
11
+ - Check an edit with `npx tsc --noEmit` and `npx zodiac push --dry-run`; neither needs an API key.
12
+ - Don't run `npm run push` unless asked: it sends the constellation to the org's Zodiac workspace.
@@ -251,6 +251,34 @@ allow.eth.susds["deposit(uint256,address)"](
251
251
  );
252
252
  ```
253
253
 
254
+ ### Showing Safes and roles in the Zodiac app
255
+
256
+ A constellation deploys everything it describes, but the Zodiac app only lists what you mark for the rest of your org.
257
+
258
+ **Vaults.** Add `vault: true` to a Safe to list it under **Vaults**. It's named by its label, the key in `eth.safe["Treasury"]`:
259
+
260
+ ```ts
261
+ export const treasury = eth.safe["Treasury"]({
262
+ nonce: 0n,
263
+ threshold: 1,
264
+ owners: ["0x…"],
265
+ modules: [eth.roles["Treasury Roles"]],
266
+ vault: true,
267
+ });
268
+ ```
269
+
270
+ **Policies.** Export `policy` from a role's folder to list the role under **Policies**, so everyone in your org can see what it permits. The value is the policy's name; a `description` is optional:
271
+
272
+ ```ts
273
+ // constellation/roles/treasury_ops/index.ts
274
+ export { default as members } from "./members";
275
+ export { default as permissions } from "./permissions";
276
+ export const policy = "Treasury Ops";
277
+ export const description = "Day-to-day treasury operations";
278
+ ```
279
+
280
+ Neither reaches the chain. The policy's identity is the role key (`treasury_ops`), not its name, so renaming it changes nothing onchain. Every Roles mod that has a role with the same key carries the same policy: each of them has to give it the same name, description, members and permissions, and no two of them may act for the same Safe.
281
+
254
282
  ## Commands
255
283
 
256
284
  | Command | What it does |