Commit Graph

7 Commits

Author SHA1 Message Date
205ff7668a feat: pipe/wire path building API + oni_commander.py high-level commands
New Mod endpoints:
- POST /api/action/build_pipe: build gas/liquid pipe path (x1,y1)->(x2,y2) with bridge option
- POST /api/action/build_wire: build wire path with types: regular, heavy, conductive, heavy_conductive

New Python tool: tools/oni_commander.py
High-level commands that combine multiple low-level API calls:
- diagnose: full diagnostic (power, CO2, temp, diseases, pipes)
- fix_co2: auto-detect CO2 pockets and dig vent shafts
- fix_overload: detect overloaded circuits with fix suggestions
- emergency_o2: auto-check O2 and build OxygenDiffuser/Electrolyzer
- expand_base: dig + build walls/floors in one command (one-click room expansion)
- build_pipe_line: simplified CLI for pipe path building
- build_wire_line: simplified CLI for wire path building
All high-level commands auto-pause/resume the game.

CLI: build_pipe_line, build_wire_line added to oni_api.py
2026-05-22 09:11:04 +08:00
f2bdddd305 feat: power grid, pipes, CO2, temp zones, save/load, skills, diseases, storage APIs
New endpoints:
- Save/Load: /api/action/save, /api/action/save_as, /api/action/load, /api/state/saves
- Power grid: /api/state/power (circuits, load, overload detection)
- Pipe contents: /api/state/pipes?type=gas|liquid (debug plumbing)
- CO2 tracking: /api/state/co2 (find CO2 pockets)
- Temp zones: /api/state/temperature/zones (hot/cold spots)
- Morale: /api/state/morale
- Diseases: /api/state/diseases (dupe infection + environmental germs)
- Storage: /api/state/storage (building contents)
- Skills: /api/state/duplicants/skills (attributes + skill trees)
- Assign job: /api/action/assign_job

New CLI commands: save, save_as, load, saves, power, pipes, co2,
temp_zones, morale, diseases, storage, skills, assign_job

CLI help reorganized with clear categories: Save/Load, Grid Analysis, Colony Management
2026-05-22 09:07:46 +08:00
48a70e4928 feat: game pause/speed control API with AI pause protocol
- POST /api/action/pause - pause game (AI must call before operations)
- POST /api/action/unpause - resume game at desired speed
- POST /api/action/speed - set game speed (1x/2x/3x)
- Game state now includes isPaused and gameSpeed
- AI pause protocol documented in SKILL.md: pause before every operation
- Introduces cell.isDiggable flag that filters neutronium properly
- pause/unpause/speed CLI commands added to oni_api.py
2026-05-22 09:04:04 +08:00
a4f2062c1a feat: priority system, batch tasks, action feedback, event daemon
- Priority system: GET /api/state/priorities, POST /api/action/priority_global, POST /api/action/priority_type
- Batch system: POST /api/action/batch with per-action result tracking
- Enhanced action feedback with error codes and AI suggestions:
  cell_occupied, cell_solid, cell_occupied_by_dupe, material_shortage, etc.
- Event stream: GET /api/state/events?since=&limit= for incremental polling
- Event daemon: scripts/event_daemon.py continuously polls events,
  classifies by severity, auto-triggers analysis on critical events
- Games state now reports suffocating/starving/stressed counts
- Cell data includes isDiggable and isSafeForDupe flags
- Added 'events', 'queue', 'batch', 'priority_global', 'priority_type' CLI commands
- Added sample batch plan file
2026-05-22 09:01:12 +08:00
4c6a9b882f docs: add comprehensive README introducing the full toolset 2026-05-22 08:54:58 +08:00
6a7ac87c1b feat: comprehensive AI-oriented data model with cell-level map API and knowledge base
- Add cell/tile map APIs: /api/state/cell, /api/state/cells, /api/state/cells/slice, /api/state/gas
- Add entity registry APIs: /api/registry/buildings, /api/registry/elements, /api/registry/techs
- Add plants, rooms, mop, harvest endpoints
- Rich semantic metadata: element state/category, building category/power, duplicant chore/cell
- AI-friendly coordinate system with (x,y) + cell index in all responses
- Build AI_KNOWLEDGE_BASE.md with building IDs, element IDs, tech trees, game mechanics
- Rewrite SKILL.md with data model explanation, coordinate guide, operation patterns
- Update Python tools: explore, cell, cells, slice, gas, registry subcommands
- Update MOD_DEV_GUIDE.md with AI data design principles
2026-05-22 08:54:03 +08:00
0e17e8a6ac feat: complete ONI Agent project with full Mod API, Python toolchain, and development guide
- Implement all Mod API endpoints (buildings, research, geysers, alerts, critters, deconstruct, prioritize, research, schedule, wardrobe)
- Enhance Python tools with comprehensive CLI, analysis (O2/food/power/temp/water), and 7 blueprints (SPOM, toilet, ranch, farm, cooling, bedroom)
- Add utility scripts: auto_repair, auto_analyze, watch mode, setup
- Write Agent-Mod integration constraints and development guide
- Create skills directory with ONI agent skill definition
2026-05-22 08:44:56 +08:00