Files
archie/.okf/codebase/internal/store/events.md
T
sam 7c34bdae5a okf: scaffold knowledge bundle and MCP server config
Adds a harvested .okf/ knowledge bundle (codebase concepts + starter
architecture/services/rules scaffolding) and .mcp.json pointing at the
shared okf MCP service (http://localhost:8765/archie-core/), which
serves multiple projects' bundles from a single process.
2026-07-22 04:36:50 +10:00

1014 B

description, resource, tags, timestamp, title, type
description resource tags timestamp title type
Source module internal/store/events.go (243 lines). internal/store/events.go
go
source
2026-07-21T18:36:22Z events.go Module

Module events.go

Path: internal/store/events.go
Lines: 243

Snippet Preview

package store

import (
	"context"
	"database/sql"
	"encoding/json"
	"errors"
	"fmt"
	"time"

	"github.com/samcharles93/archie-core/internal/events"
)

const eventsSchema = `
CREATE TABLE IF NOT EXISTS events (
	id        INTEGER PRIMARY KEY AUTOINCREMENT,
	at        TEXT NOT NULL,
	kind      TEXT NOT NULL,
	task_id   INTEGER NOT NULL DEFAULT 0,
	repo      TEXT NOT NULL DEFAULT '',
	issue     INTEGER NOT NULL DEFAULT 0,
	workflow  TEXT NOT NULL DEFAULT '',
	stage     TEXT NOT NULL DEFAULT '',
	detail    TEXT NOT NULL DEFAULT '',
	data      TEXT NOT NULL DEFAULT '{}'
);
CREATE INDEX IF NOT EXISTS idx_events_task ON events(task_id, id);
CREATE INDEX IF NOT EXISTS idx_events_kind ON events(kind, id);
`