UNPKG

aiwg

Version:

Deployment tool and support utility for AI context. Copies agents, skills, commands, rules, and behaviors into the paths each AI platform reads (Claude Code, Codex, Copilot, Cursor, Warp, OpenClaw, and 6 more) so one source of truth works across 10 platfo

54 lines 2.31 kB
/** * Project-Local Activity Log Helper * * Inline activity-log emission for project-local artifact lifecycle events. * Wraps the storage adapter from `resolveStorage('activity_log')` and emits * single-line entries per the format frozen by the activity-log rule. * * The generic post-command hook in `cli/hooks/builtin/activity-log-hook.ts` * emits one entry per CLI invocation (`aiwg use sdlc`). This helper emits * per-event entries (per-bundle, per-provider) at finer granularity, as * specified by the design doc. * * @design @.aiwg/architecture/design-doctor-log-promote.md * @implements #1037 * @issue #1049 */ /** * Project-local activity event names. The wire-format `operation` token * always falls back to one of the frozen `ACTIVITY_OPERATIONS`; the * detail (deploy-failed, remove-mutated, etc.) lives in the summary * prefix so the rule's enum doesn't have to grow. */ export type ProjectLocalEvent = 'discover' | 'deploy' | 'deploy-failed' | 'conflict' | 'shadow-acknowledged' | 'shadow-refused' | 'remove' | 'remove-mutated' | 'remove-conflict' | 'remove-force' | 'promote' | 'promote-failed'; export interface ActivityEvent { event: ProjectLocalEvent; /** Bundle id, e.g., "my-ext". */ name: string; /** Bundle type, e.g., "extension". */ type: string; /** Free-form summary (one line, ≤120 chars after the prefix). */ summary: string; } /** * Append an activity-log entry for a project-local lifecycle event. * * Non-blocking: write failures are swallowed with a stderr warning. The * caller's primary operation must not depend on log success. * * Wire format: `## [TS] <op> | <event>: <name>:<type> | <summary>` */ export declare function appendProjectLocalActivity(ev: ActivityEvent): Promise<void>; /** * Emit `discover` events for newly-seen bundles. Per #1049 design's * "discover noise control": dedupe by reading the most recent N lines * and skipping (name, type) pairs that already appeared. * * Cheap heuristic — exact log de-dup is not required. We just want to * avoid filling the log with the same lines on every read-only command. */ export declare function emitDiscoverEventsDeduped(bundles: ReadonlyArray<{ id: string; type: string; }>): Promise<void>; //# sourceMappingURL=project-local-activity.d.ts.map