MCPcopy Index your code
hub / github.com/garrytan/gstack / makeRefEvent

Function makeRefEvent

lib/gstack-decision.ts:167–177  ·  view source on GitHub ↗
(kind: "supersede" | "redact", targetId: string, opts: { session?: string; source?: DecisionSource } = {})

Source from the content-addressed store, hash-verified

165
166/** Build a supersede/redact event referencing an existing decide-event id. */
167export function makeRefEvent(kind: "supersede" | "redact", targetId: string, opts: { session?: string; source?: DecisionSource } = {}): DecisionEvent {
168 return {
169 id: randomUUID(),
170 kind,
171 supersedes: targetId,
172 scope: "repo",
173 date: new Date().toISOString(),
174 session: opts.session,
175 source: opts.source ?? "agent",
176 };
177}
178
179/**
180 * Compute the ACTIVE decisions: `decide` events whose id is NOT referenced by any

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected