@agentrix/shared 2.13.1 → 2.15.0
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/{errors-B5CcMP8s.d.cts → errors-CDX-cJtb.d.cts} +235 -8
- package/dist/index.cjs +336 -3
- package/dist/index.d.cts +484 -16
- package/dist/node.d.cts +2 -2
- package/package.json +5 -1
package/dist/index.cjs
CHANGED
|
@@ -220,6 +220,15 @@ const TaskTodoSchema = zod.z.object({
|
|
|
220
220
|
title: zod.z.string().min(1).max(200),
|
|
221
221
|
instructions: zod.z.string()
|
|
222
222
|
});
|
|
223
|
+
const TaskUsageSummarySchema = zod.z.object({
|
|
224
|
+
inputTokens: zod.z.number().int().nonnegative(),
|
|
225
|
+
outputTokens: zod.z.number().int().nonnegative(),
|
|
226
|
+
cacheReadInputTokens: zod.z.number().int().nonnegative(),
|
|
227
|
+
cacheCreationInputTokens: zod.z.number().int().nonnegative(),
|
|
228
|
+
webSearchRequests: zod.z.number().int().nonnegative(),
|
|
229
|
+
totalTokens: zod.z.number().int().nonnegative(),
|
|
230
|
+
models: zod.z.array(zod.z.string())
|
|
231
|
+
});
|
|
223
232
|
const StartTaskRequestSchema = zod.z.object({
|
|
224
233
|
chatId: zod.z.string(),
|
|
225
234
|
customTitle: zod.z.string().min(1).max(200).optional(),
|
|
@@ -241,6 +250,8 @@ const StartTaskRequestSchema = zod.z.object({
|
|
|
241
250
|
// For local mode: specific machine
|
|
242
251
|
cloudId: zod.z.string().optional(),
|
|
243
252
|
// For cloud mode: cloud ID
|
|
253
|
+
model: zod.z.string().min(1).optional(),
|
|
254
|
+
// Optional model selected for this task
|
|
244
255
|
repositoryId: zod.z.string().optional(),
|
|
245
256
|
baseBranch: zod.z.string().optional(),
|
|
246
257
|
// Base branch for the repository
|
|
@@ -296,6 +307,7 @@ const StartTaskResponseSchema = zod.z.object({
|
|
|
296
307
|
state: zod.z.string(),
|
|
297
308
|
machineId: zod.z.string().nullable(),
|
|
298
309
|
cloudId: zod.z.string().nullable(),
|
|
310
|
+
model: zod.z.string().nullable().optional(),
|
|
299
311
|
repositoryId: zod.z.string().nullable(),
|
|
300
312
|
baseBranch: zod.z.string().nullable(),
|
|
301
313
|
workerExecutionMode: WorkerExecutionModeSchema,
|
|
@@ -327,6 +339,7 @@ const TaskItemSchema = zod.z.object({
|
|
|
327
339
|
agentId: zod.z.string(),
|
|
328
340
|
machineId: zod.z.string().nullable(),
|
|
329
341
|
cloudId: zod.z.string().nullable(),
|
|
342
|
+
model: zod.z.string().nullable().optional(),
|
|
330
343
|
repositoryId: zod.z.string().nullable(),
|
|
331
344
|
baseBranch: zod.z.string().nullable(),
|
|
332
345
|
branchName: zod.z.string().nullable(),
|
|
@@ -360,6 +373,7 @@ const TaskItemSchema = zod.z.object({
|
|
|
360
373
|
totalDeletions: zod.z.number(),
|
|
361
374
|
files: zod.z.array(FileStatsSchema)
|
|
362
375
|
}).nullable(),
|
|
376
|
+
usageSummary: TaskUsageSummarySchema.nullable(),
|
|
363
377
|
totalDuration: zod.z.number().nullable(),
|
|
364
378
|
// Cumulative execution time (milliseconds)
|
|
365
379
|
// Multi-agent collaboration fields
|
|
@@ -839,6 +853,9 @@ const DraftAgentSchema = zod.z.object({
|
|
|
839
853
|
permissions: AgentPermissionsSchema.nullable(),
|
|
840
854
|
publishedAgentId: zod.z.string().nullable(),
|
|
841
855
|
sourceTaskId: zod.z.string().nullable(),
|
|
856
|
+
gitRepoUrl: zod.z.string().nullable(),
|
|
857
|
+
repoDir: zod.z.string().nullable(),
|
|
858
|
+
installedFromHiveId: zod.z.string().nullable(),
|
|
842
859
|
createdAt: zod.z.string(),
|
|
843
860
|
updatedAt: zod.z.string()
|
|
844
861
|
});
|
|
@@ -970,6 +987,10 @@ const SyncMachineModelsRequestSchema = zod.z.object({
|
|
|
970
987
|
const SyncMachineModelsResponseSchema = zod.z.object({
|
|
971
988
|
success: zod.z.literal(true)
|
|
972
989
|
});
|
|
990
|
+
const ListMachineModelsResponseSchema = zod.z.object({
|
|
991
|
+
models: zod.z.array(zod.z.string()),
|
|
992
|
+
defaultModel: zod.z.string().nullable().optional()
|
|
993
|
+
});
|
|
973
994
|
const ValidateMachineResponseSchema = zod.z.object({
|
|
974
995
|
success: zod.z.literal(true),
|
|
975
996
|
machineId: zod.z.string().optional(),
|
|
@@ -1577,7 +1598,7 @@ const SearchContactCandidatesResponseSchema = zod.z.object({
|
|
|
1577
1598
|
});
|
|
1578
1599
|
|
|
1579
1600
|
const UserInboxSubjectTypeSchema = zod.z.enum(["issue", "reference", "task"]);
|
|
1580
|
-
const UserInboxStatusSchema = zod.z.enum(["needs_reply", "needs_review"]);
|
|
1601
|
+
const UserInboxStatusSchema = zod.z.enum(["needs_reply", "needs_review", "assigned"]);
|
|
1581
1602
|
const UserInboxItemSchema = zod.z.object({
|
|
1582
1603
|
id: IdSchema,
|
|
1583
1604
|
userId: IdSchema,
|
|
@@ -1586,7 +1607,7 @@ const UserInboxItemSchema = zod.z.object({
|
|
|
1586
1607
|
subjectId: zod.z.string().min(1),
|
|
1587
1608
|
targetSubjectType: UserInboxSubjectTypeSchema.nullable().optional(),
|
|
1588
1609
|
targetSubjectId: zod.z.string().min(1).nullable().optional(),
|
|
1589
|
-
|
|
1610
|
+
statusFlags: zod.z.number().int().nonnegative(),
|
|
1590
1611
|
title: zod.z.string(),
|
|
1591
1612
|
body: zod.z.string().nullable().optional(),
|
|
1592
1613
|
isResolved: zod.z.boolean(),
|
|
@@ -1628,6 +1649,7 @@ const CiRunGitSchema = zod.z.object({
|
|
|
1628
1649
|
sha: zod.z.string().optional(),
|
|
1629
1650
|
baseRef: zod.z.string().optional(),
|
|
1630
1651
|
headRef: zod.z.string().optional(),
|
|
1652
|
+
branchName: zod.z.string().optional(),
|
|
1631
1653
|
prNumber: zod.z.number().int().positive().optional(),
|
|
1632
1654
|
issueNumber: zod.z.number().int().positive().optional()
|
|
1633
1655
|
});
|
|
@@ -1773,6 +1795,191 @@ const UpdateResourceRequestSchema = zod.z.object({
|
|
|
1773
1795
|
enabled: zod.z.boolean().optional()
|
|
1774
1796
|
});
|
|
1775
1797
|
|
|
1798
|
+
const HiveListingTypeSchema = zod.z.enum(["agent", "skill"]);
|
|
1799
|
+
const HiveAuthorTypeSchema = zod.z.enum(["user", "agent"]);
|
|
1800
|
+
const HiveListingStatusSchema = zod.z.enum(["draft", "published", "unlisted", "suspended"]);
|
|
1801
|
+
const HiveSortSchema = zod.z.enum(["trending", "newest", "rating", "installs"]);
|
|
1802
|
+
const HiveListingSchema = zod.z.object({
|
|
1803
|
+
id: IdSchema,
|
|
1804
|
+
type: HiveListingTypeSchema,
|
|
1805
|
+
name: zod.z.string(),
|
|
1806
|
+
displayName: zod.z.string(),
|
|
1807
|
+
description: zod.z.string().nullable(),
|
|
1808
|
+
readme: zod.z.string().nullable(),
|
|
1809
|
+
version: zod.z.string(),
|
|
1810
|
+
avatar: zod.z.string().nullable(),
|
|
1811
|
+
authorType: HiveAuthorTypeSchema,
|
|
1812
|
+
authorId: zod.z.string(),
|
|
1813
|
+
authorName: zod.z.string(),
|
|
1814
|
+
authorAvatar: zod.z.string().nullable(),
|
|
1815
|
+
gitRepoUrl: zod.z.string(),
|
|
1816
|
+
repoDir: zod.z.string(),
|
|
1817
|
+
sourceHiveListingId: zod.z.string().nullable(),
|
|
1818
|
+
draftAgentId: zod.z.string().nullable(),
|
|
1819
|
+
category: zod.z.string().nullable(),
|
|
1820
|
+
tags: zod.z.array(zod.z.string()),
|
|
1821
|
+
featured: zod.z.boolean(),
|
|
1822
|
+
installCount: zod.z.number(),
|
|
1823
|
+
rating: zod.z.number(),
|
|
1824
|
+
ratingCount: zod.z.number(),
|
|
1825
|
+
status: HiveListingStatusSchema,
|
|
1826
|
+
visibility: zod.z.string(),
|
|
1827
|
+
createdAt: zod.z.string(),
|
|
1828
|
+
updatedAt: zod.z.string()
|
|
1829
|
+
});
|
|
1830
|
+
const PublishToHiveRequestSchema = zod.z.object({
|
|
1831
|
+
type: HiveListingTypeSchema,
|
|
1832
|
+
draftAgentId: zod.z.string().optional(),
|
|
1833
|
+
sourceDir: zod.z.string().optional(),
|
|
1834
|
+
name: zod.z.string().min(1).regex(/^[a-z0-9-]+$/, "Name must be lowercase with hyphens").optional(),
|
|
1835
|
+
displayName: zod.z.string().min(1).optional(),
|
|
1836
|
+
description: zod.z.string().optional(),
|
|
1837
|
+
readme: zod.z.string().optional(),
|
|
1838
|
+
category: zod.z.string().optional(),
|
|
1839
|
+
tags: zod.z.array(zod.z.string()).optional(),
|
|
1840
|
+
authorType: HiveAuthorTypeSchema,
|
|
1841
|
+
authorId: zod.z.string(),
|
|
1842
|
+
machineId: zod.z.string().optional(),
|
|
1843
|
+
cloudId: zod.z.string().optional()
|
|
1844
|
+
}).refine(
|
|
1845
|
+
(data) => !!data.machineId !== !!data.cloudId,
|
|
1846
|
+
{ message: "Exactly one of machineId or cloudId must be provided" }
|
|
1847
|
+
).refine(
|
|
1848
|
+
(data) => data.type === "agent" ? !!data.draftAgentId : !!data.sourceDir,
|
|
1849
|
+
{ message: "Agent publish requires draftAgentId; skill publish requires sourceDir" }
|
|
1850
|
+
).refine(
|
|
1851
|
+
(data) => data.type === "agent" ? !!data.name && !!data.displayName : true,
|
|
1852
|
+
{ message: "Agent publish requires name and displayName" }
|
|
1853
|
+
);
|
|
1854
|
+
const PublishToHiveResponseSchema = zod.z.object({
|
|
1855
|
+
taskId: zod.z.string(),
|
|
1856
|
+
status: zod.z.string()
|
|
1857
|
+
});
|
|
1858
|
+
const HiveListQuerySchema = zod.z.object({
|
|
1859
|
+
type: HiveListingTypeSchema.optional(),
|
|
1860
|
+
category: zod.z.string().optional(),
|
|
1861
|
+
tags: zod.z.string().optional(),
|
|
1862
|
+
q: zod.z.string().optional(),
|
|
1863
|
+
sort: HiveSortSchema.default("trending"),
|
|
1864
|
+
authorId: zod.z.string().optional(),
|
|
1865
|
+
page: zod.z.coerce.number().int().min(1).default(1),
|
|
1866
|
+
pageSize: zod.z.coerce.number().int().min(1).max(50).default(20)
|
|
1867
|
+
});
|
|
1868
|
+
const HiveListResponseSchema = zod.z.object({
|
|
1869
|
+
listings: zod.z.array(HiveListingSchema),
|
|
1870
|
+
total: zod.z.number(),
|
|
1871
|
+
page: zod.z.number(),
|
|
1872
|
+
pageSize: zod.z.number()
|
|
1873
|
+
});
|
|
1874
|
+
const UpdateHiveListingRequestSchema = zod.z.object({
|
|
1875
|
+
displayName: zod.z.string().min(1).optional(),
|
|
1876
|
+
description: zod.z.string().nullable().optional(),
|
|
1877
|
+
readme: zod.z.string().nullable().optional(),
|
|
1878
|
+
category: zod.z.string().nullable().optional(),
|
|
1879
|
+
tags: zod.z.array(zod.z.string()).optional(),
|
|
1880
|
+
avatar: zod.z.string().nullable().optional(),
|
|
1881
|
+
visibility: zod.z.enum(["public", "private"]).optional()
|
|
1882
|
+
});
|
|
1883
|
+
const UpdateHiveVersionRequestSchema = zod.z.object({
|
|
1884
|
+
version: zod.z.string().min(1).optional(),
|
|
1885
|
+
changelog: zod.z.string().optional(),
|
|
1886
|
+
sourceDir: zod.z.string().optional(),
|
|
1887
|
+
machineId: zod.z.string().optional(),
|
|
1888
|
+
cloudId: zod.z.string().optional()
|
|
1889
|
+
}).refine(
|
|
1890
|
+
(data) => !!data.machineId !== !!data.cloudId,
|
|
1891
|
+
{ message: "Exactly one of machineId or cloudId must be provided" }
|
|
1892
|
+
).refine(
|
|
1893
|
+
(data) => data.version || data.sourceDir || data.machineId || data.cloudId,
|
|
1894
|
+
{ message: "No update data provided" }
|
|
1895
|
+
);
|
|
1896
|
+
const HiveInstallRequestSchema = zod.z.object({
|
|
1897
|
+
name: zod.z.string().min(1).regex(/^[a-z0-9-]+$/, "Name must be lowercase with hyphens").optional(),
|
|
1898
|
+
machineId: zod.z.string().optional(),
|
|
1899
|
+
cloudId: zod.z.string().optional()
|
|
1900
|
+
}).refine(
|
|
1901
|
+
(data) => !!data.machineId !== !!data.cloudId,
|
|
1902
|
+
{ message: "Exactly one of machineId or cloudId must be provided" }
|
|
1903
|
+
);
|
|
1904
|
+
const HiveInstallSchema = zod.z.object({
|
|
1905
|
+
id: IdSchema,
|
|
1906
|
+
hiveListingId: zod.z.string(),
|
|
1907
|
+
userId: zod.z.string(),
|
|
1908
|
+
machineId: zod.z.string().nullable(),
|
|
1909
|
+
cloudId: zod.z.string().nullable(),
|
|
1910
|
+
agentDir: zod.z.string(),
|
|
1911
|
+
installedVersion: zod.z.string(),
|
|
1912
|
+
draftAgentId: zod.z.string().nullable(),
|
|
1913
|
+
createdAt: zod.z.string(),
|
|
1914
|
+
updatedAt: zod.z.string()
|
|
1915
|
+
});
|
|
1916
|
+
const HiveInstallResponseSchema = zod.z.object({
|
|
1917
|
+
taskId: zod.z.string(),
|
|
1918
|
+
status: zod.z.string(),
|
|
1919
|
+
draftAgentId: zod.z.string().nullable().optional()
|
|
1920
|
+
});
|
|
1921
|
+
const HiveReviewSchema = zod.z.object({
|
|
1922
|
+
id: IdSchema,
|
|
1923
|
+
hiveListingId: zod.z.string(),
|
|
1924
|
+
authorType: HiveAuthorTypeSchema,
|
|
1925
|
+
authorId: zod.z.string(),
|
|
1926
|
+
authorName: zod.z.string(),
|
|
1927
|
+
authorAvatar: zod.z.string().nullable(),
|
|
1928
|
+
rating: zod.z.number().int().min(1).max(5),
|
|
1929
|
+
comment: zod.z.string().nullable(),
|
|
1930
|
+
createdAt: zod.z.string(),
|
|
1931
|
+
updatedAt: zod.z.string()
|
|
1932
|
+
});
|
|
1933
|
+
const CreateHiveReviewRequestSchema = zod.z.object({
|
|
1934
|
+
rating: zod.z.number().int().min(1).max(5),
|
|
1935
|
+
comment: zod.z.string().nullable().optional()
|
|
1936
|
+
});
|
|
1937
|
+
const UpdateHiveReviewRequestSchema = zod.z.object({
|
|
1938
|
+
rating: zod.z.number().int().min(1).max(5).optional(),
|
|
1939
|
+
comment: zod.z.string().nullable().optional()
|
|
1940
|
+
});
|
|
1941
|
+
const HiveReviewListResponseSchema = zod.z.object({
|
|
1942
|
+
reviews: zod.z.array(HiveReviewSchema),
|
|
1943
|
+
total: zod.z.number(),
|
|
1944
|
+
page: zod.z.number(),
|
|
1945
|
+
pageSize: zod.z.number()
|
|
1946
|
+
});
|
|
1947
|
+
const HiveCommentSchema = zod.z.object({
|
|
1948
|
+
id: IdSchema,
|
|
1949
|
+
hiveListingId: zod.z.string(),
|
|
1950
|
+
parentId: zod.z.string().nullable(),
|
|
1951
|
+
authorType: HiveAuthorTypeSchema,
|
|
1952
|
+
authorId: zod.z.string(),
|
|
1953
|
+
authorName: zod.z.string(),
|
|
1954
|
+
authorAvatar: zod.z.string().nullable(),
|
|
1955
|
+
content: zod.z.string(),
|
|
1956
|
+
createdAt: zod.z.string(),
|
|
1957
|
+
updatedAt: zod.z.string()
|
|
1958
|
+
});
|
|
1959
|
+
const CreateHiveCommentRequestSchema = zod.z.object({
|
|
1960
|
+
content: zod.z.string().min(1),
|
|
1961
|
+
parentId: zod.z.string().optional()
|
|
1962
|
+
});
|
|
1963
|
+
const UpdateHiveCommentRequestSchema = zod.z.object({
|
|
1964
|
+
content: zod.z.string().min(1)
|
|
1965
|
+
});
|
|
1966
|
+
const HiveCommentListResponseSchema = zod.z.object({
|
|
1967
|
+
comments: zod.z.array(HiveCommentSchema),
|
|
1968
|
+
total: zod.z.number(),
|
|
1969
|
+
page: zod.z.number(),
|
|
1970
|
+
pageSize: zod.z.number()
|
|
1971
|
+
});
|
|
1972
|
+
const HiveInstalledItemSchema = zod.z.object({
|
|
1973
|
+
install: HiveInstallSchema,
|
|
1974
|
+
listing: HiveListingSchema
|
|
1975
|
+
});
|
|
1976
|
+
const HiveInstalledResponseSchema = zod.z.object({
|
|
1977
|
+
items: zod.z.array(HiveInstalledItemSchema)
|
|
1978
|
+
});
|
|
1979
|
+
const HiveMyListingsResponseSchema = zod.z.object({
|
|
1980
|
+
listings: zod.z.array(HiveListingSchema)
|
|
1981
|
+
});
|
|
1982
|
+
|
|
1776
1983
|
const RpcCallEventSchema = zod.z.object({
|
|
1777
1984
|
eventId: zod.z.string(),
|
|
1778
1985
|
taskId: zod.z.string(),
|
|
@@ -2209,6 +2416,10 @@ const ChatWorkersStatusResponseSchema = EventBaseSchema.extend({
|
|
|
2209
2416
|
workers: zod.z.record(zod.z.string(), WorkerStatusSnapshotSchema)
|
|
2210
2417
|
// { taskId: { status, permissionMode } }
|
|
2211
2418
|
});
|
|
2419
|
+
const ListModelsEventSchema = EventBaseSchema.extend({
|
|
2420
|
+
machineId: zod.z.string(),
|
|
2421
|
+
agentType: zod.z.enum(["claude", "codex"]).optional()
|
|
2422
|
+
});
|
|
2212
2423
|
const baseTaskSchema = EventBaseSchema.extend({
|
|
2213
2424
|
taskId: zod.z.string(),
|
|
2214
2425
|
userId: zod.z.string(),
|
|
@@ -2369,6 +2580,18 @@ const TaskMessageSchema = EventBaseSchema.extend({
|
|
|
2369
2580
|
message: "Exactly one of message or encryptedMessage must be provided"
|
|
2370
2581
|
}
|
|
2371
2582
|
);
|
|
2583
|
+
const TaskModelUsageSchema = zod.z.object({
|
|
2584
|
+
inputTokens: zod.z.number().int().nonnegative().default(0),
|
|
2585
|
+
outputTokens: zod.z.number().int().nonnegative().default(0),
|
|
2586
|
+
cacheReadInputTokens: zod.z.number().int().nonnegative().default(0),
|
|
2587
|
+
cacheCreationInputTokens: zod.z.number().int().nonnegative().default(0),
|
|
2588
|
+
webSearchRequests: zod.z.number().int().nonnegative().default(0)
|
|
2589
|
+
});
|
|
2590
|
+
const TaskUsageReportEventSchema = EventBaseSchema.extend({
|
|
2591
|
+
taskId: zod.z.string(),
|
|
2592
|
+
resultEventId: zod.z.string(),
|
|
2593
|
+
modelUsage: zod.z.record(zod.z.string().min(1), TaskModelUsageSchema)
|
|
2594
|
+
});
|
|
2372
2595
|
const ShowModalEventDataSchema = EventBaseSchema.extend({
|
|
2373
2596
|
taskId: zod.z.string(),
|
|
2374
2597
|
chatId: zod.z.string().optional(),
|
|
@@ -2598,6 +2821,61 @@ const DeployAgentCompleteEventSchema = EventBaseSchema.extend({
|
|
|
2598
2821
|
supportLocal: zod.z.boolean().optional()
|
|
2599
2822
|
// Support local mode
|
|
2600
2823
|
});
|
|
2824
|
+
const HivePublishEventSchema = EventBaseSchema.extend({
|
|
2825
|
+
taskId: zod.z.string(),
|
|
2826
|
+
userId: zod.z.string(),
|
|
2827
|
+
machineId: zod.z.string().optional(),
|
|
2828
|
+
cloudId: zod.z.string().optional(),
|
|
2829
|
+
type: zod.z.enum(["agent", "skill"]),
|
|
2830
|
+
sourceDir: zod.z.string(),
|
|
2831
|
+
name: zod.z.string(),
|
|
2832
|
+
displayName: zod.z.string(),
|
|
2833
|
+
description: zod.z.string().optional(),
|
|
2834
|
+
readme: zod.z.string().optional(),
|
|
2835
|
+
version: zod.z.string(),
|
|
2836
|
+
repoDir: zod.z.string(),
|
|
2837
|
+
gitUrl: zod.z.string(),
|
|
2838
|
+
environmentVariables: zod.z.record(zod.z.string(), zod.z.string()).optional()
|
|
2839
|
+
}).refine(
|
|
2840
|
+
(data) => !!data.machineId !== !!data.cloudId,
|
|
2841
|
+
{ message: "Exactly one of machineId or cloudId must be provided" }
|
|
2842
|
+
);
|
|
2843
|
+
const HivePublishCompleteEventSchema = EventBaseSchema.extend({
|
|
2844
|
+
taskId: zod.z.string(),
|
|
2845
|
+
success: zod.z.boolean(),
|
|
2846
|
+
error: zod.z.string().optional(),
|
|
2847
|
+
gitCommitHash: zod.z.string().optional(),
|
|
2848
|
+
hasChanges: zod.z.boolean().optional(),
|
|
2849
|
+
tags: zod.z.array(zod.z.string()).optional(),
|
|
2850
|
+
name: zod.z.string().optional(),
|
|
2851
|
+
displayName: zod.z.string().optional(),
|
|
2852
|
+
description: zod.z.string().optional(),
|
|
2853
|
+
readme: zod.z.string().optional(),
|
|
2854
|
+
repoDir: zod.z.string().optional(),
|
|
2855
|
+
reviewReasons: zod.z.array(zod.z.string()).optional()
|
|
2856
|
+
});
|
|
2857
|
+
const HiveInstallEventSchema = EventBaseSchema.extend({
|
|
2858
|
+
taskId: zod.z.string(),
|
|
2859
|
+
userId: zod.z.string(),
|
|
2860
|
+
machineId: zod.z.string().optional(),
|
|
2861
|
+
cloudId: zod.z.string().optional(),
|
|
2862
|
+
hiveListingId: zod.z.string(),
|
|
2863
|
+
name: zod.z.string(),
|
|
2864
|
+
sourceType: zod.z.enum(["agent", "skill"]).optional(),
|
|
2865
|
+
sourceRepoDir: zod.z.string(),
|
|
2866
|
+
gitUrl: zod.z.string(),
|
|
2867
|
+
draftAgentDir: zod.z.string(),
|
|
2868
|
+
installDir: zod.z.string().optional()
|
|
2869
|
+
}).refine(
|
|
2870
|
+
(data) => !!data.machineId !== !!data.cloudId,
|
|
2871
|
+
{ message: "Exactly one of machineId or cloudId must be provided" }
|
|
2872
|
+
);
|
|
2873
|
+
const HiveInstallCompleteEventSchema = EventBaseSchema.extend({
|
|
2874
|
+
taskId: zod.z.string(),
|
|
2875
|
+
success: zod.z.boolean(),
|
|
2876
|
+
agentDir: zod.z.string().optional(),
|
|
2877
|
+
error: zod.z.string().optional()
|
|
2878
|
+
});
|
|
2601
2879
|
const AssociateRepoEventDataSchema = EventBaseSchema.extend({
|
|
2602
2880
|
taskId: zod.z.string(),
|
|
2603
2881
|
gitServerHost: zod.z.string(),
|
|
@@ -2640,6 +2918,7 @@ const SystemMessageSchema = EventBaseSchema.extend({
|
|
|
2640
2918
|
"chat-member-removed",
|
|
2641
2919
|
"repo-added",
|
|
2642
2920
|
"repo-removed",
|
|
2921
|
+
"repo-inbox-updated",
|
|
2643
2922
|
"pr-state-changed",
|
|
2644
2923
|
"draft-agent-added",
|
|
2645
2924
|
"agent-updated",
|
|
@@ -2696,6 +2975,14 @@ const DaemonGitlabResponseSchema = EventBaseSchema.extend({
|
|
|
2696
2975
|
machineId: zod.z.string(),
|
|
2697
2976
|
executionTimeMs: zod.z.number()
|
|
2698
2977
|
});
|
|
2978
|
+
const RepositoryInboxProviderSchema = zod.z.enum(["gitlab", "github"]);
|
|
2979
|
+
const RepositoryInboxWebhookSchema = EventBaseSchema.extend({
|
|
2980
|
+
provider: RepositoryInboxProviderSchema,
|
|
2981
|
+
gitServerId: zod.z.string(),
|
|
2982
|
+
deliveryId: zod.z.string().optional(),
|
|
2983
|
+
eventType: zod.z.string().optional(),
|
|
2984
|
+
payload: zod.z.record(zod.z.string(), zod.z.unknown())
|
|
2985
|
+
});
|
|
2699
2986
|
const CompanionHeartbeatRequestSchema = EventBaseSchema.extend({
|
|
2700
2987
|
machineId: zod.z.string(),
|
|
2701
2988
|
agentId: zod.z.string(),
|
|
@@ -2735,6 +3022,7 @@ const EventSchemaMap = {
|
|
|
2735
3022
|
"api-server-alive": ApiServerAliveEventSchema,
|
|
2736
3023
|
// Machine events
|
|
2737
3024
|
"machine-alive": MachineAliveEventSchema,
|
|
3025
|
+
"list-models": ListModelsEventSchema,
|
|
2738
3026
|
// Worker events
|
|
2739
3027
|
"worker-initializing": WorkerInitializingSchema,
|
|
2740
3028
|
"worker-initialized": WorkerInitializedSchema,
|
|
@@ -2753,6 +3041,7 @@ const EventSchemaMap = {
|
|
|
2753
3041
|
"cancel-task": cancelTaskSchema,
|
|
2754
3042
|
"stop-task": StopTaskSchema,
|
|
2755
3043
|
"task-message": TaskMessageSchema,
|
|
3044
|
+
"task-usage-report": TaskUsageReportEventSchema,
|
|
2756
3045
|
"change-task-title": ChangeTaskTitleEventSchema,
|
|
2757
3046
|
"task-state-change": TaskStateChangeEventSchema,
|
|
2758
3047
|
"update-task-agent-session-id": UpdateTaskAgentSessionIdEventSchema,
|
|
@@ -2766,6 +3055,12 @@ const EventSchemaMap = {
|
|
|
2766
3055
|
// Deploy agent events
|
|
2767
3056
|
"deploy-agent": DeployAgentEventSchema,
|
|
2768
3057
|
"deploy-agent-complete": DeployAgentCompleteEventSchema,
|
|
3058
|
+
// Hive publish events
|
|
3059
|
+
"hive-publish": HivePublishEventSchema,
|
|
3060
|
+
"hive-publish-complete": HivePublishCompleteEventSchema,
|
|
3061
|
+
// Hive install events
|
|
3062
|
+
"hive-install": HiveInstallEventSchema,
|
|
3063
|
+
"hive-install-complete": HiveInstallCompleteEventSchema,
|
|
2769
3064
|
// Multi-agent collaboration events
|
|
2770
3065
|
"task-stopped": TaskStoppedEventSchema,
|
|
2771
3066
|
"sub-task-result-updated": SubTaskResultUpdatedEventSchema,
|
|
@@ -2789,9 +3084,10 @@ const EventSchemaMap = {
|
|
|
2789
3084
|
"workspace-file-response": WorkspaceFileResponseSchema,
|
|
2790
3085
|
// RPC events
|
|
2791
3086
|
"rpc-call": RpcCallEventSchema,
|
|
2792
|
-
// Daemon
|
|
3087
|
+
// Daemon Git provider events
|
|
2793
3088
|
"daemon-gitlab-request": DaemonGitlabRequestSchema,
|
|
2794
3089
|
"daemon-gitlab-response": DaemonGitlabResponseSchema,
|
|
3090
|
+
"repository-inbox-webhook": RepositoryInboxWebhookSchema,
|
|
2795
3091
|
// Companion heartbeat events
|
|
2796
3092
|
"request-companion-heartbeat": CompanionHeartbeatRequestSchema,
|
|
2797
3093
|
"companion-heartbeat-response": CompanionHeartbeatResponseSchema,
|
|
@@ -2815,6 +3111,7 @@ const workerTaskEvents = [
|
|
|
2815
3111
|
"change-task-title",
|
|
2816
3112
|
"update-task-agent-session-id",
|
|
2817
3113
|
"task-slash-commands-update",
|
|
3114
|
+
"task-usage-report",
|
|
2818
3115
|
"reset-task-session",
|
|
2819
3116
|
"merge-request",
|
|
2820
3117
|
"merge-pr",
|
|
@@ -3382,6 +3679,8 @@ exports.CreateContactResponseSchema = CreateContactResponseSchema;
|
|
|
3382
3679
|
exports.CreateDirectRechargeCheckoutRequestSchema = CreateDirectRechargeCheckoutRequestSchema;
|
|
3383
3680
|
exports.CreateDirectRechargeCheckoutResponseSchema = CreateDirectRechargeCheckoutResponseSchema;
|
|
3384
3681
|
exports.CreateDraftAgentRequestSchema = CreateDraftAgentRequestSchema;
|
|
3682
|
+
exports.CreateHiveCommentRequestSchema = CreateHiveCommentRequestSchema;
|
|
3683
|
+
exports.CreateHiveReviewRequestSchema = CreateHiveReviewRequestSchema;
|
|
3385
3684
|
exports.CreateMergeRequestResponseSchema = CreateMergeRequestResponseSchema;
|
|
3386
3685
|
exports.CreateMergeRequestSchema = CreateMergeRequestSchema;
|
|
3387
3686
|
exports.CreateOAuthServerRequestSchema = CreateOAuthServerRequestSchema;
|
|
@@ -3451,6 +3750,27 @@ exports.GetUserAgentsResponseSchema = GetUserAgentsResponseSchema;
|
|
|
3451
3750
|
exports.GitHubIssueListItemSchema = GitHubIssueListItemSchema;
|
|
3452
3751
|
exports.GitHubIssueSchema = GitHubIssueSchema;
|
|
3453
3752
|
exports.GitServerSchema = GitServerSchema;
|
|
3753
|
+
exports.HiveAuthorTypeSchema = HiveAuthorTypeSchema;
|
|
3754
|
+
exports.HiveCommentListResponseSchema = HiveCommentListResponseSchema;
|
|
3755
|
+
exports.HiveCommentSchema = HiveCommentSchema;
|
|
3756
|
+
exports.HiveInstallCompleteEventSchema = HiveInstallCompleteEventSchema;
|
|
3757
|
+
exports.HiveInstallEventSchema = HiveInstallEventSchema;
|
|
3758
|
+
exports.HiveInstallRequestSchema = HiveInstallRequestSchema;
|
|
3759
|
+
exports.HiveInstallResponseSchema = HiveInstallResponseSchema;
|
|
3760
|
+
exports.HiveInstallSchema = HiveInstallSchema;
|
|
3761
|
+
exports.HiveInstalledItemSchema = HiveInstalledItemSchema;
|
|
3762
|
+
exports.HiveInstalledResponseSchema = HiveInstalledResponseSchema;
|
|
3763
|
+
exports.HiveListQuerySchema = HiveListQuerySchema;
|
|
3764
|
+
exports.HiveListResponseSchema = HiveListResponseSchema;
|
|
3765
|
+
exports.HiveListingSchema = HiveListingSchema;
|
|
3766
|
+
exports.HiveListingStatusSchema = HiveListingStatusSchema;
|
|
3767
|
+
exports.HiveListingTypeSchema = HiveListingTypeSchema;
|
|
3768
|
+
exports.HiveMyListingsResponseSchema = HiveMyListingsResponseSchema;
|
|
3769
|
+
exports.HivePublishCompleteEventSchema = HivePublishCompleteEventSchema;
|
|
3770
|
+
exports.HivePublishEventSchema = HivePublishEventSchema;
|
|
3771
|
+
exports.HiveReviewListResponseSchema = HiveReviewListResponseSchema;
|
|
3772
|
+
exports.HiveReviewSchema = HiveReviewSchema;
|
|
3773
|
+
exports.HiveSortSchema = HiveSortSchema;
|
|
3454
3774
|
exports.IGNORED_DIRECTORIES = IGNORED_DIRECTORIES;
|
|
3455
3775
|
exports.IdSchema = IdSchema;
|
|
3456
3776
|
exports.JsonSchemaDocumentSchema = JsonSchemaDocumentSchema;
|
|
@@ -3469,7 +3789,9 @@ exports.ListFilesResponseSchema = ListFilesResponseSchema;
|
|
|
3469
3789
|
exports.ListGitServersResponseSchema = ListGitServersResponseSchema;
|
|
3470
3790
|
exports.ListIssuesQuerySchema = ListIssuesQuerySchema;
|
|
3471
3791
|
exports.ListIssuesResponseSchema = ListIssuesResponseSchema;
|
|
3792
|
+
exports.ListMachineModelsResponseSchema = ListMachineModelsResponseSchema;
|
|
3472
3793
|
exports.ListMachinesResponseSchema = ListMachinesResponseSchema;
|
|
3794
|
+
exports.ListModelsEventSchema = ListModelsEventSchema;
|
|
3473
3795
|
exports.ListOAuthServersPublicResponseSchema = ListOAuthServersPublicResponseSchema;
|
|
3474
3796
|
exports.ListOAuthServersQuerySchema = ListOAuthServersQuerySchema;
|
|
3475
3797
|
exports.ListOAuthServersResponseSchema = ListOAuthServersResponseSchema;
|
|
@@ -3531,6 +3853,8 @@ exports.ProjectEntrySchema = ProjectEntrySchema;
|
|
|
3531
3853
|
exports.PublicResourceItemSchema = PublicResourceItemSchema;
|
|
3532
3854
|
exports.PublishDraftAgentRequestSchema = PublishDraftAgentRequestSchema;
|
|
3533
3855
|
exports.PublishDraftAgentResponseSchema = PublishDraftAgentResponseSchema;
|
|
3856
|
+
exports.PublishToHiveRequestSchema = PublishToHiveRequestSchema;
|
|
3857
|
+
exports.PublishToHiveResponseSchema = PublishToHiveResponseSchema;
|
|
3534
3858
|
exports.QueryEventsRequestSchema = QueryEventsRequestSchema;
|
|
3535
3859
|
exports.RELEVANT_DEPENDENCIES = RELEVANT_DEPENDENCIES;
|
|
3536
3860
|
exports.RTC_CHUNK_HEADER_SIZE = RTC_CHUNK_HEADER_SIZE;
|
|
@@ -3541,6 +3865,8 @@ exports.RegisterCompanionResponseSchema = RegisterCompanionResponseSchema;
|
|
|
3541
3865
|
exports.RemoveChatMemberRequestSchema = RemoveChatMemberRequestSchema;
|
|
3542
3866
|
exports.RemovePrivateCloudMemberResponseSchema = RemovePrivateCloudMemberResponseSchema;
|
|
3543
3867
|
exports.RepositoryActorIdentitySchema = RepositoryActorIdentitySchema;
|
|
3868
|
+
exports.RepositoryInboxProviderSchema = RepositoryInboxProviderSchema;
|
|
3869
|
+
exports.RepositoryInboxWebhookSchema = RepositoryInboxWebhookSchema;
|
|
3544
3870
|
exports.RepositoryReferenceCommentSchema = RepositoryReferenceCommentSchema;
|
|
3545
3871
|
exports.RepositoryReferenceCommentsResponseSchema = RepositoryReferenceCommentsResponseSchema;
|
|
3546
3872
|
exports.RepositoryReferenceDiffSchema = RepositoryReferenceDiffSchema;
|
|
@@ -3603,6 +3929,7 @@ exports.TaskArtifactsSummarySchema = TaskArtifactsSummarySchema;
|
|
|
3603
3929
|
exports.TaskInfoUpdateEventDataSchema = TaskInfoUpdateEventDataSchema;
|
|
3604
3930
|
exports.TaskItemSchema = TaskItemSchema;
|
|
3605
3931
|
exports.TaskMessageSchema = TaskMessageSchema;
|
|
3932
|
+
exports.TaskModelUsageSchema = TaskModelUsageSchema;
|
|
3606
3933
|
exports.TaskSharePermissionsSchema = TaskSharePermissionsSchema;
|
|
3607
3934
|
exports.TaskSlashCommandSchema = TaskSlashCommandSchema;
|
|
3608
3935
|
exports.TaskSlashCommandsUpdateEventDataSchema = TaskSlashCommandsUpdateEventDataSchema;
|
|
@@ -3610,6 +3937,8 @@ exports.TaskStateChangeEventSchema = TaskStateChangeEventSchema;
|
|
|
3610
3937
|
exports.TaskStoppedEventSchema = TaskStoppedEventSchema;
|
|
3611
3938
|
exports.TaskTodoSchema = TaskTodoSchema;
|
|
3612
3939
|
exports.TaskTransactionsResponseSchema = TaskTransactionsResponseSchema;
|
|
3940
|
+
exports.TaskUsageReportEventSchema = TaskUsageReportEventSchema;
|
|
3941
|
+
exports.TaskUsageSummarySchema = TaskUsageSummarySchema;
|
|
3613
3942
|
exports.ToggleApiKeyRequestSchema = ToggleApiKeyRequestSchema;
|
|
3614
3943
|
exports.ToggleOAuthServerRequestSchema = ToggleOAuthServerRequestSchema;
|
|
3615
3944
|
exports.ToggleOAuthServerResponseSchema = ToggleOAuthServerResponseSchema;
|
|
@@ -3622,6 +3951,10 @@ exports.UpdateAgentResponseSchema = UpdateAgentResponseSchema;
|
|
|
3622
3951
|
exports.UpdateApiKeyRequestSchema = UpdateApiKeyRequestSchema;
|
|
3623
3952
|
exports.UpdateDraftAgentRequestSchema = UpdateDraftAgentRequestSchema;
|
|
3624
3953
|
exports.UpdateDraftAgentResponseSchema = UpdateDraftAgentResponseSchema;
|
|
3954
|
+
exports.UpdateHiveCommentRequestSchema = UpdateHiveCommentRequestSchema;
|
|
3955
|
+
exports.UpdateHiveListingRequestSchema = UpdateHiveListingRequestSchema;
|
|
3956
|
+
exports.UpdateHiveReviewRequestSchema = UpdateHiveReviewRequestSchema;
|
|
3957
|
+
exports.UpdateHiveVersionRequestSchema = UpdateHiveVersionRequestSchema;
|
|
3625
3958
|
exports.UpdateOAuthServerRequestSchema = UpdateOAuthServerRequestSchema;
|
|
3626
3959
|
exports.UpdateOAuthServerResponseSchema = UpdateOAuthServerResponseSchema;
|
|
3627
3960
|
exports.UpdateResourceRequestSchema = UpdateResourceRequestSchema;
|