@slopus/happy-agent-client 0.0.32 → 0.0.34

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 (37) hide show
  1. package/dist/HappyAgentClient.d.ts +24 -3
  2. package/dist/HappyAgentClient.d.ts.map +1 -1
  3. package/dist/HappyAgentClient.js +92 -2
  4. package/dist/HappyAgentClient.js.map +1 -1
  5. package/dist/index.d.ts +1 -0
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +1 -0
  8. package/dist/index.js.map +1 -1
  9. package/dist/protocol/agents.d.ts +48 -41
  10. package/dist/protocol/agents.d.ts.map +1 -1
  11. package/dist/protocol/agents.js +48 -1
  12. package/dist/protocol/agents.js.map +1 -1
  13. package/dist/protocol/bootstrap.d.ts +115 -4
  14. package/dist/protocol/bootstrap.d.ts.map +1 -1
  15. package/dist/protocol/bootstrap.js +3 -0
  16. package/dist/protocol/bootstrap.js.map +1 -1
  17. package/dist/protocol/bots.d.ts +235 -0
  18. package/dist/protocol/bots.d.ts.map +1 -0
  19. package/dist/protocol/bots.js +78 -0
  20. package/dist/protocol/bots.js.map +1 -0
  21. package/dist/protocol/cloud.d.ts +4 -5
  22. package/dist/protocol/cloud.d.ts.map +1 -1
  23. package/dist/protocol/cloud.js +9 -6
  24. package/dist/protocol/cloud.js.map +1 -1
  25. package/dist/protocol/events.d.ts +120 -1
  26. package/dist/protocol/events.d.ts.map +1 -1
  27. package/dist/protocol/events.js +14 -0
  28. package/dist/protocol/events.js.map +1 -1
  29. package/dist/protocol/projects.d.ts +116 -5
  30. package/dist/protocol/projects.d.ts.map +1 -1
  31. package/dist/protocol/projects.js +2 -1
  32. package/dist/protocol/projects.js.map +1 -1
  33. package/dist/protocol/workspaces.d.ts +105 -16
  34. package/dist/protocol/workspaces.d.ts.map +1 -1
  35. package/dist/protocol/workspaces.js +13 -5
  36. package/dist/protocol/workspaces.js.map +1 -1
  37. package/package.json +1 -1
@@ -1,6 +1,5 @@
1
1
  /** Workspaces: a checkout with its own folder, its own branch, and its place in a tree. */
2
2
  import { type Static } from "@sinclair/typebox";
3
- import type { Agent } from "./agents.js";
4
3
  /** What the workspace was created from. */
5
4
  export declare const workspaceBaseSchema: import("@sinclair/typebox").TObject<{
6
5
  /** The commit the ref resolved to at creation time. */
@@ -12,7 +11,35 @@ export type WorkspaceBase = Static<typeof workspaceBaseSchema>;
12
11
  /** The workspace object. A project's root workspace shares the project's ID. */
13
12
  export declare const workspaceSchema: import("@sinclair/typebox").TObject<{
14
13
  /** Ordered top-level agents rooted directly in this workspace. */
15
- agents: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnsafe<Agent>>;
14
+ agents: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
15
+ archivedAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TNull]>;
16
+ canSendMessages: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
17
+ createdAt: import("@sinclair/typebox").TInteger;
18
+ id: import("@sinclair/typebox").TString;
19
+ lastCursor: import("@sinclair/typebox").TString;
20
+ managedByAnotherAgent: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
21
+ orderKey: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
22
+ parentAgentId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
23
+ pendingQuestionId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
24
+ processes: import("@sinclair/typebox").TObject<{
25
+ running: import("@sinclair/typebox").TInteger;
26
+ }>;
27
+ status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"idle">, import("@sinclair/typebox").TLiteral<"thinking">, import("@sinclair/typebox").TLiteral<"working">, import("@sinclair/typebox").TLiteral<"generating_tools">, import("@sinclair/typebox").TLiteral<"running_tools">]>;
28
+ subagents: import("@sinclair/typebox").TObject<{
29
+ running: import("@sinclair/typebox").TInteger;
30
+ total: import("@sinclair/typebox").TInteger;
31
+ }>;
32
+ title: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
33
+ titleStatus: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"idle">, import("@sinclair/typebox").TLiteral<"ready">]>;
34
+ unread: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
35
+ reason: import("@sinclair/typebox").TString;
36
+ since: import("@sinclair/typebox").TInteger;
37
+ }>, import("@sinclair/typebox").TNull]>;
38
+ updatedAt: import("@sinclair/typebox").TInteger;
39
+ userVisible: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
40
+ version: import("@sinclair/typebox").TString;
41
+ workspaceId: import("@sinclair/typebox").TString;
42
+ }>>;
16
43
  archivedAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TNull]>;
