@peer-agent/protocol 0.1.0-rc.23 → 0.1.0-rc.24
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/bot-access-policy.d.ts +29 -0
- package/dist/bot-access-policy.js +1 -0
- package/dist/delegation.d.ts +12 -2
- package/dist/goal.d.ts +5 -0
- package/dist/index.d.ts +3 -0
- package/dist/local-image.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { LocalAccessLevel } from './index.ts';
|
|
2
|
+
/** Device-local user authority. Never supplied by a model or copied into a worker profile. */
|
|
3
|
+
export interface BotAccessPolicy {
|
|
4
|
+
readonly workspaceId: string;
|
|
5
|
+
readonly conversationId: string;
|
|
6
|
+
readonly accessLevel: LocalAccessLevel;
|
|
7
|
+
readonly revision: number;
|
|
8
|
+
readonly updatedAt: string;
|
|
9
|
+
readonly source: 'legacy_migration' | 'new_bot' | 'local_ui';
|
|
10
|
+
}
|
|
11
|
+
export interface BotAccessPolicyReadRequest {
|
|
12
|
+
readonly workspaceId?: string;
|
|
13
|
+
readonly conversationId?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface BotAccessPolicyUpdateRequest {
|
|
16
|
+
readonly workspaceId: string;
|
|
17
|
+
readonly expectedRevision: number;
|
|
18
|
+
readonly accessLevel: LocalAccessLevel;
|
|
19
|
+
}
|
|
20
|
+
export type BotAccessPolicyResult = {
|
|
21
|
+
readonly ok: true;
|
|
22
|
+
readonly policy: BotAccessPolicy | null;
|
|
23
|
+
readonly inherited: boolean;
|
|
24
|
+
readonly botName?: string;
|
|
25
|
+
} | {
|
|
26
|
+
readonly ok: false;
|
|
27
|
+
readonly code: 'INVALID_INPUT' | 'NOT_FOUND' | 'OUT_OF_SCOPE' | 'POLICY_CONFLICT' | 'POLICY_UNAVAILABLE' | 'PROJECT_AGENT_DISABLED';
|
|
28
|
+
readonly policy?: BotAccessPolicy;
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/delegation.d.ts
CHANGED
|
@@ -66,6 +66,7 @@ export interface WorkSessionConversationMeta extends SessionQueueFacts {
|
|
|
66
66
|
readonly phase?: 'starting' | 'verifying' | 'paused';
|
|
67
67
|
}
|
|
68
68
|
export interface WorkSession extends SessionQueueFacts {
|
|
69
|
+
readonly verificationProgress?: VerificationProgress;
|
|
69
70
|
readonly completionReviewRequired?: boolean;
|
|
70
71
|
readonly resultConfirmationRequired?: boolean;
|
|
71
72
|
readonly coordination?: import('./delegation-coordination.ts').CoordinationSessionFacts;
|
|
@@ -117,11 +118,19 @@ export interface AgentMessage {
|
|
|
117
118
|
readonly text: string;
|
|
118
119
|
readonly at: string;
|
|
119
120
|
}
|
|
121
|
+
export interface VerificationProgress {
|
|
122
|
+
readonly continuationId: string;
|
|
123
|
+
readonly startedAt: string;
|
|
124
|
+
readonly lastProgressAt: string;
|
|
125
|
+
readonly observationCount: number;
|
|
126
|
+
readonly phase: 'ready' | 'requesting' | 'tools' | 'completed';
|
|
127
|
+
}
|
|
120
128
|
export interface AgentActivity {
|
|
129
|
+
readonly verificationProgress?: VerificationProgress;
|
|
121
130
|
readonly eventId: string;
|
|
122
131
|
readonly sessionId: string;
|
|
123
132
|
readonly name: string;
|
|
124
|
-
readonly state: 'queued' | 'started' | 'update' | 'question' | 'answer' | 'reported' | 'verified' | 'ended' | 'cancelled' | 'blocked';
|
|
133
|
+
readonly state: 'queued' | 'started' | 'update' | 'question' | 'answer' | 'reported' | 'verified' | 'verifying' | 'ended' | 'cancelled' | 'blocked';
|
|
125
134
|
}
|
|
126
135
|
export type JsonValue = null | string | number | boolean | readonly JsonValue[] | {
|
|
127
136
|
readonly [key: string]: JsonValue;
|
|
@@ -324,6 +333,7 @@ export interface ProjectInput {
|
|
|
324
333
|
}
|
|
325
334
|
export type PendingApprovalState = 'open' | 'approved' | 'denied' | 'expired' | 'stale' | 'cancelled';
|
|
326
335
|
export interface PendingApproval {
|
|
336
|
+
readonly policyRevision?: string;
|
|
327
337
|
readonly imageReadScope?: import('./local-image.ts').LocalImagePermissionScope;
|
|
328
338
|
readonly imageReadGrant?: import('./local-image.ts').ImageReadGrant;
|
|
329
339
|
readonly approvalId: string;
|
|
@@ -340,7 +350,7 @@ export interface PendingApproval {
|
|
|
340
350
|
readonly createdAt: string;
|
|
341
351
|
readonly state: PendingApprovalState;
|
|
342
352
|
readonly deadlineAt?: string;
|
|
343
|
-
readonly decisionReason?: 'permission_cancelled' | 'permission_timeout' | 'permission_unavailable' | 'local_user_denied';
|
|
353
|
+
readonly decisionReason?: 'permission_cancelled' | 'permission_timeout' | 'permission_unavailable' | 'local_user_denied' | 'permission_policy_changed';
|
|
344
354
|
readonly decidedAt?: string;
|
|
345
355
|
readonly decidedBy?: 'local_ui' | 'policy';
|
|
346
356
|
}
|
package/dist/goal.d.ts
CHANGED
|
@@ -603,6 +603,11 @@ export interface GoalRunnerState {
|
|
|
603
603
|
readonly fingerprint?: string;
|
|
604
604
|
readonly repeats?: number;
|
|
605
605
|
readonly progressFacts?: readonly string[];
|
|
606
|
+
readonly startedAt?: string;
|
|
607
|
+
readonly lastProgressAt?: string;
|
|
608
|
+
readonly observationCount?: number;
|
|
609
|
+
readonly observationFacts?: readonly string[];
|
|
610
|
+
readonly formatRequests?: number;
|
|
606
611
|
};
|
|
607
612
|
readonly enabled: boolean;
|
|
608
613
|
readonly status: GoalRunnerStatus;
|
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export type { RemoteReadRequest, RemoteReadContext, RemoteReadRejection, RemoteR
|
|
|
17
17
|
export { REMOTE_PROJECT_LIMITS, parseRemoteProjectRequest, admitRemoteProject, parseRemoteDelegationProjection } from './remote-access.ts';
|
|
18
18
|
export type { RemoteProjectGrant, RemoteProjectRequest, RemoteProjectContext, RemoteProjectRejection, RemoteProjectAdmission, RemoteDelegationProjection } from './remote-access.ts';
|
|
19
19
|
export type LocalAccessLevel = 'ask_before_local' | 'session_local' | 'restricted_local' | 'full_local';
|
|
20
|
+
export type { BotAccessPolicy, BotAccessPolicyReadRequest, BotAccessPolicyUpdateRequest, BotAccessPolicyResult } from './bot-access-policy.ts';
|
|
20
21
|
export type { ConversationLifetimeUsage, ProviderRequestUsage, RuntimeTurnUsage, UsageAmounts, UsageScope, } from './usage-accounting.ts';
|
|
21
22
|
export type CapabilityRiskLevel = 'L0_inert' | 'L1_local_read' | 'L2_local_write' | 'L3_external_write' | 'L4_privileged' | 'L5_destructive';
|
|
22
23
|
export type DataLevel = 'D0_public' | 'D1_internal' | 'D2_sensitive' | 'D3_private' | 'D4_regulated';
|
|
@@ -753,6 +754,8 @@ export interface ClientToolCallPollResult {
|
|
|
753
754
|
}
|
|
754
755
|
export type PermissionDuration = 'once' | 'task' | 'session' | 'scope' | 'persistent' | 'denied';
|
|
755
756
|
export interface PermissionGrant {
|
|
757
|
+
/** Host-issued policy version; audit provenance, never a client authority token. */
|
|
758
|
+
readonly policyRevision?: string;
|
|
756
759
|
readonly grantId: string;
|
|
757
760
|
readonly toolCallId: string;
|
|
758
761
|
readonly granted: boolean;
|
package/dist/local-image.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export interface LocalImagePermissionScope {
|
|
|
34
34
|
}
|
|
35
35
|
/** Local host-issued exact-image read authority; no pixels are persisted. */
|
|
36
36
|
export interface ImageReadGrant {
|
|
37
|
+
policyRevision?: string;
|
|
37
38
|
schemaVersion: 1;
|
|
38
39
|
grantId: string;
|
|
39
40
|
workspaceId: string | null;
|