@agentrix/shared 2.0.1 → 2.0.3
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 +16 -11
- package/dist/index.d.cts +1490 -1109
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -115,12 +115,8 @@ const OAuthLoginQuerySchema = zod.z.object({
|
|
|
115
115
|
// Base64-encoded Ed25519 public key
|
|
116
116
|
challenge: zod.z.string(),
|
|
117
117
|
// Base64-encoded random challenge
|
|
118
|
-
signatureProof: zod.z.string()
|
|
118
|
+
signatureProof: zod.z.string()
|
|
119
119
|
// Base64-encoded Ed25519 signature
|
|
120
|
-
salt: zod.z.string().optional(),
|
|
121
|
-
// Salt for password encryption (base64) - optional, set after login
|
|
122
|
-
encryptedSecret: zod.z.string().optional()
|
|
123
|
-
// Encrypted secret (base64) - optional, set after login
|
|
124
120
|
});
|
|
125
121
|
const OAuthCallbackQuerySchema = zod.z.object({
|
|
126
122
|
code: zod.z.string(),
|
|
@@ -540,8 +536,8 @@ const AgentCustomConfigSchema = zod.z.object({
|
|
|
540
536
|
const AgentPermissionsSchema = zod.z.object({
|
|
541
537
|
role: zod.z.string(),
|
|
542
538
|
// "all" | "low"
|
|
543
|
-
|
|
544
|
-
// URL/path
|
|
539
|
+
paths: zod.z.array(zod.z.string()).optional()
|
|
540
|
+
// URL/path patterns
|
|
545
541
|
});
|
|
546
542
|
const AgentSchema = zod.z.object({
|
|
547
543
|
id: IdSchema,
|
|
@@ -575,7 +571,7 @@ const CreateAgentRequestSchema = zod.z.object({
|
|
|
575
571
|
placeholderMsg: zod.z.string().default("Ask me anything..."),
|
|
576
572
|
gitRepoId: zod.z.string().optional(),
|
|
577
573
|
supportLocal: zod.z.boolean().default(false),
|
|
578
|
-
config: AgentCustomConfigSchema.optional()
|
|
574
|
+
config: AgentCustomConfigSchema.nullable().optional()
|
|
579
575
|
});
|
|
580
576
|
const CreateAgentResponseSchema = AgentSchema;
|
|
581
577
|
const UpdateAgentRequestSchema = zod.z.object({
|
|
@@ -1046,10 +1042,14 @@ const AskUserMessageSchema = zod.z.object({
|
|
|
1046
1042
|
questions: zod.z.array(AskUserQuestionSchema).min(1).max(4)
|
|
1047
1043
|
// 1-4 questions
|
|
1048
1044
|
});
|
|
1045
|
+
const AskUserResponseStatusSchema = zod.z.enum(["answered", "cancelled", "timeout"]);
|
|
1046
|
+
const AskUserResponseReasonSchema = zod.z.enum(["user", "timeout", "system"]);
|
|
1049
1047
|
const AskUserResponseMessageSchema = zod.z.object({
|
|
1050
1048
|
type: zod.z.literal("ask_user_response"),
|
|
1051
|
-
answers: zod.z.array(zod.z.string())
|
|
1049
|
+
answers: zod.z.array(zod.z.string()),
|
|
1052
1050
|
// Array of answers (labels), one per question
|
|
1051
|
+
status: AskUserResponseStatusSchema.optional(),
|
|
1052
|
+
reason: AskUserResponseReasonSchema.optional()
|
|
1053
1053
|
});
|
|
1054
1054
|
function isAskUserMessage(message) {
|
|
1055
1055
|
return typeof message === "object" && message !== null && "type" in message && message.type === "ask_user";
|
|
@@ -1389,7 +1389,8 @@ const SystemMessageSchema = EventBaseSchema.extend({
|
|
|
1389
1389
|
"chat-member-removed",
|
|
1390
1390
|
"repo-added",
|
|
1391
1391
|
"repo-removed",
|
|
1392
|
-
"pr-state-changed"
|
|
1392
|
+
"pr-state-changed",
|
|
1393
|
+
"agent-builder-added"
|
|
1393
1394
|
]),
|
|
1394
1395
|
data: zod.z.union([
|
|
1395
1396
|
IdOnlySchema,
|
|
@@ -1402,8 +1403,10 @@ const SystemMessageSchema = EventBaseSchema.extend({
|
|
|
1402
1403
|
// chat-member-removed (array)
|
|
1403
1404
|
RepositorySchema,
|
|
1404
1405
|
// repo-added
|
|
1405
|
-
PrStateChangedSchema
|
|
1406
|
+
PrStateChangedSchema,
|
|
1406
1407
|
// pr-state-changed
|
|
1408
|
+
AgentBuilderSchema
|
|
1409
|
+
// agent-builder-added
|
|
1407
1410
|
]),
|
|
1408
1411
|
timestamp: zod.z.string()
|
|
1409
1412
|
});
|
|
@@ -2067,6 +2070,8 @@ exports.AskUserMessageSchema = AskUserMessageSchema;
|
|
|
2067
2070
|
exports.AskUserOptionSchema = AskUserOptionSchema;
|
|
2068
2071
|
exports.AskUserQuestionSchema = AskUserQuestionSchema;
|
|
2069
2072
|
exports.AskUserResponseMessageSchema = AskUserResponseMessageSchema;
|
|
2073
|
+
exports.AskUserResponseReasonSchema = AskUserResponseReasonSchema;
|
|
2074
|
+
exports.AskUserResponseStatusSchema = AskUserResponseStatusSchema;
|
|
2070
2075
|
exports.AssociateRepoEventDataSchema = AssociateRepoEventDataSchema;
|
|
2071
2076
|
exports.BillingStatsResponseSchema = BillingStatsResponseSchema;
|
|
2072
2077
|
exports.BranchSchema = BranchSchema;
|