@peer-agent/protocol 0.1.0-beta.5 → 0.1.0-rc.1

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 (2) hide show
  1. package/dist/project.d.ts +110 -0
  2. package/package.json +1 -1
package/dist/project.d.ts CHANGED
@@ -4,6 +4,116 @@
4
4
  */
5
5
  import type { ProjectModelPolicy } from './model-routing.ts';
6
6
  import type { PendingApprovalState, WorkSessionStatus } from './delegation.ts';
7
+ export interface DiagnosticText {
8
+ readonly length: number;
9
+ readonly sha256: string;
10
+ }
11
+ export interface ProjectAgentDiagnosticTiming {
12
+ readonly startedAt: string;
13
+ readonly finishedAt: string;
14
+ readonly durationMs: number;
15
+ readonly outcome: 'done' | 'error' | 'preempted';
16
+ }
17
+ export interface ProjectDiagnostics {
18
+ readonly schemaVersion: 1;
19
+ readonly generatedAt: string | null;
20
+ readonly errors: readonly string[];
21
+ readonly scheduler: {
22
+ readonly stats: {
23
+ readonly active: number | null;
24
+ readonly waiting: number | null;
25
+ readonly limit: number | null;
26
+ };
27
+ readonly queue: readonly {
28
+ readonly workspace: DiagnosticText | null;
29
+ readonly plan: DiagnosticText | null;
30
+ readonly priority: string;
31
+ readonly enqueuedAt: string | null;
32
+ }[];
33
+ readonly projects: readonly {
34
+ readonly workspace: DiagnosticText | null;
35
+ readonly slots: {
36
+ readonly read: number | null;
37
+ readonly write: number | null;
38
+ readonly isolated: number | null;
39
+ };
40
+ readonly queue: readonly {
41
+ readonly session: DiagnosticText | null;
42
+ readonly priority: string;
43
+ readonly enqueuedAt: string | null;
44
+ readonly reason: string | null;
45
+ }[];
46
+ }[];
47
+ } | null;
48
+ readonly bots: readonly {
49
+ readonly identity: DiagnosticText | null;
50
+ readonly workspace: '.';
51
+ readonly errors: readonly string[];
52
+ readonly lease: {
53
+ readonly holder: DiagnosticText | null;
54
+ readonly surface: string;
55
+ readonly pid: number | null;
56
+ readonly acquiredAt: string | null;
57
+ readonly heartbeatAt: string | null;
58
+ } | null;
59
+ readonly input: {
60
+ readonly depth: number | null;
61
+ readonly executionDepth: number | null;
62
+ readonly cursor: DiagnosticText | null;
63
+ readonly executedCursor: DiagnosticText | null;
64
+ } | null;
65
+ readonly inbox: {
66
+ readonly cursor: number | null;
67
+ readonly events: readonly {
68
+ readonly identity: DiagnosticText | null;
69
+ readonly seq: number | null;
70
+ readonly at: string | null;
71
+ readonly kind: string;
72
+ }[];
73
+ } | null;
74
+ readonly approvals: readonly {
75
+ readonly identity: DiagnosticText | null;
76
+ readonly state: 'open' | 'stale';
77
+ readonly capability: DiagnosticText | null;
78
+ readonly summary: DiagnosticText | null;
79
+ readonly at: string | null;
80
+ }[];
81
+ readonly objectives: readonly {
82
+ readonly identity: DiagnosticText | null;
83
+ readonly status: string;
84
+ readonly autonomy: string;
85
+ readonly watches: readonly {
86
+ readonly identity: DiagnosticText | null;
87
+ readonly kind: string;
88
+ readonly source: string;
89
+ readonly paths: readonly string[];
90
+ readonly lastObservationAt: string | null;
91
+ readonly nextRunAt: string | null;
92
+ readonly pending: boolean;
93
+ readonly unavailable: boolean;
94
+ }[];
95
+ }[];
96
+ readonly turns: readonly {
97
+ readonly identity: DiagnosticText | null;
98
+ readonly startedAt: string | null;
99
+ readonly finishedAt: string | null;
100
+ readonly durationMs: number | null;
101
+ readonly outcome: string;
102
+ }[];
103
+ }[];
104
+ }
105
+ export type ProjectDiagnosticsRequest = {
106
+ readonly action: 'read' | 'export';
107
+ };
108
+ export type ProjectDiagnosticsResult = {
109
+ readonly ok: true;
110
+ readonly report: ProjectDiagnostics;
111
+ readonly saved?: boolean;
112
+ readonly cancelled?: boolean;
113
+ } | {
114
+ readonly ok: false;
115
+ readonly code: 'INVALID_INPUT' | 'DIAGNOSTICS_UNAVAILABLE' | 'DIAGNOSTICS_SAVE_FAILED';
116
+ };
7
117
  export interface ProjectRegistryEntry {
8
118
  readonly workspaceId: string;
9
119
  readonly path: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peer-agent/protocol",
3
- "version": "0.1.0-beta.5",
3
+ "version": "0.1.0-rc.1",
4
4
  "description": "Shared host-neutral protocol contracts for Peer Agent runtimes and clients.",
5
5
  "type": "module",
6
6
  "license": "MIT",