@peer-agent/protocol 0.0.2-beta.1 → 0.0.2-beta.3

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.
@@ -41,6 +41,8 @@ export interface AutomationNotificationPolicy {
41
41
  readonly needsAttention: 'system_and_badge' | 'badge_only';
42
42
  readonly failed: boolean;
43
43
  readonly succeeded: boolean;
44
+ /** When enabled, successful runs notify only if their result differs from the previous completed run. */
45
+ readonly succeededOnlyOnChange?: boolean;
44
46
  }
45
47
  export interface AutomationBudget {
46
48
  readonly timeoutMs: number;
@@ -105,6 +107,10 @@ export interface AutomationRunChangeSet {
105
107
  export interface AutomationRunReceipt {
106
108
  readonly summary?: string;
107
109
  readonly error?: string;
110
+ /** Bounded snapshot of the previous completed result; never used as executable prompt context. */
111
+ readonly previousSummary?: string;
112
+ readonly resultChanged?: boolean;
113
+ readonly comparisonSummary?: string;
108
114
  readonly evidence: readonly Evidence[];
109
115
  readonly evidenceRefs: readonly string[];
110
116
  readonly verifications: readonly AutomationRunVerification[];
@@ -248,6 +254,8 @@ export interface AutomationCreateContext {
248
254
  readonly source: AutomationCreateContextSource;
249
255
  readonly status: AutomationCreateContextStatus;
250
256
  readonly activeProposal?: AutomationChatProposal | null;
257
+ /** Most recent terminal proposal retained for durable idempotent action replay. */
258
+ readonly lastSettledProposal?: AutomationChatProposal | null;
251
259
  readonly rejectedFingerprints: readonly string[];
252
260
  readonly createdAt: string;
253
261
  readonly updatedAt: string;
@@ -277,3 +285,19 @@ export interface AutomationProposalActionResult {
277
285
  readonly receipt?: AutomationCreationReceipt | null;
278
286
  readonly replayed: boolean;
279
287
  }
288
+ /**
289
+ * Durable conversation origin for automation Fresh Runs.
290
+ * Distinct from AutomationCreateContext (chat → create automation draft).
291
+ * UI badges and audit links must read this field, not title prefixes.
292
+ */
293
+ export type ConversationAutomationOriginKind = 'automation_run';
294
+ export interface ConversationAutomationOrigin {
295
+ readonly kind: ConversationAutomationOriginKind;
296
+ readonly automationId: string;
297
+ readonly runId: string;
298
+ readonly automationName: string;
299
+ readonly triggerSource: AutomationTriggerSource;
300
+ /** User-facing workspace that owns the Automation; execution may use a worktree. */
301
+ readonly originWorkspacePath?: string;
302
+ readonly createdAt: string;
303
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peer-agent/protocol",
3
- "version": "0.0.2-beta.1",
3
+ "version": "0.0.2-beta.3",
4
4
  "description": "Shared host-neutral protocol contracts for Peer Agent runtimes and clients.",
5
5
  "type": "module",
6
6
  "license": "MIT",