@peer-agent/protocol 0.1.0-rc.3 → 0.1.0-rc.30

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.
Files changed (65) hide show
  1. package/dist/acceptance-close-gate.d.ts +10 -1
  2. package/dist/acceptance-close-gate.js +12 -0
  3. package/dist/agent-supervision.d.ts +81 -0
  4. package/dist/agent-supervision.js +1 -0
  5. package/dist/attention.d.ts +44 -0
  6. package/dist/attention.js +1 -0
  7. package/dist/bot-access-policy.d.ts +29 -0
  8. package/dist/bot-access-policy.js +1 -0
  9. package/dist/bot-conversation-read.d.ts +25 -0
  10. package/dist/bot-conversation-read.js +9 -0
  11. package/dist/bot-model-selection.d.ts +13 -0
  12. package/dist/bot-model-selection.js +1 -0
  13. package/dist/browser-window.d.ts +48 -0
  14. package/dist/browser-window.js +23 -0
  15. package/dist/capability-admission.d.ts +20 -0
  16. package/dist/capability-admission.js +1 -0
  17. package/dist/delegation-coordination.d.ts +76 -0
  18. package/dist/delegation-coordination.js +1 -0
  19. package/dist/delegation.d.ts +189 -6
  20. package/dist/delegation.js +39 -39
  21. package/dist/document-reference.d.ts +81 -0
  22. package/dist/document-reference.js +1 -0
  23. package/dist/evidence-inspection.d.ts +51 -0
  24. package/dist/evidence-inspection.js +1 -0
  25. package/dist/goal.d.ts +49 -2
  26. package/dist/index.d.ts +46 -5
  27. package/dist/index.js +19 -0
  28. package/dist/local-git.d.ts +44 -0
  29. package/dist/local-git.js +3 -0
  30. package/dist/local-image.d.ts +53 -0
  31. package/dist/local-image.js +5 -0
  32. package/dist/model-reasoning.d.ts +13 -0
  33. package/dist/model-reasoning.js +18 -0
  34. package/dist/model-routing.d.ts +36 -2
  35. package/dist/model-routing.js +30 -5
  36. package/dist/project-agent-failure.d.ts +30 -0
  37. package/dist/project-agent-failure.js +44 -0
  38. package/dist/project-input-recovery.d.ts +65 -0
  39. package/dist/project-input-recovery.js +5 -0
  40. package/dist/project-recovery.d.ts +43 -0
  41. package/dist/project-recovery.js +1 -0
  42. package/dist/project.d.ts +63 -0
  43. package/dist/project.js +2 -5
  44. package/dist/resource-edit-execution.d.ts +68 -0
  45. package/dist/resource-edit-execution.js +96 -0
  46. package/dist/resource-edit.d.ts +237 -0
  47. package/dist/resource-edit.js +134 -0
  48. package/dist/resource-feedback.d.ts +91 -0
  49. package/dist/resource-feedback.js +120 -0
  50. package/dist/resource-file-replace.d.ts +36 -0
  51. package/dist/resource-file-replace.js +40 -0
  52. package/dist/resource-reference-hints.d.ts +3 -0
  53. package/dist/resource-reference-hints.js +58 -0
  54. package/dist/resource-window.d.ts +138 -0
  55. package/dist/resource-window.js +116 -0
  56. package/dist/session-facts.d.ts +29 -0
  57. package/dist/session-facts.js +35 -0
  58. package/dist/system-context.d.ts +6 -0
  59. package/dist/task-overview.d.ts +89 -0
  60. package/dist/task-overview.js +317 -17
  61. package/dist/tool-activity-preview.d.ts +4 -0
  62. package/dist/tool-activity-preview.js +72 -0
  63. package/dist/work-coordination.d.ts +136 -0
  64. package/dist/work-coordination.js +1 -0
  65. package/package.json +1 -1
