@autohq/cli 0.1.603 → 0.1.604

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.
@@ -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.603",
37754
+ version: "0.1.604",
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 = operatorSender(record2.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 operatorSender(value2) {
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
  }
package/dist/index.js CHANGED
@@ -15667,7 +15667,7 @@ function chatDestinationSchema(shape) {
15667
15667
  };
15668
15668
  });
15669
15669
  }
15670
- var ChatMessageKindSchema, ChatMessageRefSchema, ChatToolBindingSchema, ChatMessageEventPayloadSchema, ChatMessageEditedEventPayloadSchema, ChatReactionEventPayloadSchema, ChatMessageContentSchema, ChatThreadSelectorSchema, ChatThreadDestinationFields, SlackChatDestinationFields, LinearChatDestinationFields, TelegramChatDestinationFields, DiscordChatDestinationFields, SlackChatDestinationSchema, LinearChatDestinationSchema, TelegramChatDestinationSchema, DiscordChatDestinationSchema, ChatDestinationSchema, SlackChatRecipientSchema, LinearChatRecipientSchema, TelegramChatRecipientSchema, DiscordChatRecipientSchema, ChatRecipientSchema, SlackChatAddressSchema, LinearChatAddressSchema, TelegramChatAddressSchema, DiscordChatAddressSchema, ChatAddressSchema, ChatToolDefaultsSchema, ChatSendToolInputSchema, ChatSendToolOutputSchema, ChatHistoryToolInputSchema, ChatAttachmentSchema, ChatHistoryMessageSchema, ChatHistoryContextSchema, ChatHistoryToolOutputSchema, ChatAttachmentDownloadAllowedMimeTypes, ChatAttachmentDownloadAllowedMimeTypeSchema, ChatAttachmentDownloadMaxSizeBytesByType, ChatAttachmentDownloadMaxSizeBytes, ChatAttachmentDownloadToolInputSchema, ChatAttachmentDownloadToolOutputSchema, ChatIssueParticipantSchema, ChatIssueNamedRefSchema, ChatIssueRefSchema, ChatIssueSchema, ChatIssueGetToolInputSchema, ChatIssueGetToolOutputSchema, ChatIssueUpdateToolInputSchema, ChatIssueUpdateToolOutputSchema, ChatReplyToolInputSchema, ChatReplyToolOutputSchema, ChatReactionToolInputSchema, ChatReactionToolOutputSchema, ChatSearchResultTypeSchema, ChatSearchToolInputSchema, ChatSearchWorkspaceSchema, SlackChatSearchResultSchema, DiscordChatSearchResultSchema, ChatSearchResultSchema, ChatSearchToolOutputSchema;
15670
+ var ChatMessageKindSchema, ChatMessageRefSchema, ChatToolBindingSchema, ChatMessageEventPayloadSchema, ChatMessageEditedEventPayloadSchema, ChatReactionEventPayloadSchema, ChatMessageContentSchema, ChatThreadSelectorSchema, ChatThreadDestinationFields, SlackChatDestinationFields, LinearChatDestinationFields, TelegramChatDestinationFields, DiscordChatDestinationFields, SlackChatDestinationSchema, LinearChatDestinationSchema, TelegramChatDestinationSchema, DiscordChatDestinationSchema, ChatDestinationSchema, SlackChatRecipientSchema, LinearChatRecipientSchema, TelegramChatRecipientSchema, DiscordChatRecipientSchema, ChatRecipientSchema, SlackChatAddressSchema, LinearChatAddressSchema, TelegramChatAddressSchema, DiscordChatAddressSchema, ChatAddressSchema, ChatToolDefaultsSchema, ChatSendToolInputSchema, ChatSendToolOutputSchema, ChatMessageUpdateToolInputSchema, ChatMessageUpdateToolOutputSchema, ChatMessagePinToolInputSchema, ChatMessagePinToolOutputSchema, ChatMessageUnpinToolOutputSchema, ChatHistoryToolInputSchema, ChatAttachmentSchema, ChatHistoryMessageSchema, ChatHistoryContextSchema, ChatHistoryToolOutputSchema, ChatAttachmentDownloadAllowedMimeTypes, ChatAttachmentDownloadAllowedMimeTypeSchema, ChatAttachmentDownloadMaxSizeBytesByType, ChatAttachmentDownloadMaxSizeBytes, ChatAttachmentDownloadToolInputSchema, ChatAttachmentDownloadToolOutputSchema, ChatIssueParticipantSchema, ChatIssueNamedRefSchema, ChatIssueRefSchema, ChatIssueSchema, ChatIssueGetToolInputSchema, ChatIssueGetToolOutputSchema, ChatIssueUpdateToolInputSchema, ChatIssueUpdateToolOutputSchema, ChatReplyToolInputSchema, ChatReplyToolOutputSchema, ChatReactionToolInputSchema, ChatReactionToolOutputSchema, ChatSearchResultTypeSchema, ChatSearchToolInputSchema, ChatSearchWorkspaceSchema, SlackChatSearchResultSchema, DiscordChatSearchResultSchema, ChatSearchResultSchema, ChatSearchToolOutputSchema;
15671
15671
  var init_chat = __esm({
15672
15672
  "../../packages/schemas/src/chat.ts"() {
15673
15673
  "use strict";
@@ -15971,6 +15971,30 @@ var init_chat = __esm({
15971
15971
  provider: ProviderNameSchema,
15972
15972
  threadId: external_exports.string().trim().min(1)
15973
15973
  });
15974
+ ChatMessageUpdateToolInputSchema = external_exports.object({
15975
+ content: ChatMessageContentSchema,
15976
+ message: ChatMessageRefSchema,
15977
+ target: ChatAddressSchema.optional()
15978
+ });
15979
+ ChatMessageUpdateToolOutputSchema = external_exports.object({
15980
+ updated: external_exports.literal(true),
15981
+ messageId: external_exports.string().trim().min(1),
15982
+ threadId: external_exports.string().trim().min(1)
15983
+ });
15984
+ ChatMessagePinToolInputSchema = external_exports.object({
15985
+ message: ChatMessageRefSchema,
15986
+ target: ChatAddressSchema.optional()
15987
+ });
15988
+ ChatMessagePinToolOutputSchema = external_exports.object({
15989
+ pinned: external_exports.literal(true),
15990
+ messageId: external_exports.string().trim().min(1),
15991
+ threadId: external_exports.string().trim().min(1)
15992
+ });
15993
+ ChatMessageUnpinToolOutputSchema = external_exports.object({
15994
+ pinned: external_exports.literal(false),
15995
+ messageId: external_exports.string().trim().min(1),
15996
+ threadId: external_exports.string().trim().min(1)
15997
+ });
15974
15998
  ChatHistoryToolInputSchema = external_exports.object({
15975
15999
  target: ChatAddressSchema,
15976
16000
  limit: external_exports.number().int().min(1).max(100).default(20)
@@ -91159,7 +91183,7 @@ var init_package = __esm({
91159
91183
  "package.json"() {
91160
91184
  package_default = {
91161
91185
  name: "@autohq/cli",
91162
- version: "0.1.603",
91186
+ version: "0.1.604",
91163
91187
  license: "SEE LICENSE IN README.md",
91164
91188
  publishConfig: {
91165
91189
  access: "public"
@@ -104539,21 +104563,31 @@ function deliveryMessageWithSender(input) {
104539
104563
  if (typeof record2.message !== "string") {
104540
104564
  return null;
104541
104565
  }
104542
- const sender = operatorSender(record2.sender);
104566
+ const sender = deliverySender(record2.sender);
104543
104567
  if (!sender) {
104544
104568
  return record2.message;
104545
104569
  }
104570
+ if (sender.type === "agent") {
104571
+ return [
104572
+ `Message from Auto agent session ${sender.sessionId}:`,
104573
+ "",
104574
+ record2.message
104575
+ ].join("\n");
104576
+ }
104546
104577
  return [
104547
104578
  `Message from ${senderLabel(sender)} (${senderReference(sender)}):`,
104548
104579
  "",
104549
104580
  record2.message
104550
104581
  ].join("\n");
104551
104582
  }
104552
- function operatorSender(value) {
104583
+ function deliverySender(value) {
104553
104584
  if (!value || typeof value !== "object") {
104554
104585
  return null;
104555
104586
  }
104556
104587
  const record2 = value;
104588
+ if (record2.type === "agent" && typeof record2.sessionId === "string" && record2.sessionId.trim()) {
104589
+ return { type: "agent", sessionId: record2.sessionId };
104590
+ }
104557
104591
  if (record2.type !== "operator" || typeof record2.id !== "string" || !record2.id.trim()) {
104558
104592
  return null;
104559
104593
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autohq/cli",
3
- "version": "0.1.603",
3
+ "version": "0.1.604",
4
4
  "license": "SEE LICENSE IN README.md",
5
5
  "publishConfig": {
6
6
  "access": "public"