age-of-agents 0.1.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/LICENSE +35 -0
- package/README.md +133 -0
- package/dist/cli.js +1521 -0
- package/dist/web/assets/BitmapFont-mAGUTDwa.js +6 -0
- package/dist/web/assets/BufferResource-h79-7-mE.js +185 -0
- package/dist/web/assets/CanvasRenderer-Bj-TbKWH.js +1 -0
- package/dist/web/assets/Filter-CS0IbJYg.js +1 -0
- package/dist/web/assets/RenderTargetSystem-Ci99Kqmf.js +184 -0
- package/dist/web/assets/WebGLRenderer-DJFFp8sD.js +156 -0
- package/dist/web/assets/WebGPURenderer-DjDWbvja.js +41 -0
- package/dist/web/assets/browserAll-Cpq7asZb.js +14 -0
- package/dist/web/assets/fantasy/buildings/barracks.json +31 -0
- package/dist/web/assets/fantasy/buildings/barracks.png +0 -0
- package/dist/web/assets/fantasy/buildings/citadel.json +31 -0
- package/dist/web/assets/fantasy/buildings/citadel.png +0 -0
- package/dist/web/assets/fantasy/buildings/forge.json +31 -0
- package/dist/web/assets/fantasy/buildings/forge.png +0 -0
- package/dist/web/assets/fantasy/buildings/guild.json +31 -0
- package/dist/web/assets/fantasy/buildings/guild.png +0 -0
- package/dist/web/assets/fantasy/buildings/index.json +12 -0
- package/dist/web/assets/fantasy/buildings/library.json +31 -0
- package/dist/web/assets/fantasy/buildings/library.png +0 -0
- package/dist/web/assets/fantasy/buildings/market.json +31 -0
- package/dist/web/assets/fantasy/buildings/market.png +0 -0
- package/dist/web/assets/fantasy/buildings/mine.json +31 -0
- package/dist/web/assets/fantasy/buildings/mine.png +0 -0
- package/dist/web/assets/fantasy/buildings/tower.json +31 -0
- package/dist/web/assets/fantasy/buildings/tower.png +0 -0
- package/dist/web/assets/fantasy/decorations/bush.json +31 -0
- package/dist/web/assets/fantasy/decorations/bush.png +0 -0
- package/dist/web/assets/fantasy/decorations/flower.json +31 -0
- package/dist/web/assets/fantasy/decorations/flower.png +0 -0
- package/dist/web/assets/fantasy/decorations/index.json +8 -0
- package/dist/web/assets/fantasy/decorations/rock.json +31 -0
- package/dist/web/assets/fantasy/decorations/rock.png +0 -0
- package/dist/web/assets/fantasy/decorations/tree.json +31 -0
- package/dist/web/assets/fantasy/decorations/tree.png +0 -0
- package/dist/web/assets/fantasy/heroes/fable-default.json +420 -0
- package/dist/web/assets/fantasy/heroes/fable-default.png +0 -0
- package/dist/web/assets/fantasy/heroes/haiku-default.json +420 -0
- package/dist/web/assets/fantasy/heroes/haiku-default.png +0 -0
- package/dist/web/assets/fantasy/heroes/index.json +8 -0
- package/dist/web/assets/fantasy/heroes/opus-default.json +420 -0
- package/dist/web/assets/fantasy/heroes/opus-default.png +0 -0
- package/dist/web/assets/fantasy/heroes/sonnet-default.json +420 -0
- package/dist/web/assets/fantasy/heroes/sonnet-default.png +0 -0
- package/dist/web/assets/fantasy/tilemap/dirt.json +301 -0
- package/dist/web/assets/fantasy/tilemap/dirt.png +0 -0
- package/dist/web/assets/fantasy/tilemap/index.json +8 -0
- package/dist/web/assets/fantasy/tilemap/rock.json +301 -0
- package/dist/web/assets/fantasy/tilemap/rock.png +0 -0
- package/dist/web/assets/fantasy/tilemap/water.json +301 -0
- package/dist/web/assets/fantasy/tilemap/water.png +0 -0
- package/dist/web/assets/fantasy/tilemap-iso/dirt.json +31 -0
- package/dist/web/assets/fantasy/tilemap-iso/dirt.png +0 -0
- package/dist/web/assets/fantasy/tilemap-iso/grass.json +31 -0
- package/dist/web/assets/fantasy/tilemap-iso/grass.png +0 -0
- package/dist/web/assets/fantasy/tilemap-iso/index.json +8 -0
- package/dist/web/assets/fantasy/tilemap-iso/rock.json +31 -0
- package/dist/web/assets/fantasy/tilemap-iso/rock.png +0 -0
- package/dist/web/assets/fantasy/tilemap-iso/water.json +31 -0
- package/dist/web/assets/fantasy/tilemap-iso/water.png +0 -0
- package/dist/web/assets/index-DOMBOmYA.js +468 -0
- package/dist/web/assets/index-_0EytMyf.css +1 -0
- package/dist/web/assets/scifi/buildings/barracks.json +31 -0
- package/dist/web/assets/scifi/buildings/barracks.png +0 -0
- package/dist/web/assets/scifi/buildings/citadel.json +31 -0
- package/dist/web/assets/scifi/buildings/citadel.png +0 -0
- package/dist/web/assets/scifi/buildings/forge.json +31 -0
- package/dist/web/assets/scifi/buildings/forge.png +0 -0
- package/dist/web/assets/scifi/buildings/guild.json +31 -0
- package/dist/web/assets/scifi/buildings/guild.png +0 -0
- package/dist/web/assets/scifi/buildings/index.json +12 -0
- package/dist/web/assets/scifi/buildings/library.json +31 -0
- package/dist/web/assets/scifi/buildings/library.png +0 -0
- package/dist/web/assets/scifi/buildings/market.json +31 -0
- package/dist/web/assets/scifi/buildings/market.png +0 -0
- package/dist/web/assets/scifi/buildings/mine.json +31 -0
- package/dist/web/assets/scifi/buildings/mine.png +0 -0
- package/dist/web/assets/scifi/buildings/tower.json +31 -0
- package/dist/web/assets/scifi/buildings/tower.png +0 -0
- package/dist/web/assets/scifi/decorations/bush.json +31 -0
- package/dist/web/assets/scifi/decorations/bush.png +0 -0
- package/dist/web/assets/scifi/decorations/flower.json +31 -0
- package/dist/web/assets/scifi/decorations/flower.png +0 -0
- package/dist/web/assets/scifi/decorations/index.json +8 -0
- package/dist/web/assets/scifi/decorations/rock.json +31 -0
- package/dist/web/assets/scifi/decorations/rock.png +0 -0
- package/dist/web/assets/scifi/decorations/tree.json +31 -0
- package/dist/web/assets/scifi/decorations/tree.png +0 -0
- package/dist/web/assets/scifi/heroes/fable-default.json +420 -0
- package/dist/web/assets/scifi/heroes/fable-default.png +0 -0
- package/dist/web/assets/scifi/heroes/haiku-default.json +420 -0
- package/dist/web/assets/scifi/heroes/haiku-default.png +0 -0
- package/dist/web/assets/scifi/heroes/index.json +8 -0
- package/dist/web/assets/scifi/heroes/opus-default.json +420 -0
- package/dist/web/assets/scifi/heroes/opus-default.png +0 -0
- package/dist/web/assets/scifi/heroes/sonnet-default.json +420 -0
- package/dist/web/assets/scifi/heroes/sonnet-default.png +0 -0
- package/dist/web/assets/scifi/tilemap-iso/dirt.json +31 -0
- package/dist/web/assets/scifi/tilemap-iso/dirt.png +0 -0
- package/dist/web/assets/scifi/tilemap-iso/grass.json +31 -0
- package/dist/web/assets/scifi/tilemap-iso/grass.png +0 -0
- package/dist/web/assets/scifi/tilemap-iso/index.json +8 -0
- package/dist/web/assets/scifi/tilemap-iso/rock.json +31 -0
- package/dist/web/assets/scifi/tilemap-iso/rock.png +0 -0
- package/dist/web/assets/scifi/tilemap-iso/water.json +31 -0
- package/dist/web/assets/scifi/tilemap-iso/water.png +0 -0
- package/dist/web/assets/webworkerAll-Dzq-_2J4.js +83 -0
- package/dist/web/index.html +16 -0
- package/package.json +59 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mateusz Pawelczuk
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
Art assets
|
|
26
|
+
|
|
27
|
+
The pixel-art assets bundled in this repository (packages/client/public/assets/)
|
|
28
|
+
were generated by the author with PixelLab (https://pixellab.ai) and are owned
|
|
29
|
+
by the author. Per PixelLab's Terms of Service you may use, modify and
|
|
30
|
+
redistribute them; they are released here under the same MIT terms as the code.
|
|
31
|
+
|
|
32
|
+
This repository does NOT bundle any third-party asset packs. The optional
|
|
33
|
+
helper at scripts/download-assets.mjs lets you fetch alternative packs locally
|
|
34
|
+
into downloads/ (git-ignored); some of those packs (e.g. Tiny Swords, CraftPix)
|
|
35
|
+
forbid redistribution and are therefore never committed.
|
package/README.md
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# ๐ฐ Age of Agents
|
|
4
|
+
|
|
5
|
+
**Watch your AI coding sessions grow a peaceful pixel-art realm.**
|
|
6
|
+
|
|
7
|
+
Every Claude Code or Codex session becomes a settler walking out of the keep.
|
|
8
|
+
The tool it runs decides which workshop it visits, subagents become workers,
|
|
9
|
+
and tokens fill the storehouse โ a calm, Age-of-Empires-style kingdom of your work.
|
|
10
|
+
No combat, just a quiet realm you can watch at a glance.
|
|
11
|
+
|
|
12
|
+
[](https://www.npmjs.com/package/age-of-agents)
|
|
13
|
+
[](LICENSE)
|
|
14
|
+

|
|
15
|
+

|
|
16
|
+
|
|
17
|
+
[**โถ Live site**](https://agentsmill.github.io/age-of-agents/) ยท [Quick start](#-quick-start) ยท [How it works](#-how-it-works) ยท [Architecture](#-architecture)
|
|
18
|
+
|
|
19
|
+
<img src="docs/screenshots/citadel-fantasy.png" alt="Age of Agents โ peaceful fantasy realm" width="820">
|
|
20
|
+
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## โจ What is this?
|
|
26
|
+
|
|
27
|
+
Age of Agents (npm package **`age-of-agents`**) runs as a small local web app
|
|
28
|
+
alongside your normal CLI workflow. It watches your agent session transcripts and
|
|
29
|
+
renders them as a calm, real-time strategy realm:
|
|
30
|
+
|
|
31
|
+
- **Each session โ a settler.** Start a Claude Code or Codex session and a settler walks out of the keep, carrying your prompt as its task.
|
|
32
|
+
- **Tools โ workshops.** The settler heads to the building that matches the work โ the forge for code edits, the mage tower for web research, the mine for the terminal.
|
|
33
|
+
- **Subagents โ workers.** When a session spawns subagents (e.g. the Task tool), they appear as little workers around their settler.
|
|
34
|
+
- **Tokens โ harvest.** Tokens read and produced fill the storehouse. Settlers ponder while thinking, rest when waiting, and stroll home when the day's work is done.
|
|
35
|
+
- **Two worlds.** Switch between a **fantasy** (top-down) and a **sci-fi** (isometric) realm on the fly.
|
|
36
|
+
|
|
37
|
+
A glanceable, second-monitor view of what your agents are quietly up to.
|
|
38
|
+
|
|
39
|
+
## ๐ผ๏ธ Gallery
|
|
40
|
+
|
|
41
|
+
| Fantasy | Sci-Fi |
|
|
42
|
+
| --- | --- |
|
|
43
|
+
| <img src="docs/screenshots/citadel-fantasy.png" alt="Fantasy realm" width="400"> | <img src="docs/screenshots/citadel-scifi.png" alt="Sci-fi colony" width="400"> |
|
|
44
|
+
|
|
45
|
+
**Session detail** โ click a settler to inspect its task, token economy and live activity:
|
|
46
|
+
|
|
47
|
+
<div align="center">
|
|
48
|
+
<img src="docs/screenshots/citadel-session-panel.png" alt="Session detail panel" width="720">
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
## ๐ Quick start
|
|
52
|
+
|
|
53
|
+
Run it instantly, no install:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npx age-of-agents # watches ~/.claude & ~/.codex sessions, prints the URL
|
|
57
|
+
npx age-of-agents --demo # calm demo mode (fake sessions)
|
|
58
|
+
npx age-of-agents --open # also open the browser
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Or install globally (commands `age-of-agents` and the shorter `aoa`):
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npm i -g age-of-agents
|
|
65
|
+
aoa --open
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
> The server binds to `127.0.0.1` only and never writes your transcripts anywhere โ it just reads them locally and broadcasts game state over a local WebSocket. See [Privacy](#-privacy).
|
|
69
|
+
|
|
70
|
+
### From source
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
git clone https://github.com/agentsmill/age-of-agents
|
|
74
|
+
cd age-of-agents && npm install
|
|
75
|
+
npm run demo # server (demo) + client (Vite) โ http://localhost:5173
|
|
76
|
+
npm run dev # visualize your real sessions
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## ๐งญ How it works
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
agent session transcript โโโถ server (watcher + state machine) โโโถ WebSocket โโโถ client (PixiJS realm + HUD)
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
- The **server** tails JSONL transcripts, turns each line into a `Fact`, and runs a small per-session **state machine** (thinking / working / resting / idle / returning).
|
|
86
|
+
- It broadcasts a `HeroSnapshot` for every session over a WebSocket. The snapshot carries *what* the session is doing (`currentTool`, recent actions, tokens) โ never raw coordinates.
|
|
87
|
+
- The **client** decides *where* each settler goes and renders the pixel-art realm, the HUD, the minimap and the side panel.
|
|
88
|
+
|
|
89
|
+
## ๐จ Themes
|
|
90
|
+
|
|
91
|
+
Two full art sets, switchable from the top bar:
|
|
92
|
+
|
|
93
|
+
- **Fantasy** โ top-down: keep, mage tower, library, guild, market, mine, orchard & ponds.
|
|
94
|
+
- **Sci-Fi** โ isometric: command center, hangars, drone factory, ore refinery, research lab on a calm Martian colony.
|
|
95
|
+
|
|
96
|
+
## ๐งฑ Architecture
|
|
97
|
+
|
|
98
|
+
A small npm-workspaces monorepo, published as the single `age-of-agents` CLI:
|
|
99
|
+
|
|
100
|
+
| Package | Stack | Responsibility |
|
|
101
|
+
| --- | --- | --- |
|
|
102
|
+
| `packages/shared` | TypeScript | WebSocket protocol types (`GameEvent`, snapshots) |
|
|
103
|
+
| `packages/server` | Node + Fastify + `ws` | transcript watcher, state machine, hooks endpoint, demo generator, CLI |
|
|
104
|
+
| `packages/client` | Vite + React 19 + PixiJS v8 | the game realm, HUD, minimap, side panel |
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
npm test # unit tests (server + client)
|
|
108
|
+
npm run build # production client + bundled CLI (dist/cli.js)
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## ๐ Privacy
|
|
112
|
+
|
|
113
|
+
- The server listens on `127.0.0.1` only โ nothing is exposed to your network.
|
|
114
|
+
- Transcripts are read **locally and read-only**; their contents are never written to disk by Age of Agents or sent anywhere.
|
|
115
|
+
- Installing the optional Claude Code hooks modifies `~/.claude/settings.json` (a fast event channel). Demo mode touches nothing of yours.
|
|
116
|
+
|
|
117
|
+
## ๐ญ Assets
|
|
118
|
+
|
|
119
|
+
All pixel-art assets in `packages/client/public/assets/` were **generated by the author with [PixelLab](https://pixellab.ai)** and are the author's own work โ released here under the same MIT license as the code. Without any assets the game still runs on procedurally generated placeholders.
|
|
120
|
+
|
|
121
|
+
`assets-manifest.json` + `scripts/download-assets.mjs` are an **optional** helper for swapping in alternative third-party packs locally; those packs are never committed (some forbid redistribution) and are not needed to run the game.
|
|
122
|
+
|
|
123
|
+
## ๐ค Contributing
|
|
124
|
+
|
|
125
|
+
Issues and PRs are welcome. To get going: `npm install`, then `npm run demo` to see the realm, and `npm test` before opening a PR.
|
|
126
|
+
|
|
127
|
+
## ๐ License
|
|
128
|
+
|
|
129
|
+
[MIT](LICENSE) ยฉ Mateusz Pawelczuk. Art assets generated with PixelLab, redistributed under MIT per PixelLab's Terms of Service.
|
|
130
|
+
|
|
131
|
+
## ๐ Acknowledgements
|
|
132
|
+
|
|
133
|
+
Inspired by [AgentCraft](https://www.getagentcraft.com). Built with [PixiJS](https://pixijs.com), [React](https://react.dev), [Fastify](https://fastify.dev) and [PixelLab](https://pixellab.ai).
|