17
44
  /** `null` on a root workspace, which was not branched from anything. */
18
45
  base: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
@@ -21,6 +48,8 @@ export declare const workspaceSchema: import("@sinclair/typebox").TObject<{
21
48
  /** The ref the caller named. */
22
49
  ref: import("@sinclair/typebox").TString;
23
50
  }>, import("@sinclair/typebox").TNull]>;
51
+ /** The owning bot on a dedicated bot workspace; `null` on ordinary workspaces. */
52
+ botId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>>;
24
53
  compute: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
25
54
  path: import("@sinclair/typebox").TString;
26
55
  type: import("@sinclair/typebox").TLiteral<"host">;
@@ -46,16 +75,16 @@ export declare const workspaceSchema: import("@sinclair/typebox").TObject<{
46
75
  status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"initializing">, import("@sinclair/typebox").TLiteral<"ready">, import("@sinclair/typebox").TLiteral<"failed">]>;
47
76
  }>;
48
77
  /** How the checkout was made. */
49
- kind: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TLiteral<"worktree">, import("@sinclair/typebox").TLiteral<"copy">]>;
78
+ kind: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TLiteral<"worktree">, import("@sinclair/typebox").TLiteral<"copy">, import("@sinclair/typebox").TLiteral<"bot">]>;
50
79
  /** The display name, which is also the branch name behind the checkout. */
51
80
  name: import("@sinclair/typebox").TString;
52
81
  nameSource: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"user">, import("@sinclair/typebox").TLiteral<"generated">]>;
53
82
  /** Orders this workspace among the siblings sharing its parent. */
54
83
  orderKey: import("@sinclair/typebox").TString;
55
- /** `null` on the root workspace. */
84
+ /** `null` on a root workspace and on a bot workspace. */
56
85
  parentId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
57
- /** The root of this workspace's tree. */
58
- projectId: import("@sinclair/typebox").TString;
86
+ /** The root of this workspace's tree; `null` on a bot workspace. */
87
+ projectId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
59
88
  /** `"archiving"` is the window where the decision is durable but cleanup runs. */
60
89
  status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"active">, import("@sinclair/typebox").TLiteral<"archiving">, import("@sinclair/typebox").TLiteral<"archived">]>;
61
90
  updatedAt: import("@sinclair/typebox").TInteger;
@@ -66,7 +95,35 @@ export type Workspace = Static<typeof workspaceSchema>;
66
95
  export declare const workspaceListResponseSchema: import("@sinclair/typebox").TObject<{
67
96
  workspaces: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
68
97
  /** Ordered top-level agents rooted directly in this workspace. */
69
- agents: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnsafe<Agent>>;
98
+ agents: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
99
+ archivedAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TNull]>;
100
+ canSendMessages: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
101
+ createdAt: import("@sinclair/typebox").TInteger;
102
+ id: import("@sinclair/typebox").TString;
103
+ lastCursor: import("@sinclair/typebox").TString;
104
+ managedByAnotherAgent: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
105
+ orderKey: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
106
+ parentAgentId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
107
+ pendingQuestionId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
108
+ processes: import("@sinclair/typebox").TObject<{
109
+ running: import("@sinclair/typebox").TInteger;
110
+ }>;
111
+ status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"idle">, import("@sinclair/typebox").TLiteral<"thinking">, import("@sinclair/typebox").TLiteral<"working">, import("@sinclair/typebox").TLiteral<"generating_tools">, import("@sinclair/typebox").TLiteral<"running_tools">]>;
112
+ subagents: import("@sinclair/typebox").TObject<{
113
+ running: import("@sinclair/typebox").TInteger;
114
+ total: import("@sinclair/typebox").TInteger;
115
+ }>;
116
+ title: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
117
+ titleStatus: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"idle">, import("@sinclair/typebox").TLiteral<"ready">]>;
118
+ unread: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
119
+ reason: import("@sinclair/typebox").TString;
120
+ since: import("@sinclair/typebox").TInteger;
121
+ }>, import("@sinclair/typebox").TNull]>;
122
+ updatedAt: import("@sinclair/typebox").TInteger;
123
+ userVisible: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
124
+ version: import("@sinclair/typebox").TString;
125
+ workspaceId: import("@sinclair/typebox").TString;
126
+ }>>;
70
127
  archivedAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TNull]>;
