@slopus/happy-agent-client 0.0.26 → 0.0.28
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/HappyAgentClient.d.ts +17 -0
- package/dist/HappyAgentClient.d.ts.map +1 -1
- package/dist/HappyAgentClient.js +67 -0
- package/dist/HappyAgentClient.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/protocol/bootstrap.d.ts +314 -18
- package/dist/protocol/bootstrap.d.ts.map +1 -1
- package/dist/protocol/bootstrap.js +33 -1
- package/dist/protocol/bootstrap.js.map +1 -1
- package/dist/protocol/events.d.ts +7 -1
- package/dist/protocol/events.d.ts.map +1 -1
- package/dist/protocol/events.js +6 -1
- package/dist/protocol/events.js.map +1 -1
- package/dist/protocol/messages.d.ts +13 -7
- package/dist/protocol/messages.d.ts.map +1 -1
- package/dist/protocol/messages.js +11 -2
- package/dist/protocol/messages.js.map +1 -1
- package/dist/protocol/sharing.d.ts +224 -0
- package/dist/protocol/sharing.d.ts.map +1 -0
- package/dist/protocol/sharing.js +91 -0
- package/dist/protocol/sharing.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
/** Bootstrap: one request that gets a desktop client on screen instantly. */
|
|
2
|
+
import { type Static } from "@sinclair/typebox";
|
|
2
3
|
import type { Agent, AgentDraftResponse, AgentModeResponse, AgentResponse } from "./agents.js";
|
|
3
|
-
import type
|
|
4
|
-
import type { DaemonConfig, OnboardingState } from "./daemon.js";
|
|
5
|
-
import type { HappyIntegration } from "./integrations.js";
|
|
4
|
+
import { type EventCursor } from "./common.js";
|
|
6
5
|
import type { UserMessage } from "./messages.js";
|
|
7
6
|
import type { BackgroundProcess } from "./processes.js";
|
|
8
|
-
import type { Profile } from "./profile.js";
|
|
9
|
-
import type { Project } from "./projects.js";
|
|
10
7
|
import type { AgentUsageResponse } from "./usage.js";
|
|
11
|
-
import type { Workspace } from "./workspaces.js";
|
|
12
8
|
/**
|
|
13
9
|
* `GET /v0/agents/:agentId/bootstrap`
|
|
14
10
|
*
|
|
@@ -32,20 +28,320 @@ export interface AgentBootstrapResponse extends AgentDraftResponse, AgentModeRes
|
|
|
32
28
|
* own. There is no separate global agent list: each included project and
|
|
33
29
|
* workspace carries its own ordered top-level agents.
|
|
34
30
|
*/
|
|
35
|
-
export
|
|
36
|
-
config:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
31
|
+
export declare const desktopBootstrapResponseSchema: import("@sinclair/typebox").TObject<{
|
|
32
|
+
config: import("@sinclair/typebox").TObject<{
|
|
33
|
+
defaults: import("@sinclair/typebox").TObject<{
|
|
34
|
+
effort: import("@sinclair/typebox").TString;
|
|
35
|
+
modelId: import("@sinclair/typebox").TString;
|
|
36
|
+
permissionMode: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"read_only">, import("@sinclair/typebox").TLiteral<"workspace_write">, import("@sinclair/typebox").TLiteral<"auto">, import("@sinclair/typebox").TLiteral<"full_access">]>;
|
|
37
|
+
providerId: import("@sinclair/typebox").TString;
|
|
38
|
+
}>;
|
|
39
|
+
features: import("@sinclair/typebox").TObject<{
|
|
40
|
+
crossWorkspace: import("@sinclair/typebox").TBoolean;
|
|
41
|
+
workflows: import("@sinclair/typebox").TBoolean;
|
|
42
|
+
workspaces: import("@sinclair/typebox").TBoolean;
|
|
43
|
+
}>;
|
|
44
|
+
mcpServers: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
45
|
+
enabled: import("@sinclair/typebox").TBoolean;
|
|
46
|
+
transport: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"stdio">, import("@sinclair/typebox").TLiteral<"http">]>;
|
|
47
|
+
}>>;
|
|
48
|
+
models: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
49
|
+
contextWindow: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TNull]>;
|
|
50
|
+
defaultEffort: import("@sinclair/typebox").TString;
|
|
51
|
+
efforts: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
52
|
+
name: import("@sinclair/typebox").TString;
|
|
53
|
+
serviceTiers: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
54
|
+
}>>;
|
|
55
|
+
network: import("@sinclair/typebox").TObject<{
|
|
56
|
+
allowedDomains: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
57
|
+
allowedLoopbackPorts: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TInteger>;
|
|
58
|
+
allowedPorts: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TInteger>;
|
|
59
|
+
allowLocalBinding: import("@sinclair/typebox").TBoolean;
|
|
60
|
+
deniedDomains: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
61
|
+
}>;
|
|
62
|
+
p2p: import("@sinclair/typebox").TObject<{
|
|
63
|
+
enableDirect: import("@sinclair/typebox").TBoolean;
|
|
64
|
+
enableIroh: import("@sinclair/typebox").TBoolean;
|
|
65
|
+
enableSsh: import("@sinclair/typebox").TBoolean;
|
|
66
|
+
exposeApi: import("@sinclair/typebox").TBoolean;
|
|
67
|
+
name: import("@sinclair/typebox").TString;
|
|
68
|
+
role: import("@sinclair/typebox").TString;
|
|
69
|
+
}>;
|
|
70
|
+
permissions: import("@sinclair/typebox").TObject<{
|
|
71
|
+
protectedPaths: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
72
|
+
}>;
|
|
73
|
+
presence: import("@sinclair/typebox").TObject<{
|
|
74
|
+
current: import("@sinclair/typebox").TString;
|
|
75
|
+
fallback: import("@sinclair/typebox").TString;
|
|
76
|
+
states: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
77
|
+
answerWaitMs: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TNull]>;
|
|
78
|
+
emoji: import("@sinclair/typebox").TString;
|
|
79
|
+
prompt: import("@sinclair/typebox").TString;
|
|
80
|
+
title: import("@sinclair/typebox").TString;
|
|
81
|
+
}>>;
|
|
82
|
+
}>;
|
|
83
|
+
providers: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
84
|
+
enabled: import("@sinclair/typebox").TBoolean;
|
|
85
|
+
models: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
86
|
+
defaultEffort: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
87
|
+
efforts: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
88
|
+
enabled: import("@sinclair/typebox").TBoolean;
|
|
89
|
+
id: import("@sinclair/typebox").TString;
|
|
90
|
+
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
91
|
+
serviceTiers: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
92
|
+
}>>;
|
|
93
|
+
type: import("@sinclair/typebox").TString;
|
|
94
|
+
}>>;
|
|
95
|
+
settings: import("@sinclair/typebox").TObject<{
|
|
96
|
+
compactCompletedTurns: import("@sinclair/typebox").TBoolean;
|
|
97
|
+
completionChime: import("@sinclair/typebox").TBoolean;
|
|
98
|
+
inferenceMaxRetries: import("@sinclair/typebox").TInteger;
|
|
99
|
+
showReasoning: import("@sinclair/typebox").TBoolean;
|
|
100
|
+
showUsage: import("@sinclair/typebox").TBoolean;
|
|
101
|
+
toolResultRetentionDays: import("@sinclair/typebox").TInteger;
|
|
102
|
+
}>;
|
|
103
|
+
theme: import("@sinclair/typebox").TObject<{
|
|
104
|
+
accent: import("@sinclair/typebox").TString;
|
|
105
|
+
brand: import("@sinclair/typebox").TString;
|
|
106
|
+
error: import("@sinclair/typebox").TString;
|
|
107
|
+
primary: import("@sinclair/typebox").TString;
|
|
108
|
+
secondary: import("@sinclair/typebox").TString;
|
|
109
|
+
success: import("@sinclair/typebox").TString;
|
|
110
|
+
warning: import("@sinclair/typebox").TString;
|
|
111
|
+
}>;
|
|
112
|
+
workspace: import("@sinclair/typebox").TObject<{
|
|
113
|
+
keepCopiesOnArchive: import("@sinclair/typebox").TBoolean;
|
|
114
|
+
keepWorktreesOnArchive: import("@sinclair/typebox").TBoolean;
|
|
115
|
+
protectedSync: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
116
|
+
setupCommands: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
117
|
+
sync: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
118
|
+
}>;
|
|
119
|
+
}>;
|
|
45
120
|
/**
|
|
46
121
|
* The newest event cursor as of this snapshot. Opening the event stream
|
|
47
122
|
* from here leaves no window for a change to fall between the two.
|
|
48
123
|
*/
|
|
49
|
-
cursor:
|
|
50
|
-
|
|
124
|
+
cursor: import("@sinclair/typebox").TString;
|
|
125
|
+
/** Current Happy mobile connection state. Absent on older compatible daemons. */
|
|
126
|
+
happyIntegration: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
127
|
+
updatedAt: import("@sinclair/typebox").TInteger;
|
|
128
|
+
version: import("@sinclair/typebox").TString;
|
|
129
|
+
authorization: import("@sinclair/typebox").TNull;
|
|
130
|
+
configured: import("@sinclair/typebox").TBoolean;
|
|
131
|
+
error: import("@sinclair/typebox").TNull;
|
|
132
|
+
status: import("@sinclair/typebox").TLiteral<"disabled">;
|
|
133
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
134
|
+
updatedAt: import("@sinclair/typebox").TInteger;
|
|
135
|
+
version: import("@sinclair/typebox").TString;
|
|
136
|
+
authorization: import("@sinclair/typebox").TNull;
|
|
137
|
+
configured: import("@sinclair/typebox").TBoolean;
|
|
138
|
+
error: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
139
|
+
code: import("@sinclair/typebox").TString;
|
|
140
|
+
message: import("@sinclair/typebox").TString;
|
|
141
|
+
}>, import("@sinclair/typebox").TNull]>;
|
|
142
|
+
status: import("@sinclair/typebox").TLiteral<"disconnected">;
|
|
143
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
144
|
+
updatedAt: import("@sinclair/typebox").TInteger;
|
|
145
|
+
version: import("@sinclair/typebox").TString;
|
|
146
|
+
authorization: import("@sinclair/typebox").TObject<{
|
|
147
|
+
data: import("@sinclair/typebox").TString;
|
|
148
|
+
expiresAt: import("@sinclair/typebox").TInteger;
|
|
149
|
+
kind: import("@sinclair/typebox").TLiteral<"qr">;
|
|
150
|
+
}>;
|
|
151
|
+
configured: import("@sinclair/typebox").TLiteral<false>;
|
|
152
|
+
error: import("@sinclair/typebox").TNull;
|
|
153
|
+
status: import("@sinclair/typebox").TLiteral<"pairing">;
|
|
154
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
155
|
+
updatedAt: import("@sinclair/typebox").TInteger;
|
|
156
|
+
version: import("@sinclair/typebox").TString;
|
|
157
|
+
authorization: import("@sinclair/typebox").TNull;
|
|
158
|
+
configured: import("@sinclair/typebox").TLiteral<true>;
|
|
159
|
+
error: import("@sinclair/typebox").TNull;
|
|
160
|
+
status: import("@sinclair/typebox").TLiteral<"connecting">;
|
|
161
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
162
|
+
updatedAt: import("@sinclair/typebox").TInteger;
|
|
163
|
+
version: import("@sinclair/typebox").TString;
|
|
164
|
+
authorization: import("@sinclair/typebox").TNull;
|
|
165
|
+
configured: import("@sinclair/typebox").TLiteral<true>;
|
|
166
|
+
error: import("@sinclair/typebox").TNull;
|
|
167
|
+
status: import("@sinclair/typebox").TLiteral<"connected">;
|
|
168
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
169
|
+
updatedAt: import("@sinclair/typebox").TInteger;
|
|
170
|
+
version: import("@sinclair/typebox").TString;
|
|
171
|
+
authorization: import("@sinclair/typebox").TNull;
|
|
172
|
+
configured: import("@sinclair/typebox").TBoolean;
|
|
173
|
+
error: import("@sinclair/typebox").TObject<{
|
|
174
|
+
code: import("@sinclair/typebox").TString;
|
|
175
|
+
message: import("@sinclair/typebox").TString;
|
|
176
|
+
}>;
|
|
177
|
+
status: import("@sinclair/typebox").TLiteral<"failed">;
|
|
178
|
+
}>]>>;
|
|
179
|
+
onboarding: import("@sinclair/typebox").TObject<{
|
|
180
|
+
completed: import("@sinclair/typebox").TBoolean;
|
|
181
|
+
steps: import("@sinclair/typebox").TObject<{
|
|
182
|
+
profile: import("@sinclair/typebox").TObject<{
|
|
183
|
+
done: import("@sinclair/typebox").TBoolean;
|
|
184
|
+
}>;
|
|
185
|
+
project: import("@sinclair/typebox").TObject<{
|
|
186
|
+
done: import("@sinclair/typebox").TBoolean;
|
|
187
|
+
}>;
|
|
188
|
+
providers: import("@sinclair/typebox").TObject<{
|
|
189
|
+
done: import("@sinclair/typebox").TBoolean;
|
|
190
|
+
signedIn: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
191
|
+
}>;
|
|
192
|
+
}>;
|
|
193
|
+
}>;
|
|
194
|
+
profile: import("@sinclair/typebox").TObject<{
|
|
195
|
+
email: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
196
|
+
name: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
197
|
+
photo: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
198
|
+
thumbhash: import("@sinclair/typebox").TString;
|
|
199
|
+
}>, import("@sinclair/typebox").TNull]>;
|
|
200
|
+
updatedAt: import("@sinclair/typebox").TInteger;
|
|
201
|
+
version: import("@sinclair/typebox").TString;
|
|
202
|
+
}>;
|
|
203
|
+
/** Every active project, in catalog order. */
|
|
204
|
+
projects: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
205
|
+
agents: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnsafe<Agent>>;
|
|
206
|
+
archivedAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TNull]>;
|
|
207
|
+
avatar: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
208
|
+
kind: import("@sinclair/typebox").TLiteral<"image">;
|
|
209
|
+
source: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"user">, import("@sinclair/typebox").TLiteral<"generated">]>;
|
|
210
|
+
thumbhash: import("@sinclair/typebox").TString;
|
|
211
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
212
|
+
kind: import("@sinclair/typebox").TLiteral<"home">;
|
|
213
|
+
}>]>, import("@sinclair/typebox").TNull]>;
|
|
214
|
+
compute: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
215
|
+
path: import("@sinclair/typebox").TString;
|
|
216
|
+
type: import("@sinclair/typebox").TLiteral<"host">;
|
|
217
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
218
|
+
image: import("@sinclair/typebox").TString;
|
|
219
|
+
type: import("@sinclair/typebox").TLiteral<"docker">;
|
|
220
|
+
}>]>;
|
|
221
|
+
createdAt: import("@sinclair/typebox").TInteger;
|
|
222
|
+
defaultBranch: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
223
|
+
description: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
224
|
+
git: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
225
|
+
ahead: import("@sinclair/typebox").TInteger;
|
|
226
|
+
behind: import("@sinclair/typebox").TInteger;
|
|
227
|
+
branch: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>>;
|
|
228
|
+
detached: import("@sinclair/typebox").TBoolean;
|
|
229
|
+
head: import("@sinclair/typebox").TString;
|
|
230
|
+
upstream: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
231
|
+
}>, import("@sinclair/typebox").TNull]>;
|
|
232
|
+
id: import("@sinclair/typebox").TString;
|
|
233
|
+
initialization: import("@sinclair/typebox").TObject<{
|
|
234
|
+
attempt: import("@sinclair/typebox").TInteger;
|
|
235
|
+
error: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
236
|
+
status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"initializing">, import("@sinclair/typebox").TLiteral<"ready">, import("@sinclair/typebox").TLiteral<"failed">]>;
|
|
237
|
+
}>;
|
|
238
|
+
name: import("@sinclair/typebox").TString;
|
|
239
|
+
nameSource: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"folder">, import("@sinclair/typebox").TLiteral<"user">]>;
|
|
240
|
+
orderKey: import("@sinclair/typebox").TString;
|
|
241
|
+
remoteSource: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
242
|
+
kind: import("@sinclair/typebox").TLiteral<"github">;
|
|
243
|
+
repository: import("@sinclair/typebox").TString;
|
|
244
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
245
|
+
kind: import("@sinclair/typebox").TLiteral<"git">;
|
|
246
|
+
url: import("@sinclair/typebox").TString;
|
|
247
|
+
}>]>, import("@sinclair/typebox").TNull]>;
|
|
248
|
+
settings: import("@sinclair/typebox").TObject<{
|
|
249
|
+
defaultWorkspaceCompute: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
250
|
+
type: import("@sinclair/typebox").TLiteral<"host">;
|
|
251
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
252
|
+
image: import("@sinclair/typebox").TString;
|
|
253
|
+
type: import("@sinclair/typebox").TLiteral<"docker">;
|
|
254
|
+
}>]>;
|
|
255
|
+
}>;
|
|
256
|
+
status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"active">, import("@sinclair/typebox").TLiteral<"archived">]>;
|
|
257
|
+
updatedAt: import("@sinclair/typebox").TInteger;
|
|
258
|
+
version: import("@sinclair/typebox").TString;
|
|
259
|
+
worktreeSupport: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"supported">, import("@sinclair/typebox").TLiteral<"unsupported">, import("@sinclair/typebox").TLiteral<"unknown">]>;
|
|
260
|
+
worktreeUnsupportedReason: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
261
|
+
}>>;
|
|
262
|
+
/** Current sharing state. Absent on older compatible protocol-22 daemons. */
|
|
263
|
+
sharing: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
264
|
+
updatedAt: import("@sinclair/typebox").TInteger;
|
|
265
|
+
version: import("@sinclair/typebox").TString;
|
|
266
|
+
status: import("@sinclair/typebox").TLiteral<"unenrolled">;
|
|
267
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
268
|
+
updatedAt: import("@sinclair/typebox").TInteger;
|
|
269
|
+
version: import("@sinclair/typebox").TString;
|
|
270
|
+
connection: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"connecting">, import("@sinclair/typebox").TLiteral<"connected">, import("@sinclair/typebox").TLiteral<"disconnected">]>;
|
|
271
|
+
contacts: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
272
|
+
identity: import("@sinclair/typebox").TString;
|
|
273
|
+
profile: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
274
|
+
email: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
275
|
+
name: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
276
|
+
photo: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
277
|
+
thumbhash: import("@sinclair/typebox").TString;
|
|
278
|
+
}>, import("@sinclair/typebox").TNull]>;
|
|
279
|
+
updatedAt: import("@sinclair/typebox").TInteger;
|
|
280
|
+
version: import("@sinclair/typebox").TString;
|
|
281
|
+
}>, import("@sinclair/typebox").TNull]>;
|
|
282
|
+
status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"active">, import("@sinclair/typebox").TLiteral<"removing">]>;
|
|
283
|
+
}>>;
|
|
284
|
+
identity: import("@sinclair/typebox").TString;
|
|
285
|
+
incomingRequests: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
286
|
+
id: import("@sinclair/typebox").TString;
|
|
287
|
+
identity: import("@sinclair/typebox").TString;
|
|
288
|
+
profile: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
289
|
+
email: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
290
|
+
name: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
291
|
+
photo: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
292
|
+
thumbhash: import("@sinclair/typebox").TString;
|
|
293
|
+
}>, import("@sinclair/typebox").TNull]>;
|
|
294
|
+
updatedAt: import("@sinclair/typebox").TInteger;
|
|
295
|
+
version: import("@sinclair/typebox").TString;
|
|
296
|
+
}>, import("@sinclair/typebox").TNull]>;
|
|
297
|
+
}>>;
|
|
298
|
+
outgoingRequests: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
299
|
+
id: import("@sinclair/typebox").TString;
|
|
300
|
+
identity: import("@sinclair/typebox").TString;
|
|
301
|
+
}>>;
|
|
302
|
+
status: import("@sinclair/typebox").TLiteral<"enrolled">;
|
|
303
|
+
}>]>>;
|
|
304
|
+
/** Each project's root workspace and the workspaces directly under it. */
|
|
305
|
+
workspaces: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
306
|
+
agents: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnsafe<Agent>>;
|
|
307
|
+
archivedAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TNull]>;
|
|
308
|
+
base: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
309
|
+
commit: import("@sinclair/typebox").TString;
|
|
310
|
+
ref: import("@sinclair/typebox").TString;
|
|
311
|
+
}>, import("@sinclair/typebox").TNull]>;
|
|
312
|
+
compute: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
313
|
+
path: import("@sinclair/typebox").TString;
|
|
314
|
+
type: import("@sinclair/typebox").TLiteral<"host">;
|
|
315
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
316
|
+
image: import("@sinclair/typebox").TString;
|
|
317
|
+
type: import("@sinclair/typebox").TLiteral<"docker">;
|
|
318
|
+
}>]>;
|
|
319
|
+
createdAt: import("@sinclair/typebox").TInteger;
|
|
320
|
+
creatorAgentId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
321
|
+
git: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
322
|
+
ahead: import("@sinclair/typebox").TInteger;
|
|
323
|
+
behind: import("@sinclair/typebox").TInteger;
|
|
324
|
+
branch: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>>;
|
|
325
|
+
detached: import("@sinclair/typebox").TBoolean;
|
|
326
|
+
head: import("@sinclair/typebox").TString;
|
|
327
|
+
upstream: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
328
|
+
}>, import("@sinclair/typebox").TNull]>;
|
|
329
|
+
id: import("@sinclair/typebox").TString;
|
|
330
|
+
initialization: import("@sinclair/typebox").TObject<{
|
|
331
|
+
attempt: import("@sinclair/typebox").TInteger;
|
|
332
|
+
error: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
333
|
+
status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"initializing">, import("@sinclair/typebox").TLiteral<"ready">, import("@sinclair/typebox").TLiteral<"failed">]>;
|
|
334
|
+
}>;
|
|
335
|
+
kind: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TLiteral<"worktree">, import("@sinclair/typebox").TLiteral<"copy">]>;
|
|
336
|
+
name: import("@sinclair/typebox").TString;
|
|
337
|
+
nameSource: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"user">, import("@sinclair/typebox").TLiteral<"generated">]>;
|
|
338
|
+
orderKey: import("@sinclair/typebox").TString;
|
|
339
|
+
parentId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
340
|
+
projectId: import("@sinclair/typebox").TString;
|
|
341
|
+
status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"active">, import("@sinclair/typebox").TLiteral<"archiving">, import("@sinclair/typebox").TLiteral<"archived">]>;
|
|
342
|
+
updatedAt: import("@sinclair/typebox").TInteger;
|
|
343
|
+
version: import("@sinclair/typebox").TString;
|
|
344
|
+
}>>;
|
|
345
|
+
}>;
|
|
346
|
+
export type DesktopBootstrapResponse = Static<typeof desktopBootstrapResponseSchema>;
|
|
51
347
|
//# sourceMappingURL=bootstrap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../../sources/protocol/bootstrap.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAE7E,OAAO,
|
|
1
|
+
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../../sources/protocol/bootstrap.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAE7E,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAEtD,OAAO,KAAK,EAAE,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC/F,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,aAAa,CAAC;AAGlE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAIxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAGrD;;;;;;GAMG;AACH,MAAM,WAAW,sBACb,SAAQ,kBAAkB,EAAE,iBAAiB,EAAE,aAAa,EAAE,kBAAkB;IAChF,gFAAgF;IAChF,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,0FAA0F;IAC1F,SAAS,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAChC,mFAAmF;IACnF,SAAS,CAAC,EAAE,KAAK,EAAE,CAAC;IACpB,MAAM,EAAE,WAAW,CAAC;CACvB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEvC;;;OAGG;;IAEH,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIjF,8CAA8C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAE9C,6EAA6E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAE7E,0EAA0E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE5E,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
|
|
@@ -1,3 +1,35 @@
|
|
|
1
1
|
/** Bootstrap: one request that gets a desktop client on screen instantly. */
|
|
2
|
-
|
|
2
|
+
import { Type } from "@sinclair/typebox";
|
|
3
|
+
import { eventCursorSchema } from "./common.js";
|
|
4
|
+
import { daemonConfigSchema, onboardingStateSchema } from "./daemon.js";
|
|
5
|
+
import { happyIntegrationSchema } from "./integrations.js";
|
|
6
|
+
import { profileSchema } from "./profile.js";
|
|
7
|
+
import { projectSchema } from "./projects.js";
|
|
8
|
+
import { sharingSchema } from "./sharing.js";
|
|
9
|
+
import { workspaceSchema } from "./workspaces.js";
|
|
10
|
+
/**
|
|
11
|
+
* `GET /v0/bootstrap/desktop`
|
|
12
|
+
*
|
|
13
|
+
* A composition of other endpoints' objects; nothing here has a shape of its
|
|
14
|
+
* own. There is no separate global agent list: each included project and
|
|
15
|
+
* workspace carries its own ordered top-level agents.
|
|
16
|
+
*/
|
|
17
|
+
export const desktopBootstrapResponseSchema = Type.Object({
|
|
18
|
+
config: daemonConfigSchema,
|
|
19
|
+
/**
|
|
20
|
+
* The newest event cursor as of this snapshot. Opening the event stream
|
|
21
|
+
* from here leaves no window for a change to fall between the two.
|
|
22
|
+
*/
|
|
23
|
+
cursor: eventCursorSchema,
|
|
24
|
+
/** Current Happy mobile connection state. Absent on older compatible daemons. */
|
|
25
|
+
happyIntegration: Type.Optional(happyIntegrationSchema),
|
|
26
|
+
onboarding: onboardingStateSchema,
|
|
27
|
+
profile: profileSchema,
|
|
28
|
+
/** Every active project, in catalog order. */
|
|
29
|
+
projects: Type.Array(projectSchema),
|
|
30
|
+
/** Current sharing state. Absent on older compatible protocol-22 daemons. */
|
|
31
|
+
sharing: Type.Optional(sharingSchema),
|
|
32
|
+
/** Each project's root workspace and the workspaces directly under it. */
|
|
33
|
+
workspaces: Type.Array(workspaceSchema),
|
|
34
|
+
});
|
|
3
35
|
//# sourceMappingURL=bootstrap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../sources/protocol/bootstrap.ts"],"names":[],"mappings":"AAAA,6EAA6E"}
|
|
1
|
+
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../sources/protocol/bootstrap.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAE7E,OAAO,EAAe,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAGtD,OAAO,EAAoB,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAG3D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAoBlD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,IAAI,CAAC,MAAM,CAAC;IACtD,MAAM,EAAE,kBAAkB;IAC1B;;;OAGG;IACH,MAAM,EAAE,iBAAiB;IACzB,iFAAiF;IACjF,gBAAgB,EAAE,IAAI,CAAC,QAAQ,CAAC,sBAAsB,CAAC;IACvD,UAAU,EAAE,qBAAqB;IACjC,OAAO,EAAE,aAAa;IACtB,8CAA8C;IAC9C,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC;IACnC,6EAA6E;IAC7E,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC;IACrC,0EAA0E;IAC1E,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC;CAC1C,CAAC,CAAC"}
|
|
@@ -180,6 +180,12 @@ export interface ProfileUpdatedPayload extends MutationEcho {
|
|
|
180
180
|
export interface HappyIntegrationUpdatedPayload {
|
|
181
181
|
integration: HappyIntegration;
|
|
182
182
|
}
|
|
183
|
+
/** Compact sharing invalidation; clients refetch only when this version is newer. */
|
|
184
|
+
export declare const sharingUpdatedPayloadSchema: import("@sinclair/typebox").TObject<{
|
|
185
|
+
mutationId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
186
|
+
version: import("@sinclair/typebox").TString;
|
|
187
|
+
}>;
|
|
188
|
+
export type SharingUpdatedPayload = Static<typeof sharingUpdatedPayloadSchema>;
|
|
183
189
|
/** One event on the journal. */
|
|
184
190
|
export interface EventEnvelope<TType extends string, TPayload> {
|
|
185
191
|
/** This event's place in the journal; never a resource identity. */
|
|
@@ -189,7 +195,7 @@ export interface EventEnvelope<TType extends string, TPayload> {
|
|
|
189
195
|
payload: TPayload;
|
|
190
196
|
}
|
|
191
197
|
/** Every event the specification names today. */
|
|
192
|
-
export type HappyAgentEvent = EventEnvelope<"daemon.draining", DaemonDrainingPayload> | EventEnvelope<"project.created", ProjectCreatedPayload> | EventEnvelope<"project.updated", ProjectUpdatedPayload> | EventEnvelope<"workspace.created", WorkspaceCreatedPayload> | EventEnvelope<"workspace.updated", WorkspaceUpdatedPayload> | EventEnvelope<"terminal.created", TerminalCreatedPayload> | EventEnvelope<"terminal.updated", TerminalUpdatedPayload> | EventEnvelope<"git.updated", GitUpdatedPayload> | EventEnvelope<"files.updated", FilesUpdatedPayload> | EventEnvelope<"agent.created", AgentCreatedPayload> | EventEnvelope<"agent.updated", AgentUpdatedPayload> | EventEnvelope<"agent.context.updated", AgentContextUpdatedPayload> | EventEnvelope<"agent.draft.updated", AgentDraftUpdatedPayload> | EventEnvelope<"agent.slash_commands.updated", AgentSlashCommandsUpdatedPayload> | EventEnvelope<"process.started", ProcessStartedPayload> | EventEnvelope<"process.updated", ProcessUpdatedPayload> | EventEnvelope<"process.exited", ProcessUpdatedPayload> | EventEnvelope<"question.created", QuestionCreatedPayload> | EventEnvelope<"question.updated", QuestionUpdatedPayload> | EventEnvelope<"run.started", RunStartedPayload> | EventEnvelope<"run.boundary", RunBoundaryPayload> | EventEnvelope<"run.finished", RunFinishedPayload> | EventEnvelope<"message.created", MessageCreatedPayload> | EventEnvelope<"message.updated", MessageUpdatedPayload> | EventEnvelope<"message.delta", MessageDeltaPayload> | EventEnvelope<"message.deleted", MessageDeletedPayload> | EventEnvelope<"config.updated", ConfigUpdatedPayload> | EventEnvelope<"profile.updated", ProfileUpdatedPayload> | EventEnvelope<"happy.integration.updated", HappyIntegrationUpdatedPayload>;
|
|
198
|
+
export type HappyAgentEvent = EventEnvelope<"daemon.draining", DaemonDrainingPayload> | EventEnvelope<"project.created", ProjectCreatedPayload> | EventEnvelope<"project.updated", ProjectUpdatedPayload> | EventEnvelope<"workspace.created", WorkspaceCreatedPayload> | EventEnvelope<"workspace.updated", WorkspaceUpdatedPayload> | EventEnvelope<"terminal.created", TerminalCreatedPayload> | EventEnvelope<"terminal.updated", TerminalUpdatedPayload> | EventEnvelope<"git.updated", GitUpdatedPayload> | EventEnvelope<"files.updated", FilesUpdatedPayload> | EventEnvelope<"agent.created", AgentCreatedPayload> | EventEnvelope<"agent.updated", AgentUpdatedPayload> | EventEnvelope<"agent.context.updated", AgentContextUpdatedPayload> | EventEnvelope<"agent.draft.updated", AgentDraftUpdatedPayload> | EventEnvelope<"agent.slash_commands.updated", AgentSlashCommandsUpdatedPayload> | EventEnvelope<"process.started", ProcessStartedPayload> | EventEnvelope<"process.updated", ProcessUpdatedPayload> | EventEnvelope<"process.exited", ProcessUpdatedPayload> | EventEnvelope<"question.created", QuestionCreatedPayload> | EventEnvelope<"question.updated", QuestionUpdatedPayload> | EventEnvelope<"run.started", RunStartedPayload> | EventEnvelope<"run.boundary", RunBoundaryPayload> | EventEnvelope<"run.finished", RunFinishedPayload> | EventEnvelope<"message.created", MessageCreatedPayload> | EventEnvelope<"message.updated", MessageUpdatedPayload> | EventEnvelope<"message.delta", MessageDeltaPayload> | EventEnvelope<"message.deleted", MessageDeletedPayload> | EventEnvelope<"config.updated", ConfigUpdatedPayload> | EventEnvelope<"profile.updated", ProfileUpdatedPayload> | EventEnvelope<"happy.integration.updated", HappyIntegrationUpdatedPayload> | EventEnvelope<"sharing.updated", SharingUpdatedPayload>;
|
|
193
199
|
/** The name of an event this client build knows. */
|
|
194
200
|
export type HappyAgentEventType = HappyAgentEvent["type"];
|
|
195
201
|
/** `GET /v0/events` query parameters. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../sources/protocol/events.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAEH,KAAK,KAAK,EACV,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../sources/protocol/events.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAEH,KAAK,KAAK,EACV,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,SAAS,EAGjB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,O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mB;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,uBAAuB;AACvB,MAAM,WAAW,iBAAiB;IAC9B,oBAAoB;IACpB,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,0DAA0D;IAC1D,MAAM,EAAE,WAAW,CAAC;IACpB,iFAAiF;IACjF,YAAY,EAAE,WAAW,CAAC;CAC7B;AAED,4DAA4D;AAC5D,MAAM,WAAW,gBAAgB;IAC7B,8CAA8C;IAC9C,MAAM,EAAE,WAAW,CAAC;IACpB;;;OAGG;IACH,GAAG,EAAE,OAAO,CAAC;IACb,8EAA8E;IAC9E,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,SAAS,CAAC;IACvB,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,4EAA4E;IAC5E,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,mFAAmF;IACnF,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,kDAAkD;AAClD,MAAM,MAAM,gBAAgB,GACtB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,gBAAgB,CAAA;CAAE,GAC1C;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,eAAe,CAAC;IAAC,MAAM,EAAE,WAAW,CAAA;CAAE,CAAC;AAErE,uCAAuC;AACvC,MAAM,WAAW,kBAAkB;IAC/B,sEAAsE;IACtE,KAAK,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IAChC;;;;OAIG;IACH,WAAW,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IACtC,oDAAoD;IACpD,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;CACpC"}
|
package/dist/protocol/events.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* and the daemon says so rather than silently skipping what was lost.
|
|
7
7
|
*/
|
|
8
8
|
import { Type } from "@sinclair/typebox";
|
|
9
|
-
import { cuid2Schema, } from "./common.js";
|
|
9
|
+
import { cuid2Schema, mutationIdSchema, resourceVersionSchema, } from "./common.js";
|
|
10
10
|
/**
|
|
11
11
|
* Streaming text: the one event that is not a full object.
|
|
12
12
|
*
|
|
@@ -24,4 +24,9 @@ export const messageDeltaPayloadSchema = Type.Object({
|
|
|
24
24
|
/** Text to concatenate onto that block. */
|
|
25
25
|
append: Type.String(),
|
|
26
26
|
});
|
|
27
|
+
/** Compact sharing invalidation; clients refetch only when this version is newer. */
|
|
28
|
+
export const sharingUpdatedPayloadSchema = Type.Object({
|
|
29
|
+
mutationId: Type.Optional(mutationIdSchema),
|
|
30
|
+
version: resourceVersionSchema,
|
|
31
|
+
});
|
|
27
32
|
//# sourceMappingURL=events.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../sources/protocol/events.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAe,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EACH,WAAW,
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../sources/protocol/events.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAe,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EACH,WAAW,EAKX,gBAAgB,EAChB,qBAAqB,GACxB,MAAM,aAAa,CAAC;AAkIrB;;;;;GAKG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC,MAAM,CAAC;IACjD,OAAO,EAAE,WAAW;IACpB,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,WAAW;IACtB,iCAAiC;IACjC,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IACxC,iDAAiD;IACjD,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IACpC,2CAA2C;IAC3C,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;CACxB,CAAC,CAAC;AA8BH,qFAAqF;AACrF,MAAM,CAAC,MAAM,2BAA2B,GAAG,IAAI,CAAC,MAAM,CAAC;IACnD,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IAC3C,OAAO,EAAE,qBAAqB;CACjC,CAAC,CAAC"}
|
|
@@ -217,6 +217,14 @@ export interface MessageMetadata {
|
|
|
217
217
|
/** The agent that sent this system-generated message, when one identified itself. */
|
|
218
218
|
senderAgentId?: Cuid2;
|
|
219
219
|
}
|
|
220
|
+
/** One JSON value inside opaque client-owned message metadata. */
|
|
221
|
+
export declare const clientMetadataValueSchema: import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TThis>, import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TThis>]>>;
|
|
222
|
+
/** One JSON value inside opaque client-owned message metadata. */
|
|
223
|
+
export type ClientMetadataValue = Static<typeof clientMetadataValueSchema>;
|
|
224
|
+
/** Freeform JSON supplied by a client and durably attached to one user message. */
|
|
225
|
+
export declare const clientMetadataSchema: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TThis>, import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TThis>]>>>;
|
|
226
|
+
/** Freeform JSON supplied by a client and durably attached to one user message. */
|
|
227
|
+
export type ClientMetadata = Static<typeof clientMetadataSchema>;
|
|
220
228
|
/** Plain text. */
|
|
221
229
|
export interface TextBlock {
|
|
222
230
|
type: "text";
|
|
@@ -256,7 +264,7 @@ export type ToolPermissionReview = {
|
|
|
256
264
|
};
|
|
257
265
|
interface ToolCallBlockBase {
|
|
258
266
|
type: "tool_call";
|
|
259
|
-
/**
|
|
267
|
+
/** Happy Agent Base's stable CUID2 identity for this invocation. */
|
|
260
268
|
id: string;
|
|
261
269
|
name: string;
|
|
262
270
|
status: "running" | "completed" | "failed";
|
|
@@ -286,7 +294,6 @@ export type CompactionTrigger = Static<typeof compactionTriggerSchema>;
|
|
|
286
294
|
export declare const runningCompactionBlockSchema: import("@sinclair/typebox").TObject<{
|
|
287
295
|
completedAt: import("@sinclair/typebox").TNull;
|
|
288
296
|
failureReason: import("@sinclair/typebox").TNull;
|
|
289
|
-
replacedMessageIds: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
290
297
|
startedAt: import("@sinclair/typebox").TInteger;
|
|
291
298
|
status: import("@sinclair/typebox").TLiteral<"running">;
|
|
292
299
|
tokensAfter: import("@sinclair/typebox").TNull;
|
|
@@ -299,7 +306,6 @@ export type RunningCompactionBlock = Static<typeof runningCompactionBlockSchema>
|
|
|
299
306
|
export declare const completedCompactionBlockSchema: import("@sinclair/typebox").TObject<{
|
|
300
307
|
completedAt: import("@sinclair/typebox").TInteger;
|
|
301
308
|
failureReason: import("@sinclair/typebox").TNull;
|
|
302
|
-
replacedMessageIds: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
303
309
|
startedAt: import("@sinclair/typebox").TInteger;
|
|
304
310
|
status: import("@sinclair/typebox").TLiteral<"completed">;
|
|
305
311
|
tokensAfter: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TNull]>;
|
|
@@ -312,7 +318,6 @@ export type CompletedCompactionBlock = Static<typeof completedCompactionBlockSch
|
|
|
312
318
|
export declare const failedCompactionBlockSchema: import("@sinclair/typebox").TObject<{
|
|
313
319
|
completedAt: import("@sinclair/typebox").TInteger;
|
|
314
320
|
failureReason: import("@sinclair/typebox").TString;
|
|
315
|
-
replacedMessageIds: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
316
321
|
startedAt: import("@sinclair/typebox").TInteger;
|
|
317
322
|
status: import("@sinclair/typebox").TLiteral<"failed">;
|
|
318
323
|
tokensAfter: import("@sinclair/typebox").TNull;
|
|
@@ -325,7 +330,6 @@ export type FailedCompactionBlock = Static<typeof failedCompactionBlockSchema>;
|
|
|
325
330
|
export declare const compactionBlockSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
326
331
|
completedAt: import("@sinclair/typebox").TNull;
|
|
327
332
|
failureReason: import("@sinclair/typebox").TNull;
|
|
328
|
-
replacedMessageIds: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
329
333
|
startedAt: import("@sinclair/typebox").TInteger;
|
|
330
334
|
status: import("@sinclair/typebox").TLiteral<"running">;
|
|
331
335
|
tokensAfter: import("@sinclair/typebox").TNull;
|
|
@@ -335,7 +339,6 @@ export declare const compactionBlockSchema: import("@sinclair/typebox").TUnion<[
|
|
|
335
339
|
}>, import("@sinclair/typebox").TObject<{
|
|
336
340
|
completedAt: import("@sinclair/typebox").TInteger;
|
|
337
341
|
failureReason: import("@sinclair/typebox").TNull;
|
|
338
|
-
replacedMessageIds: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
339
342
|
startedAt: import("@sinclair/typebox").TInteger;
|
|
340
343
|
status: import("@sinclair/typebox").TLiteral<"completed">;
|
|
341
344
|
tokensAfter: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TNull]>;
|
|
@@ -345,7 +348,6 @@ export declare const compactionBlockSchema: import("@sinclair/typebox").TUnion<[
|
|
|
345
348
|
}>, import("@sinclair/typebox").TObject<{
|
|
346
349
|
completedAt: import("@sinclair/typebox").TInteger;
|
|
347
350
|
failureReason: import("@sinclair/typebox").TString;
|
|
348
|
-
replacedMessageIds: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
349
351
|
startedAt: import("@sinclair/typebox").TInteger;
|
|
350
352
|
status: import("@sinclair/typebox").TLiteral<"failed">;
|
|
351
353
|
tokensAfter: import("@sinclair/typebox").TNull;
|
|
@@ -365,6 +367,8 @@ export interface UserMessage {
|
|
|
365
367
|
createdAt: Timestamp;
|
|
366
368
|
content: MessageBlock[];
|
|
367
369
|
metadata: MessageMetadata;
|
|
370
|
+
/** Opaque client-owned JSON, when the sender supplied it. */
|
|
371
|
+
clientMetadata?: ClientMetadata;
|
|
368
372
|
/** `"pending"` until inference takes the message up. */
|
|
369
373
|
status: "pending" | "accepted";
|
|
370
374
|
delivery: MessageDelivery;
|
|
@@ -425,6 +429,8 @@ export interface SendMessageRequest {
|
|
|
425
429
|
id?: Cuid2;
|
|
426
430
|
/** The message text. Required. */
|
|
427
431
|
text: string;
|
|
432
|
+
/** Opaque JSON to persist and return with this user message. */
|
|
433
|
+
clientMetadata?: ClientMetadata;
|
|
428
434
|
/** Optional rich blocks accompanying the text; image bytes travel inline. */
|
|
429
435
|
content?: MessageBlock[];
|
|
430
436
|
/** Defaults to `"queue"`. On an idle agent the two are identical. */
|