@autohq/cli 0.1.457 → 0.1.459
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/agent-bridge.js +59 -1
- package/dist/index.js +60 -2
- package/package.json +1 -1
package/dist/agent-bridge.js
CHANGED
|
@@ -30825,7 +30825,7 @@ Object.assign(lookup, {
|
|
|
30825
30825
|
// package.json
|
|
30826
30826
|
var package_default = {
|
|
30827
30827
|
name: "@autohq/cli",
|
|
30828
|
-
version: "0.1.
|
|
30828
|
+
version: "0.1.459",
|
|
30829
30829
|
license: "SEE LICENSE IN README.md",
|
|
30830
30830
|
publishConfig: {
|
|
30831
30831
|
access: "public"
|
|
@@ -31927,6 +31927,43 @@ var ChatMessageEventPayloadSchema = external_exports.object({
|
|
|
31927
31927
|
}).optional(),
|
|
31928
31928
|
raw: JsonValueSchema2
|
|
31929
31929
|
});
|
|
31930
|
+
var ChatMessageEditedEventPayloadSchema = external_exports.object({
|
|
31931
|
+
chat: external_exports.object({
|
|
31932
|
+
provider: ProviderNameSchema,
|
|
31933
|
+
kind: external_exports.literal("edited"),
|
|
31934
|
+
threadId: external_exports.string().trim().min(1),
|
|
31935
|
+
channelId: external_exports.string().trim().min(1),
|
|
31936
|
+
isDirectMessage: external_exports.boolean(),
|
|
31937
|
+
messageId: external_exports.string().trim().min(1)
|
|
31938
|
+
}),
|
|
31939
|
+
message: external_exports.object({
|
|
31940
|
+
text: external_exports.string(),
|
|
31941
|
+
previousText: external_exports.string().optional(),
|
|
31942
|
+
author: JsonValueSchema2,
|
|
31943
|
+
isMention: external_exports.literal(false),
|
|
31944
|
+
dateSent: external_exports.string().datetime(),
|
|
31945
|
+
editedAt: external_exports.string().datetime(),
|
|
31946
|
+
attachments: JsonValueSchema2.default([]),
|
|
31947
|
+
links: JsonValueSchema2.default([])
|
|
31948
|
+
}),
|
|
31949
|
+
auto: external_exports.object({
|
|
31950
|
+
mentioned: external_exports.literal(false),
|
|
31951
|
+
contextual: external_exports.boolean().default(true),
|
|
31952
|
+
authored: external_exports.boolean().default(false),
|
|
31953
|
+
context: external_exports.object({ kind: external_exports.literal("thread_participation") }).optional(),
|
|
31954
|
+
attribution: external_exports.object({
|
|
31955
|
+
sessionId: external_exports.string().trim().min(1),
|
|
31956
|
+
agentName: external_exports.string().trim().min(1)
|
|
31957
|
+
}).optional(),
|
|
31958
|
+
attributions: external_exports.array(
|
|
31959
|
+
external_exports.object({
|
|
31960
|
+
sessionId: external_exports.string().trim().min(1),
|
|
31961
|
+
agentName: external_exports.string().trim().min(1)
|
|
31962
|
+
})
|
|
31963
|
+
).optional()
|
|
31964
|
+
}).optional(),
|
|
31965
|
+
raw: JsonValueSchema2
|
|
31966
|
+
});
|
|
31930
31967
|
var ChatReactionEventPayloadSchema = external_exports.object({
|
|
31931
31968
|
chat: external_exports.object({
|
|
31932
31969
|
provider: ProviderNameSchema,
|
|
@@ -34842,6 +34879,11 @@ function templateField(guard) {
|
|
|
34842
34879
|
const field = external_exports.string().trim().min(1).max(2e4).optional();
|
|
34843
34880
|
return guard === "authoring" ? field.superRefine(refineNoPayloadPrefixedTemplateTokens) : field;
|
|
34844
34881
|
}
|
|
34882
|
+
function attachedUserPromptField() {
|
|
34883
|
+
return external_exports.string().min(1).max(2e4).refine((value2) => value2.trim().length > 0, {
|
|
34884
|
+
message: "Attached user prompt must contain non-whitespace text"
|
|
34885
|
+
}).optional();
|
|
34886
|
+
}
|
|
34845
34887
|
function displayTitleField(guard) {
|
|
34846
34888
|
const field = external_exports.union([
|
|
34847
34889
|
external_exports.literal("infer"),
|
|
@@ -34875,6 +34917,7 @@ var TriggerChecksField = external_exports.array(
|
|
|
34875
34917
|
function triggerSharedFields(guard) {
|
|
34876
34918
|
return {
|
|
34877
34919
|
message: templateField(guard),
|
|
34920
|
+
attachedUserPrompt: attachedUserPromptField(),
|
|
34878
34921
|
checks: TriggerChecksField,
|
|
34879
34922
|
// Catch-all flag: a `fallback` trigger fires only when no normal (non-
|
|
34880
34923
|
// fallback) trigger on the same endpoint + eventKey matched its `where`.
|
|
@@ -34915,6 +34958,7 @@ function triggerBaseSchema(guard) {
|
|
|
34915
34958
|
...TriggerEventSourceFields
|
|
34916
34959
|
}).strict().superRefine((trigger, context) => {
|
|
34917
34960
|
validateTriggerChecks(trigger, context, [trigger.event]);
|
|
34961
|
+
validateAttachedUserPrompt(trigger, context, guard);
|
|
34918
34962
|
});
|
|
34919
34963
|
}
|
|
34920
34964
|
function triggerDefinitionBaseSchema(guard) {
|
|
@@ -34943,6 +34987,7 @@ function triggerDefinitionBaseSchema(guard) {
|
|
|
34943
34987
|
context,
|
|
34944
34988
|
trigger.event ? [trigger.event] : trigger.events ?? []
|
|
34945
34989
|
);
|
|
34990
|
+
validateAttachedUserPrompt(trigger, context, guard);
|
|
34946
34991
|
});
|
|
34947
34992
|
}
|
|
34948
34993
|
function heartbeatTriggerBaseSchema(guard) {
|
|
@@ -34958,6 +35003,7 @@ function heartbeatTriggerBaseSchema(guard) {
|
|
|
34958
35003
|
...triggerSharedFields(guard)
|
|
34959
35004
|
}).strict().superRefine((trigger, context) => {
|
|
34960
35005
|
validateTriggerChecks(trigger, context, ["heartbeat"]);
|
|
35006
|
+
validateAttachedUserPrompt(trigger, context, guard);
|
|
34961
35007
|
});
|
|
34962
35008
|
}
|
|
34963
35009
|
var TriggerSchema = triggerBaseSchema("stored").extend({
|
|
@@ -35369,6 +35415,15 @@ var AgentPresenceCompleteResponseSchema = external_exports.object({
|
|
|
35369
35415
|
organizationId: external_exports.string().trim().min(1),
|
|
35370
35416
|
botUserId: external_exports.string().trim().min(1)
|
|
35371
35417
|
});
|
|
35418
|
+
function validateAttachedUserPrompt(trigger, context, guard) {
|
|
35419
|
+
if (guard === "authoring" && trigger.attachedUserPrompt !== void 0 && trigger.routing.kind !== "spawn") {
|
|
35420
|
+
context.addIssue({
|
|
35421
|
+
code: external_exports.ZodIssueCode.custom,
|
|
35422
|
+
path: ["attachedUserPrompt"],
|
|
35423
|
+
message: "Attached user prompt is supported only for spawn routing"
|
|
35424
|
+
});
|
|
35425
|
+
}
|
|
35426
|
+
}
|
|
35372
35427
|
function validateTriggerChecks(trigger, context, eventKeys) {
|
|
35373
35428
|
const checks = trigger.checks ?? [];
|
|
35374
35429
|
if (checks.length === 0) {
|
|
@@ -36182,6 +36237,9 @@ var SessionRecordSchema = external_exports.object({
|
|
|
36182
36237
|
// Defaulted, not just nullable: sessions persisted before requester shipped
|
|
36183
36238
|
// lack the key, and replay-path parsing must keep accepting them.
|
|
36184
36239
|
requester: RequesterSchema.nullable().default(null),
|
|
36240
|
+
// Defaulted for session.upsert payloads persisted before attached prompts.
|
|
36241
|
+
attachedUserPrompt: external_exports.string().nullable().default(null).optional(),
|
|
36242
|
+
triggerMessageContext: external_exports.string().nullable().default(null).optional(),
|
|
36185
36243
|
snapshot: AgentResourceSchema,
|
|
36186
36244
|
environmentSnapshot: EnvironmentResourceSchema,
|
|
36187
36245
|
toolSnapshots: external_exports.array(
|
package/dist/index.js
CHANGED
|
@@ -15555,7 +15555,7 @@ var init_auth = __esm({
|
|
|
15555
15555
|
});
|
|
15556
15556
|
|
|
15557
15557
|
// ../../packages/schemas/src/chat.ts
|
|
15558
|
-
var ChatMessageKindSchema, ChatMessageRefSchema, ChatToolBindingSchema, ChatMessageEventPayloadSchema, ChatReactionEventPayloadSchema, ChatMessageContentSchema, ChatThreadSelectorSchema, SlackChatDestinationSchema, LinearChatDestinationSchema, TelegramChatDestinationSchema, ChatDestinationSchema, SlackChatRecipientSchema, LinearChatRecipientSchema, TelegramChatRecipientSchema, ChatRecipientSchema, SlackChatAddressSchema, LinearChatAddressSchema, TelegramChatAddressSchema, ChatAddressSchema, ChatToolDefaultsSchema, ChatSendToolInputSchema, ChatSendToolOutputSchema, ChatHistoryToolInputSchema, ChatAttachmentSchema, ChatHistoryMessageSchema, ChatHistoryToolOutputSchema, ChatAttachmentDownloadAllowedMimeTypes, ChatAttachmentDownloadAllowedMimeTypeSchema, ChatAttachmentDownloadMaxSizeBytesByType, ChatAttachmentDownloadMaxSizeBytes, ChatAttachmentDownloadToolInputSchema, ChatAttachmentDownloadToolOutputSchema, ChatIssueParticipantSchema, ChatIssueNamedRefSchema, ChatIssueRefSchema, ChatIssueSchema, ChatIssueGetToolInputSchema, ChatIssueGetToolOutputSchema, ChatIssueUpdateToolInputSchema, ChatIssueUpdateToolOutputSchema, ChatReplyToolInputSchema, ChatReplyToolOutputSchema, ChatReactionToolInputSchema, ChatReactionToolOutputSchema, ChatSearchResultTypeSchema, ChatSearchToolInputSchema, ChatSearchWorkspaceSchema, SlackChatSearchResultSchema, ChatSearchResultSchema, ChatSearchToolOutputSchema;
|
|
15558
|
+
var ChatMessageKindSchema, ChatMessageRefSchema, ChatToolBindingSchema, ChatMessageEventPayloadSchema, ChatMessageEditedEventPayloadSchema, ChatReactionEventPayloadSchema, ChatMessageContentSchema, ChatThreadSelectorSchema, SlackChatDestinationSchema, LinearChatDestinationSchema, TelegramChatDestinationSchema, ChatDestinationSchema, SlackChatRecipientSchema, LinearChatRecipientSchema, TelegramChatRecipientSchema, ChatRecipientSchema, SlackChatAddressSchema, LinearChatAddressSchema, TelegramChatAddressSchema, ChatAddressSchema, ChatToolDefaultsSchema, ChatSendToolInputSchema, ChatSendToolOutputSchema, ChatHistoryToolInputSchema, ChatAttachmentSchema, ChatHistoryMessageSchema, ChatHistoryToolOutputSchema, ChatAttachmentDownloadAllowedMimeTypes, ChatAttachmentDownloadAllowedMimeTypeSchema, ChatAttachmentDownloadMaxSizeBytesByType, ChatAttachmentDownloadMaxSizeBytes, ChatAttachmentDownloadToolInputSchema, ChatAttachmentDownloadToolOutputSchema, ChatIssueParticipantSchema, ChatIssueNamedRefSchema, ChatIssueRefSchema, ChatIssueSchema, ChatIssueGetToolInputSchema, ChatIssueGetToolOutputSchema, ChatIssueUpdateToolInputSchema, ChatIssueUpdateToolOutputSchema, ChatReplyToolInputSchema, ChatReplyToolOutputSchema, ChatReactionToolInputSchema, ChatReactionToolOutputSchema, ChatSearchResultTypeSchema, ChatSearchToolInputSchema, ChatSearchWorkspaceSchema, SlackChatSearchResultSchema, ChatSearchResultSchema, ChatSearchToolOutputSchema;
|
|
15559
15559
|
var init_chat = __esm({
|
|
15560
15560
|
"../../packages/schemas/src/chat.ts"() {
|
|
15561
15561
|
"use strict";
|
|
@@ -15641,6 +15641,43 @@ var init_chat = __esm({
|
|
|
15641
15641
|
}).optional(),
|
|
15642
15642
|
raw: JsonValueSchema
|
|
15643
15643
|
});
|
|
15644
|
+
ChatMessageEditedEventPayloadSchema = external_exports.object({
|
|
15645
|
+
chat: external_exports.object({
|
|
15646
|
+
provider: ProviderNameSchema,
|
|
15647
|
+
kind: external_exports.literal("edited"),
|
|
15648
|
+
threadId: external_exports.string().trim().min(1),
|
|
15649
|
+
channelId: external_exports.string().trim().min(1),
|
|
15650
|
+
isDirectMessage: external_exports.boolean(),
|
|
15651
|
+
messageId: external_exports.string().trim().min(1)
|
|
15652
|
+
}),
|
|
15653
|
+
message: external_exports.object({
|
|
15654
|
+
text: external_exports.string(),
|
|
15655
|
+
previousText: external_exports.string().optional(),
|
|
15656
|
+
author: JsonValueSchema,
|
|
15657
|
+
isMention: external_exports.literal(false),
|
|
15658
|
+
dateSent: external_exports.string().datetime(),
|
|
15659
|
+
editedAt: external_exports.string().datetime(),
|
|
15660
|
+
attachments: JsonValueSchema.default([]),
|
|
15661
|
+
links: JsonValueSchema.default([])
|
|
15662
|
+
}),
|
|
15663
|
+
auto: external_exports.object({
|
|
15664
|
+
mentioned: external_exports.literal(false),
|
|
15665
|
+
contextual: external_exports.boolean().default(true),
|
|
15666
|
+
authored: external_exports.boolean().default(false),
|
|
15667
|
+
context: external_exports.object({ kind: external_exports.literal("thread_participation") }).optional(),
|
|
15668
|
+
attribution: external_exports.object({
|
|
15669
|
+
sessionId: external_exports.string().trim().min(1),
|
|
15670
|
+
agentName: external_exports.string().trim().min(1)
|
|
15671
|
+
}).optional(),
|
|
15672
|
+
attributions: external_exports.array(
|
|
15673
|
+
external_exports.object({
|
|
15674
|
+
sessionId: external_exports.string().trim().min(1),
|
|
15675
|
+
agentName: external_exports.string().trim().min(1)
|
|
15676
|
+
})
|
|
15677
|
+
).optional()
|
|
15678
|
+
}).optional(),
|
|
15679
|
+
raw: JsonValueSchema
|
|
15680
|
+
});
|
|
15644
15681
|
ChatReactionEventPayloadSchema = external_exports.object({
|
|
15645
15682
|
chat: external_exports.object({
|
|
15646
15683
|
provider: ProviderNameSchema,
|
|
@@ -18732,6 +18769,11 @@ function templateField(guard) {
|
|
|
18732
18769
|
const field = external_exports.string().trim().min(1).max(2e4).optional();
|
|
18733
18770
|
return guard === "authoring" ? field.superRefine(refineNoPayloadPrefixedTemplateTokens) : field;
|
|
18734
18771
|
}
|
|
18772
|
+
function attachedUserPromptField() {
|
|
18773
|
+
return external_exports.string().min(1).max(2e4).refine((value) => value.trim().length > 0, {
|
|
18774
|
+
message: "Attached user prompt must contain non-whitespace text"
|
|
18775
|
+
}).optional();
|
|
18776
|
+
}
|
|
18735
18777
|
function displayTitleField(guard) {
|
|
18736
18778
|
const field = external_exports.union([
|
|
18737
18779
|
external_exports.literal("infer"),
|
|
@@ -18746,6 +18788,7 @@ function displayTitleField(guard) {
|
|
|
18746
18788
|
function triggerSharedFields(guard) {
|
|
18747
18789
|
return {
|
|
18748
18790
|
message: templateField(guard),
|
|
18791
|
+
attachedUserPrompt: attachedUserPromptField(),
|
|
18749
18792
|
checks: TriggerChecksField,
|
|
18750
18793
|
// Catch-all flag: a `fallback` trigger fires only when no normal (non-
|
|
18751
18794
|
// fallback) trigger on the same endpoint + eventKey matched its `where`.
|
|
@@ -18764,6 +18807,7 @@ function triggerBaseSchema(guard) {
|
|
|
18764
18807
|
...TriggerEventSourceFields
|
|
18765
18808
|
}).strict().superRefine((trigger, context) => {
|
|
18766
18809
|
validateTriggerChecks(trigger, context, [trigger.event]);
|
|
18810
|
+
validateAttachedUserPrompt(trigger, context, guard);
|
|
18767
18811
|
});
|
|
18768
18812
|
}
|
|
18769
18813
|
function triggerDefinitionBaseSchema(guard) {
|
|
@@ -18792,6 +18836,7 @@ function triggerDefinitionBaseSchema(guard) {
|
|
|
18792
18836
|
context,
|
|
18793
18837
|
trigger.event ? [trigger.event] : trigger.events ?? []
|
|
18794
18838
|
);
|
|
18839
|
+
validateAttachedUserPrompt(trigger, context, guard);
|
|
18795
18840
|
});
|
|
18796
18841
|
}
|
|
18797
18842
|
function heartbeatTriggerBaseSchema(guard) {
|
|
@@ -18807,6 +18852,7 @@ function heartbeatTriggerBaseSchema(guard) {
|
|
|
18807
18852
|
...triggerSharedFields(guard)
|
|
18808
18853
|
}).strict().superRefine((trigger, context) => {
|
|
18809
18854
|
validateTriggerChecks(trigger, context, ["heartbeat"]);
|
|
18855
|
+
validateAttachedUserPrompt(trigger, context, guard);
|
|
18810
18856
|
});
|
|
18811
18857
|
}
|
|
18812
18858
|
function avatarAssetDimensions(bytes) {
|
|
@@ -19024,6 +19070,15 @@ function validateTriggerObservedTargetConfig(spec, context) {
|
|
|
19024
19070
|
}
|
|
19025
19071
|
}
|
|
19026
19072
|
}
|
|
19073
|
+
function validateAttachedUserPrompt(trigger, context, guard) {
|
|
19074
|
+
if (guard === "authoring" && trigger.attachedUserPrompt !== void 0 && trigger.routing.kind !== "spawn") {
|
|
19075
|
+
context.addIssue({
|
|
19076
|
+
code: external_exports.ZodIssueCode.custom,
|
|
19077
|
+
path: ["attachedUserPrompt"],
|
|
19078
|
+
message: "Attached user prompt is supported only for spawn routing"
|
|
19079
|
+
});
|
|
19080
|
+
}
|
|
19081
|
+
}
|
|
19027
19082
|
function validateTriggerChecks(trigger, context, eventKeys) {
|
|
19028
19083
|
const checks = trigger.checks ?? [];
|
|
19029
19084
|
if (checks.length === 0) {
|
|
@@ -20294,6 +20349,9 @@ var init_sessions = __esm({
|
|
|
20294
20349
|
// Defaulted, not just nullable: sessions persisted before requester shipped
|
|
20295
20350
|
// lack the key, and replay-path parsing must keep accepting them.
|
|
20296
20351
|
requester: RequesterSchema.nullable().default(null),
|
|
20352
|
+
// Defaulted for session.upsert payloads persisted before attached prompts.
|
|
20353
|
+
attachedUserPrompt: external_exports.string().nullable().default(null).optional(),
|
|
20354
|
+
triggerMessageContext: external_exports.string().nullable().default(null).optional(),
|
|
20297
20355
|
snapshot: AgentResourceSchema,
|
|
20298
20356
|
environmentSnapshot: EnvironmentResourceSchema,
|
|
20299
20357
|
toolSnapshots: external_exports.array(
|
|
@@ -53306,7 +53364,7 @@ var init_package = __esm({
|
|
|
53306
53364
|
"package.json"() {
|
|
53307
53365
|
package_default = {
|
|
53308
53366
|
name: "@autohq/cli",
|
|
53309
|
-
version: "0.1.
|
|
53367
|
+
version: "0.1.459",
|
|
53310
53368
|
license: "SEE LICENSE IN README.md",
|
|
53311
53369
|
publishConfig: {
|
|
53312
53370
|
access: "public"
|