@peer-agent/protocol 0.1.0-rc.12 → 0.1.0-rc.14
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.
- package/dist/delegation.d.ts +5 -1
- package/dist/index.d.ts +12 -0
- package/dist/local-image.d.ts +16 -0
- package/dist/project.d.ts +3 -2
- package/dist/tool-activity-preview.js +3 -0
- package/package.json +1 -1
package/dist/delegation.d.ts
CHANGED
|
@@ -295,8 +295,10 @@ 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
|
+
readonly imageReadScope?: import('./local-image.ts').LocalImagePermissionScope;
|
|
301
|
+
readonly imageReadGrant?: import('./local-image.ts').ImageReadGrant;
|
|
300
302
|
readonly approvalId: string;
|
|
301
303
|
readonly workspaceId: string | null;
|
|
302
304
|
readonly sessionId?: string | null;
|
|
@@ -310,6 +312,8 @@ export interface PendingApproval {
|
|
|
310
312
|
readonly argsDigest: string;
|
|
311
313
|
readonly createdAt: string;
|
|
312
314
|
readonly state: PendingApprovalState;
|
|
315
|
+
readonly deadlineAt?: string;
|
|
316
|
+
readonly decisionReason?: 'permission_cancelled' | 'permission_timeout' | 'permission_unavailable' | 'local_user_denied';
|
|
313
317
|
readonly decidedAt?: string;
|
|
314
318
|
readonly decidedBy?: 'local_ui' | 'policy';
|
|
315
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/local-image.d.ts
CHANGED
|
@@ -24,6 +24,22 @@ export interface LocalImagePermissionScope {
|
|
|
24
24
|
path: string;
|
|
25
25
|
workspacePath: string | null;
|
|
26
26
|
action: 'read_image_for_model';
|
|
27
|
+
fileIdentity?: {
|
|
28
|
+
dev: number;
|
|
29
|
+
ino: number;
|
|
30
|
+
size: number;
|
|
31
|
+
mtimeMs: number;
|
|
32
|
+
ctimeMs: number;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
/** Local host-issued exact-image read authority; no pixels are persisted. */
|
|
36
|
+
export interface ImageReadGrant {
|
|
37
|
+
schemaVersion: 1;
|
|
38
|
+
grantId: string;
|
|
39
|
+
workspaceId: string | null;
|
|
40
|
+
conversationId: string;
|
|
41
|
+
expiresAt: number;
|
|
42
|
+
scope: LocalImagePermissionScope;
|
|
27
43
|
}
|
|
28
44
|
/** Concrete image grant; legacy grant scopes remain unchanged. */
|
|
29
45
|
export interface LocalImagePermissionGrant extends PermissionGrant {
|
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';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
const PRIVATE_FIELD = /(?:api.?key|token|secret|password|credential|authorization|cookie|private.?key|reasoning|thinking)/i;
|
|
2
2
|
/** One bounded display seam for tool parameters/results in live and historical presentation. It never executes a tool. */
|
|
3
3
|
export function toolActivityPreview(value, limit) {
|
|
4
|
+
// A missing result is not the JSON literal null. Stringifying it prints the word "null".
|
|
5
|
+
if (value == null)
|
|
6
|
+
return { text: '', truncated: false, redacted: false };
|
|
4
7
|
if (typeof value === 'string' && value.length > 64_000)
|
|
5
8
|
return { text: '', truncated: true, redacted: true };
|
|
6
9
|
let redacted = false, truncated = false, nodes = 0;
|