@agentrix/shared 1.0.8 → 1.0.9
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/index.cjs +83 -4
- package/dist/index.d.cts +1446 -29
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -180,6 +180,22 @@ const CloudJoinApprovalRequestSchema = zod.z.object({
|
|
|
180
180
|
userId: zod.z.string(),
|
|
181
181
|
cloudId: zod.z.string()
|
|
182
182
|
});
|
|
183
|
+
const TaskSharePermissionsSchema = zod.z.object({
|
|
184
|
+
canSendMessage: zod.z.boolean(),
|
|
185
|
+
canCreatePr: zod.z.boolean(),
|
|
186
|
+
canApprovePr: zod.z.boolean(),
|
|
187
|
+
canViewPr: zod.z.boolean(),
|
|
188
|
+
canMergePr: zod.z.boolean()
|
|
189
|
+
});
|
|
190
|
+
const ShareAuthQuerySchema = zod.z.object({
|
|
191
|
+
code: zod.z.string()
|
|
192
|
+
});
|
|
193
|
+
const ShareAuthResponseSchema = zod.z.object({
|
|
194
|
+
success: zod.z.literal(true),
|
|
195
|
+
shareToken: zod.z.string(),
|
|
196
|
+
taskId: zod.z.string(),
|
|
197
|
+
permissions: TaskSharePermissionsSchema
|
|
198
|
+
});
|
|
183
199
|
|
|
184
200
|
const StartTaskRequestSchema = zod.z.object({
|
|
185
201
|
chatId: zod.z.string(),
|
|
@@ -397,6 +413,24 @@ const CreateMergeRequestResponseSchema = zod.z.object({
|
|
|
397
413
|
reason: zod.z.string().optional()
|
|
398
414
|
// failed-reason
|
|
399
415
|
});
|
|
416
|
+
const ApprovePrRequestSchema = zod.z.object({});
|
|
417
|
+
const ApprovePrResponseSchema = zod.z.object({
|
|
418
|
+
success: zod.z.boolean(),
|
|
419
|
+
taskId: zod.z.string(),
|
|
420
|
+
pullRequestNumber: zod.z.number()
|
|
421
|
+
});
|
|
422
|
+
const CreateTaskShareSchema = zod.z.object({
|
|
423
|
+
permissions: TaskSharePermissionsSchema.optional().default({
|
|
424
|
+
canSendMessage: false,
|
|
425
|
+
canCreatePr: false,
|
|
426
|
+
canApprovePr: false,
|
|
427
|
+
canViewPr: true,
|
|
428
|
+
canMergePr: false
|
|
429
|
+
})
|
|
430
|
+
});
|
|
431
|
+
const CreateTaskShareResponseSchema = zod.z.object({
|
|
432
|
+
shareCode: zod.z.string()
|
|
433
|
+
});
|
|
400
434
|
const ArchiveTaskRequestSchema = zod.z.object({});
|
|
401
435
|
const ArchiveTaskResponseSchema = zod.z.object({
|
|
402
436
|
success: zod.z.boolean(),
|
|
@@ -464,6 +498,31 @@ const ListChatTasksResponseSchema = zod.z.object({
|
|
|
464
498
|
});
|
|
465
499
|
|
|
466
500
|
const AgentTypeSchema = zod.z.enum(["claude", "codex"]);
|
|
501
|
+
const DisplayConfigKeysSchema = zod.z.object({
|
|
502
|
+
// PR Actions
|
|
503
|
+
createPR: zod.z.string().optional(),
|
|
504
|
+
viewPR: zod.z.string().optional(),
|
|
505
|
+
mergePR: zod.z.string().optional(),
|
|
506
|
+
approvePR: zod.z.string().optional(),
|
|
507
|
+
merged: zod.z.string().optional(),
|
|
508
|
+
closed: zod.z.string().optional(),
|
|
509
|
+
recreatePR: zod.z.string().optional(),
|
|
510
|
+
// Share Permissions
|
|
511
|
+
permissionCanSendMessage: zod.z.string().optional(),
|
|
512
|
+
permissionCanSendMessageDesc: zod.z.string().optional(),
|
|
513
|
+
permissionCanCreatePr: zod.z.string().optional(),
|
|
514
|
+
permissionCanCreatePrDesc: zod.z.string().optional(),
|
|
515
|
+
permissionCanApprovePr: zod.z.string().optional(),
|
|
516
|
+
permissionCanApprovePrDesc: zod.z.string().optional(),
|
|
517
|
+
permissionCanViewPr: zod.z.string().optional(),
|
|
518
|
+
permissionCanViewPrDesc: zod.z.string().optional(),
|
|
519
|
+
permissionCanMergePr: zod.z.string().optional(),
|
|
520
|
+
permissionCanMergePrDesc: zod.z.string().optional()
|
|
521
|
+
});
|
|
522
|
+
const DisplayConfigSchema = zod.z.record(zod.z.string(), DisplayConfigKeysSchema);
|
|
523
|
+
const AgentCustomConfigSchema = zod.z.object({
|
|
524
|
+
displayConfig: DisplayConfigSchema.optional()
|
|
525
|
+
});
|
|
467
526
|
const AgentSchema = zod.z.object({
|
|
468
527
|
id: IdSchema,
|
|
469
528
|
name: zod.z.string(),
|
|
@@ -478,7 +537,8 @@ const AgentSchema = zod.z.object({
|
|
|
478
537
|
developerEmail: zod.z.string().nullable(),
|
|
479
538
|
gitRepoId: zod.z.string().nullable(),
|
|
480
539
|
supportLocal: zod.z.boolean(),
|
|
481
|
-
enable: zod.z.boolean()
|
|
540
|
+
enable: zod.z.boolean(),
|
|
541
|
+
config: AgentCustomConfigSchema.nullable()
|
|
482
542
|
});
|
|
483
543
|
const ListAgentsResponseSchema = zod.z.object({
|
|
484
544
|
agents: zod.z.array(AgentSchema)
|
|
@@ -493,7 +553,8 @@ const CreateAgentRequestSchema = zod.z.object({
|
|
|
493
553
|
guildMsg: zod.z.string().default("what can I do for you today?"),
|
|
494
554
|
placeholderMsg: zod.z.string().default("Ask me anything..."),
|
|
495
555
|
gitRepoId: zod.z.string().optional(),
|
|
496
|
-
supportLocal: zod.z.boolean().default(false)
|
|
556
|
+
supportLocal: zod.z.boolean().default(false),
|
|
557
|
+
config: AgentCustomConfigSchema.optional()
|
|
497
558
|
});
|
|
498
559
|
const CreateAgentResponseSchema = AgentSchema;
|
|
499
560
|
const UpdateAgentRequestSchema = zod.z.object({
|
|
@@ -505,7 +566,8 @@ const UpdateAgentRequestSchema = zod.z.object({
|
|
|
505
566
|
guildMsg: zod.z.string().optional(),
|
|
506
567
|
placeholderMsg: zod.z.string().optional(),
|
|
507
568
|
gitRepoId: zod.z.string().nullable().optional(),
|
|
508
|
-
supportLocal: zod.z.boolean().optional()
|
|
569
|
+
supportLocal: zod.z.boolean().optional(),
|
|
570
|
+
config: AgentCustomConfigSchema.nullable().optional()
|
|
509
571
|
});
|
|
510
572
|
const UpdateAgentResponseSchema = AgentSchema;
|
|
511
573
|
const DeleteAgentResponseSchema = zod.z.object({
|
|
@@ -1137,6 +1199,10 @@ const MergeRequestEventSchema = EventBaseSchema.extend({
|
|
|
1137
1199
|
summary: zod.z.string(),
|
|
1138
1200
|
description: zod.z.string().optional()
|
|
1139
1201
|
});
|
|
1202
|
+
const MergePullRequestEventSchema = EventBaseSchema.extend({
|
|
1203
|
+
taskId: zod.z.string(),
|
|
1204
|
+
mergeMethod: zod.z.enum(["merge", "squash", "rebase"]).optional().default("squash")
|
|
1205
|
+
});
|
|
1140
1206
|
const IdOnlySchema = zod.z.object({
|
|
1141
1207
|
id: zod.z.string()
|
|
1142
1208
|
});
|
|
@@ -1202,6 +1268,7 @@ const EventSchemaMap = {
|
|
|
1202
1268
|
"task-artifacts-updated": TaskArtifactsUpdatedEventSchema,
|
|
1203
1269
|
// Merge request events
|
|
1204
1270
|
"merge-request": MergeRequestEventSchema,
|
|
1271
|
+
"merge-pr": MergePullRequestEventSchema,
|
|
1205
1272
|
// System message events
|
|
1206
1273
|
"system-message": SystemMessageSchema,
|
|
1207
1274
|
// Billing events
|
|
@@ -1220,7 +1287,8 @@ const workerTaskEvents = [
|
|
|
1220
1287
|
"change-task-title",
|
|
1221
1288
|
"update-task-agent-session-id",
|
|
1222
1289
|
"task-artifacts-updated",
|
|
1223
|
-
"merge-request"
|
|
1290
|
+
"merge-request",
|
|
1291
|
+
"merge-pr"
|
|
1224
1292
|
];
|
|
1225
1293
|
|
|
1226
1294
|
function userAuth(token) {
|
|
@@ -1750,6 +1818,7 @@ function decryptFileContent(encryptedContent, dataKey) {
|
|
|
1750
1818
|
exports.AddChatMemberRequestSchema = AddChatMemberRequestSchema;
|
|
1751
1819
|
exports.AddChatMemberResponseSchema = AddChatMemberResponseSchema;
|
|
1752
1820
|
exports.AgentConfigValidationError = AgentConfigValidationError;
|
|
1821
|
+
exports.AgentCustomConfigSchema = AgentCustomConfigSchema;
|
|
1753
1822
|
exports.AgentError = AgentError;
|
|
1754
1823
|
exports.AgentLoadError = AgentLoadError;
|
|
1755
1824
|
exports.AgentMetadataSchema = AgentMetadataSchema;
|
|
@@ -1760,6 +1829,8 @@ exports.ApiErrorSchema = ApiErrorSchema;
|
|
|
1760
1829
|
exports.ApiServerAliveEventSchema = ApiServerAliveEventSchema;
|
|
1761
1830
|
exports.AppAliveEventSchema = AppAliveEventSchema;
|
|
1762
1831
|
exports.ApprovalStatusResponseSchema = ApprovalStatusResponseSchema;
|
|
1832
|
+
exports.ApprovePrRequestSchema = ApprovePrRequestSchema;
|
|
1833
|
+
exports.ApprovePrResponseSchema = ApprovePrResponseSchema;
|
|
1763
1834
|
exports.ArchiveTaskRequestSchema = ArchiveTaskRequestSchema;
|
|
1764
1835
|
exports.ArchiveTaskResponseSchema = ArchiveTaskResponseSchema;
|
|
1765
1836
|
exports.AskUserMessageSchema = AskUserMessageSchema;
|
|
@@ -1797,11 +1868,15 @@ exports.CreateMergeRequestResponseSchema = CreateMergeRequestResponseSchema;
|
|
|
1797
1868
|
exports.CreateMergeRequestSchema = CreateMergeRequestSchema;
|
|
1798
1869
|
exports.CreateOAuthServerRequestSchema = CreateOAuthServerRequestSchema;
|
|
1799
1870
|
exports.CreateOAuthServerResponseSchema = CreateOAuthServerResponseSchema;
|
|
1871
|
+
exports.CreateTaskShareResponseSchema = CreateTaskShareResponseSchema;
|
|
1872
|
+
exports.CreateTaskShareSchema = CreateTaskShareSchema;
|
|
1800
1873
|
exports.CreditExhaustedEventSchema = CreditExhaustedEventSchema;
|
|
1801
1874
|
exports.CreditsPackageSchema = CreditsPackageSchema;
|
|
1802
1875
|
exports.DateSchema = DateSchema;
|
|
1803
1876
|
exports.DeleteAgentResponseSchema = DeleteAgentResponseSchema;
|
|
1804
1877
|
exports.DeleteOAuthServerResponseSchema = DeleteOAuthServerResponseSchema;
|
|
1878
|
+
exports.DisplayConfigKeysSchema = DisplayConfigKeysSchema;
|
|
1879
|
+
exports.DisplayConfigSchema = DisplayConfigSchema;
|
|
1805
1880
|
exports.EventAckSchema = EventAckSchema;
|
|
1806
1881
|
exports.EventSchemaMap = EventSchemaMap;
|
|
1807
1882
|
exports.FRAMEWORK_TYPES = FRAMEWORK_TYPES;
|
|
@@ -1852,6 +1927,7 @@ exports.MachineApprovalStatusQuerySchema = MachineApprovalStatusQuerySchema;
|
|
|
1852
1927
|
exports.MachineAuthAuthorizedResponseSchema = MachineAuthAuthorizedResponseSchema;
|
|
1853
1928
|
exports.MachineAuthRequestSchema = MachineAuthRequestSchema;
|
|
1854
1929
|
exports.MachineAuthResultQuerySchema = MachineAuthResultQuerySchema;
|
|
1930
|
+
exports.MergePullRequestEventSchema = MergePullRequestEventSchema;
|
|
1855
1931
|
exports.MergeRequestEventSchema = MergeRequestEventSchema;
|
|
1856
1932
|
exports.MissingAgentFileError = MissingAgentFileError;
|
|
1857
1933
|
exports.OAuthAccountInfoSchema = OAuthAccountInfoSchema;
|
|
@@ -1877,6 +1953,8 @@ exports.ResetSecretRequestSchema = ResetSecretRequestSchema;
|
|
|
1877
1953
|
exports.ResetSecretResponseSchema = ResetSecretResponseSchema;
|
|
1878
1954
|
exports.ResumeTaskRequestSchema = ResumeTaskRequestSchema;
|
|
1879
1955
|
exports.ResumeTaskResponseSchema = ResumeTaskResponseSchema;
|
|
1956
|
+
exports.ShareAuthQuerySchema = ShareAuthQuerySchema;
|
|
1957
|
+
exports.ShareAuthResponseSchema = ShareAuthResponseSchema;
|
|
1880
1958
|
exports.ShutdownMachineSchema = ShutdownMachineSchema;
|
|
1881
1959
|
exports.SignatureAuthRequestSchema = SignatureAuthRequestSchema;
|
|
1882
1960
|
exports.SignatureAuthResponseSchema = SignatureAuthResponseSchema;
|
|
@@ -1894,6 +1972,7 @@ exports.SystemMessageSchema = SystemMessageSchema;
|
|
|
1894
1972
|
exports.TaskArtifactsUpdatedEventSchema = TaskArtifactsUpdatedEventSchema;
|
|
1895
1973
|
exports.TaskItemSchema = TaskItemSchema;
|
|
1896
1974
|
exports.TaskMessageSchema = TaskMessageSchema;
|
|
1975
|
+
exports.TaskSharePermissionsSchema = TaskSharePermissionsSchema;
|
|
1897
1976
|
exports.TaskStateChangeEventSchema = TaskStateChangeEventSchema;
|
|
1898
1977
|
exports.TaskTransactionsResponseSchema = TaskTransactionsResponseSchema;
|
|
1899
1978
|
exports.ToggleOAuthServerRequestSchema = ToggleOAuthServerRequestSchema;
|