Commit Graph

369 Commits

Author SHA1 Message Date
MayaTheShy
5a83d89509 fix: implement reliable modem command delivery with acknowledgment and retry mechanism 2026-03-29 01:11:24 -04:00
MayaTheShy
bb15c78ca9 fix: improve monitor alias detection and registration for better peripheral handling 2026-03-29 00:23:59 -04:00
MayaTheShy
4be2d7be8f fix: replace sleep(0) with os.pullEvent() + add diagnostic logging
sleep(0) wakes the processor only on timer ticks, causing a
1-tick delay. os.pullEvent() with no filter wakes the processor
on ANY event — including the modem_message that triggered the
capture — so items are processed in the same event cycle.

Added logging to capture and processor tasks:
- NET-CAP: logs each queued message with type and queue depth
- NET-PROC: logs each message being processed
- Both log on startup to confirm they're running
2026-03-29 00:02:07 -04:00
MayaTheShy
9396fbd81a fix: enhance monitor detection to handle adjacent peripherals correctly 2026-03-28 23:41:20 -04:00
MayaTheShy
ec1a681924 fix: replace custom event wake-up with polling, remove craftItem double-capture
Two robustness improvements to the Network capture/processor split:

1. Processor wake-up: replaced os.queueEvent('network_queued') /
   os.pullEvent('network_queued') with sleep(0) polling. Custom events
   can be consumed by other coroutines (e.g. craftItem's unfiltered
   os.pullEvent()) or swallowed by the OS event layer. Polling the
   shared queue every tick is simpler and guaranteed reliable.

2. craftItem: removed ORDER_CHANNEL message buffering and re-queuing.
   With the dedicated Network-capture task, ORDER_CHANNEL messages are
   already safely captured into networkQueue. The old buffering caused
   double-capture: capture task adds to queue, craftItem also buffers,
   then re-queues via os.queueEvent -> capture captures again -> dup.
   The commandId dedup caught these, but removing the source is cleaner.
2026-03-28 23:40:09 -04:00
MayaTheShy
36612ecc9f fix: split Network-listener into capture/processor to prevent modem_message loss
CC:Tweaked's parallel.waitForAny drops events when a coroutine's
filter doesn't match. The old Network-listener processed commands
inline, causing it to yield with filter 'task_complete' during
peripheral calls (pushItems, list, etc). Any modem_message arriving
during that window was consumed by the scheduler and lost.

Split into two coroutines:
- Network-capture: only ever yields for 'modem_message', inserts
  into a shared networkQueue table, queues 'network_queued' event
- Network-processor: drains the queue and runs all handler logic,
  safe to yield for peripheral calls without losing messages

