@compilr-dev/agents 0.3.15 → 0.3.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,5 +3,5 @@
3
3
  *
4
4
  * Work history tracking with effort estimation.
5
5
  */
6
- export type { Effort, WorkEpisode, EffortSignals, EffortWeights, EffortSummary, ProjectWorkSummary, EpisodeStore, } from './types.js';
6
+ export type { Effort, WorkEpisode, EffortSignals, EffortWeights, EffortSummary, ProjectWorkSummary, WorkAtRisk, EpisodeStore, } from './types.js';
7
7
  export { estimateEffort, DEFAULT_WEIGHTS, EFFORT_ORDER } from './effort.js';
@@ -127,6 +127,20 @@ export interface ProjectWorkSummary {
127
127
  /** Episodes since the last git commit */
128
128
  uncommittedWork: WorkEpisode[];
129
129
  }
130
+ /**
131
+ * Summary of work that would be at risk from a destructive operation.
132
+ * Used by guardrails and rehearsal to warn agents before they destroy work.
133
+ */
134
+ export interface WorkAtRisk {
135
+ /** Episodes involving the affected files */
136
+ episodes: WorkEpisode[];
137
+ /** Maximum effort across at-risk episodes */
138
+ totalEffort: Effort;
139
+ /** Agents who did the work (e.g., ['default (abc123)', 'backend (xyz999)']) */
140
+ agentAttribution: string[];
141
+ /** Human-readable warning message */
142
+ warningMessage: string;
143
+ }
130
144
  /**
131
145
  * Persistence interface for work episodes.
132
146
  * Write methods may be async (for file I/O), read methods are synchronous
package/dist/index.d.ts CHANGED
@@ -67,4 +67,4 @@ export type { RateLimiterConfig, RateLimiterStats, RetryConfig, RateLimitRetryCo
67
67
  export { RehearsalManager, createRehearsalManager, GitRehearsalAnalyzer, createGitAnalyzer, FileRehearsalAnalyzer, createFileAnalyzer, } from './rehearsal/index.js';
68
68
  export type { ImpactSeverity, RehearsalRecommendation, OperationCategory, AffectedFile, RehearsalImpact, RehearsalResult, RehearsalContext, RehearsalAnalyzer, RehearsalManagerOptions, RehearsalEventType, RehearsalEvent, RehearsalEventHandler, } from './rehearsal/index.js';
69
69
  export { estimateEffort, DEFAULT_WEIGHTS, EFFORT_ORDER } from './episodes/index.js';
70
- export type { Effort, WorkEpisode, EffortSignals, EffortWeights, EffortSummary, ProjectWorkSummary, EpisodeStore, } from './episodes/index.js';
70
+ export type { Effort, WorkEpisode, EffortSignals, EffortWeights, EffortSummary, ProjectWorkSummary, WorkAtRisk, EpisodeStore, } from './episodes/index.js';
@@ -5,6 +5,7 @@
5
5
  * before they are executed. This is a novel safety feature that goes beyond
6
6
  * simple dry-run by actually analyzing what would be affected.
7
7
  */
8
+ import type { WorkAtRisk } from '../episodes/types.js';
8
9
  /**
9
10
  * Severity level of the operation's potential impact
10
11
  */
@@ -120,6 +121,10 @@ export interface RehearsalResult {
120
121
  * Suggested safer alternatives (if any)
121
122
  */
122
123
  alternatives?: string[];
124
+ /**
125
+ * Work episodes at risk from this operation (populated by episodic memory)
126
+ */
127
+ workAtRisk?: WorkAtRisk;
123
128
  /**
124
129
  * Time taken to perform the analysis (ms)
125
130
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compilr-dev/agents",
3
- "version": "0.3.15",
3
+ "version": "0.3.16",
4
4
  "description": "Lightweight multi-LLM agent library for building CLI AI assistants",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",