71
128
  /** `null` on a root workspace, which was not branched from anything. */
72
129
  base: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
@@ -75,6 +132,8 @@ export declare const workspaceListResponseSchema: import("@sinclair/typebox").TO
75
132
  /** The ref the caller named. */
76
133
  ref: import("@sinclair/typebox").TString;
77
134
  }>, import("@sinclair/typebox").TNull]>;
135
+ /** The owning bot on a dedicated bot workspace; `null` on ordinary workspaces. */
136
+ botId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>>;
78
137
  compute: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
79
138
  path: import("@sinclair/typebox").TString;
80
139
  type: import("@sinclair/typebox").TLiteral<"host">;
@@ -100,16 +159,16 @@ export declare const workspaceListResponseSchema: import("@sinclair/typebox").TO
100
159
  status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"initializing">, import("@sinclair/typebox").TLiteral<"ready">, import("@sinclair/typebox").TLiteral<"failed">]>;
101
160
  }>;
102
161
  /** How the checkout was made. */
103
- kind: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TLiteral<"worktree">, import("@sinclair/typebox").TLiteral<"copy">]>;
162
+ kind: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TLiteral<"worktree">, import("@sinclair/typebox").TLiteral<"copy">, import("@sinclair/typebox").TLiteral<"bot">]>;
104
163
  /** The display name, which is also the branch name behind the checkout. */
105
164
  name: import("@sinclair/typebox").TString;
106
165
  nameSource: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"user">, import("@sinclair/typebox").TLiteral<"generated">]>;
107
166
  /** Orders this workspace among the siblings sharing its parent. */
108
167
  orderKey: import("@sinclair/typebox").TString;
109
- /** `null` on the root workspace. */
168
+ /** `null` on a root workspace and on a bot workspace. */
110
169
  parentId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
111
- /** The root of this workspace's tree. */
112
- projectId: import("@sinclair/typebox").TString;
170
+ /** The root of this workspace's tree; `null` on a bot workspace. */
171
+ projectId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
113
172
  /** `"archiving"` is the window where the decision is durable but cleanup runs. */
114
173
  status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"active">, import("@sinclair/typebox").TLiteral<"archiving">, import("@sinclair/typebox").TLiteral<"archived">]>;
115
174
  updatedAt: import("@sinclair/typebox").TInteger;
@@ -121,7 +180,35 @@ export type WorkspaceListResponse = Static<typeof workspaceListResponseSchema>;
121
180
  export declare const workspaceResponseSchema: import("@sinclair/typebox").TObject<{
122
181
  workspace: import("@sinclair/typebox").TObject<{
123
182
  /** Ordered top-level agents rooted directly in this workspace. */
124
- agents: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnsafe<Agent>>;
183
+ agents: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
184
+ archivedAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TNull]>;
185
+ canSendMessages: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
186
+ createdAt: import("@sinclair/typebox").TInteger;
187
+ id: import("@sinclair/typebox").TString;
188
+ lastCursor: import("@sinclair/typebox").TString;
189
+ managedByAnotherAgent: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
190
+ orderKey: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
191
+ parentAgentId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
192
+ pendingQuestionId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
193
+ processes: import("@sinclair/typebox").TObject<{
194
+ running: import("@sinclair/typebox").TInteger;
195
+ }>;
196
+ status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"idle">, import("@sinclair/typebox").TLiteral<"thinking">, import("@sinclair/typebox").TLiteral<"working">, import("@sinclair/typebox").TLiteral<"generating_tools">, import("@sinclair/typebox").TLiteral<"running_tools">]>;
197
+ subagents: import("@sinclair/typebox").TObject<{
198
+ running: import("@sinclair/typebox").TInteger;
199
+ total: import("@sinclair/typebox").TInteger;
200
+ }>;
201
+ title: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
202
+ titleStatus: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"idle">, import("@sinclair/typebox").TLiteral<"ready">]>;
203
+ unread: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
204
+ reason: import("@sinclair/typebox").TString;
205
+ since: import("@sinclair/typebox").TInteger;
206
+ }>, import("@sinclair/typebox").TNull]>;
207
+ updatedAt: import("@sinclair/typebox").TInteger;
208
+ userVisible: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
209
+ version: import("@sinclair/typebox").TString;
210
+ workspaceId: import("@sinclair/typebox").TString;
211
+ }>>;
125
212
  archivedAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TNull]>;
126
213
  /** `null` on a root workspace, which was not branched from anything. */
127
214
  base: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
