@volter/teams 0.2.0 → 0.2.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.
package/package.json CHANGED
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "name": "@volter/teams",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "description": "Volter Teams, the neutral team plane: machine identity and daemon core, the local door and server link, admission from machine grants, product doors, and the Teams server's neutral routes (company RFC 0008).",
6
6
  "license": "MIT",
7
7
  "exports": {
8
- "./agent-profile": {"types":"./agent-profile.d.ts","default":"./agent-profile.mjs"},
8
+ "./agent-profile": {
9
+ "types": "./agent-profile.d.ts",
10
+ "default": "./agent-profile.mjs"
11
+ },
9
12
  ".": "./index.mjs",
10
13
  "./channel": "./channel.mjs",
11
14
  "./browser-channel": {
@@ -7,13 +7,12 @@ CREATE TABLE roles (
7
7
  created_at INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(team_id,name)
8
8
  ) STRICT;
9
9
  INSERT INTO roles(team_id,name,actions_json,builtin)
10
- SELECT t.id,r.name,r.actions,1 FROM teams t,(
11
- SELECT 'owner' name,'["*"]' actions UNION ALL
12
- SELECT 'admin','["*"]' UNION ALL
13
- SELECT 'member','["teams.read","members.read","groups.read","sessions.read","sessions.write","machines.read","sources.read","events.read","agents.read","identity.read","identity.observe"]' UNION ALL
14
- SELECT 'viewer','["teams.read","members.read","groups.read","sessions.read","machines.read","events.read","agents.read","identity.read"]' UNION ALL
15
- SELECT 'reader','["sessions.read"]' UNION ALL
16
- SELECT 'manager','["sessions.read","sessions.write","sessions.access"]'
10
+ -- a VALUES list, not a UNION chain: Durable Object SQLite allows at most 5 terms in a compound SELECT
11
+ SELECT t.id,r.column1,r.column2,1 FROM teams t,(VALUES
12
+ ('owner','["*"]'),('admin','["*"]'),
13
+ ('member','["teams.read","members.read","groups.read","sessions.read","sessions.write","machines.read","sources.read","events.read","agents.read","identity.read","identity.observe"]'),
14
+ ('viewer','["teams.read","members.read","groups.read","sessions.read","machines.read","events.read","agents.read","identity.read"]'),
15
+ ('reader','["sessions.read"]'),('manager','["sessions.read","sessions.write","sessions.access"]')
17
16
  ) r;
18
17
  CREATE TRIGGER team_builtin_roles AFTER INSERT ON teams BEGIN
19
18
  INSERT INTO roles(team_id,name,actions_json,builtin) VALUES