agent-valley 2.3.0 → 3.0.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/README.md +14 -5
- package/dist/assets/plugin.json +1 -1
- package/dist/assets/turso/migrations/0000_team_ledger.sql +56 -0
- package/dist/assets/turso/migrations/meta/_journal.json +13 -0
- package/dist/index.js +105112 -46823
- package/dist/supervisor.js +798 -267
- package/package.json +8 -4
package/README.md
CHANGED
|
@@ -90,9 +90,10 @@ bun av down # Stop background daemon
|
|
|
90
90
|
bun av status # Query orchestrator status
|
|
91
91
|
bun av top # Live actor status monitor
|
|
92
92
|
bun av logs # Tail dashboard logs (-n for line count)
|
|
93
|
-
bun av login #
|
|
93
|
+
bun av login # Verify and save an opaque AV user team token
|
|
94
94
|
bun av logout # Logout from team
|
|
95
95
|
bun av invite # Copy team config to clipboard
|
|
96
|
+
bun av team --help # Central-server team administration and legacy data import
|
|
96
97
|
bun av order --help # Give a Chief Director a goal; --verify supplies an optional trusted command
|
|
97
98
|
bun av missions # List saved local Chief Director orders
|
|
98
99
|
bun av missions --watch # Resume eligible saved orders and scheduled observations
|
|
@@ -155,12 +156,16 @@ server:
|
|
|
155
156
|
|
|
156
157
|
# Team Dashboard (optional)
|
|
157
158
|
team:
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
id: my-team
|
|
159
|
+
relay_url: https://av.example.com
|
|
160
|
+
id: 11111111-1111-4111-8111-111111111111
|
|
161
161
|
display_name: my-node
|
|
162
162
|
```
|
|
163
163
|
|
|
164
|
+
Workers receive the gateway URL, team UUID and an AV user token through `av login`.
|
|
165
|
+
The central server also configures `team.turso_url` and `team.turso_auth_token_env`
|
|
166
|
+
(default `TURSO_AUTH_TOKEN`). The database token stays on the central server or an
|
|
167
|
+
explicit administration machine. See [team ledger setup and migration](./docs/guides/team-ledger.md).
|
|
168
|
+
|
|
164
169
|
### Project Config (`av.yaml`)
|
|
165
170
|
|
|
166
171
|
```yaml
|
|
@@ -360,7 +365,7 @@ PixiJS-rendered office scene showing real-time actor status:
|
|
|
360
365
|
- **Operations panel** — dependency blockers, retry reasons and next retry times
|
|
361
366
|
- **System metrics** — CPU, memory, uptime
|
|
362
367
|
- **SSE real-time events** — instant updates on actor.start, actor.done, actor.failed
|
|
363
|
-
- **Team HUD** — multi-node view
|
|
368
|
+
- **Team HUD** — multi-node view through the AV gateway and Turso ledger; the browser polls its local relay every five seconds
|
|
364
369
|
|
|
365
370
|
### API Endpoints
|
|
366
371
|
|
|
@@ -373,6 +378,10 @@ PixiJS-rendered office scene showing real-time actor status:
|
|
|
373
378
|
| `/api/health` | GET | Health check (503 if the orchestrator is unavailable or stopped) |
|
|
374
379
|
| `/api/intervention` | POST | Live actor intervention; local by default, token-authenticated when configured |
|
|
375
380
|
| `/api/metrics` | GET | Prometheus-format metrics (enabled via `observability.prometheus.enabled`) |
|
|
381
|
+
| `/api/team/ledger` | GET | Replayed team state for the local browser; dashboard status authentication applies |
|
|
382
|
+
| `/api/team/session` | GET | Validate an AV team bearer token for `team_id` |
|
|
383
|
+
| `/api/team/relay` | GET | Read team events after a sequence cursor using an AV team bearer token |
|
|
384
|
+
| `/api/team/relay` | POST | Publish a validated event using an AV team bearer token; enforces node ownership |
|
|
376
385
|
|
|
377
386
|
---
|
|
378
387
|
|
package/dist/assets/plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
3
|
"name": "av",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.0.0",
|
|
5
5
|
"description": "Delegate repository goals to Agent Valley and inspect mission progress and verification evidence.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Agent Valley"
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
CREATE TABLE `ledger_events` (
|
|
2
|
+
`seq` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
3
|
+
`team_id` text NOT NULL,
|
|
4
|
+
`event_id` text NOT NULL,
|
|
5
|
+
`node_id` text NOT NULL,
|
|
6
|
+
`user_id` text NOT NULL,
|
|
7
|
+
`type` text NOT NULL,
|
|
8
|
+
`payload` text NOT NULL,
|
|
9
|
+
`client_timestamp` text NOT NULL,
|
|
10
|
+
`created_at` text DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')) NOT NULL,
|
|
11
|
+
`source` text DEFAULT 'native' NOT NULL,
|
|
12
|
+
FOREIGN KEY (`team_id`) REFERENCES `teams`(`id`) ON UPDATE no action ON DELETE no action,
|
|
13
|
+
CONSTRAINT "ledger_event_id_length" CHECK(length("ledger_events"."event_id") between 1 and 200),
|
|
14
|
+
CONSTRAINT "ledger_event_type" CHECK("ledger_events"."type" in ('node.join','node.reconnect','node.leave','agent.start','agent.done','agent.failed','agent.cancelled')),
|
|
15
|
+
CONSTRAINT "ledger_payload_object" CHECK(json_valid("ledger_events"."payload") and json_type("ledger_events"."payload") = 'object'),
|
|
16
|
+
CONSTRAINT "ledger_source" CHECK("ledger_events"."source" in ('native','supabase-import')),
|
|
17
|
+
CONSTRAINT "ledger_native_node_owner" CHECK("ledger_events"."source" = 'supabase-import' or (lower(substr("ledger_events"."node_id", 1, length("ledger_events"."user_id") + 1)) = lower("ledger_events"."user_id") || ':' and length("ledger_events"."node_id") > length("ledger_events"."user_id") + 1))
|
|
18
|
+
);
|
|
19
|
+
--> statement-breakpoint
|
|
20
|
+
CREATE UNIQUE INDEX `ledger_events_team_event_unique` ON `ledger_events` (`team_id`,`event_id`);--> statement-breakpoint
|
|
21
|
+
CREATE INDEX `idx_ledger_team_seq` ON `ledger_events` (`team_id`,`seq`);--> statement-breakpoint
|
|
22
|
+
CREATE TABLE `team_members` (
|
|
23
|
+
`team_id` text NOT NULL,
|
|
24
|
+
`user_id` text NOT NULL,
|
|
25
|
+
`role` text NOT NULL,
|
|
26
|
+
`display_name` text NOT NULL,
|
|
27
|
+
`joined_at` text DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')) NOT NULL,
|
|
28
|
+
PRIMARY KEY(`team_id`, `user_id`),
|
|
29
|
+
FOREIGN KEY (`team_id`) REFERENCES `teams`(`id`) ON UPDATE no action ON DELETE cascade,
|
|
30
|
+
CONSTRAINT "team_members_role" CHECK("team_members"."role" in ('owner', 'admin', 'member')),
|
|
31
|
+
CONSTRAINT "team_members_display_name_length" CHECK(length(trim("team_members"."display_name")) between 1 and 200)
|
|
32
|
+
);
|
|
33
|
+
--> statement-breakpoint
|
|
34
|
+
CREATE INDEX `idx_team_members_user` ON `team_members` (`user_id`);--> statement-breakpoint
|
|
35
|
+
CREATE TABLE `team_tokens` (
|
|
36
|
+
`token_hash` text PRIMARY KEY NOT NULL,
|
|
37
|
+
`team_id` text NOT NULL,
|
|
38
|
+
`user_id` text NOT NULL,
|
|
39
|
+
`expires_at` integer NOT NULL,
|
|
40
|
+
`revoked_at` integer,
|
|
41
|
+
FOREIGN KEY (`team_id`,`user_id`) REFERENCES `team_members`(`team_id`,`user_id`) ON UPDATE no action ON DELETE cascade,
|
|
42
|
+
CONSTRAINT "team_tokens_hash_length" CHECK(length("team_tokens"."token_hash") = 64),
|
|
43
|
+
CONSTRAINT "team_tokens_expiry" CHECK("team_tokens"."expires_at" > 0)
|
|
44
|
+
);
|
|
45
|
+
--> statement-breakpoint
|
|
46
|
+
CREATE INDEX `idx_team_tokens_member` ON `team_tokens` (`team_id`,`user_id`);--> statement-breakpoint
|
|
47
|
+
CREATE TABLE `teams` (
|
|
48
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
49
|
+
`name` text NOT NULL,
|
|
50
|
+
`slug` text NOT NULL,
|
|
51
|
+
`created_at` text DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')) NOT NULL,
|
|
52
|
+
CONSTRAINT "teams_name_length" CHECK(length(trim("teams"."name")) between 1 and 200),
|
|
53
|
+
CONSTRAINT "teams_slug_length" CHECK(length(trim("teams"."slug")) between 1 and 200)
|
|
54
|
+
);
|
|
55
|
+
--> statement-breakpoint
|
|
56
|
+
CREATE UNIQUE INDEX `teams_slug_unique` ON `teams` (`slug`);
|