@@ -130,6 +217,8 @@ export declare const workspaceResponseSchema: import("@sinclair/typebox").TObjec
130
217
  /** The ref the caller named. */
131
218
  ref: import("@sinclair/typebox").TString;
132
219
  }>, import("@sinclair/typebox").TNull]>;
220
+ /** The owning bot on a dedicated bot workspace; `null` on ordinary workspaces. */
221
+ botId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>>;
133
222
  compute: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
134
223
  path: import("@sinclair/typebox").TString;
135
224
  type: import("@sinclair/typebox").TLiteral<"host">;
@@ -155,16 +244,16 @@ export declare const workspaceResponseSchema: import("@sinclair/typebox").TObjec
155
244
  status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"initializing">, import("@sinclair/typebox").TLiteral<"ready">, import("@sinclair/typebox").TLiteral<"failed">]>;
156
245
  }>;
157
246
  /** How the checkout was made. */
158
- kind: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TLiteral<"worktree">, import("@sinclair/typebox").TLiteral<"copy">]>;
247
+ kind: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TLiteral<"worktree">, import("@sinclair/typebox").TLiteral<"copy">, import("@sinclair/typebox").TLiteral<"bot">]>;
159
248
  /** The display name, which is also the branch name behind the checkout. */
160
249
  name: import("@sinclair/typebox").TString;
161
250
  nameSource: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"user">, import("@sinclair/typebox").TLiteral<"generated">]>;
162
251
  /** Orders this workspace among the siblings sharing its parent. */
163
252
  orderKey: import("@sinclair/typebox").TString;
164
- /** `null` on the root workspace. */
253
+ /** `null` on a root workspace and on a bot workspace. */
165
254
  parentId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
166
- /** The root of this workspace's tree. */
167
- projectId: import("@sinclair/typebox").TString;
255
+ /** The root of this workspace's tree; `null` on a bot workspace. */
256
+ projectId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
168
257
  /** `"archiving"` is the window where the decision is durable but cleanup runs. */
169
258
  status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"active">, import("@sinclair/typebox").TLiteral<"archiving">, import("@sinclair/typebox").TLiteral<"archived">]>;
170
259
  updatedAt: import("@sinclair/typebox").TInteger;
