molecule-core/platform/internal/models/event.go
Hongming Wang 24fec62d7f initial commit — Molecule AI platform
Forked clean from public hackathon repo (Starfire-AgentTeam, BSL 1.1)
with full rebrand to Molecule AI under github.com/Molecule-AI/molecule-monorepo.

Brand: Starfire → Molecule AI.
Slug: starfire / agent-molecule → molecule.
Env vars: STARFIRE_* → MOLECULE_*.
Go module: github.com/agent-molecule/platform → github.com/Molecule-AI/molecule-monorepo/platform.
Python packages: starfire_plugin → molecule_plugin, starfire_agent → molecule_agent.
DB: agentmolecule → molecule.

History truncated; see public repo for prior commits and contributor
attribution. Verified green: go test -race ./... (platform), pytest
(workspace-template 1129 + sdk 132), vitest (canvas 352), build (mcp).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 11:55:37 -07:00

25 lines
788 B
Go

package models
import (
"encoding/json"
"time"
)
type StructureEvent struct {
ID string `json:"id" db:"id"`
EventType string `json:"event_type" db:"event_type"`
WorkspaceID *string `json:"workspace_id" db:"workspace_id"`
AgentID *string `json:"agent_id" db:"agent_id"`
TargetID *string `json:"target_id" db:"target_id"`
Payload json.RawMessage `json:"payload" db:"payload"`
CreatedAt time.Time `json:"created_at" db:"created_at"`
}
// WSMessage is the JSON sent over WebSocket to clients.
type WSMessage struct {
Event string `json:"event"`
WorkspaceID string `json:"workspace_id"`
Timestamp time.Time `json:"timestamp"`
Payload json.RawMessage `json:"payload"`
}