This fixes the ~80% message loss rate on dispense requests.
2026-03-28 23:01:14 -04:00
MayaTheShy
badde91336 fix(docker): clone platform from git instead of additional_contexts
The additional_contexts approach required cc-platform-core to exist on
the Docker host at a relative path. This fails on servers where the
repo layout differs. Instead, use a multi-stage build: stage 1 clones
cc-platform-core from Gitea (depth 1), stage 2 copies server/ into the
app and rewrites the file: path. Fully self-contained — no host deps.
2026-03-28 22:37:57 -04:00
MayaTheShy
c3344288a8 fix(docker): resolve @cc-platform/server file: dep in container build
Use additional_contexts to copy platform server package into the Docker
build context. Rewrites the file: dependency path and removes the
lockfile so npm install can resolve the local package correctly.
2026-03-28 22:35:39 -04:00
MayaTheShy
021b351248 feat: replace hand-rolled WebSocketServer with createWebSocketManager for improved connection handling and state updates 2026-03-26 16:00:58 -04:00
MayaTheShy
b782d5c8f9 feat: add @cc-platform/server dependency and update package-lock.json 2026-03-26 16:00:53 -04:00
MayaTheShy
45b264dbc4 feat: implement WebSocket support for real-time command handling and state updates 2026-03-26 15:52:05 -04:00
MayaTheShy
24ce637f6e feat: remove lava bucket from fuel items list 2026-03-26 15:22:59 -04:00
MayaTheShy
075d42ecab feat: update server log messages to use dynamic port variable 2026-03-26 15:20:01 -04:00
MayaTheShy
379d08b594 feat: refactor server setup to use createPlatformServer and streamline middleware 2026-03-26 15:19:27 -04:00
MayaTheShy
d54855bf19 feat: add missing dependency for cc-platform server in package.json 2026-03-26 15:19:22 -04:00
MayaTheShy
5eca4b7155 feat: refactor configuration loading and HTTP helpers to use WebBridge functions 2026-03-26 15:19:16 -04:00
MayaTheShy
e340368ef0 feat: add required platform field to package configuration 2026-03-26 15:18:59 -04:00
MayaTheShy
38ff3f61bd feat: enhance billboard rendering with pie chart and storage ring display 2026-03-26 14:44:51 -04:00
MayaTheShy
664741504f feat: update billboard monitor text scale configuration to use BILLBOARD_TEXT_SCALE 2026-03-26 14:27:31 -04:00
MayaTheShy
c830642dc8 feat: add BILLBOARD_TEXT_SCALE configuration option for billboard display size 2026-03-26 14:27:28 -04:00
MayaTheShy
29026175b7 feat: enhance billboard monitor setup with explicit configuration and auto-detection 2026-03-26 14:23:33 -04:00
MayaTheShy
fe6a6df6a3 feat: update BILLBOARD_MONITOR comment for clarity on auto-detection 2026-03-26 14:23:29 -04:00
MayaTheShy
3c4d76d4a9 feat: improve billboard monitor detection and logging 2026-03-26 14:23:24 -04:00
MayaTheShy
c7a1b7066a feat: rename BILLBOARD_MONITOR_SIDE to BILLBOARD_MONITOR for consistency 2026-03-26 14:21:15 -04:00
MayaTheShy
8a50bc586d feat: implement billboard monitor support and remove legacy code 2026-03-26 14:16:23 -04:00
MayaTheShy
c1b1713699 feat: add support for billboard role in startup script 2026-03-26 14:08:19 -04:00
MayaTheShy
c9d21bcfaa feat: add monitor billboard for displaying inventory goals and alerts 2026-03-26 14:08:14 -04:00
MayaTheShy
97983156c6 feat: expand upstream CDN mapping for additional modpack support 2026-03-26 13:43:50 -04:00
MayaTheShy
46f7b0c98a feat: expand supported mods in download-textures script for enhanced asset management 2026-03-26 13:43:47 -04:00
MayaTheShy
13b374d7f8 feat: implement smart texture resolution and indexing for improved asset management 2026-03-26 13:11:06 -04:00
MayaTheShy
981e561c2d feat: add download-textures script to package.json for texture management 2026-03-26 13:11:02 -04:00
MayaTheShy
a1ff2433e4 feat: refactor texture resolution logic to streamline item icon rendering 2026-03-26 13:10:58 -04:00
MayaTheShy
a50a6e9697 feat: add texture download logic to entrypoint script for initial setup 2026-03-26 13:10:53 -04:00
MayaTheShy
c74898049a feat: add download-textures script for bulk downloading Minecraft and Create textures 2026-03-26 13:10:49 -04:00
MayaTheShy
25623b735c feat: add aliased texture names for improved block texture handling 2026-03-25 23:06:03 -04:00
MayaTheShy
1050ed84f2 feat: enhance texture mapping with dynamic aliases and new Create mod textures 2026-03-25 23:05:05 -04:00
MayaTheShy
4cf1e550b7 feat: add error logging for HTTP requests and command processing in inventoryWebBridge 2026-03-25 22:42:52 -04:00
MayaTheShy
66ac81de65 feat: optimize broadcastState function to conditionally include recipe tables based on config changes 2026-03-25 22:42:45 -04:00
MayaTheShy
ea29136f25 feat: delegate recipe helper functions to shared lib/ui.lua for improved code organization 2026-03-25 22:42:39 -04:00
MayaTheShy
641a317873 feat: remove itemDB initialization and related flush calls for streamlined inventory management 2026-03-25 22:38:10 -04:00
MayaTheShy
5dd9bd9344 feat: add recursive crafting and recipe management endpoints for enhanced crafting capabilities 2026-03-25 22:37:08 -04:00
MayaTheShy
b7427aa973 feat: implement reboot listener for mining turtle to handle remote reboot commands 2026-03-25 22:37:03 -04:00
MayaTheShy
48ca088a2c feat: add new data files for enhanced inventory management and crafting capabilities 2026-03-25 22:36:57 -04:00
MayaTheShy
b9081f26a8 feat: add bridge reply channel and enhance command processing for improved communication 2026-03-25 22:36:52 -04:00
MayaTheShy
f10108bd48 feat: remove unused catalogue from state cache and update message handling for dropper data 2026-03-25 22:36:45 -04:00
MayaTheShy
f1e418ad83 feat: update installation instructions for Opus Package Manager and enhance startup script details 2026-03-25 22:24:05 -04:00
MayaTheShy
9a02b350c2 feat: add mining turtle and auto-updating startup scripts to enhance inventory management 2026-03-25 22:21:40 -04:00
MayaTheShy
c390b5291b feat: enhance item retrieval process in crafting command for improved efficiency 2026-03-25 22:00:44 -04:00
MayaTheShy
b2d55feb98 feat: add collection hopper emptying function to improve item management 2026-03-25 21:53:56 -04:00
MayaTheShy
54cad8b92b feat: add collection hoppers and interval configuration for improved item management 2026-03-25 21:53:51 -04:00