@peer-agent/protocol 0.1.0-rc.13 → 0.1.0-rc.15

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.
@@ -295,7 +295,7 @@ export interface ProjectInput {
295
295
  readonly attachments?: readonly ProjectInputAttachment[];
296
296
  readonly createdAt: string;
297
297
  }
298
- export type PendingApprovalState = 'open' | 'approved' | 'denied' | 'expired' | 'stale';
298
+ export type PendingApprovalState = 'open' | 'approved' | 'denied' | 'expired' | 'stale' | 'cancelled';
299
299
  export interface PendingApproval {
300
300
  readonly imageReadScope?: import('./local-image.ts').LocalImagePermissionScope;
301
301
  readonly imageReadGrant?: import('./local-image.ts').ImageReadGrant;
@@ -312,6 +312,8 @@ export interface PendingApproval {
312
312
  readonly argsDigest: string;
313
313
  readonly createdAt: string;
314
314
  readonly state: PendingApprovalState;
315
+ readonly deadlineAt?: string;
316
+ readonly decisionReason?: 'permission_cancelled' | 'permission_timeout' | 'permission_unavailable' | 'local_user_denied';
315
317
  readonly decidedAt?: string;
316
318
  readonly decidedBy?: 'local_ui' | 'policy';
317
319
  }
package/dist/index.d.ts CHANGED
@@ -725,6 +725,18 @@ export interface ClientToolCall extends RuntimeToolCall {
725
725
  readonly dataLevel: DataLevel;
726
726
  readonly requestedAt: string;
727
727
  }
728
+ /** Host permission wait events. Requests are presentation, never permission truth. */
729
+ export interface ChatPermissionRequest {
730
+ readonly streamId: string;
731
+ readonly call: ClientToolCall;
732
+ readonly deadlineAt?: string;
733
+ }
734
+ export interface ChatPermissionSettled {
735
+ readonly streamId: string;
736
+ readonly toolCallIds: readonly string[];
737
+ readonly granted?: boolean;
738
+ readonly reason?: string;
739
+ }
728
740
  export interface ClientToolCallPollRequest {
729
741
  readonly sessionId: string;
730
742
  readonly projectionId?: string;
package/dist/project.d.ts CHANGED
@@ -199,13 +199,14 @@ export interface ProjectAgentToolActivity {
199
199
  readonly kind: 'tool';
200
200
  readonly id: string;
201
201
  readonly name: string;
202
- readonly status: 'preparing' | 'running' | 'done' | 'error' | 'stopped';
202
+ readonly status: 'preparing' | 'running' | 'awaiting_permission' | 'done' | 'error' | 'stopped';
203
203
  readonly startedAt?: string;
204
204
  readonly finishedAt?: string;
205
205
  readonly summary?: string;
206
206
  readonly input?: ProjectAgentToolPreview;
207
207
  readonly result?: ProjectAgentToolPreview;
208
208
  readonly receivedChars?: number;
209
+ readonly permissionDeadlineAt?: string;
209
210
  }
210
211
  /** Public conversation update, never hidden reasoning, Tool Result or Evidence.
211
212
  * User agent_turn records may persist these as publicUpdates (100 / 32000 chars).
@@ -225,7 +226,7 @@ export interface ProjectAgentActivity {
225
226
  readonly finishedAt?: string;
226
227
  readonly modelSelection?: Pick<import('./model-routing.ts').RuntimeModelSelection, 'modelProviderId' | 'reasoningEffort'>;
227
228
  readonly replyTo: readonly string[];
228
- readonly phase: 'waiting' | 'thinking' | 'responding' | 'tool' | 'settling' | 'done' | 'error' | 'stopped' | 'disposed';
229
+ readonly phase: 'waiting' | 'thinking' | 'responding' | 'tool' | 'awaiting_permission' | 'settling' | 'done' | 'error' | 'stopped' | 'disposed';
229
230
  readonly replyText: string;
230
231
  readonly segments: readonly (({
231
232
  readonly kind: 'text';
@@ -8,10 +8,22 @@ export interface ProjectWorkRecovery {
8
8
  readonly retryAt?: string;
9
9
  readonly reservationId?: string;
10
10
  readonly deadlineAt?: string;
11
+ readonly dispatchesReconciled?: boolean;
11
12
  readonly blockedCode?: 'RECOVERY_CHECKPOINT_UNAVAILABLE';
12
13
  }
13
14
  export type ProjectWorkState = 'runnable' | 'waiting_children' | 'waiting_user' | 'retry_wait' | 'paused' | 'budget_limited' | 'blocked_system' | 'delivered' | 'cancelled';
14
15
  export type ProjectTurnEnd = 'reply_committed' | 'awaiting_children' | 'yielded' | 'awaiting_user' | 'budget_limited' | 'provider_retryable' | 'no_progress' | 'user_stopped' | 'fatal';
16
+ /** Host reconciliation closes an interrupted review, never supplies its verdict. */
17
+ export interface VerificationDispatchReconciliation {
18
+ readonly attemptId: string;
19
+ readonly toolCallId: string;
20
+ readonly capabilityId: 'verify_session' | 'local.delegation.verify_session';
21
+ readonly sessionId: string;
22
+ readonly planId: string;
23
+ readonly sourceRevision: string;
24
+ readonly outcome: 'verification_interrupted';
25
+ readonly at: string;
26
+ }
15
27
  export interface ProjectWorkReceipt {
16
28
  readonly schemaVersion: 1;
17
29
  readonly workId: string;
@@ -57,13 +69,16 @@ export interface ProjectWorkReceipt {
57
69
  readonly pendingTools?: readonly {
58
70
  readonly toolCallId: string | null;
59
71
  readonly capabilityId: string | null;
72
+ readonly verificationSessionId?: string;
60
73
  }[];
61
74
  }>>;
75
+ readonly reconciledDispatches?: readonly VerificationDispatchReconciliation[];
62
76
  readonly uncertainDispatches?: readonly {
63
77
  readonly attemptId: string;
64
78
  readonly role: string;
65
79
  readonly toolCallId: string | null;
66
80
  readonly capabilityId: string | null;
81
+ readonly verificationSessionId?: string;
67
82
  }[];
68
83
  };
69
84
  readonly stopScope: 'reply' | 'work';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peer-agent/protocol",
3
- "version": "0.1.0-rc.13",
3
+ "version": "0.1.0-rc.15",
4
4
  "description": "Shared host-neutral protocol contracts for Peer Agent runtimes and clients.",
5
5
  "type": "module",
6
6
  "license": "MIT",