Commit Graph

4 Commits

Author SHA1 Message Date
caoqianming a7f5c85032 Persist event subject_type/subject_id and add ops event timeline API
EventInsert + EventRecord + record_event now carry the subject_type /
subject_id columns added by the P1 migration. Ops events populate
"segment" / "station" subjects so the timeline can be filtered without
parsing event_type strings. Platform SourceCreated / Updated / Deleted
attribute themselves to subject_type="source". Adds get_events_*_filtered
in core and exposes GET /api/event on ops with event_type /
event_type_prefix / subject_type / subject_id query params, closing
design doc §14 "event 表能按 ops.* 和 subject_type/subject_id 查到全链路事件".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 08:57:40 +08:00
caoqianming e3e7917078 Seed dual-kiln segment templates behind OPS_SEED_TEMPLATES
ensure_kiln_templates idempotently inserts 6 dry-kiln stations and 6
segments (infeed/step/outfeed × 2 kilns) with their canonical step
sequences from §10.1. Equipment and station-signal bindings stay
operator-owned through the CRUD APIs. Startup runs the seed only when
OPS_SEED_TEMPLATES=true|1, so production deployments don't accidentally
mutate config.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 08:47:18 +08:00
caoqianming 63683a24c8 Implement operation-system engine MVP (P3)
Adds the segment supervisor + per-segment state machine driving
Idle → Checking → Executing → Confirming → Completed (plus Blocked /
Faulted / ManualAckRequired), interlock evaluator, action-kind step
executor, control + runtime HTTP handlers, and WebSocket runtime push
via AppEvent.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 08:39:14 +08:00
caoqianming b651b6af66 refactor(core): move doc handler to core and split API.md per app
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 08:18:51 +08:00