@agentrix/shared 2.1.0 → 2.2.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/index.cjs +136 -12
- package/dist/index.d.cts +286 -27
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -283,8 +283,8 @@ const StartTaskResponseSchema = zod.z.object({
|
|
|
283
283
|
});
|
|
284
284
|
const TaskItemSchema = zod.z.object({
|
|
285
285
|
id: IdSchema,
|
|
286
|
-
type: zod.z.enum(["chat", "work"]).default("work"),
|
|
287
|
-
// Task type: "chat" (virtual
|
|
286
|
+
type: zod.z.enum(["chat", "work", "shadow"]).default("work"),
|
|
287
|
+
// Task type: "chat" (virtual) | "work" (real work) | "shadow" (companion heartbeat/shadow)
|
|
288
288
|
chatId: IdSchema,
|
|
289
289
|
userId: zod.z.string(),
|
|
290
290
|
state: zod.z.string(),
|
|
@@ -540,6 +540,25 @@ const SubTaskSummarySchema = zod.z.object({
|
|
|
540
540
|
const ListSubTasksResponseSchema = zod.z.object({
|
|
541
541
|
tasks: zod.z.array(SubTaskSummarySchema)
|
|
542
542
|
});
|
|
543
|
+
const ListRecentTasksRequestSchema = zod.z.object({
|
|
544
|
+
chatId: zod.z.string(),
|
|
545
|
+
limit: zod.z.coerce.number().int().min(1).max(50).optional().default(10),
|
|
546
|
+
status: zod.z.enum(["all", "active", "completed"]).optional().default("all")
|
|
547
|
+
});
|
|
548
|
+
const RecentTaskSummarySchema = zod.z.object({
|
|
549
|
+
taskId: IdSchema,
|
|
550
|
+
type: zod.z.enum(["chat", "work", "shadow"]),
|
|
551
|
+
state: zod.z.string(),
|
|
552
|
+
agentId: zod.z.string(),
|
|
553
|
+
title: zod.z.string().nullable(),
|
|
554
|
+
totalDuration: zod.z.number().nullable(),
|
|
555
|
+
createdAt: zod.z.string(),
|
|
556
|
+
updatedAt: zod.z.string()
|
|
557
|
+
});
|
|
558
|
+
const ListRecentTasksResponseSchema = zod.z.object({
|
|
559
|
+
tasks: zod.z.array(RecentTaskSummarySchema),
|
|
560
|
+
hasMore: zod.z.boolean()
|
|
561
|
+
});
|
|
543
562
|
const FindTaskByAgentRequestSchema = zod.z.object({
|
|
544
563
|
parentTaskId: zod.z.string(),
|
|
545
564
|
agentId: zod.z.string()
|
|
@@ -586,7 +605,10 @@ const ChatMemberInputSchema = zod.z.object({
|
|
|
586
605
|
const CreateChatRequestSchema = zod.z.object({
|
|
587
606
|
type: ChatTypeSchema.default("direct"),
|
|
588
607
|
// Optional, defaults to 'direct'
|
|
589
|
-
members: zod.z.array(ChatMemberInputSchema)
|
|
608
|
+
members: zod.z.array(ChatMemberInputSchema),
|
|
609
|
+
// Encryption keys for companion chat tasks (generated by App, stored on virtual task)
|
|
610
|
+
dataEncryptionKey: zod.z.string().optional(),
|
|
611
|
+
ownerEncryptedDataKey: zod.z.string().optional()
|
|
590
612
|
});
|
|
591
613
|
const CreateChatResponseSchema = ChatWithMembersSchema;
|
|
592
614
|
const ListChatsQuerySchema = zod.z.object({
|
|
@@ -624,7 +646,7 @@ const UpdateChatContextRequestSchema = zod.z.object({
|
|
|
624
646
|
});
|
|
625
647
|
const UpdateChatContextResponseSchema = ChatSchema;
|
|
626
648
|
|
|
627
|
-
const AgentTypeSchema = zod.z.enum(["claude", "codex"]);
|
|
649
|
+
const AgentTypeSchema = zod.z.enum(["claude", "codex", "companion"]);
|
|
628
650
|
const DisplayConfigKeysSchema = zod.z.object({
|
|
629
651
|
// PR Actions
|
|
630
652
|
createPR: zod.z.string().optional(),
|
|
@@ -648,7 +670,9 @@ const DisplayConfigKeysSchema = zod.z.object({
|
|
|
648
670
|
});
|
|
649
671
|
const DisplayConfigSchema = zod.z.record(zod.z.string(), DisplayConfigKeysSchema);
|
|
650
672
|
const AgentCustomConfigSchema = zod.z.object({
|
|
651
|
-
displayConfig: DisplayConfigSchema.optional()
|
|
673
|
+
displayConfig: DisplayConfigSchema.optional(),
|
|
674
|
+
machineId: zod.z.string().optional(),
|
|
675
|
+
heartbeatTaskId: zod.z.string().optional()
|
|
652
676
|
});
|
|
653
677
|
const AgentPermissionsSchema = zod.z.object({
|
|
654
678
|
role: zod.z.string(),
|
|
@@ -659,6 +683,7 @@ const AgentPermissionsSchema = zod.z.object({
|
|
|
659
683
|
const AgentSchema = zod.z.object({
|
|
660
684
|
id: IdSchema,
|
|
661
685
|
name: zod.z.string(),
|
|
686
|
+
displayName: zod.z.string().nullable(),
|
|
662
687
|
type: AgentTypeSchema,
|
|
663
688
|
avatar: zod.z.string().nullable(),
|
|
664
689
|
userId: zod.z.string(),
|
|
@@ -695,6 +720,7 @@ const CreateAgentRequestSchema = zod.z.object({
|
|
|
695
720
|
const CreateAgentResponseSchema = AgentSchema;
|
|
696
721
|
const UpdateAgentRequestSchema = zod.z.object({
|
|
697
722
|
name: zod.z.string().min(1).optional(),
|
|
723
|
+
displayName: zod.z.string().nullable().optional(),
|
|
698
724
|
type: AgentTypeSchema.optional(),
|
|
699
725
|
avatar: zod.z.string().nullable().optional(),
|
|
700
726
|
description: zod.z.string().nullable().optional(),
|
|
@@ -1229,7 +1255,7 @@ const AskUserResponseMessageSchema = zod.z.object({
|
|
|
1229
1255
|
const TaskAgentInfoSchema = zod.z.object({
|
|
1230
1256
|
id: zod.z.string(),
|
|
1231
1257
|
name: zod.z.string(),
|
|
1232
|
-
type:
|
|
1258
|
+
type: AgentTypeSchema.optional().default("claude"),
|
|
1233
1259
|
description: zod.z.string().optional()
|
|
1234
1260
|
});
|
|
1235
1261
|
function isAskUserMessage(message) {
|
|
@@ -1238,8 +1264,14 @@ function isAskUserMessage(message) {
|
|
|
1238
1264
|
function isAskUserResponseMessage(message) {
|
|
1239
1265
|
return typeof message === "object" && message !== null && "type" in message && message.type === "ask_user_response";
|
|
1240
1266
|
}
|
|
1267
|
+
function isCompanionHeartbeatMessage(message) {
|
|
1268
|
+
return typeof message === "object" && message !== null && "type" in message && message.type === "companion_heartbeat";
|
|
1269
|
+
}
|
|
1270
|
+
function isCompanionReminderMessage(message) {
|
|
1271
|
+
return typeof message === "object" && message !== null && "type" in message && message.type === "companion_reminder";
|
|
1272
|
+
}
|
|
1241
1273
|
function isSDKMessage(message) {
|
|
1242
|
-
return typeof message === "object" && message !== null && "type" in message && message.type !== "ask_user" && message.type !== "ask_user_response";
|
|
1274
|
+
return typeof message === "object" && message !== null && "type" in message && message.type !== "ask_user" && message.type !== "ask_user_response" && message.type !== "companion_heartbeat" && message.type !== "companion_reminder";
|
|
1243
1275
|
}
|
|
1244
1276
|
function isSDKUserMessage(message) {
|
|
1245
1277
|
return isSDKMessage(message) && message.type === "user";
|
|
@@ -1376,8 +1408,8 @@ const baseTaskSchema = EventBaseSchema.extend({
|
|
|
1376
1408
|
// Agents available for this task
|
|
1377
1409
|
todos: zod.z.array(TaskTodoSchema).optional(),
|
|
1378
1410
|
// Structured todos for group tasks
|
|
1379
|
-
taskType: zod.z.enum(["chat", "work"]).optional().default("work"),
|
|
1380
|
-
// Task type: 'chat' for main chat, 'work' for task execution
|
|
1411
|
+
taskType: zod.z.enum(["chat", "work", "shadow"]).optional().default("work"),
|
|
1412
|
+
// Task type: 'chat' for main chat, 'work' for task execution, 'shadow' for companion shadow
|
|
1381
1413
|
customTitle: zod.z.string().min(1).max(200).optional()
|
|
1382
1414
|
// Custom task title (set by user/tool)
|
|
1383
1415
|
});
|
|
@@ -1452,6 +1484,8 @@ const TaskMessageSchema = EventBaseSchema.extend({
|
|
|
1452
1484
|
message: "Invalid TaskMessagePayload format"
|
|
1453
1485
|
}
|
|
1454
1486
|
).optional(),
|
|
1487
|
+
messageType: zod.z.string().optional(),
|
|
1488
|
+
// Message type metadata (for encrypted payload routing)
|
|
1455
1489
|
encryptedMessage: zod.z.string().optional(),
|
|
1456
1490
|
// base64 sealed-box payload (local mode)
|
|
1457
1491
|
// Multi-agent collaboration fields
|
|
@@ -1623,6 +1657,8 @@ const SubTaskResultUpdatedEventSchema = EventBaseSchema.extend({
|
|
|
1623
1657
|
result: zod.z.string(),
|
|
1624
1658
|
is_error: zod.z.boolean().optional()
|
|
1625
1659
|
}),
|
|
1660
|
+
encryptedResultMessage: zod.z.string().optional(),
|
|
1661
|
+
// Encrypted result payload for E2E forwarding
|
|
1626
1662
|
// Optional artifacts summary (for displaying in parent task chat)
|
|
1627
1663
|
artifacts: TaskArtifactsSummarySchema.optional()
|
|
1628
1664
|
});
|
|
@@ -1681,6 +1717,15 @@ const AssociateRepoEventDataSchema = EventBaseSchema.extend({
|
|
|
1681
1717
|
remoteUrl: zod.z.string()
|
|
1682
1718
|
// Original URL for logging
|
|
1683
1719
|
});
|
|
1720
|
+
const UpdateAgentInfoEventSchema = EventBaseSchema.extend({
|
|
1721
|
+
taskId: zod.z.string(),
|
|
1722
|
+
agentId: zod.z.string(),
|
|
1723
|
+
displayName: zod.z.string().optional(),
|
|
1724
|
+
avatar: zod.z.string().optional(),
|
|
1725
|
+
// emoji or URL (fileId)
|
|
1726
|
+
signature: zod.z.string().optional()
|
|
1727
|
+
// status line / tagline
|
|
1728
|
+
});
|
|
1684
1729
|
const IdOnlySchema = zod.z.object({
|
|
1685
1730
|
id: zod.z.string()
|
|
1686
1731
|
});
|
|
@@ -1705,6 +1750,7 @@ const SystemMessageSchema = EventBaseSchema.extend({
|
|
|
1705
1750
|
"repo-removed",
|
|
1706
1751
|
"pr-state-changed",
|
|
1707
1752
|
"draft-agent-added",
|
|
1753
|
+
"agent-updated",
|
|
1708
1754
|
"task-added"
|
|
1709
1755
|
]),
|
|
1710
1756
|
data: zod.z.union([
|
|
@@ -1722,6 +1768,8 @@ const SystemMessageSchema = EventBaseSchema.extend({
|
|
|
1722
1768
|
// pr-state-changed
|
|
1723
1769
|
DraftAgentSchema,
|
|
1724
1770
|
// draft-agent-added
|
|
1771
|
+
AgentSchema,
|
|
1772
|
+
// agent-updated
|
|
1725
1773
|
TaskItemSchema
|
|
1726
1774
|
// task-added
|
|
1727
1775
|
]),
|
|
@@ -1753,6 +1801,20 @@ const DaemonGitlabResponseSchema = EventBaseSchema.extend({
|
|
|
1753
1801
|
machineId: zod.z.string(),
|
|
1754
1802
|
executionTimeMs: zod.z.number()
|
|
1755
1803
|
});
|
|
1804
|
+
const CompanionHeartbeatRequestSchema = EventBaseSchema.extend({
|
|
1805
|
+
machineId: zod.z.string(),
|
|
1806
|
+
agentId: zod.z.string(),
|
|
1807
|
+
chatId: zod.z.string(),
|
|
1808
|
+
userId: zod.z.string(),
|
|
1809
|
+
timestamp: zod.z.string()
|
|
1810
|
+
});
|
|
1811
|
+
const CompanionHeartbeatResponseSchema = EventBaseSchema.extend({
|
|
1812
|
+
taskId: zod.z.string(),
|
|
1813
|
+
chatId: zod.z.string()
|
|
1814
|
+
});
|
|
1815
|
+
const ResetTaskSessionSchema = EventBaseSchema.extend({
|
|
1816
|
+
taskId: zod.z.string()
|
|
1817
|
+
});
|
|
1756
1818
|
const EventSchemaMap = {
|
|
1757
1819
|
// App events
|
|
1758
1820
|
"app-alive": AppAliveEventSchema,
|
|
@@ -1793,6 +1855,8 @@ const EventSchemaMap = {
|
|
|
1793
1855
|
"sub-task-result-updated": SubTaskResultUpdatedEventSchema,
|
|
1794
1856
|
// Repository association events
|
|
1795
1857
|
"associate-repo": AssociateRepoEventDataSchema,
|
|
1858
|
+
// Agent info update events
|
|
1859
|
+
"update-agent-info": UpdateAgentInfoEventSchema,
|
|
1796
1860
|
// System message events
|
|
1797
1861
|
"system-message": SystemMessageSchema,
|
|
1798
1862
|
// Billing events
|
|
@@ -1811,6 +1875,10 @@ const EventSchemaMap = {
|
|
|
1811
1875
|
// Daemon GitLab proxy events
|
|
1812
1876
|
"daemon-gitlab-request": DaemonGitlabRequestSchema,
|
|
1813
1877
|
"daemon-gitlab-response": DaemonGitlabResponseSchema,
|
|
1878
|
+
// Companion heartbeat events
|
|
1879
|
+
"request-companion-heartbeat": CompanionHeartbeatRequestSchema,
|
|
1880
|
+
"companion-heartbeat-response": CompanionHeartbeatResponseSchema,
|
|
1881
|
+
"reset-task-session": ResetTaskSessionSchema,
|
|
1814
1882
|
// Ack events
|
|
1815
1883
|
"event-ack": EventAckSchema
|
|
1816
1884
|
};
|
|
@@ -1822,9 +1890,11 @@ const workerTaskEvents = [
|
|
|
1822
1890
|
"worker-exit",
|
|
1823
1891
|
"change-task-title",
|
|
1824
1892
|
"update-task-agent-session-id",
|
|
1893
|
+
"reset-task-session",
|
|
1825
1894
|
"merge-request",
|
|
1826
1895
|
"merge-pr",
|
|
1827
|
-
"associate-repo"
|
|
1896
|
+
"associate-repo",
|
|
1897
|
+
"update-agent-info"
|
|
1828
1898
|
];
|
|
1829
1899
|
|
|
1830
1900
|
function userAuth(token) {
|
|
@@ -2116,10 +2186,51 @@ async function loadSystemPrompt(claudeDir, promptFile) {
|
|
|
2116
2186
|
);
|
|
2117
2187
|
}
|
|
2118
2188
|
}
|
|
2119
|
-
function replacePromptPlaceholders(template, cwd) {
|
|
2120
|
-
|
|
2189
|
+
function replacePromptPlaceholders(template, cwd, extra) {
|
|
2190
|
+
const vars = {
|
|
2191
|
+
WORKING_DIR: cwd,
|
|
2192
|
+
PLATFORM: process.platform,
|
|
2193
|
+
OS_VERSION: `${os__namespace.type()} ${os__namespace.release()}`,
|
|
2194
|
+
DATE: (/* @__PURE__ */ new Date()).toISOString().split("T")[0],
|
|
2195
|
+
...extra
|
|
2196
|
+
};
|
|
2197
|
+
let result = template.replace(
|
|
2198
|
+
/\{\{#if\s+(\w+)\s*(==|!=)\s*(\w+)\}\}([\s\S]*?)\{\{\/if\}\}/g,
|
|
2199
|
+
(_match, key, op, expected, content) => {
|
|
2200
|
+
const actual = vars[key] ?? "";
|
|
2201
|
+
const matches = op === "==" ? actual === expected : actual !== expected;
|
|
2202
|
+
return matches ? content : "";
|
|
2203
|
+
}
|
|
2204
|
+
);
|
|
2205
|
+
for (const [key, value] of Object.entries(vars)) {
|
|
2206
|
+
result = result.replace(new RegExp(`\\{\\{${key}\\}\\}`, "g"), value);
|
|
2207
|
+
}
|
|
2208
|
+
return result;
|
|
2121
2209
|
}
|
|
2122
2210
|
|
|
2211
|
+
const CompanionWorkspaceFileSchema = zod.z.object({
|
|
2212
|
+
name: zod.z.string(),
|
|
2213
|
+
path: zod.z.string(),
|
|
2214
|
+
// relative to workspace root
|
|
2215
|
+
size: zod.z.number(),
|
|
2216
|
+
modifiedAt: zod.z.number(),
|
|
2217
|
+
isDirectory: zod.z.boolean()
|
|
2218
|
+
});
|
|
2219
|
+
const RegisterCompanionRequestSchema = zod.z.object({
|
|
2220
|
+
machineId: zod.z.string().min(1)
|
|
2221
|
+
});
|
|
2222
|
+
const RegisterCompanionResponseSchema = zod.z.object({
|
|
2223
|
+
agentId: zod.z.string(),
|
|
2224
|
+
userId: zod.z.string(),
|
|
2225
|
+
chatId: zod.z.string(),
|
|
2226
|
+
created: zod.z.boolean()
|
|
2227
|
+
// true = newly created, false = already existed
|
|
2228
|
+
});
|
|
2229
|
+
const CompanionEnsureResponseSchema = zod.z.object({
|
|
2230
|
+
agentDir: zod.z.string(),
|
|
2231
|
+
workspaceDir: zod.z.string()
|
|
2232
|
+
});
|
|
2233
|
+
|
|
2123
2234
|
const cryptoModule = typeof globalThis.crypto !== "undefined" ? globalThis.crypto : (async () => {
|
|
2124
2235
|
try {
|
|
2125
2236
|
const nodeCrypto = await import('node:crypto');
|
|
@@ -2754,6 +2865,10 @@ exports.CloudJoinResultQuerySchema = CloudJoinResultQuerySchema;
|
|
|
2754
2865
|
exports.CloudJoinStatusQuerySchema = CloudJoinStatusQuerySchema;
|
|
2755
2866
|
exports.CloudMachineSchema = CloudMachineSchema;
|
|
2756
2867
|
exports.CloudSchema = CloudSchema;
|
|
2868
|
+
exports.CompanionEnsureResponseSchema = CompanionEnsureResponseSchema;
|
|
2869
|
+
exports.CompanionHeartbeatRequestSchema = CompanionHeartbeatRequestSchema;
|
|
2870
|
+
exports.CompanionHeartbeatResponseSchema = CompanionHeartbeatResponseSchema;
|
|
2871
|
+
exports.CompanionWorkspaceFileSchema = CompanionWorkspaceFileSchema;
|
|
2757
2872
|
exports.ConfirmUploadRequestSchema = ConfirmUploadRequestSchema;
|
|
2758
2873
|
exports.ConfirmUploadResponseSchema = ConfirmUploadResponseSchema;
|
|
2759
2874
|
exports.ConsumeTransactionSchema = ConsumeTransactionSchema;
|
|
@@ -2831,6 +2946,8 @@ exports.ListOAuthServersQuerySchema = ListOAuthServersQuerySchema;
|
|
|
2831
2946
|
exports.ListOAuthServersResponseSchema = ListOAuthServersResponseSchema;
|
|
2832
2947
|
exports.ListPackagesQuerySchema = ListPackagesQuerySchema;
|
|
2833
2948
|
exports.ListPackagesResponseSchema = ListPackagesResponseSchema;
|
|
2949
|
+
exports.ListRecentTasksRequestSchema = ListRecentTasksRequestSchema;
|
|
2950
|
+
exports.ListRecentTasksResponseSchema = ListRecentTasksResponseSchema;
|
|
2834
2951
|
exports.ListRepositoriesResponseSchema = ListRepositoriesResponseSchema;
|
|
2835
2952
|
exports.ListSubTasksRequestSchema = ListSubTasksRequestSchema;
|
|
2836
2953
|
exports.ListSubTasksResponseSchema = ListSubTasksResponseSchema;
|
|
@@ -2874,11 +2991,15 @@ exports.PublishDraftAgentResponseSchema = PublishDraftAgentResponseSchema;
|
|
|
2874
2991
|
exports.QueryEventsRequestSchema = QueryEventsRequestSchema;
|
|
2875
2992
|
exports.RELEVANT_DEPENDENCIES = RELEVANT_DEPENDENCIES;
|
|
2876
2993
|
exports.RTC_CHUNK_HEADER_SIZE = RTC_CHUNK_HEADER_SIZE;
|
|
2994
|
+
exports.RecentTaskSummarySchema = RecentTaskSummarySchema;
|
|
2877
2995
|
exports.RechargeResponseSchema = RechargeResponseSchema;
|
|
2996
|
+
exports.RegisterCompanionRequestSchema = RegisterCompanionRequestSchema;
|
|
2997
|
+
exports.RegisterCompanionResponseSchema = RegisterCompanionResponseSchema;
|
|
2878
2998
|
exports.RemoveChatMemberRequestSchema = RemoveChatMemberRequestSchema;
|
|
2879
2999
|
exports.RepositorySchema = RepositorySchema;
|
|
2880
3000
|
exports.ResetSecretRequestSchema = ResetSecretRequestSchema;
|
|
2881
3001
|
exports.ResetSecretResponseSchema = ResetSecretResponseSchema;
|
|
3002
|
+
exports.ResetTaskSessionSchema = ResetTaskSessionSchema;
|
|
2882
3003
|
exports.ResumeTaskRequestSchema = ResumeTaskRequestSchema;
|
|
2883
3004
|
exports.ResumeTaskResponseSchema = ResumeTaskResponseSchema;
|
|
2884
3005
|
exports.RpcCallEventSchema = RpcCallEventSchema;
|
|
@@ -2930,6 +3051,7 @@ exports.ToggleOAuthServerResponseSchema = ToggleOAuthServerResponseSchema;
|
|
|
2930
3051
|
exports.TransactionSchema = TransactionSchema;
|
|
2931
3052
|
exports.UnarchiveTaskRequestSchema = UnarchiveTaskRequestSchema;
|
|
2932
3053
|
exports.UnarchiveTaskResponseSchema = UnarchiveTaskResponseSchema;
|
|
3054
|
+
exports.UpdateAgentInfoEventSchema = UpdateAgentInfoEventSchema;
|
|
2933
3055
|
exports.UpdateAgentRequestSchema = UpdateAgentRequestSchema;
|
|
2934
3056
|
exports.UpdateAgentResponseSchema = UpdateAgentResponseSchema;
|
|
2935
3057
|
exports.UpdateChatContextRequestSchema = UpdateChatContextRequestSchema;
|
|
@@ -2992,6 +3114,8 @@ exports.getAgentContext = getAgentContext;
|
|
|
2992
3114
|
exports.getRandomBytes = getRandomBytes;
|
|
2993
3115
|
exports.isAskUserMessage = isAskUserMessage;
|
|
2994
3116
|
exports.isAskUserResponseMessage = isAskUserResponseMessage;
|
|
3117
|
+
exports.isCompanionHeartbeatMessage = isCompanionHeartbeatMessage;
|
|
3118
|
+
exports.isCompanionReminderMessage = isCompanionReminderMessage;
|
|
2995
3119
|
exports.isSDKMessage = isSDKMessage;
|
|
2996
3120
|
exports.isSDKUserMessage = isSDKUserMessage;
|
|
2997
3121
|
exports.loadAgentConfig = loadAgentConfig;
|
package/dist/index.d.cts
CHANGED
|
@@ -53,9 +53,9 @@ declare const FileStatsSchema: z.ZodObject<{
|
|
|
53
53
|
}, z.core.$strip>;
|
|
54
54
|
type FileStats = z.infer<typeof FileStatsSchema>;
|
|
55
55
|
declare const SenderTypeSchema: z.ZodEnum<{
|
|
56
|
+
agent: "agent";
|
|
56
57
|
human: "human";
|
|
57
58
|
system: "system";
|
|
58
|
-
agent: "agent";
|
|
59
59
|
}>;
|
|
60
60
|
type SenderType = z.infer<typeof SenderTypeSchema>;
|
|
61
61
|
|
|
@@ -493,6 +493,7 @@ declare const TaskItemSchema: z.ZodObject<{
|
|
|
493
493
|
type: z.ZodDefault<z.ZodEnum<{
|
|
494
494
|
chat: "chat";
|
|
495
495
|
work: "work";
|
|
496
|
+
shadow: "shadow";
|
|
496
497
|
}>>;
|
|
497
498
|
chatId: z.ZodString;
|
|
498
499
|
userId: z.ZodString;
|
|
@@ -564,6 +565,7 @@ declare const ListTasksResponseSchema: z.ZodObject<{
|
|
|
564
565
|
type: z.ZodDefault<z.ZodEnum<{
|
|
565
566
|
chat: "chat";
|
|
566
567
|
work: "work";
|
|
568
|
+
shadow: "shadow";
|
|
567
569
|
}>>;
|
|
568
570
|
chatId: z.ZodString;
|
|
569
571
|
userId: z.ZodString;
|
|
@@ -863,6 +865,7 @@ declare const ArchiveTaskResponseSchema: z.ZodObject<{
|
|
|
863
865
|
type: z.ZodDefault<z.ZodEnum<{
|
|
864
866
|
chat: "chat";
|
|
865
867
|
work: "work";
|
|
868
|
+
shadow: "shadow";
|
|
866
869
|
}>>;
|
|
867
870
|
chatId: z.ZodString;
|
|
868
871
|
userId: z.ZodString;
|
|
@@ -931,6 +934,7 @@ declare const UnarchiveTaskResponseSchema: z.ZodObject<{
|
|
|
931
934
|
type: z.ZodDefault<z.ZodEnum<{
|
|
932
935
|
chat: "chat";
|
|
933
936
|
work: "work";
|
|
937
|
+
shadow: "shadow";
|
|
934
938
|
}>>;
|
|
935
939
|
chatId: z.ZodString;
|
|
936
940
|
userId: z.ZodString;
|
|
@@ -1001,6 +1005,7 @@ declare const UpdateTaskTitleResponseSchema: z.ZodObject<{
|
|
|
1001
1005
|
type: z.ZodDefault<z.ZodEnum<{
|
|
1002
1006
|
chat: "chat";
|
|
1003
1007
|
work: "work";
|
|
1008
|
+
shadow: "shadow";
|
|
1004
1009
|
}>>;
|
|
1005
1010
|
chatId: z.ZodString;
|
|
1006
1011
|
userId: z.ZodString;
|
|
@@ -1071,14 +1076,14 @@ type SendMessageTarget = 'agent' | 'user';
|
|
|
1071
1076
|
declare const SendTaskMessageRequestSchema: z.ZodObject<{
|
|
1072
1077
|
message: z.ZodCustom<SDKUserMessage | SDKAssistantMessage, SDKUserMessage | SDKAssistantMessage>;
|
|
1073
1078
|
target: z.ZodEnum<{
|
|
1074
|
-
agent: "agent";
|
|
1075
1079
|
user: "user";
|
|
1080
|
+
agent: "agent";
|
|
1076
1081
|
}>;
|
|
1077
1082
|
fromTaskId: z.ZodOptional<z.ZodString>;
|
|
1078
1083
|
senderType: z.ZodEnum<{
|
|
1084
|
+
agent: "agent";
|
|
1079
1085
|
human: "human";
|
|
1080
1086
|
system: "system";
|
|
1081
|
-
agent: "agent";
|
|
1082
1087
|
}>;
|
|
1083
1088
|
senderId: z.ZodString;
|
|
1084
1089
|
senderName: z.ZodString;
|
|
@@ -1144,6 +1149,59 @@ declare const ListSubTasksResponseSchema: z.ZodObject<{
|
|
|
1144
1149
|
}, z.core.$strip>>;
|
|
1145
1150
|
}, z.core.$strip>;
|
|
1146
1151
|
type ListSubTasksResponse = z.infer<typeof ListSubTasksResponseSchema>;
|
|
1152
|
+
/**
|
|
1153
|
+
* GET /v1/tasks/recent - Query parameters schema
|
|
1154
|
+
* Lists recent tasks in a chat for agent consumption (lightweight summary)
|
|
1155
|
+
*/
|
|
1156
|
+
declare const ListRecentTasksRequestSchema: z.ZodObject<{
|
|
1157
|
+
chatId: z.ZodString;
|
|
1158
|
+
limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
1159
|
+
status: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
1160
|
+
all: "all";
|
|
1161
|
+
active: "active";
|
|
1162
|
+
completed: "completed";
|
|
1163
|
+
}>>>;
|
|
1164
|
+
}, z.core.$strip>;
|
|
1165
|
+
type ListRecentTasksRequest = z.infer<typeof ListRecentTasksRequestSchema>;
|
|
1166
|
+
/**
|
|
1167
|
+
* Recent task summary schema (lightweight, for agent review)
|
|
1168
|
+
*/
|
|
1169
|
+
declare const RecentTaskSummarySchema: z.ZodObject<{
|
|
1170
|
+
taskId: z.ZodString;
|
|
1171
|
+
type: z.ZodEnum<{
|
|
1172
|
+
chat: "chat";
|
|
1173
|
+
work: "work";
|
|
1174
|
+
shadow: "shadow";
|
|
1175
|
+
}>;
|
|
1176
|
+
state: z.ZodString;
|
|
1177
|
+
agentId: z.ZodString;
|
|
1178
|
+
title: z.ZodNullable<z.ZodString>;
|
|
1179
|
+
totalDuration: z.ZodNullable<z.ZodNumber>;
|
|
1180
|
+
createdAt: z.ZodString;
|
|
1181
|
+
updatedAt: z.ZodString;
|
|
1182
|
+
}, z.core.$strip>;
|
|
1183
|
+
type RecentTaskSummary = z.infer<typeof RecentTaskSummarySchema>;
|
|
1184
|
+
/**
|
|
1185
|
+
* GET /v1/tasks/recent - Response schema
|
|
1186
|
+
*/
|
|
1187
|
+
declare const ListRecentTasksResponseSchema: z.ZodObject<{
|
|
1188
|
+
tasks: z.ZodArray<z.ZodObject<{
|
|
1189
|
+
taskId: z.ZodString;
|
|
1190
|
+
type: z.ZodEnum<{
|
|
1191
|
+
chat: "chat";
|
|
1192
|
+
work: "work";
|
|
1193
|
+
shadow: "shadow";
|
|
1194
|
+
}>;
|
|
1195
|
+
state: z.ZodString;
|
|
1196
|
+
agentId: z.ZodString;
|
|
1197
|
+
title: z.ZodNullable<z.ZodString>;
|
|
1198
|
+
totalDuration: z.ZodNullable<z.ZodNumber>;
|
|
1199
|
+
createdAt: z.ZodString;
|
|
1200
|
+
updatedAt: z.ZodString;
|
|
1201
|
+
}, z.core.$strip>>;
|
|
1202
|
+
hasMore: z.ZodBoolean;
|
|
1203
|
+
}, z.core.$strip>;
|
|
1204
|
+
type ListRecentTasksResponse = z.infer<typeof ListRecentTasksResponseSchema>;
|
|
1147
1205
|
/**
|
|
1148
1206
|
* GET /v1/tasks/find-by-agent - Query parameters schema
|
|
1149
1207
|
* Finds a task by parentTaskId and agentId
|
|
@@ -1174,8 +1232,8 @@ declare const ChatMemberSchema: z.ZodObject<{
|
|
|
1174
1232
|
chatId: z.ZodString;
|
|
1175
1233
|
memberCode: z.ZodString;
|
|
1176
1234
|
type: z.ZodEnum<{
|
|
1177
|
-
human: "human";
|
|
1178
1235
|
agent: "agent";
|
|
1236
|
+
human: "human";
|
|
1179
1237
|
}>;
|
|
1180
1238
|
role: z.ZodString;
|
|
1181
1239
|
createdAt: z.ZodString;
|
|
@@ -1231,8 +1289,8 @@ declare const ChatWithMembersSchema: z.ZodObject<{
|
|
|
1231
1289
|
chatId: z.ZodString;
|
|
1232
1290
|
memberCode: z.ZodString;
|
|
1233
1291
|
type: z.ZodEnum<{
|
|
1234
|
-
human: "human";
|
|
1235
1292
|
agent: "agent";
|
|
1293
|
+
human: "human";
|
|
1236
1294
|
}>;
|
|
1237
1295
|
role: z.ZodString;
|
|
1238
1296
|
createdAt: z.ZodString;
|
|
@@ -1246,8 +1304,8 @@ type ChatWithMembers = z.infer<typeof ChatWithMembersSchema>;
|
|
|
1246
1304
|
declare const ChatMemberInputSchema: z.ZodObject<{
|
|
1247
1305
|
memberCode: z.ZodString;
|
|
1248
1306
|
type: z.ZodEnum<{
|
|
1249
|
-
human: "human";
|
|
1250
1307
|
agent: "agent";
|
|
1308
|
+
human: "human";
|
|
1251
1309
|
}>;
|
|
1252
1310
|
}, z.core.$strip>;
|
|
1253
1311
|
type ChatMemberInput = z.infer<typeof ChatMemberInputSchema>;
|
|
@@ -1262,10 +1320,12 @@ declare const CreateChatRequestSchema: z.ZodObject<{
|
|
|
1262
1320
|
members: z.ZodArray<z.ZodObject<{
|
|
1263
1321
|
memberCode: z.ZodString;
|
|
1264
1322
|
type: z.ZodEnum<{
|
|
1265
|
-
human: "human";
|
|
1266
1323
|
agent: "agent";
|
|
1324
|
+
human: "human";
|
|
1267
1325
|
}>;
|
|
1268
1326
|
}, z.core.$strip>>;
|
|
1327
|
+
dataEncryptionKey: z.ZodOptional<z.ZodString>;
|
|
1328
|
+
ownerEncryptedDataKey: z.ZodOptional<z.ZodString>;
|
|
1269
1329
|
}, z.core.$strip>;
|
|
1270
1330
|
type CreateChatRequest = z.infer<typeof CreateChatRequestSchema>;
|
|
1271
1331
|
/**
|
|
@@ -1290,8 +1350,8 @@ declare const CreateChatResponseSchema: z.ZodObject<{
|
|
|
1290
1350
|
chatId: z.ZodString;
|
|
1291
1351
|
memberCode: z.ZodString;
|
|
1292
1352
|
type: z.ZodEnum<{
|
|
1293
|
-
human: "human";
|
|
1294
1353
|
agent: "agent";
|
|
1354
|
+
human: "human";
|
|
1295
1355
|
}>;
|
|
1296
1356
|
role: z.ZodString;
|
|
1297
1357
|
createdAt: z.ZodString;
|
|
@@ -1331,8 +1391,8 @@ declare const ListChatsResponseSchema: z.ZodObject<{
|
|
|
1331
1391
|
chatId: z.ZodString;
|
|
1332
1392
|
memberCode: z.ZodString;
|
|
1333
1393
|
type: z.ZodEnum<{
|
|
1334
|
-
human: "human";
|
|
1335
1394
|
agent: "agent";
|
|
1395
|
+
human: "human";
|
|
1336
1396
|
}>;
|
|
1337
1397
|
role: z.ZodString;
|
|
1338
1398
|
createdAt: z.ZodString;
|
|
@@ -1364,8 +1424,8 @@ declare const GetChatResponseSchema: z.ZodObject<{
|
|
|
1364
1424
|
chatId: z.ZodString;
|
|
1365
1425
|
memberCode: z.ZodString;
|
|
1366
1426
|
type: z.ZodEnum<{
|
|
1367
|
-
human: "human";
|
|
1368
1427
|
agent: "agent";
|
|
1428
|
+
human: "human";
|
|
1369
1429
|
}>;
|
|
1370
1430
|
role: z.ZodString;
|
|
1371
1431
|
createdAt: z.ZodString;
|
|
@@ -1382,8 +1442,8 @@ declare const ListChatMembersResponseSchema: z.ZodObject<{
|
|
|
1382
1442
|
chatId: z.ZodString;
|
|
1383
1443
|
memberCode: z.ZodString;
|
|
1384
1444
|
type: z.ZodEnum<{
|
|
1385
|
-
human: "human";
|
|
1386
1445
|
agent: "agent";
|
|
1446
|
+
human: "human";
|
|
1387
1447
|
}>;
|
|
1388
1448
|
role: z.ZodString;
|
|
1389
1449
|
createdAt: z.ZodString;
|
|
@@ -1399,8 +1459,8 @@ declare const AddChatMemberRequestSchema: z.ZodObject<{
|
|
|
1399
1459
|
members: z.ZodArray<z.ZodObject<{
|
|
1400
1460
|
memberCode: z.ZodString;
|
|
1401
1461
|
type: z.ZodEnum<{
|
|
1402
|
-
human: "human";
|
|
1403
1462
|
agent: "agent";
|
|
1463
|
+
human: "human";
|
|
1404
1464
|
}>;
|
|
1405
1465
|
}, z.core.$strip>>;
|
|
1406
1466
|
}, z.core.$strip>;
|
|
@@ -1414,8 +1474,8 @@ declare const AddChatMemberResponseSchema: z.ZodObject<{
|
|
|
1414
1474
|
chatId: z.ZodString;
|
|
1415
1475
|
memberCode: z.ZodString;
|
|
1416
1476
|
type: z.ZodEnum<{
|
|
1417
|
-
human: "human";
|
|
1418
1477
|
agent: "agent";
|
|
1478
|
+
human: "human";
|
|
1419
1479
|
}>;
|
|
1420
1480
|
role: z.ZodString;
|
|
1421
1481
|
createdAt: z.ZodString;
|
|
@@ -1431,8 +1491,8 @@ declare const RemoveChatMemberRequestSchema: z.ZodObject<{
|
|
|
1431
1491
|
members: z.ZodArray<z.ZodObject<{
|
|
1432
1492
|
memberCode: z.ZodString;
|
|
1433
1493
|
type: z.ZodEnum<{
|
|
1434
|
-
human: "human";
|
|
1435
1494
|
agent: "agent";
|
|
1495
|
+
human: "human";
|
|
1436
1496
|
}>;
|
|
1437
1497
|
}, z.core.$strip>>;
|
|
1438
1498
|
}, z.core.$strip>;
|
|
@@ -1449,6 +1509,7 @@ declare const ListChatTasksResponseSchema: z.ZodObject<{
|
|
|
1449
1509
|
type: z.ZodDefault<z.ZodEnum<{
|
|
1450
1510
|
chat: "chat";
|
|
1451
1511
|
work: "work";
|
|
1512
|
+
shadow: "shadow";
|
|
1452
1513
|
}>>;
|
|
1453
1514
|
chatId: z.ZodString;
|
|
1454
1515
|
userId: z.ZodString;
|
|
@@ -1544,6 +1605,7 @@ type UpdateChatContextResponse = z.infer<typeof UpdateChatContextResponseSchema>
|
|
|
1544
1605
|
declare const AgentTypeSchema: z.ZodEnum<{
|
|
1545
1606
|
claude: "claude";
|
|
1546
1607
|
codex: "codex";
|
|
1608
|
+
companion: "companion";
|
|
1547
1609
|
}>;
|
|
1548
1610
|
type AgentType = z.infer<typeof AgentTypeSchema>;
|
|
1549
1611
|
/**
|
|
@@ -1618,6 +1680,8 @@ declare const AgentCustomConfigSchema: z.ZodObject<{
|
|
|
1618
1680
|
permissionCanMergePr: z.ZodOptional<z.ZodString>;
|
|
1619
1681
|
permissionCanMergePrDesc: z.ZodOptional<z.ZodString>;
|
|
1620
1682
|
}, z.core.$strip>>>;
|
|
1683
|
+
machineId: z.ZodOptional<z.ZodString>;
|
|
1684
|
+
heartbeatTaskId: z.ZodOptional<z.ZodString>;
|
|
1621
1685
|
}, z.core.$strip>;
|
|
1622
1686
|
type AgentCustomConfig = z.infer<typeof AgentCustomConfigSchema>;
|
|
1623
1687
|
/**
|
|
@@ -1631,9 +1695,11 @@ type AgentPermissions = z.infer<typeof AgentPermissionsSchema>;
|
|
|
1631
1695
|
declare const AgentSchema: z.ZodObject<{
|
|
1632
1696
|
id: z.ZodString;
|
|
1633
1697
|
name: z.ZodString;
|
|
1698
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
1634
1699
|
type: z.ZodEnum<{
|
|
1635
1700
|
claude: "claude";
|
|
1636
1701
|
codex: "codex";
|
|
1702
|
+
companion: "companion";
|
|
1637
1703
|
}>;
|
|
1638
1704
|
avatar: z.ZodNullable<z.ZodString>;
|
|
1639
1705
|
userId: z.ZodString;
|
|
@@ -1666,6 +1732,8 @@ declare const AgentSchema: z.ZodObject<{
|
|
|
1666
1732
|
permissionCanMergePr: z.ZodOptional<z.ZodString>;
|
|
1667
1733
|
permissionCanMergePrDesc: z.ZodOptional<z.ZodString>;
|
|
1668
1734
|
}, z.core.$strip>>>;
|
|
1735
|
+
machineId: z.ZodOptional<z.ZodString>;
|
|
1736
|
+
heartbeatTaskId: z.ZodOptional<z.ZodString>;
|
|
1669
1737
|
}, z.core.$strip>>;
|
|
1670
1738
|
permissions: z.ZodNullable<z.ZodObject<{
|
|
1671
1739
|
role: z.ZodString;
|
|
@@ -1680,9 +1748,11 @@ declare const ListAgentsResponseSchema: z.ZodObject<{
|
|
|
1680
1748
|
agents: z.ZodArray<z.ZodObject<{
|
|
1681
1749
|
id: z.ZodString;
|
|
1682
1750
|
name: z.ZodString;
|
|
1751
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
1683
1752
|
type: z.ZodEnum<{
|
|
1684
1753
|
claude: "claude";
|
|
1685
1754
|
codex: "codex";
|
|
1755
|
+
companion: "companion";
|
|
1686
1756
|
}>;
|
|
1687
1757
|
avatar: z.ZodNullable<z.ZodString>;
|
|
1688
1758
|
userId: z.ZodString;
|
|
@@ -1715,6 +1785,8 @@ declare const ListAgentsResponseSchema: z.ZodObject<{
|
|
|
1715
1785
|
permissionCanMergePr: z.ZodOptional<z.ZodString>;
|
|
1716
1786
|
permissionCanMergePrDesc: z.ZodOptional<z.ZodString>;
|
|
1717
1787
|
}, z.core.$strip>>>;
|
|
1788
|
+
machineId: z.ZodOptional<z.ZodString>;
|
|
1789
|
+
heartbeatTaskId: z.ZodOptional<z.ZodString>;
|
|
1718
1790
|
}, z.core.$strip>>;
|
|
1719
1791
|
permissions: z.ZodNullable<z.ZodObject<{
|
|
1720
1792
|
role: z.ZodString;
|
|
@@ -1729,9 +1801,11 @@ type ListAgentsResponse = z.infer<typeof ListAgentsResponseSchema>;
|
|
|
1729
1801
|
declare const GetAgentResponseSchema: z.ZodObject<{
|
|
1730
1802
|
id: z.ZodString;
|
|
1731
1803
|
name: z.ZodString;
|
|
1804
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
1732
1805
|
type: z.ZodEnum<{
|
|
1733
1806
|
claude: "claude";
|
|
1734
1807
|
codex: "codex";
|
|
1808
|
+
companion: "companion";
|
|
1735
1809
|
}>;
|
|
1736
1810
|
avatar: z.ZodNullable<z.ZodString>;
|
|
1737
1811
|
userId: z.ZodString;
|
|
@@ -1764,6 +1838,8 @@ declare const GetAgentResponseSchema: z.ZodObject<{
|
|
|
1764
1838
|
permissionCanMergePr: z.ZodOptional<z.ZodString>;
|
|
1765
1839
|
permissionCanMergePrDesc: z.ZodOptional<z.ZodString>;
|
|
1766
1840
|
}, z.core.$strip>>>;
|
|
1841
|
+
machineId: z.ZodOptional<z.ZodString>;
|
|
1842
|
+
heartbeatTaskId: z.ZodOptional<z.ZodString>;
|
|
1767
1843
|
}, z.core.$strip>>;
|
|
1768
1844
|
permissions: z.ZodNullable<z.ZodObject<{
|
|
1769
1845
|
role: z.ZodString;
|
|
@@ -1779,6 +1855,7 @@ declare const CreateAgentRequestSchema: z.ZodObject<{
|
|
|
1779
1855
|
type: z.ZodEnum<{
|
|
1780
1856
|
claude: "claude";
|
|
1781
1857
|
codex: "codex";
|
|
1858
|
+
companion: "companion";
|
|
1782
1859
|
}>;
|
|
1783
1860
|
avatar: z.ZodOptional<z.ZodString>;
|
|
1784
1861
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -1807,6 +1884,8 @@ declare const CreateAgentRequestSchema: z.ZodObject<{
|
|
|
1807
1884
|
permissionCanMergePr: z.ZodOptional<z.ZodString>;
|
|
1808
1885
|
permissionCanMergePrDesc: z.ZodOptional<z.ZodString>;
|
|
1809
1886
|
}, z.core.$strip>>>;
|
|
1887
|
+
machineId: z.ZodOptional<z.ZodString>;
|
|
1888
|
+
heartbeatTaskId: z.ZodOptional<z.ZodString>;
|
|
1810
1889
|
}, z.core.$strip>>>;
|
|
1811
1890
|
isSystem: z.ZodOptional<z.ZodBoolean>;
|
|
1812
1891
|
}, z.core.$strip>;
|
|
@@ -1817,9 +1896,11 @@ type CreateAgentRequest = z.infer<typeof CreateAgentRequestSchema>;
|
|
|
1817
1896
|
declare const CreateAgentResponseSchema: z.ZodObject<{
|
|
1818
1897
|
id: z.ZodString;
|
|
1819
1898
|
name: z.ZodString;
|
|
1899
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
1820
1900
|
type: z.ZodEnum<{
|
|
1821
1901
|
claude: "claude";
|
|
1822
1902
|
codex: "codex";
|
|
1903
|
+
companion: "companion";
|
|
1823
1904
|
}>;
|
|
1824
1905
|
avatar: z.ZodNullable<z.ZodString>;
|
|
1825
1906
|
userId: z.ZodString;
|
|
@@ -1852,6 +1933,8 @@ declare const CreateAgentResponseSchema: z.ZodObject<{
|
|
|
1852
1933
|
permissionCanMergePr: z.ZodOptional<z.ZodString>;
|
|
1853
1934
|
permissionCanMergePrDesc: z.ZodOptional<z.ZodString>;
|
|
1854
1935
|
}, z.core.$strip>>>;
|
|
1936
|
+
machineId: z.ZodOptional<z.ZodString>;
|
|
1937
|
+
heartbeatTaskId: z.ZodOptional<z.ZodString>;
|
|
1855
1938
|
}, z.core.$strip>>;
|
|
1856
1939
|
permissions: z.ZodNullable<z.ZodObject<{
|
|
1857
1940
|
role: z.ZodString;
|
|
@@ -1864,9 +1947,11 @@ type CreateAgentResponse = z.infer<typeof CreateAgentResponseSchema>;
|
|
|
1864
1947
|
*/
|
|
1865
1948
|
declare const UpdateAgentRequestSchema: z.ZodObject<{
|
|
1866
1949
|
name: z.ZodOptional<z.ZodString>;
|
|
1950
|
+
displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1867
1951
|
type: z.ZodOptional<z.ZodEnum<{
|
|
1868
1952
|
claude: "claude";
|
|
1869
1953
|
codex: "codex";
|
|
1954
|
+
companion: "companion";
|
|
1870
1955
|
}>>;
|
|
1871
1956
|
avatar: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1872
1957
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1895,6 +1980,8 @@ declare const UpdateAgentRequestSchema: z.ZodObject<{
|
|
|
1895
1980
|
permissionCanMergePr: z.ZodOptional<z.ZodString>;
|
|
1896
1981
|
permissionCanMergePrDesc: z.ZodOptional<z.ZodString>;
|
|
1897
1982
|
}, z.core.$strip>>>;
|
|
1983
|
+
machineId: z.ZodOptional<z.ZodString>;
|
|
1984
|
+
heartbeatTaskId: z.ZodOptional<z.ZodString>;
|
|
1898
1985
|
}, z.core.$strip>>>;
|
|
1899
1986
|
}, z.core.$strip>;
|
|
1900
1987
|
type UpdateAgentRequest = z.infer<typeof UpdateAgentRequestSchema>;
|
|
@@ -1904,9 +1991,11 @@ type UpdateAgentRequest = z.infer<typeof UpdateAgentRequestSchema>;
|
|
|
1904
1991
|
declare const UpdateAgentResponseSchema: z.ZodObject<{
|
|
1905
1992
|
id: z.ZodString;
|
|
1906
1993
|
name: z.ZodString;
|
|
1994
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
1907
1995
|
type: z.ZodEnum<{
|
|
1908
1996
|
claude: "claude";
|
|
1909
1997
|
codex: "codex";
|
|
1998
|
+
companion: "companion";
|
|
1910
1999
|
}>;
|
|
1911
2000
|
avatar: z.ZodNullable<z.ZodString>;
|
|
1912
2001
|
userId: z.ZodString;
|
|
@@ -1939,6 +2028,8 @@ declare const UpdateAgentResponseSchema: z.ZodObject<{
|
|
|
1939
2028
|
permissionCanMergePr: z.ZodOptional<z.ZodString>;
|
|
1940
2029
|
permissionCanMergePrDesc: z.ZodOptional<z.ZodString>;
|
|
1941
2030
|
}, z.core.$strip>>>;
|
|
2031
|
+
machineId: z.ZodOptional<z.ZodString>;
|
|
2032
|
+
heartbeatTaskId: z.ZodOptional<z.ZodString>;
|
|
1942
2033
|
}, z.core.$strip>>;
|
|
1943
2034
|
permissions: z.ZodNullable<z.ZodObject<{
|
|
1944
2035
|
role: z.ZodString;
|
|
@@ -2021,6 +2112,7 @@ declare const CreateDraftAgentRequestSchema: z.ZodObject<{
|
|
|
2021
2112
|
type: z.ZodDefault<z.ZodEnum<{
|
|
2022
2113
|
claude: "claude";
|
|
2023
2114
|
codex: "codex";
|
|
2115
|
+
companion: "companion";
|
|
2024
2116
|
}>>;
|
|
2025
2117
|
avatar: z.ZodOptional<z.ZodString>;
|
|
2026
2118
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -2075,6 +2167,7 @@ declare const DraftAgentSchema: z.ZodObject<{
|
|
|
2075
2167
|
type: z.ZodEnum<{
|
|
2076
2168
|
claude: "claude";
|
|
2077
2169
|
codex: "codex";
|
|
2170
|
+
companion: "companion";
|
|
2078
2171
|
}>;
|
|
2079
2172
|
avatar: z.ZodNullable<z.ZodString>;
|
|
2080
2173
|
userId: z.ZodString;
|
|
@@ -2181,6 +2274,7 @@ declare const UpdateDraftAgentResponseSchema: z.ZodObject<{
|
|
|
2181
2274
|
type: z.ZodEnum<{
|
|
2182
2275
|
claude: "claude";
|
|
2183
2276
|
codex: "codex";
|
|
2277
|
+
companion: "companion";
|
|
2184
2278
|
}>;
|
|
2185
2279
|
avatar: z.ZodNullable<z.ZodString>;
|
|
2186
2280
|
userId: z.ZodString;
|
|
@@ -2239,9 +2333,11 @@ declare const GetUserAgentsResponseSchema: z.ZodObject<{
|
|
|
2239
2333
|
agents: z.ZodArray<z.ZodObject<{
|
|
2240
2334
|
id: z.ZodString;
|
|
2241
2335
|
name: z.ZodString;
|
|
2336
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
2242
2337
|
type: z.ZodEnum<{
|
|
2243
2338
|
claude: "claude";
|
|
2244
2339
|
codex: "codex";
|
|
2340
|
+
companion: "companion";
|
|
2245
2341
|
}>;
|
|
2246
2342
|
avatar: z.ZodNullable<z.ZodString>;
|
|
2247
2343
|
userId: z.ZodString;
|
|
@@ -2274,6 +2370,8 @@ declare const GetUserAgentsResponseSchema: z.ZodObject<{
|
|
|
2274
2370
|
permissionCanMergePr: z.ZodOptional<z.ZodString>;
|
|
2275
2371
|
permissionCanMergePrDesc: z.ZodOptional<z.ZodString>;
|
|
2276
2372
|
}, z.core.$strip>>>;
|
|
2373
|
+
machineId: z.ZodOptional<z.ZodString>;
|
|
2374
|
+
heartbeatTaskId: z.ZodOptional<z.ZodString>;
|
|
2277
2375
|
}, z.core.$strip>>;
|
|
2278
2376
|
permissions: z.ZodNullable<z.ZodObject<{
|
|
2279
2377
|
role: z.ZodString;
|
|
@@ -2288,6 +2386,7 @@ declare const GetUserAgentsResponseSchema: z.ZodObject<{
|
|
|
2288
2386
|
type: z.ZodEnum<{
|
|
2289
2387
|
claude: "claude";
|
|
2290
2388
|
codex: "codex";
|
|
2389
|
+
companion: "companion";
|
|
2291
2390
|
}>;
|
|
2292
2391
|
avatar: z.ZodNullable<z.ZodString>;
|
|
2293
2392
|
userId: z.ZodString;
|
|
@@ -3360,8 +3459,8 @@ declare const AskUserResponseStatusSchema: z.ZodEnum<{
|
|
|
3360
3459
|
timeout: "timeout";
|
|
3361
3460
|
}>;
|
|
3362
3461
|
declare const AskUserResponseReasonSchema: z.ZodEnum<{
|
|
3363
|
-
system: "system";
|
|
3364
3462
|
user: "user";
|
|
3463
|
+
system: "system";
|
|
3365
3464
|
timeout: "timeout";
|
|
3366
3465
|
}>;
|
|
3367
3466
|
type AskUserResponseStatus = z.infer<typeof AskUserResponseStatusSchema>;
|
|
@@ -3381,19 +3480,41 @@ declare const AskUserResponseMessageSchema: z.ZodObject<{
|
|
|
3381
3480
|
timeout: "timeout";
|
|
3382
3481
|
}>>;
|
|
3383
3482
|
reason: z.ZodOptional<z.ZodEnum<{
|
|
3384
|
-
system: "system";
|
|
3385
3483
|
user: "user";
|
|
3484
|
+
system: "system";
|
|
3386
3485
|
timeout: "timeout";
|
|
3387
3486
|
}>>;
|
|
3388
3487
|
}, z.core.$strip>;
|
|
3389
3488
|
type AskUserResponseMessage = z.infer<typeof AskUserResponseMessageSchema>;
|
|
3489
|
+
/**
|
|
3490
|
+
* Companion heartbeat message payload (System → Worker)
|
|
3491
|
+
* Sent by the platform scheduler to wake up companion for autonomous work
|
|
3492
|
+
*/
|
|
3493
|
+
interface CompanionHeartbeatMessage {
|
|
3494
|
+
type: 'companion_heartbeat';
|
|
3495
|
+
timestamp: string;
|
|
3496
|
+
}
|
|
3497
|
+
/**
|
|
3498
|
+
* Companion reminder message payload (Shadow → Main)
|
|
3499
|
+
* Sent by the heartbeat task (shadow) to remind the main companion worker.
|
|
3500
|
+
* Invisible to the user — only wakes up the main worker to act.
|
|
3501
|
+
* Keep content concise; use filePath for detailed analysis.
|
|
3502
|
+
*/
|
|
3503
|
+
interface CompanionReminderMessage {
|
|
3504
|
+
type: 'companion_reminder';
|
|
3505
|
+
content: string;
|
|
3506
|
+
filePath?: string;
|
|
3507
|
+
timestamp: string;
|
|
3508
|
+
}
|
|
3390
3509
|
/**
|
|
3391
3510
|
* Union type for task message payload
|
|
3392
3511
|
* - SDKMessage: Normal agent messages
|
|
3393
3512
|
* - AskUserMessage: Worker asking user questions
|
|
3394
3513
|
* - AskUserResponseMessage: User responding to questions
|
|
3514
|
+
* - CompanionHeartbeatMessage: Scheduled heartbeat to wake up companion
|
|
3515
|
+
* - CompanionReminderMessage: Shadow companion reminding main companion
|
|
3395
3516
|
*/
|
|
3396
|
-
type TaskMessagePayload = SDKMessage | AskUserMessage | AskUserResponseMessage;
|
|
3517
|
+
type TaskMessagePayload = SDKMessage | AskUserMessage | AskUserResponseMessage | CompanionHeartbeatMessage | CompanionReminderMessage;
|
|
3397
3518
|
|
|
3398
3519
|
declare const TaskAgentInfoSchema: z.ZodObject<{
|
|
3399
3520
|
id: z.ZodString;
|
|
@@ -3401,6 +3522,7 @@ declare const TaskAgentInfoSchema: z.ZodObject<{
|
|
|
3401
3522
|
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
3402
3523
|
claude: "claude";
|
|
3403
3524
|
codex: "codex";
|
|
3525
|
+
companion: "companion";
|
|
3404
3526
|
}>>>;
|
|
3405
3527
|
description: z.ZodOptional<z.ZodString>;
|
|
3406
3528
|
}, z.core.$strip>;
|
|
@@ -3414,7 +3536,15 @@ declare function isAskUserMessage(message: TaskMessagePayload): message is AskUs
|
|
|
3414
3536
|
*/
|
|
3415
3537
|
declare function isAskUserResponseMessage(message: TaskMessagePayload): message is AskUserResponseMessage;
|
|
3416
3538
|
/**
|
|
3417
|
-
* Type guard to check if message is
|
|
3539
|
+
* Type guard to check if message is CompanionHeartbeatMessage
|
|
3540
|
+
*/
|
|
3541
|
+
declare function isCompanionHeartbeatMessage(message: TaskMessagePayload): message is CompanionHeartbeatMessage;
|
|
3542
|
+
/**
|
|
3543
|
+
* Type guard to check if message is CompanionReminderMessage
|
|
3544
|
+
*/
|
|
3545
|
+
declare function isCompanionReminderMessage(message: TaskMessagePayload): message is CompanionReminderMessage;
|
|
3546
|
+
/**
|
|
3547
|
+
* Type guard to check if message is SDKMessage (not ask_user related, not companion_heartbeat, not companion_reminder)
|
|
3418
3548
|
*/
|
|
3419
3549
|
declare function isSDKMessage(message: TaskMessagePayload): message is SDKMessage;
|
|
3420
3550
|
/**
|
|
@@ -3585,6 +3715,7 @@ declare const baseTaskSchema: z.ZodObject<{
|
|
|
3585
3715
|
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
3586
3716
|
claude: "claude";
|
|
3587
3717
|
codex: "codex";
|
|
3718
|
+
companion: "companion";
|
|
3588
3719
|
}>>>;
|
|
3589
3720
|
description: z.ZodOptional<z.ZodString>;
|
|
3590
3721
|
}, z.core.$strip>>>;
|
|
@@ -3596,6 +3727,7 @@ declare const baseTaskSchema: z.ZodObject<{
|
|
|
3596
3727
|
taskType: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
3597
3728
|
chat: "chat";
|
|
3598
3729
|
work: "work";
|
|
3730
|
+
shadow: "shadow";
|
|
3599
3731
|
}>>>;
|
|
3600
3732
|
customTitle: z.ZodOptional<z.ZodString>;
|
|
3601
3733
|
}, z.core.$strip>;
|
|
@@ -3634,6 +3766,7 @@ declare const createTaskSchema: z.ZodObject<{
|
|
|
3634
3766
|
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
3635
3767
|
claude: "claude";
|
|
3636
3768
|
codex: "codex";
|
|
3769
|
+
companion: "companion";
|
|
3637
3770
|
}>>>;
|
|
3638
3771
|
description: z.ZodOptional<z.ZodString>;
|
|
3639
3772
|
}, z.core.$strip>>>;
|
|
@@ -3645,6 +3778,7 @@ declare const createTaskSchema: z.ZodObject<{
|
|
|
3645
3778
|
taskType: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
3646
3779
|
chat: "chat";
|
|
3647
3780
|
work: "work";
|
|
3781
|
+
shadow: "shadow";
|
|
3648
3782
|
}>>>;
|
|
3649
3783
|
customTitle: z.ZodOptional<z.ZodString>;
|
|
3650
3784
|
event: z.ZodString;
|
|
@@ -3686,6 +3820,7 @@ declare const resumeTaskSchema: z.ZodObject<{
|
|
|
3686
3820
|
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
3687
3821
|
claude: "claude";
|
|
3688
3822
|
codex: "codex";
|
|
3823
|
+
companion: "companion";
|
|
3689
3824
|
}>>>;
|
|
3690
3825
|
description: z.ZodOptional<z.ZodString>;
|
|
3691
3826
|
}, z.core.$strip>>>;
|
|
@@ -3697,6 +3832,7 @@ declare const resumeTaskSchema: z.ZodObject<{
|
|
|
3697
3832
|
taskType: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
3698
3833
|
chat: "chat";
|
|
3699
3834
|
work: "work";
|
|
3835
|
+
shadow: "shadow";
|
|
3700
3836
|
}>>>;
|
|
3701
3837
|
customTitle: z.ZodOptional<z.ZodString>;
|
|
3702
3838
|
agentSessionId: z.ZodString;
|
|
@@ -3831,13 +3967,14 @@ declare const TaskMessageSchema: z.ZodObject<{
|
|
|
3831
3967
|
opCode: z.ZodOptional<z.ZodString>;
|
|
3832
3968
|
groupId: z.ZodOptional<z.ZodString>;
|
|
3833
3969
|
sequence: z.ZodOptional<z.ZodNumber>;
|
|
3834
|
-
message: z.ZodOptional<z.ZodCustom<
|
|
3970
|
+
message: z.ZodOptional<z.ZodCustom<any, any>>;
|
|
3971
|
+
messageType: z.ZodOptional<z.ZodString>;
|
|
3835
3972
|
encryptedMessage: z.ZodOptional<z.ZodString>;
|
|
3836
3973
|
agentId: z.ZodOptional<z.ZodString>;
|
|
3837
3974
|
senderType: z.ZodEnum<{
|
|
3975
|
+
agent: "agent";
|
|
3838
3976
|
human: "human";
|
|
3839
3977
|
system: "system";
|
|
3840
|
-
agent: "agent";
|
|
3841
3978
|
}>;
|
|
3842
3979
|
senderId: z.ZodString;
|
|
3843
3980
|
senderName: z.ZodString;
|
|
@@ -4061,6 +4198,7 @@ declare const SubTaskResultUpdatedEventSchema: z.ZodObject<{
|
|
|
4061
4198
|
result: z.ZodString;
|
|
4062
4199
|
is_error: z.ZodOptional<z.ZodBoolean>;
|
|
4063
4200
|
}, z.core.$strip>;
|
|
4201
|
+
encryptedResultMessage: z.ZodOptional<z.ZodString>;
|
|
4064
4202
|
artifacts: z.ZodOptional<z.ZodObject<{
|
|
4065
4203
|
commitHash: z.ZodString;
|
|
4066
4204
|
stats: z.ZodObject<{
|
|
@@ -4158,11 +4296,20 @@ declare const AssociateRepoEventDataSchema: z.ZodObject<{
|
|
|
4158
4296
|
repo: z.ZodString;
|
|
4159
4297
|
remoteUrl: z.ZodString;
|
|
4160
4298
|
}, z.core.$strip>;
|
|
4299
|
+
declare const UpdateAgentInfoEventSchema: z.ZodObject<{
|
|
4300
|
+
eventId: z.ZodString;
|
|
4301
|
+
taskId: z.ZodString;
|
|
4302
|
+
agentId: z.ZodString;
|
|
4303
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
4304
|
+
avatar: z.ZodOptional<z.ZodString>;
|
|
4305
|
+
signature: z.ZodOptional<z.ZodString>;
|
|
4306
|
+
}, z.core.$strip>;
|
|
4307
|
+
type UpdateAgentInfoEventData = z.infer<typeof UpdateAgentInfoEventSchema>;
|
|
4161
4308
|
type AssociateRepoEventData = z.infer<typeof AssociateRepoEventDataSchema>;
|
|
4162
4309
|
/**
|
|
4163
4310
|
* System message type
|
|
4164
4311
|
*/
|
|
4165
|
-
type SystemMessageType = "machine-online" | "machine-offline" | "chat-added" | "chat-removed" | "chat-member-added" | "chat-member-removed" | "repo-added" | "repo-removed" | "pr-state-changed" | "draft-agent-added";
|
|
4312
|
+
type SystemMessageType = "machine-online" | "machine-offline" | "chat-added" | "chat-removed" | "chat-member-added" | "chat-member-removed" | "repo-added" | "repo-removed" | "pr-state-changed" | "draft-agent-added" | "agent-updated";
|
|
4166
4313
|
/**
|
|
4167
4314
|
* PR state changed schema
|
|
4168
4315
|
*/
|
|
@@ -4202,6 +4349,7 @@ declare const SystemMessageSchema: z.ZodObject<{
|
|
|
4202
4349
|
"repo-removed": "repo-removed";
|
|
4203
4350
|
"pr-state-changed": "pr-state-changed";
|
|
4204
4351
|
"draft-agent-added": "draft-agent-added";
|
|
4352
|
+
"agent-updated": "agent-updated";
|
|
4205
4353
|
"task-added": "task-added";
|
|
4206
4354
|
}>;
|
|
4207
4355
|
data: z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -4225,8 +4373,8 @@ declare const SystemMessageSchema: z.ZodObject<{
|
|
|
4225
4373
|
chatId: z.ZodString;
|
|
4226
4374
|
memberCode: z.ZodString;
|
|
4227
4375
|
type: z.ZodEnum<{
|
|
4228
|
-
human: "human";
|
|
4229
4376
|
agent: "agent";
|
|
4377
|
+
human: "human";
|
|
4230
4378
|
}>;
|
|
4231
4379
|
role: z.ZodString;
|
|
4232
4380
|
createdAt: z.ZodString;
|
|
@@ -4268,6 +4416,7 @@ declare const SystemMessageSchema: z.ZodObject<{
|
|
|
4268
4416
|
type: z.ZodEnum<{
|
|
4269
4417
|
claude: "claude";
|
|
4270
4418
|
codex: "codex";
|
|
4419
|
+
companion: "companion";
|
|
4271
4420
|
}>;
|
|
4272
4421
|
avatar: z.ZodNullable<z.ZodString>;
|
|
4273
4422
|
userId: z.ZodString;
|
|
@@ -4317,11 +4466,59 @@ declare const SystemMessageSchema: z.ZodObject<{
|
|
|
4317
4466
|
sourceTaskId: z.ZodNullable<z.ZodString>;
|
|
4318
4467
|
createdAt: z.ZodString;
|
|
4319
4468
|
updatedAt: z.ZodString;
|
|
4469
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4470
|
+
id: z.ZodString;
|
|
4471
|
+
name: z.ZodString;
|
|
4472
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
4473
|
+
type: z.ZodEnum<{
|
|
4474
|
+
claude: "claude";
|
|
4475
|
+
codex: "codex";
|
|
4476
|
+
companion: "companion";
|
|
4477
|
+
}>;
|
|
4478
|
+
avatar: z.ZodNullable<z.ZodString>;
|
|
4479
|
+
userId: z.ZodString;
|
|
4480
|
+
description: z.ZodNullable<z.ZodString>;
|
|
4481
|
+
signature: z.ZodNullable<z.ZodString>;
|
|
4482
|
+
guildMsg: z.ZodString;
|
|
4483
|
+
placeholderMsg: z.ZodString;
|
|
4484
|
+
developerName: z.ZodString;
|
|
4485
|
+
developerEmail: z.ZodNullable<z.ZodString>;
|
|
4486
|
+
gitRepoId: z.ZodNullable<z.ZodString>;
|
|
4487
|
+
supportLocal: z.ZodBoolean;
|
|
4488
|
+
enable: z.ZodBoolean;
|
|
4489
|
+
config: z.ZodNullable<z.ZodObject<{
|
|
4490
|
+
displayConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
4491
|
+
createPR: z.ZodOptional<z.ZodString>;
|
|
4492
|
+
viewPR: z.ZodOptional<z.ZodString>;
|
|
4493
|
+
mergePR: z.ZodOptional<z.ZodString>;
|
|
4494
|
+
approvePR: z.ZodOptional<z.ZodString>;
|
|
4495
|
+
merged: z.ZodOptional<z.ZodString>;
|
|
4496
|
+
closed: z.ZodOptional<z.ZodString>;
|
|
4497
|
+
recreatePR: z.ZodOptional<z.ZodString>;
|
|
4498
|
+
permissionCanSendMessage: z.ZodOptional<z.ZodString>;
|
|
4499
|
+
permissionCanSendMessageDesc: z.ZodOptional<z.ZodString>;
|
|
4500
|
+
permissionCanCreatePr: z.ZodOptional<z.ZodString>;
|
|
4501
|
+
permissionCanCreatePrDesc: z.ZodOptional<z.ZodString>;
|
|
4502
|
+
permissionCanApprovePr: z.ZodOptional<z.ZodString>;
|
|
4503
|
+
permissionCanApprovePrDesc: z.ZodOptional<z.ZodString>;
|
|
4504
|
+
permissionCanViewPr: z.ZodOptional<z.ZodString>;
|
|
4505
|
+
permissionCanViewPrDesc: z.ZodOptional<z.ZodString>;
|
|
4506
|
+
permissionCanMergePr: z.ZodOptional<z.ZodString>;
|
|
4507
|
+
permissionCanMergePrDesc: z.ZodOptional<z.ZodString>;
|
|
4508
|
+
}, z.core.$strip>>>;
|
|
4509
|
+
machineId: z.ZodOptional<z.ZodString>;
|
|
4510
|
+
heartbeatTaskId: z.ZodOptional<z.ZodString>;
|
|
4511
|
+
}, z.core.$strip>>;
|
|
4512
|
+
permissions: z.ZodNullable<z.ZodObject<{
|
|
4513
|
+
role: z.ZodString;
|
|
4514
|
+
paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4515
|
+
}, z.core.$strip>>;
|
|
4320
4516
|
}, z.core.$strip>, z.ZodObject<{
|
|
4321
4517
|
id: z.ZodString;
|
|
4322
4518
|
type: z.ZodDefault<z.ZodEnum<{
|
|
4323
4519
|
chat: "chat";
|
|
4324
4520
|
work: "work";
|
|
4521
|
+
shadow: "shadow";
|
|
4325
4522
|
}>>;
|
|
4326
4523
|
chatId: z.ZodString;
|
|
4327
4524
|
userId: z.ZodString;
|
|
@@ -4420,7 +4617,27 @@ declare const DaemonGitlabResponseSchema: z.ZodObject<{
|
|
|
4420
4617
|
executionTimeMs: z.ZodNumber;
|
|
4421
4618
|
}, z.core.$strip>;
|
|
4422
4619
|
type DaemonGitlabResponseEventData = z.infer<typeof DaemonGitlabResponseSchema>;
|
|
4423
|
-
|
|
4620
|
+
declare const CompanionHeartbeatRequestSchema: z.ZodObject<{
|
|
4621
|
+
eventId: z.ZodString;
|
|
4622
|
+
machineId: z.ZodString;
|
|
4623
|
+
agentId: z.ZodString;
|
|
4624
|
+
chatId: z.ZodString;
|
|
4625
|
+
userId: z.ZodString;
|
|
4626
|
+
timestamp: z.ZodString;
|
|
4627
|
+
}, z.core.$strip>;
|
|
4628
|
+
type CompanionHeartbeatRequestData = z.infer<typeof CompanionHeartbeatRequestSchema>;
|
|
4629
|
+
declare const CompanionHeartbeatResponseSchema: z.ZodObject<{
|
|
4630
|
+
eventId: z.ZodString;
|
|
4631
|
+
taskId: z.ZodString;
|
|
4632
|
+
chatId: z.ZodString;
|
|
4633
|
+
}, z.core.$strip>;
|
|
4634
|
+
type CompanionHeartbeatResponseData = z.infer<typeof CompanionHeartbeatResponseSchema>;
|
|
4635
|
+
declare const ResetTaskSessionSchema: z.ZodObject<{
|
|
4636
|
+
eventId: z.ZodString;
|
|
4637
|
+
taskId: z.ZodString;
|
|
4638
|
+
}, z.core.$strip>;
|
|
4639
|
+
type ResetTaskSessionEventData = z.infer<typeof ResetTaskSessionSchema>;
|
|
4640
|
+
type EventData = AppAliveEventData | ApiServerAliveEventData | MachineAliveEventData | ShutdownMachineData | WorkerInitializingEventData | WorkerInitializedEventData | WorkerReadyEventData | WorkerAliveEventData | WorkerExitEventData | WorkerRunningEventData | WorkerStatusRequestEventData | ChatWorkersStatusRequestEventData | ChatWorkersStatusResponseEventData | CreateTaskEventData | ResumeTaskEventData | CancelTaskEventData | StopTaskEventData | TaskMessageEventData | ChangeTaskTitleEventData | TaskStateChangeEventData | UpdateTaskAgentSessionIdEventData | TaskInfoUpdateEventData | MergeRequestEventData | TaskStoppedEventData | SubTaskResultUpdatedEventData | SystemMessageEventData | CreditExhaustedEventData | RtcIceServersRequestEventData | RtcIceServersResponseEventData | MachineRtcRequestEventData | MachineRtcResponseEventData | RtcSignalEventData | WorkspaceFileRequestEventData | WorkspaceFileResponseEventData | UpdateAgentInfoEventData | DaemonGitlabRequestEventData | DaemonGitlabResponseEventData | CompanionHeartbeatRequestData | CompanionHeartbeatResponseData | ResetTaskSessionEventData;
|
|
4424
4641
|
type EventMap = {
|
|
4425
4642
|
"app-alive": AppAliveEventData;
|
|
4426
4643
|
"api-server-alive": ApiServerAliveEventData;
|
|
@@ -4451,6 +4668,7 @@ type EventMap = {
|
|
|
4451
4668
|
"task-stopped": TaskStoppedEventData;
|
|
4452
4669
|
"sub-task-result-updated": SubTaskResultUpdatedEventData;
|
|
4453
4670
|
"associate-repo": AssociateRepoEventData;
|
|
4671
|
+
"update-agent-info": UpdateAgentInfoEventData;
|
|
4454
4672
|
"system-message": SystemMessageEventData;
|
|
4455
4673
|
"credit-exhausted": CreditExhaustedEventData;
|
|
4456
4674
|
"rtc-ice-servers-request": RtcIceServersRequestEventData;
|
|
@@ -4463,6 +4681,9 @@ type EventMap = {
|
|
|
4463
4681
|
"rpc-call": RpcCallEventData;
|
|
4464
4682
|
"daemon-gitlab-request": DaemonGitlabRequestEventData;
|
|
4465
4683
|
"daemon-gitlab-response": DaemonGitlabResponseEventData;
|
|
4684
|
+
"request-companion-heartbeat": CompanionHeartbeatRequestData;
|
|
4685
|
+
"companion-heartbeat-response": CompanionHeartbeatResponseData;
|
|
4686
|
+
"reset-task-session": ResetTaskSessionEventData;
|
|
4466
4687
|
"event-ack": EventAckData;
|
|
4467
4688
|
};
|
|
4468
4689
|
type EventName = keyof EventMap;
|
|
@@ -4470,7 +4691,7 @@ declare const EventSchemaMap: Record<EventName, z.ZodType<any>>;
|
|
|
4470
4691
|
/**
|
|
4471
4692
|
* only sent by worker and which need to send to human in chat room
|
|
4472
4693
|
*/
|
|
4473
|
-
type WorkerTaskEvent = "worker-initializing" | "worker-initialized" | "worker-ready" | "worker-exit" | "worker-running" | "change-task-title" | "update-task-agent-session-id" | "merge-request" | "merge-pr" | "associate-repo";
|
|
4694
|
+
type WorkerTaskEvent = "worker-initializing" | "worker-initialized" | "worker-ready" | "worker-exit" | "worker-running" | "change-task-title" | "update-task-agent-session-id" | "reset-task-session" | "merge-request" | "merge-pr" | "associate-repo" | "update-agent-info";
|
|
4474
4695
|
declare const workerTaskEvents: WorkerTaskEvent[];
|
|
4475
4696
|
|
|
4476
4697
|
type ClientType = 'user' | 'worker' | 'machine';
|
|
@@ -4654,6 +4875,14 @@ interface AgentrixContext {
|
|
|
4654
4875
|
* List direct sub tasks under the current task
|
|
4655
4876
|
*/
|
|
4656
4877
|
listSubTasks(): Promise<SubTaskSummary[]>;
|
|
4878
|
+
/**
|
|
4879
|
+
* List recent tasks in the current chat
|
|
4880
|
+
* Used by companion to review recent task activity
|
|
4881
|
+
*/
|
|
4882
|
+
listTasks(params?: {
|
|
4883
|
+
limit?: number;
|
|
4884
|
+
status?: 'all' | 'active' | 'completed';
|
|
4885
|
+
}): Promise<RecentTaskSummary[]>;
|
|
4657
4886
|
/**
|
|
4658
4887
|
* Upload a file to the agent's storage
|
|
4659
4888
|
*/
|
|
@@ -4885,7 +5114,7 @@ declare class MissingAgentFileError extends AgentError {
|
|
|
4885
5114
|
*/
|
|
4886
5115
|
|
|
4887
5116
|
declare function loadAgentConfig(options: LoadAgentOptions): Promise<AgentConfig>;
|
|
4888
|
-
declare function replacePromptPlaceholders(template: string, cwd: string): string;
|
|
5117
|
+
declare function replacePromptPlaceholders(template: string, cwd: string, extra?: Record<string, string>): string;
|
|
4889
5118
|
|
|
4890
5119
|
/**
|
|
4891
5120
|
* Agent directory structure and configuration validation
|
|
@@ -4926,6 +5155,36 @@ declare function assertAgentExists(agentDir: string, agentId: string): void;
|
|
|
4926
5155
|
*/
|
|
4927
5156
|
declare function discoverPlugins(pluginsDir: string): string[];
|
|
4928
5157
|
|
|
5158
|
+
/**
|
|
5159
|
+
* Companion agent types
|
|
5160
|
+
* Types for the self-evolving companion agent system
|
|
5161
|
+
*/
|
|
5162
|
+
|
|
5163
|
+
declare const CompanionWorkspaceFileSchema: z.ZodObject<{
|
|
5164
|
+
name: z.ZodString;
|
|
5165
|
+
path: z.ZodString;
|
|
5166
|
+
size: z.ZodNumber;
|
|
5167
|
+
modifiedAt: z.ZodNumber;
|
|
5168
|
+
isDirectory: z.ZodBoolean;
|
|
5169
|
+
}, z.core.$strip>;
|
|
5170
|
+
type CompanionWorkspaceFile = z.infer<typeof CompanionWorkspaceFileSchema>;
|
|
5171
|
+
declare const RegisterCompanionRequestSchema: z.ZodObject<{
|
|
5172
|
+
machineId: z.ZodString;
|
|
5173
|
+
}, z.core.$strip>;
|
|
5174
|
+
type RegisterCompanionRequest = z.infer<typeof RegisterCompanionRequestSchema>;
|
|
5175
|
+
declare const RegisterCompanionResponseSchema: z.ZodObject<{
|
|
5176
|
+
agentId: z.ZodString;
|
|
5177
|
+
userId: z.ZodString;
|
|
5178
|
+
chatId: z.ZodString;
|
|
5179
|
+
created: z.ZodBoolean;
|
|
5180
|
+
}, z.core.$strip>;
|
|
5181
|
+
type RegisterCompanionResponse = z.infer<typeof RegisterCompanionResponseSchema>;
|
|
5182
|
+
declare const CompanionEnsureResponseSchema: z.ZodObject<{
|
|
5183
|
+
agentDir: z.ZodString;
|
|
5184
|
+
workspaceDir: z.ZodString;
|
|
5185
|
+
}, z.core.$strip>;
|
|
5186
|
+
type CompanionEnsureResponse = z.infer<typeof CompanionEnsureResponseSchema>;
|
|
5187
|
+
|
|
4929
5188
|
declare function encodeBase64(buffer: Uint8Array, variant?: 'base64' | 'base64url'): string;
|
|
4930
5189
|
declare function encodeBase64Url(buffer: Uint8Array): string;
|
|
4931
5190
|
declare function decodeBase64(base64: string, variant?: 'base64' | 'base64url'): Uint8Array;
|
|
@@ -5116,5 +5375,5 @@ declare const RELEVANT_DEPENDENCIES: readonly ["react", "react-dom", "vue", "vit
|
|
|
5116
5375
|
*/
|
|
5117
5376
|
declare function detectPreview(fs: FileSystemAdapter): Promise<PreviewMetadata | null>;
|
|
5118
5377
|
|
|
5119
|
-
export { ActiveAgentSchema, AddChatMemberRequestSchema, AddChatMemberResponseSchema, AgentConfigValidationError, AgentCustomConfigSchema, AgentError, AgentLoadError, AgentMetadataSchema, AgentNotFoundError, AgentPermissionsSchema, AgentSchema, AgentTypeSchema, ApiErrorSchema, ApiServerAliveEventSchema, AppAliveEventSchema, ApprovalStatusResponseSchema, ApprovePrRequestSchema, ApprovePrResponseSchema, ArchiveTaskRequestSchema, ArchiveTaskResponseSchema, AskUserMessageSchema, AskUserOptionSchema, AskUserQuestionSchema, AskUserResponseMessageSchema, AskUserResponseReasonSchema, AskUserResponseStatusSchema, AssociateRepoEventDataSchema, BillingStatsResponseSchema, BranchSchema, CONFIG_FILES, CancelTaskRequestSchema, CancelTaskResponseSchema, ChangeTaskTitleEventSchema, ChargeTransactionSchema, ChatMemberInputSchema, ChatMemberSchema, ChatSchema, ChatTypeSchema, ChatWithMembersSchema, ChatWorkersStatusRequestSchema, ChatWorkersStatusResponseSchema, ClaudeConfigSchema, CloudJoinApprovalRequestSchema, CloudJoinRequestSchema, CloudJoinResultQuerySchema, CloudJoinStatusQuerySchema, CloudMachineSchema, CloudSchema, ConfirmUploadRequestSchema, ConfirmUploadResponseSchema, ConsumeTransactionSchema, CreateAgentRequestSchema, CreateAgentResponseSchema, CreateChatRequestSchema, CreateChatResponseSchema, CreateCloudRequestSchema, CreateCloudResponseSchema, CreateDraftAgentRequestSchema, CreateMergeRequestResponseSchema, CreateMergeRequestSchema, CreateOAuthServerRequestSchema, CreateOAuthServerResponseSchema, CreateTaskShareResponseSchema, CreateTaskShareSchema, CreditExhaustedEventSchema, CreditsPackageSchema, DaemonGitlabOperationSchema, DaemonGitlabRequestSchema, DaemonGitlabResponseSchema, DateSchema, DeleteAgentResponseSchema, DeleteOAuthServerResponseSchema, DeployAgentCompleteEventSchema, DeployAgentEventSchema, DisplayConfigKeysSchema, DisplayConfigSchema, DraftAgentConfigSchema, DraftAgentSchema, ENTRY_FILE_PATTERNS, EnvironmentVariableSchema, EventAckSchema, EventSchemaMap, FRAMEWORK_TYPES, FileItemSchema, FileStatsSchema, FileVisibilitySchema, FillEventsRequestSchema, FindTaskByAgentRequestSchema, FindTaskByAgentResponseSchema, FrameworkNotSupportedError, GetAgentResponseSchema, GetChatResponseSchema, GetEnvironmentVariablesResponseSchema, GetGitServerResponseSchema, GetGitUrlQuerySchema, GetGitUrlResponseSchema, GetInstallUrlResponseSchema, GetOAuthServerResponseSchema, GetRepositoryResponseSchema, GetTaskSessionResponseSchema, GetUploadUrlsRequestSchema, GetUploadUrlsResponseSchema, GetUserAgentsResponseSchema, GitHubIssueListItemSchema, GitHubIssueSchema, GitServerSchema, IGNORED_DIRECTORIES, IdSchema, ListAgentsResponseSchema, ListBranchesResponseSchema, ListChatMembersResponseSchema, ListChatTasksResponseSchema, ListChatsQuerySchema, ListChatsResponseSchema, ListFilesQuerySchema, ListFilesResponseSchema, ListGitServersResponseSchema, ListIssuesQuerySchema, ListIssuesResponseSchema, ListMachinesResponseSchema, ListOAuthServersPublicResponseSchema, ListOAuthServersQuerySchema, ListOAuthServersResponseSchema, ListPackagesQuerySchema, ListPackagesResponseSchema, ListRepositoriesResponseSchema, ListSubTasksRequestSchema, ListSubTasksResponseSchema, ListTasksRequestSchema, ListTasksResponseSchema, ListTransactionsQuerySchema, ListTransactionsResponseSchema, LocalMachineSchema, LogoutResponseSchema, MachineAliveEventSchema, MachineApprovalRequestSchema, MachineApprovalStatusQuerySchema, MachineAuthAuthorizedResponseSchema, MachineAuthRequestSchema, MachineAuthResultQuerySchema, MachineRtcRequestSchema, MachineRtcResponseSchema, MergePullRequestEventSchema, MergeRequestEventSchema, MissingAgentFileError, OAuthAccountInfoSchema, OAuthBindCallbackResponseSchema, OAuthBindQuerySchema, OAuthBindResponseSchema, OAuthCallbackQuerySchema, OAuthCallbackResponseSchema, OAuthLoginQuerySchema, OAuthServerPublicSchema, OAuthServerSchema, OAuthUnbindResponseSchema, PaginatedResponseSchema, PermissionResponseRequestSchema, PermissionResponseResponseSchema, PreviewMetadataSchema, PreviewMethodSchema, PreviewProjectTypeSchema, ProjectDirectoryResponseSchema, ProjectEntrySchema, PublishDraftAgentRequestSchema, PublishDraftAgentResponseSchema, QueryEventsRequestSchema, RELEVANT_DEPENDENCIES, RTC_CHUNK_HEADER_SIZE, RechargeResponseSchema, RemoveChatMemberRequestSchema, RepositorySchema, ResetSecretRequestSchema, ResetSecretResponseSchema, ResumeTaskRequestSchema, ResumeTaskResponseSchema, RpcCallEventSchema, RpcResponseSchema, RtcChunkFlags, RtcIceServerSchema, RtcIceServersRequestSchema, RtcIceServersResponseSchema, RtcSignalSchema, STATIC_FILE_EXTENSIONS, SendTaskMessageRequestSchema, SendTaskMessageResponseSchema, SenderTypeSchema, SetEnvironmentVariablesRequestSchema, ShareAuthQuerySchema, ShareAuthResponseSchema, ShowModalEventDataSchema, ShowModalRequestSchema, ShowModalResponseSchema, ShutdownMachineSchema, SignatureAuthRequestSchema, SignatureAuthResponseSchema, SimpleSuccessSchema, StartTaskRequestSchema, StartTaskResponseSchema, StatsQuerySchema, StopTaskRequestSchema, StopTaskResponseSchema, StopTaskSchema, SubTaskResultUpdatedEventSchema, SubTaskSummarySchema, SyncCloudMachineResponseSchema, SyncLocalMachineResponseSchema, SyncMachineRequestSchema, SystemMessageSchema, TaskAgentInfoSchema, TaskArtifactsStatsSchema, TaskArtifactsSummarySchema, TaskInfoUpdateEventDataSchema, TaskItemSchema, TaskMessageSchema, TaskSharePermissionsSchema, TaskStateChangeEventSchema, TaskStoppedEventSchema, TaskTodoSchema, TaskTransactionsResponseSchema, ToggleOAuthServerRequestSchema, ToggleOAuthServerResponseSchema, TransactionSchema, UnarchiveTaskRequestSchema, UnarchiveTaskResponseSchema, UpdateAgentRequestSchema, UpdateAgentResponseSchema, UpdateChatContextRequestSchema, UpdateChatContextResponseSchema, UpdateDraftAgentRequestSchema, UpdateDraftAgentResponseSchema, UpdateOAuthServerRequestSchema, UpdateOAuthServerResponseSchema, UpdateTaskAgentSessionIdEventSchema, UpdateTaskTitleRequestSchema, UpdateTaskTitleResponseSchema, UpdateUserProfileRequestSchema, UpdateUserProfileResponseSchema, UploadUrlResultSchema, UserBalanceResponseSchema, UserBasicInfoSchema, UserProfileResponseSchema, UserWithOAuthAccountsSchema, WorkerAliveEventSchema, WorkerExitSchema, WorkerInitializedSchema, WorkerInitializingSchema, WorkerReadySchema, WorkerRunningSchema, WorkerStatusRequestSchema, WorkerStatusValueSchema, WorkspaceFileRequestSchema, WorkspaceFileResponseSchema, assertAgentExists, assertFileExists, baseTaskSchema, buildRtcChunkFrame, cancelTaskRequestSchema, cancelTaskSchema, createEventId, createKeyPair, createKeyPairWithUit8Array, createMergeRequestSchema, createTaskSchema, decodeBase64, decodeRtcChunkHeader, decryptAES, decryptFileContent, decryptMachineEncryptionKey, decryptSdkMessage, decryptWithEphemeralKey, detectPreview, discoverPlugins, encodeBase64, encodeBase64Url, encodeRtcChunkHeader, encryptAES, encryptFileContent, encryptMachineEncryptionKey, encryptSdkMessage, encryptWithEphemeralKey, generateAESKey, generateAESKeyBase64, getAgentContext, getRandomBytes, isAskUserMessage, isAskUserResponseMessage, isSDKMessage, isSDKUserMessage, loadAgentConfig, machineAuth, permissionResponseRequestSchema, replacePromptPlaceholders, resumeTaskRequestSchema, resumeTaskSchema, setAgentContext, splitRtcChunkFrame, startTaskSchema, stopTaskRequestSchema, userAuth, validateAgentDirectory, validateFrameworkDirectory, workerAuth, workerTaskEvents };
|
|
5120
|
-
export type { ActiveAgent, AddChatMemberRequest, AddChatMemberResponse, Agent, AgentConfig, AgentContext, AgentCustomConfig, AgentMetadata, AgentPermissions, AgentType, AgentrixContext, ApiError, ApiServerAliveEventData, AppAliveEventData, ApprovalStatusResponse, ApprovePrRequest, ApprovePrResponse, ArchiveTaskRequest, ArchiveTaskResponse, AskUserMessage, AskUserOption, AskUserQuestion, AskUserResponseMessage, AskUserResponseReason, AskUserResponseStatus, AssociateRepoEventData, AuthPayload, BillingStatsResponse, Branch, CancelTaskEventData, CancelTaskRequest, CancelTaskResponse, ChangeTaskTitleEventData, ChargeTransaction, Chat, ChatMember, ChatMemberInput, ChatType, ChatWithMembers, ChatWorkersStatusRequestEventData, ChatWorkersStatusResponseEventData, ClaudeAgentConfig, ClientType, Cloud, CloudJoinApprovalRequest, CloudJoinRequest, CloudJoinResultQuery, CloudJoinStatusQuery, CloudMachine, ConfirmUploadRequest, ConfirmUploadResponse, ConsumeTransaction, CreateAgentRequest, CreateAgentResponse, CreateChatRequest, CreateChatResponse, CreateCloudRequest, CreateCloudResponse, CreateDraftAgentRequest, CreateMergeRequestRequest, CreateMergeRequestResponse, CreateOAuthServerRequest, CreateOAuthServerResponse, CreateTaskEventData, CreateTaskShareRequest, CreateTaskShareResponse, CreditExhaustedEventData, CreditsPackage, DaemonGitlabOperation, DaemonGitlabRequestEventData, DaemonGitlabResponseEventData, DeleteAgentResponse, DeleteOAuthServerResponse, DeployAgentCompleteEventData, DeployAgentEventData, DisplayConfig, DisplayConfigKeys, DraftAgent, DraftAgentConfig, EnvironmentVariable, EventAckData, EventData, EventMap, EventName, FileItem, FileStats, FileSystemAdapter, FileVisibility, FillEventsRequest, FillEventsResponse, FindTaskByAgentRequest, FindTaskByAgentResponse, FrameworkType, GetAgentResponse, GetChatResponse, GetEnvironmentVariablesResponse, GetGitServerResponse, GetGitUrlQuery, GetGitUrlResponse, GetInstallUrlResponse, GetOAuthServerResponse, GetRepositoryResponse, GetTaskSessionResponse, GetUploadUrlsRequest, GetUploadUrlsResponse, GetUserAgentsResponse, GitHubIssue, GitHubIssueListItem, GitServer, HookFactory, ListAgentsResponse, ListBranchesResponse, ListChatMembersResponse, ListChatTasksResponse, ListChatsQuery, ListChatsResponse, ListFilesQuery, ListFilesResponse, ListGitServersResponse, ListIssuesQuery, ListIssuesResponse, ListMachinesResponse, ListOAuthServersPublicResponse, ListOAuthServersQuery, ListOAuthServersResponse, ListPackagesQuery, ListPackagesResponse, ListRepositoriesResponse, ListSubTasksRequest, ListSubTasksResponse, ListTasksRequest, ListTasksResponse, ListTransactionsQuery, ListTransactionsResponse, LoadAgentOptions, LocalMachine, LogoutResponse, MachineAliveEventData, MachineApprovalRequest, MachineApprovalStatusQuery, MachineAuthAuthorizedResponse, MachineAuthRequest, MachineAuthResultQuery, MachineEncryptionKey, MachineRtcRequestEventData, MachineRtcResponseEventData, MergePullRequestAck, MergePullRequestEventData, MergeRequestEventData, OAuthAccountInfo, OAuthBindCallbackResponse, OAuthBindQuery, OAuthBindResponse, OAuthCallbackQuery, OAuthCallbackResponse, OAuthLoginQuery, OAuthServer, OAuthServerPublic, OAuthUnbindResponse, PermissionResponseRequest, PermissionResponseResponse, PrStateChangedData, PreviewMetadata, PreviewMethod, PreviewProjectType, ProjectDirectoryResponse, ProjectEntry, PublishDraftAgentRequest, PublishDraftAgentResponse, QueryEventsRequest, QueryEventsResponse, RechargeResponse, RemoveChatMemberRequest, Repository, RepositoryInitHookInput, ResetSecretRequest, ResetSecretResponse, ResumeTaskEventData, ResumeTaskRequest, ResumeTaskResponse, RpcCallEventData, RpcResponseData, RtcChunkFrame, RtcChunkHeader, RtcControlChannel, RtcControlMessage, RtcIceServer, RtcIceServersRequestEventData, RtcIceServersResponseEventData, RtcSignalEventData, SendMessageTarget, SendTaskMessageRequest, SendTaskMessageResponse, SenderType, SetEnvironmentVariablesRequest, ShareAuthQuery, ShareAuthResponse, ShowModalEventData, ShowModalRequest, ShowModalResponse, ShutdownMachineData, SignatureAuthRequest, SignatureAuthResponse, SimpleSuccess, StartTaskRequest, StartTaskResponse, StatsQuery, StopTaskEventData, StopTaskRequest, StopTaskResponse, SubTaskResultUpdatedEventData, SubTaskSummary, SyncCloudMachineResponse, SyncLocalMachineResponse, SyncMachineRequest, SystemMessageEventData, SystemMessageType, TaskAgentInfo, TaskArtifactsStats, TaskArtifactsSummary, TaskEvent, TaskInfoUpdateEventData, TaskItem, TaskMessageEventData, TaskMessagePayload, TaskSharePermissions, TaskState, TaskStateChangeEventData, TaskStoppedEventData, TaskTodo, TaskTransactionsResponse, ToggleOAuthServerRequest, ToggleOAuthServerResponse, Transaction, UnarchiveTaskRequest, UnarchiveTaskResponse, UpdateAgentRequest, UpdateAgentResponse, UpdateChatContextRequest, UpdateChatContextResponse, UpdateDraftAgentRequest, UpdateDraftAgentResponse, UpdateOAuthServerRequest, UpdateOAuthServerResponse, UpdateTaskAgentSessionIdEventData, UpdateTaskTitleRequest, UpdateTaskTitleResponse, UpdateUserProfileRequest, UpdateUserProfileResponse, UploadUrlResult, UserBalanceResponse, UserBasicInfo, UserProfileResponse, UserWithOAuthAccounts, ValidationResult, WorkerAliveEventData, WorkerExitEventData, WorkerInitializedEventData, WorkerInitializingEventData, WorkerReadyEventData, WorkerRunningEventData, WorkerStatusRequestEventData, WorkerStatusValue, WorkerTaskEvent, WorkspaceFileRequestEventData, WorkspaceFileResponseEventData };
|
|
5378
|
+
export { ActiveAgentSchema, AddChatMemberRequestSchema, AddChatMemberResponseSchema, AgentConfigValidationError, AgentCustomConfigSchema, AgentError, AgentLoadError, AgentMetadataSchema, AgentNotFoundError, AgentPermissionsSchema, AgentSchema, AgentTypeSchema, ApiErrorSchema, ApiServerAliveEventSchema, AppAliveEventSchema, ApprovalStatusResponseSchema, ApprovePrRequestSchema, ApprovePrResponseSchema, ArchiveTaskRequestSchema, ArchiveTaskResponseSchema, AskUserMessageSchema, AskUserOptionSchema, AskUserQuestionSchema, AskUserResponseMessageSchema, AskUserResponseReasonSchema, AskUserResponseStatusSchema, AssociateRepoEventDataSchema, BillingStatsResponseSchema, BranchSchema, CONFIG_FILES, CancelTaskRequestSchema, CancelTaskResponseSchema, ChangeTaskTitleEventSchema, ChargeTransactionSchema, ChatMemberInputSchema, ChatMemberSchema, ChatSchema, ChatTypeSchema, ChatWithMembersSchema, ChatWorkersStatusRequestSchema, ChatWorkersStatusResponseSchema, ClaudeConfigSchema, CloudJoinApprovalRequestSchema, CloudJoinRequestSchema, CloudJoinResultQuerySchema, CloudJoinStatusQuerySchema, CloudMachineSchema, CloudSchema, CompanionEnsureResponseSchema, CompanionHeartbeatRequestSchema, CompanionHeartbeatResponseSchema, CompanionWorkspaceFileSchema, ConfirmUploadRequestSchema, ConfirmUploadResponseSchema, ConsumeTransactionSchema, CreateAgentRequestSchema, CreateAgentResponseSchema, CreateChatRequestSchema, CreateChatResponseSchema, CreateCloudRequestSchema, CreateCloudResponseSchema, CreateDraftAgentRequestSchema, CreateMergeRequestResponseSchema, CreateMergeRequestSchema, CreateOAuthServerRequestSchema, CreateOAuthServerResponseSchema, CreateTaskShareResponseSchema, CreateTaskShareSchema, CreditExhaustedEventSchema, CreditsPackageSchema, DaemonGitlabOperationSchema, DaemonGitlabRequestSchema, DaemonGitlabResponseSchema, DateSchema, DeleteAgentResponseSchema, DeleteOAuthServerResponseSchema, DeployAgentCompleteEventSchema, DeployAgentEventSchema, DisplayConfigKeysSchema, DisplayConfigSchema, DraftAgentConfigSchema, DraftAgentSchema, ENTRY_FILE_PATTERNS, EnvironmentVariableSchema, EventAckSchema, EventSchemaMap, FRAMEWORK_TYPES, FileItemSchema, FileStatsSchema, FileVisibilitySchema, FillEventsRequestSchema, FindTaskByAgentRequestSchema, FindTaskByAgentResponseSchema, FrameworkNotSupportedError, GetAgentResponseSchema, GetChatResponseSchema, GetEnvironmentVariablesResponseSchema, GetGitServerResponseSchema, GetGitUrlQuerySchema, GetGitUrlResponseSchema, GetInstallUrlResponseSchema, GetOAuthServerResponseSchema, GetRepositoryResponseSchema, GetTaskSessionResponseSchema, GetUploadUrlsRequestSchema, GetUploadUrlsResponseSchema, GetUserAgentsResponseSchema, GitHubIssueListItemSchema, GitHubIssueSchema, GitServerSchema, IGNORED_DIRECTORIES, IdSchema, ListAgentsResponseSchema, ListBranchesResponseSchema, ListChatMembersResponseSchema, ListChatTasksResponseSchema, ListChatsQuerySchema, ListChatsResponseSchema, ListFilesQuerySchema, ListFilesResponseSchema, ListGitServersResponseSchema, ListIssuesQuerySchema, ListIssuesResponseSchema, ListMachinesResponseSchema, ListOAuthServersPublicResponseSchema, ListOAuthServersQuerySchema, ListOAuthServersResponseSchema, ListPackagesQuerySchema, ListPackagesResponseSchema, ListRecentTasksRequestSchema, ListRecentTasksResponseSchema, ListRepositoriesResponseSchema, ListSubTasksRequestSchema, ListSubTasksResponseSchema, ListTasksRequestSchema, ListTasksResponseSchema, ListTransactionsQuerySchema, ListTransactionsResponseSchema, LocalMachineSchema, LogoutResponseSchema, MachineAliveEventSchema, MachineApprovalRequestSchema, MachineApprovalStatusQuerySchema, MachineAuthAuthorizedResponseSchema, MachineAuthRequestSchema, MachineAuthResultQuerySchema, MachineRtcRequestSchema, MachineRtcResponseSchema, MergePullRequestEventSchema, MergeRequestEventSchema, MissingAgentFileError, OAuthAccountInfoSchema, OAuthBindCallbackResponseSchema, OAuthBindQuerySchema, OAuthBindResponseSchema, OAuthCallbackQuerySchema, OAuthCallbackResponseSchema, OAuthLoginQuerySchema, OAuthServerPublicSchema, OAuthServerSchema, OAuthUnbindResponseSchema, PaginatedResponseSchema, PermissionResponseRequestSchema, PermissionResponseResponseSchema, PreviewMetadataSchema, PreviewMethodSchema, PreviewProjectTypeSchema, ProjectDirectoryResponseSchema, ProjectEntrySchema, PublishDraftAgentRequestSchema, PublishDraftAgentResponseSchema, QueryEventsRequestSchema, RELEVANT_DEPENDENCIES, RTC_CHUNK_HEADER_SIZE, RecentTaskSummarySchema, RechargeResponseSchema, RegisterCompanionRequestSchema, RegisterCompanionResponseSchema, RemoveChatMemberRequestSchema, RepositorySchema, ResetSecretRequestSchema, ResetSecretResponseSchema, ResetTaskSessionSchema, ResumeTaskRequestSchema, ResumeTaskResponseSchema, RpcCallEventSchema, RpcResponseSchema, RtcChunkFlags, RtcIceServerSchema, RtcIceServersRequestSchema, RtcIceServersResponseSchema, RtcSignalSchema, STATIC_FILE_EXTENSIONS, SendTaskMessageRequestSchema, SendTaskMessageResponseSchema, SenderTypeSchema, SetEnvironmentVariablesRequestSchema, ShareAuthQuerySchema, ShareAuthResponseSchema, ShowModalEventDataSchema, ShowModalRequestSchema, ShowModalResponseSchema, ShutdownMachineSchema, SignatureAuthRequestSchema, SignatureAuthResponseSchema, SimpleSuccessSchema, StartTaskRequestSchema, StartTaskResponseSchema, StatsQuerySchema, StopTaskRequestSchema, StopTaskResponseSchema, StopTaskSchema, SubTaskResultUpdatedEventSchema, SubTaskSummarySchema, SyncCloudMachineResponseSchema, SyncLocalMachineResponseSchema, SyncMachineRequestSchema, SystemMessageSchema, TaskAgentInfoSchema, TaskArtifactsStatsSchema, TaskArtifactsSummarySchema, TaskInfoUpdateEventDataSchema, TaskItemSchema, TaskMessageSchema, TaskSharePermissionsSchema, TaskStateChangeEventSchema, TaskStoppedEventSchema, TaskTodoSchema, TaskTransactionsResponseSchema, ToggleOAuthServerRequestSchema, ToggleOAuthServerResponseSchema, TransactionSchema, UnarchiveTaskRequestSchema, UnarchiveTaskResponseSchema, UpdateAgentInfoEventSchema, UpdateAgentRequestSchema, UpdateAgentResponseSchema, UpdateChatContextRequestSchema, UpdateChatContextResponseSchema, UpdateDraftAgentRequestSchema, UpdateDraftAgentResponseSchema, UpdateOAuthServerRequestSchema, UpdateOAuthServerResponseSchema, UpdateTaskAgentSessionIdEventSchema, UpdateTaskTitleRequestSchema, UpdateTaskTitleResponseSchema, UpdateUserProfileRequestSchema, UpdateUserProfileResponseSchema, UploadUrlResultSchema, UserBalanceResponseSchema, UserBasicInfoSchema, UserProfileResponseSchema, UserWithOAuthAccountsSchema, WorkerAliveEventSchema, WorkerExitSchema, WorkerInitializedSchema, WorkerInitializingSchema, WorkerReadySchema, WorkerRunningSchema, WorkerStatusRequestSchema, WorkerStatusValueSchema, WorkspaceFileRequestSchema, WorkspaceFileResponseSchema, assertAgentExists, assertFileExists, baseTaskSchema, buildRtcChunkFrame, cancelTaskRequestSchema, cancelTaskSchema, createEventId, createKeyPair, createKeyPairWithUit8Array, createMergeRequestSchema, createTaskSchema, decodeBase64, decodeRtcChunkHeader, decryptAES, decryptFileContent, decryptMachineEncryptionKey, decryptSdkMessage, decryptWithEphemeralKey, detectPreview, discoverPlugins, encodeBase64, encodeBase64Url, encodeRtcChunkHeader, encryptAES, encryptFileContent, encryptMachineEncryptionKey, encryptSdkMessage, encryptWithEphemeralKey, generateAESKey, generateAESKeyBase64, getAgentContext, getRandomBytes, isAskUserMessage, isAskUserResponseMessage, isCompanionHeartbeatMessage, isCompanionReminderMessage, isSDKMessage, isSDKUserMessage, loadAgentConfig, machineAuth, permissionResponseRequestSchema, replacePromptPlaceholders, resumeTaskRequestSchema, resumeTaskSchema, setAgentContext, splitRtcChunkFrame, startTaskSchema, stopTaskRequestSchema, userAuth, validateAgentDirectory, validateFrameworkDirectory, workerAuth, workerTaskEvents };
|
|
5379
|
+
export type { ActiveAgent, AddChatMemberRequest, AddChatMemberResponse, Agent, AgentConfig, AgentContext, AgentCustomConfig, AgentMetadata, AgentPermissions, AgentType, AgentrixContext, ApiError, ApiServerAliveEventData, AppAliveEventData, ApprovalStatusResponse, ApprovePrRequest, ApprovePrResponse, ArchiveTaskRequest, ArchiveTaskResponse, AskUserMessage, AskUserOption, AskUserQuestion, AskUserResponseMessage, AskUserResponseReason, AskUserResponseStatus, AssociateRepoEventData, AuthPayload, BillingStatsResponse, Branch, CancelTaskEventData, CancelTaskRequest, CancelTaskResponse, ChangeTaskTitleEventData, ChargeTransaction, Chat, ChatMember, ChatMemberInput, ChatType, ChatWithMembers, ChatWorkersStatusRequestEventData, ChatWorkersStatusResponseEventData, ClaudeAgentConfig, ClientType, Cloud, CloudJoinApprovalRequest, CloudJoinRequest, CloudJoinResultQuery, CloudJoinStatusQuery, CloudMachine, CompanionEnsureResponse, CompanionHeartbeatMessage, CompanionHeartbeatRequestData, CompanionHeartbeatResponseData, CompanionReminderMessage, CompanionWorkspaceFile, ConfirmUploadRequest, ConfirmUploadResponse, ConsumeTransaction, CreateAgentRequest, CreateAgentResponse, CreateChatRequest, CreateChatResponse, CreateCloudRequest, CreateCloudResponse, CreateDraftAgentRequest, CreateMergeRequestRequest, CreateMergeRequestResponse, CreateOAuthServerRequest, CreateOAuthServerResponse, CreateTaskEventData, CreateTaskShareRequest, CreateTaskShareResponse, CreditExhaustedEventData, CreditsPackage, DaemonGitlabOperation, DaemonGitlabRequestEventData, DaemonGitlabResponseEventData, DeleteAgentResponse, DeleteOAuthServerResponse, DeployAgentCompleteEventData, DeployAgentEventData, DisplayConfig, DisplayConfigKeys, DraftAgent, DraftAgentConfig, EnvironmentVariable, EventAckData, EventData, EventMap, EventName, FileItem, FileStats, FileSystemAdapter, FileVisibility, FillEventsRequest, FillEventsResponse, FindTaskByAgentRequest, FindTaskByAgentResponse, FrameworkType, GetAgentResponse, GetChatResponse, GetEnvironmentVariablesResponse, GetGitServerResponse, GetGitUrlQuery, GetGitUrlResponse, GetInstallUrlResponse, GetOAuthServerResponse, GetRepositoryResponse, GetTaskSessionResponse, GetUploadUrlsRequest, GetUploadUrlsResponse, GetUserAgentsResponse, GitHubIssue, GitHubIssueListItem, GitServer, HookFactory, ListAgentsResponse, ListBranchesResponse, ListChatMembersResponse, ListChatTasksResponse, ListChatsQuery, ListChatsResponse, ListFilesQuery, ListFilesResponse, ListGitServersResponse, ListIssuesQuery, ListIssuesResponse, ListMachinesResponse, ListOAuthServersPublicResponse, ListOAuthServersQuery, ListOAuthServersResponse, ListPackagesQuery, ListPackagesResponse, ListRecentTasksRequest, ListRecentTasksResponse, ListRepositoriesResponse, ListSubTasksRequest, ListSubTasksResponse, ListTasksRequest, ListTasksResponse, ListTransactionsQuery, ListTransactionsResponse, LoadAgentOptions, LocalMachine, LogoutResponse, MachineAliveEventData, MachineApprovalRequest, MachineApprovalStatusQuery, MachineAuthAuthorizedResponse, MachineAuthRequest, MachineAuthResultQuery, MachineEncryptionKey, MachineRtcRequestEventData, MachineRtcResponseEventData, MergePullRequestAck, MergePullRequestEventData, MergeRequestEventData, OAuthAccountInfo, OAuthBindCallbackResponse, OAuthBindQuery, OAuthBindResponse, OAuthCallbackQuery, OAuthCallbackResponse, OAuthLoginQuery, OAuthServer, OAuthServerPublic, OAuthUnbindResponse, PermissionResponseRequest, PermissionResponseResponse, PrStateChangedData, PreviewMetadata, PreviewMethod, PreviewProjectType, ProjectDirectoryResponse, ProjectEntry, PublishDraftAgentRequest, PublishDraftAgentResponse, QueryEventsRequest, QueryEventsResponse, RecentTaskSummary, RechargeResponse, RegisterCompanionRequest, RegisterCompanionResponse, RemoveChatMemberRequest, Repository, RepositoryInitHookInput, ResetSecretRequest, ResetSecretResponse, ResetTaskSessionEventData, ResumeTaskEventData, ResumeTaskRequest, ResumeTaskResponse, RpcCallEventData, RpcResponseData, RtcChunkFrame, RtcChunkHeader, RtcControlChannel, RtcControlMessage, RtcIceServer, RtcIceServersRequestEventData, RtcIceServersResponseEventData, RtcSignalEventData, SendMessageTarget, SendTaskMessageRequest, SendTaskMessageResponse, SenderType, SetEnvironmentVariablesRequest, ShareAuthQuery, ShareAuthResponse, ShowModalEventData, ShowModalRequest, ShowModalResponse, ShutdownMachineData, SignatureAuthRequest, SignatureAuthResponse, SimpleSuccess, StartTaskRequest, StartTaskResponse, StatsQuery, StopTaskEventData, StopTaskRequest, StopTaskResponse, SubTaskResultUpdatedEventData, SubTaskSummary, SyncCloudMachineResponse, SyncLocalMachineResponse, SyncMachineRequest, SystemMessageEventData, SystemMessageType, TaskAgentInfo, TaskArtifactsStats, TaskArtifactsSummary, TaskEvent, TaskInfoUpdateEventData, TaskItem, TaskMessageEventData, TaskMessagePayload, TaskSharePermissions, TaskState, TaskStateChangeEventData, TaskStoppedEventData, TaskTodo, TaskTransactionsResponse, ToggleOAuthServerRequest, ToggleOAuthServerResponse, Transaction, UnarchiveTaskRequest, UnarchiveTaskResponse, UpdateAgentInfoEventData, UpdateAgentRequest, UpdateAgentResponse, UpdateChatContextRequest, UpdateChatContextResponse, UpdateDraftAgentRequest, UpdateDraftAgentResponse, UpdateOAuthServerRequest, UpdateOAuthServerResponse, UpdateTaskAgentSessionIdEventData, UpdateTaskTitleRequest, UpdateTaskTitleResponse, UpdateUserProfileRequest, UpdateUserProfileResponse, UploadUrlResult, UserBalanceResponse, UserBasicInfo, UserProfileResponse, UserWithOAuthAccounts, ValidationResult, WorkerAliveEventData, WorkerExitEventData, WorkerInitializedEventData, WorkerInitializingEventData, WorkerReadyEventData, WorkerRunningEventData, WorkerStatusRequestEventData, WorkerStatusValue, WorkerTaskEvent, WorkspaceFileRequestEventData, WorkspaceFileResponseEventData };
|