@@ -0,0 +1,136 @@
1
+ import type { ProjectRecoveryFailureKind } from './project-agent-failure.ts';
2
+ export interface ProjectWorkBudgetLimits {
3
+ readonly schemaVersion?: 2;
4
+ readonly source: string;
5
+ readonly maxModelRequests?: number;
6
+ readonly maxToolCalls?: number;
7
+ readonly maxTokens?: number;
8
+ readonly maxCostUsd?: number;
9
+ }
10
+ export interface ProjectWorkBudgetBoundary {
11
+ readonly metric: 'modelRequests' | 'toolCalls' | 'tokens' | 'costUsd';
12
+ readonly used: number | null;
13
+ readonly limit: number;
14
+ readonly source: string;
15
+ readonly reason: 'limit_reached' | 'usage_unknown' | 'reservation_pending';
16
+ }
17
+ /** Current host admission; a card action never grants execution authority. */
18
+ export interface ProjectReplyRecoveryAction {
19
+ readonly canContinue: boolean;
20
+ readonly blockedReason?: string;
21
+ readonly budget?: ProjectWorkBudgetBoundary;
22
+ }
23
+ /** A reply attempt and delegated execution have independent outcomes. Host facts only. */
24
+ export interface ProjectReplyFailureStatus {
25
+ readonly phase: 'current' | 'retrying' | 'superseded' | 'recovered' | 'cancelled' | 'paused';
26
+ readonly turnKind: 'user' | 'wake';
27
+ readonly workId?: string;
28
+ readonly activeSessionIds: readonly string[];
29
+ readonly recoveredByReplyId?: string;
30
+ }
31
+ /** Persisted on agent_turn.meta and the protected outcome; not a delivered reply. */
32
+ export interface ProjectAgentSilentWait {
33
+ readonly source: 'host' | 'tool';
34
+ readonly sessionIds: readonly string[];
35
+ }
36
+ /** Local host reservation; neither model text nor a UI timer owns recovery. */
37
+ export interface ProjectWorkRecovery {
38
+ readonly failureKind: ProjectRecoveryFailureKind;
39
+ readonly retryable: boolean;
40
+ readonly autoAttempts: number;
41
+ readonly failedTurnId: string;
42
+ readonly retryAt?: string;
43
+ readonly reservationId?: string;
44
+ readonly deadlineAt?: string;
45
+ readonly dispatchesReconciled?: boolean;
46
+ readonly blockedCode?: 'RECOVERY_CHECKPOINT_UNAVAILABLE';
47
+ }
48
+ export type ProjectWorkState = 'runnable' | 'waiting_children' | 'waiting_user' | 'retry_wait' | 'paused' | 'budget_limited' | 'blocked_system' | 'delivered' | 'cancelled' | 'coalesced';
49
+ export type ProjectTurnEnd = 'reply_committed' | 'awaiting_children' | 'yielded' | 'awaiting_user' | 'budget_limited' | 'provider_retryable' | 'no_progress' | 'user_stopped' | 'fatal' | 'coalesced';
50
+ /** Host reconciliation closes an interrupted review/query, never supplies its result or verdict. */
51
+ export interface VerificationDispatchReconciliation {
52
+ readonly attemptId: string;
53
+ readonly toolCallId: string;
54
+ readonly capabilityId: 'verify_session' | 'local.delegation.verify_session' | 'get_session' | 'local.delegation.get_session' | 'get_verification_detail' | 'local.delegation.get_verification_detail';
55
+ readonly sessionId: string;
56
+ readonly planId: string;
57
+ readonly sourceRevision: string;
58
+ readonly outcome: 'verification_interrupted' | 'query_interrupted';
59
+ readonly at: string;
60
+ }
61
+ export interface ProjectWorkReceipt {
62
+ readonly schemaVersion: 1;
63
+ readonly workId: string;
64
+ readonly workspaceId: string;
65
+ readonly parentConversationId: string;
66
+ readonly anchorInputIds: readonly string[];
67
+ readonly sessionIds: readonly string[];
68
+ /** Current owned technical blockers; a public progress update does not discharge them. */
69
+ readonly repairSessionIds?: readonly string[];
70
+ readonly progressFacts?: readonly string[];
71
+ readonly state: ProjectWorkState;
72
+ readonly revision: number;
73
+ readonly checkpointRef?: string;
74
+ readonly nativeCheckpointRef?: string;
75
+ /** Only duplicate background observations transfer custody; all history remains. */
76
+ readonly continuationOwnerWorkId?: string;
77
+ readonly reportedWait?: {
78
+ readonly replyIds: readonly string[];
79
+ readonly waitingUser: boolean;
80
+ readonly sessionStates: readonly {
81
+ readonly sessionId: string;
82
+ readonly status: string;
83
+ readonly sourceRevision: string;
84
+ readonly observationRevision?: string;
85
+ }[];
86
+ };
87
+ readonly recovery?: ProjectWorkRecovery;
88
+ readonly end?: ProjectTurnEnd;
89
+ readonly attemptId?: string;
90
+ readonly pendingEventIds?: readonly string[];
91
+ readonly waitFor: readonly {
92
+ readonly kind: 'session' | 'approval' | 'question' | 'retry_timer';
93
+ readonly id: string;
94
+ }[];
95
+ readonly consumedEventIds: readonly string[];
96
+ readonly pendingResultRefs: readonly string[];
97
+ readonly lastDeliveredFactKey?: string;
98
+ readonly budgetRef?: string;
99
+ readonly budget?: {
100
+ readonly modelRequests: number;
101
+ readonly toolCalls: number;
102
+ readonly tokens: number;
103
+ readonly costUsd: number;
104
+ readonly unknownUsage: boolean;
105
+ readonly unknownCost: boolean;
106
+ readonly limits: ProjectWorkBudgetLimits;
107
+ readonly policyMigration?: {
108
+ readonly version: 2;
109
+ readonly reason: 'legacy_system_default_removed';
110
+ readonly previousLimits: ProjectWorkBudgetLimits;
111
+ readonly at: string;
112
+ };
113
+ readonly lastBoundary?: ProjectWorkBudgetBoundary;
114
+ readonly attempts: Readonly<Record<string, {
115
+ readonly role: string;
116
+ readonly requests?: number;
117
+ readonly modelProviderId?: string;
118
+ readonly checkpointRef?: string;
119
+ readonly pendingTools?: readonly {
120
+ readonly toolCallId: string | null;
121
+ readonly capabilityId: string | null;
122
+ readonly verificationSessionId?: string;
123
+ }[];
124
+ }>>;
125
+ readonly reconciledDispatches?: readonly VerificationDispatchReconciliation[];
126
+ readonly uncertainDispatches?: readonly {
127
+ readonly attemptId: string;
128
+ readonly role: string;
129
+ readonly toolCallId: string | null;
130
+ readonly capabilityId: string | null;
131
+ readonly verificationSessionId?: string;
132
+ }[];
133
+ };
134
+ readonly stopScope: 'reply' | 'work';
135
+ readonly updatedAt: string;
136
+ }
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peer-agent/protocol",
3
- "version": "0.1.0-rc.3",
3
+ "version": "0.1.0-rc.30",
4
4
  "description": "Shared host-neutral protocol contracts for Peer Agent runtimes and clients.",
5
5
  "type": "module",
6
6
  "license": "MIT",