@autohq/cli 0.1.603 → 0.1.605
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 +37 -3
- package/dist/index.js +1119 -166
- package/package.json +1 -1
package/dist/agent-bridge.js
CHANGED
|
@@ -37751,7 +37751,7 @@ Object.assign(lookup, {
|
|
|
37751
37751
|
// package.json
|
|
37752
37752
|
var package_default = {
|
|
37753
37753
|
name: "@autohq/cli",
|
|
37754
|
-
version: "0.1.
|
|
37754
|
+
version: "0.1.605",
|
|
37755
37755
|
license: "SEE LICENSE IN README.md",
|
|
37756
37756
|
publishConfig: {
|
|
37757
37757
|
access: "public"
|
|
@@ -39443,6 +39443,30 @@ var ChatSendToolOutputSchema = external_exports.object({
|
|
|
39443
39443
|
provider: ProviderNameSchema,
|
|
39444
39444
|
threadId: external_exports.string().trim().min(1)
|
|
39445
39445
|
});
|
|
39446
|
+
var ChatMessageUpdateToolInputSchema = external_exports.object({
|
|
39447
|
+
content: ChatMessageContentSchema,
|
|
39448
|
+
message: ChatMessageRefSchema,
|
|
39449
|
+
target: ChatAddressSchema.optional()
|
|
39450
|
+
});
|
|
39451
|
+
var ChatMessageUpdateToolOutputSchema = external_exports.object({
|
|
39452
|
+
updated: external_exports.literal(true),
|
|
39453
|
+
messageId: external_exports.string().trim().min(1),
|
|
39454
|
+
threadId: external_exports.string().trim().min(1)
|
|
39455
|
+
});
|
|
39456
|
+
var ChatMessagePinToolInputSchema = external_exports.object({
|
|
39457
|
+
message: ChatMessageRefSchema,
|
|
39458
|
+
target: ChatAddressSchema.optional()
|
|
39459
|
+
});
|
|
39460
|
+
var ChatMessagePinToolOutputSchema = external_exports.object({
|
|
39461
|
+
pinned: external_exports.literal(true),
|
|
39462
|
+
messageId: external_exports.string().trim().min(1),
|
|
39463
|
+
threadId: external_exports.string().trim().min(1)
|
|
39464
|
+
});
|
|
39465
|
+
var ChatMessageUnpinToolOutputSchema = external_exports.object({
|
|
39466
|
+
pinned: external_exports.literal(false),
|
|
39467
|
+
messageId: external_exports.string().trim().min(1),
|
|
39468
|
+
threadId: external_exports.string().trim().min(1)
|
|
39469
|
+
});
|
|
39446
39470
|
var ChatHistoryToolInputSchema = external_exports.object({
|
|
39447
39471
|
target: ChatAddressSchema,
|
|
39448
39472
|
limit: external_exports.number().int().min(1).max(100).default(20)
|
|
@@ -78783,21 +78807,31 @@ function deliveryMessageWithSender(input) {
|
|
|
78783
78807
|
if (typeof record2.message !== "string") {
|
|
78784
78808
|
return null;
|
|
78785
78809
|
}
|
|
78786
|
-
const sender =
|
|
78810
|
+
const sender = deliverySender(record2.sender);
|
|
78787
78811
|
if (!sender) {
|
|
78788
78812
|
return record2.message;
|
|
78789
78813
|
}
|
|
78814
|
+
if (sender.type === "agent") {
|
|
78815
|
+
return [
|
|
78816
|
+
`Message from Auto agent session ${sender.sessionId}:`,
|
|
78817
|
+
"",
|
|
78818
|
+
record2.message
|
|
78819
|
+
].join("\n");
|
|
78820
|
+
}
|
|
78790
78821
|
return [
|
|
78791
78822
|
`Message from ${senderLabel(sender)} (${senderReference(sender)}):`,
|
|
78792
78823
|
"",
|
|
78793
78824
|
record2.message
|
|
78794
78825
|
].join("\n");
|
|
78795
78826
|
}
|
|
78796
|
-
function
|
|
78827
|
+
function deliverySender(value2) {
|
|
78797
78828
|
if (!value2 || typeof value2 !== "object") {
|
|
78798
78829
|
return null;
|
|
78799
78830
|
}
|
|
78800
78831
|
const record2 = value2;
|
|
78832
|
+
if (record2.type === "agent" && typeof record2.sessionId === "string" && record2.sessionId.trim()) {
|
|
78833
|
+
return { type: "agent", sessionId: record2.sessionId };
|
|
78834
|
+
}
|
|
78801
78835
|
if (record2.type !== "operator" || typeof record2.id !== "string" || !record2.id.trim()) {
|
|
78802
78836
|
return null;
|
|
78803
78837
|
}
|