@peer-agent/protocol 0.1.0-rc.12 → 0.1.0-rc.13
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
CHANGED
|
@@ -297,6 +297,8 @@ export interface ProjectInput {
|
|
|
297
297
|
}
|
|
298
298
|
export type PendingApprovalState = 'open' | 'approved' | 'denied' | 'expired' | 'stale';
|
|
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;
|
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 {
|
|
@@ -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;
|