@@ -1 +1 @@
1
- {"version":3,"file":"workspaces.d.ts","sourceRoot":"","sources":["../../sources/protocol/workspaces.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAE3F,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAYtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,2CAA2C;AAC3C,eAAO,MAAM,mBAAmB;IAC5B,uDAAuD;;IAEvD,gCAAgC;;EAElC,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAE/D,gFAAgF;AAChF,eAAO,MAAM,eAAe;IACxB,kEAAkE;;;IAGlE,wEAAwE;;QAZxE,uDAAuD;;QAEvD,gCAAgC;;;;;;;;;;;IAchC,uEAAuE;;;;;;;;;;;;;;;;IAKvE,iCAAiC;;IAEjC,2EAA2E;;;IAG3E,mEAAmE;;IAEnE,oCAAoC;;IAEpC,yCAAyC;;IAEzC,kFAAkF;;;;EAQpF,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC;AAEvD,mFAAmF;AACnF,eAAO,MAAM,2BAA2B;;QAnCpC,kEAAkE;;;QAGlE,wEAAwE;;YAZxE,uDAAuD;;YAEvD,gCAAgC;;;;;;;;;;;QAchC,uEAAuE;;;;;;;;;;;;;;;;QAKvE,iCAAiC;;QAEjC,2EAA2E;;;QAG3E,mEAAmE;;QAEnE,oCAAoC;;QAEpC,yCAA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CAAgC;;;QAYhC,kFAAkF;;;;;;;;;;QAIlF,uEAAuE;;;;;;;;;;;;;;;;QAKvE,iCAAiC;;QAOjC,2EAA2E;;;QAG3E,mEAAmE;;QAEnE,yDAAyD;;QAEzD,oEAAoE;;QAEpE,kFAAkF;;;;;EAkBJ,CAAC;AACnF,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAEvE,6CAA6C;AAC7C,eAAO,MAAM,yBAAyB;IAClC,sEAAsE;;IAEtE,gCAAgC;;EAElC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE3E,4BAA4B;AAC5B,eAAO,MAAM,4BAA4B;IACrC,sDAAsD;;IAEtD,uEAAuE;;IAEvE,mCAAmC;;;IAGnC,yDAAyD;;IAEzD,0FAA0F;;IAE1F,gFAAgF;;EAElF,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAEjF,0CAA0C;AAC1C,eAAO,MAAM,4BAA4B;;;EAGvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAEjF,iDAAiD;AACjD,eAAO,MAAM,6BAA6B;;EAExC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEnF,iDAAiD;AACjD,eAAO,MAAM,6BAA6B;IACtC,uEAAuE;;;EAGzE,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  /** Workspaces: a checkout with its own folder, its own branch, and its place in a tree. */
2
2
  import { Type } from "@sinclair/typebox";
3
3
  import { computeSchema, cuid2Schema, gitSummarySchema, initializationStateSchema, mutationIdSchema, Nullable, resourceVersionSchema, timestampSchema, } from "./common.js";
4
+ import { agentSchema } from "./agents.js";
4
5
  /** What the workspace was created from. */
5
6
  export const workspaceBaseSchema = Type.Object({
6
7
  /** The commit the ref resolved to at creation time. */
@@ -11,10 +12,12 @@ export const workspaceBaseSchema = Type.Object({
11
12
  /** The workspace object. A project's root workspace shares the project's ID. */
12
13
  export const workspaceSchema = Type.Object({
13
14
  /** Ordered top-level agents rooted directly in this workspace. */
14
- agents: Type.Array(Type.Unsafe({ type: "object" })),
15
+ agents: Type.Array(agentSchema),
15
16
  archivedAt: Nullable(timestampSchema),
16
17
  /** `null` on a root workspace, which was not branched from anything. */
17
18
  base: Nullable(workspaceBaseSchema),
19
+ /** The owning bot on a dedicated bot workspace; `null` on ordinary workspaces. */
20
+ botId: Type.Optional(Nullable(cuid2Schema)),
18
21
  compute: computeSchema,
19
22
  createdAt: timestampSchema,
20
23
  /** The agent that created this workspace; `null` when a person did. */
@@ -23,16 +26,21 @@ export const workspaceSchema = Type.Object({
23
26
  id: cuid2Schema,
24
27
  initialization: initializationStateSchema,
25
28
  /** How the checkout was made. */
26
- kind: Type.Union([Type.Literal("root"), Type.Literal("worktree"), Type.Literal("copy")]),
29
+ kind: Type.Union([
30
+ Type.Literal("root"),
31
+ Type.Literal("worktree"),
32
+ Type.Literal("copy"),
33
+ Type.Literal("bot"),
34
+ ]),
27
35
  /** The display name, which is also the branch name behind the checkout. */
28
36
  name: Type.String(),
29
37
  nameSource: Type.Union([Type.Literal("user"), Type.Literal("generated")]),
30
38
  /** Orders this workspace among the siblings sharing its parent. */
31
39
  orderKey: Type.String(),
32
- /** `null` on the root workspace. */
40
+ /** `null` on a root workspace and on a bot workspace. */
33
41
  parentId: Nullable(cuid2Schema),
34
- /** The root of this workspace's tree. */
35
- projectId: cuid2Schema,
42
+ /** The root of this workspace's tree; `null` on a bot workspace. */
43
+ projectId: Nullable(cuid2Schema),
36
44
  /** `"archiving"` is the window where the decision is durable but cleanup runs. */
37
45
  status: Type.Union([
38
46
  Type.Literal("active"),
@@ -1 +1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AAC,IAAI,CAAC,MAAM,EAAE,CAAC;IACrC,mCAAmC;IACnC,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC;IAC9B,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IAC3C,yDAAyD;IACzD,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;IACnB,0FAA0F;IAC1F,cAAc,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;IAC7C,gFAAgF;IAChF,QAAQ,EAAE,WAAW;CACxB,CAAC,CAAC;AAGH,0CAA0C;AAC1C,MAAM,CAAC,MAAM,4BAA4B,GAAG,IAAI,CAAC,MAAM,CAAC;IACpD,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IAC3C,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC;AAGH,iDAAiD;AACjD,MAAM,CAAC,MAAM,6BAA6B,GAAG,IAAI,CAAC,MAAM,CAAC;IACrD,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC;CAC9C,CAAC,CAAC;AAGH,iDAAiD;AACjD,MAAM,CAAC,MAAM,6BAA6B,GAAG,IAAI,CAAC,MAAM,CAAC;IACrD,uEAAuE;IACvE,OAAO,EAAE,QAAQ,CAAC,WAAW,CAAC;IAC9B,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC;CAC9C,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slopus/happy-agent-client",
3
- "version": "0.0.32",
3
+ "version": "0.0.34",
4
4
  "description": "Typed client for the Happy agent HTTP API.",
5
5
  "license": "MIT",
6
6
  "repository": {