@firfi/huly-mcp 0.9.1 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +249 -99
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +19 -31
package/dist/index.cjs
CHANGED
|
@@ -150564,6 +150564,9 @@ var ChannelId = HulyRef("ChannelId");
|
|
|
150564
150564
|
var MessageId = HulyRef("MessageId");
|
|
150565
150565
|
var ThreadReplyId = HulyRef("ThreadReplyId");
|
|
150566
150566
|
var ActivityMessageId = HulyRef("ActivityMessageId");
|
|
150567
|
+
var ReactionId = HulyRef("ReactionId");
|
|
150568
|
+
var SavedMessageId = HulyRef("SavedMessageId");
|
|
150569
|
+
var MentionId = HulyRef("MentionId");
|
|
150567
150570
|
var AttachmentId = HulyRef("AttachmentId");
|
|
150568
150571
|
var BlobId = HulyRef("BlobId");
|
|
150569
150572
|
var CardId = HulyRef("CardId");
|
|
@@ -150599,6 +150602,7 @@ var Email = Schema_exports.NonEmptyString.pipe(
|
|
|
150599
150602
|
);
|
|
150600
150603
|
var StatusName = NonEmptyString2.pipe(Schema_exports.brand("StatusName"));
|
|
150601
150604
|
var PersonName = NonEmptyString2.pipe(Schema_exports.brand("PersonName"));
|
|
150605
|
+
var PersonRefInput = Schema_exports.Union(Email, PersonName);
|
|
150602
150606
|
var ComponentLabel = NonEmptyString2.pipe(Schema_exports.brand("ComponentLabel"));
|
|
150603
150607
|
var MilestoneLabel = NonEmptyString2.pipe(Schema_exports.brand("MilestoneLabel"));
|
|
150604
150608
|
var ChannelName = NonEmptyString2.pipe(Schema_exports.brand("ChannelName"));
|
|
@@ -151039,8 +151043,8 @@ var ListLeadsParamsBase = Schema_exports.Struct({
|
|
|
151039
151043
|
status: Schema_exports.optional(StatusName.annotations({
|
|
151040
151044
|
description: "Filter by status name"
|
|
151041
151045
|
})),
|
|
151042
|
-
assignee: Schema_exports.optional(
|
|
151043
|
-
description: "Filter by assignee email"
|
|
151046
|
+
assignee: Schema_exports.optional(PersonRefInput.annotations({
|
|
151047
|
+
description: "Filter by assignee email or display name"
|
|
151044
151048
|
})),
|
|
151045
151049
|
titleSearch: Schema_exports.optional(Schema_exports.String.annotations({
|
|
151046
151050
|
description: "Search leads by title substring (case-insensitive)"
|
|
@@ -171272,7 +171276,7 @@ var PostHog = class extends PostHogBackendClient {
|
|
|
171272
171276
|
};
|
|
171273
171277
|
|
|
171274
171278
|
// src/version.ts
|
|
171275
|
-
var VERSION = true ? "0.9.
|
|
171279
|
+
var VERSION = true ? "0.9.3" : "0.0.0-dev";
|
|
171276
171280
|
|
|
171277
171281
|
// src/telemetry/posthog.ts
|
|
171278
171282
|
var POSTHOG_API_KEY = "phc_TGfFqCGdnF0p68wuFzd5WSw1IsBvOJW0YgoMJDyZPjm";
|
|
@@ -171497,6 +171501,12 @@ var toMcpResponse = (response) => {
|
|
|
171497
171501
|
};
|
|
171498
171502
|
|
|
171499
171503
|
// src/domain/schemas/activity.ts
|
|
171504
|
+
var ActivityCount = Schema_exports.NonNegativeInt.annotations({
|
|
171505
|
+
identifier: "ActivityCount",
|
|
171506
|
+
title: "ActivityCount",
|
|
171507
|
+
description: "Non-negative integer count for activity replies or reactions"
|
|
171508
|
+
});
|
|
171509
|
+
var ActivityAction = Schema_exports.Literal("create", "update", "remove");
|
|
171500
171510
|
var ListActivityParamsSchema = Schema_exports.Struct({
|
|
171501
171511
|
objectId: NonEmptyString2.annotations({
|
|
171502
171512
|
description: "ID of the object to get activity for"
|
|
@@ -171600,6 +171610,55 @@ var parseSaveMessageParams = Schema_exports.decodeUnknown(SaveMessageParamsSchem
|
|
|
171600
171610
|
var parseUnsaveMessageParams = Schema_exports.decodeUnknown(UnsaveMessageParamsSchema);
|
|
171601
171611
|
var parseListSavedMessagesParams = Schema_exports.decodeUnknown(ListSavedMessagesParamsSchema);
|
|
171602
171612
|
var parseListMentionsParams = Schema_exports.decodeUnknown(ListMentionsParamsSchema);
|
|
171613
|
+
var ActivityMessageWireSchema = Schema_exports.Struct({
|
|
171614
|
+
id: ActivityMessageId,
|
|
171615
|
+
objectId: NonEmptyString2,
|
|
171616
|
+
objectClass: ObjectClassName,
|
|
171617
|
+
modifiedBy: Schema_exports.optional(PersonId),
|
|
171618
|
+
modifiedOn: Schema_exports.optional(Timestamp),
|
|
171619
|
+
isPinned: Schema_exports.optional(Schema_exports.Boolean),
|
|
171620
|
+
replies: Schema_exports.optional(ActivityCount),
|
|
171621
|
+
reactions: Schema_exports.optional(ActivityCount),
|
|
171622
|
+
editedOn: Schema_exports.optional(Schema_exports.NullOr(Timestamp)),
|
|
171623
|
+
action: Schema_exports.optional(ActivityAction),
|
|
171624
|
+
message: Schema_exports.optional(Schema_exports.String)
|
|
171625
|
+
});
|
|
171626
|
+
var ReactionWireSchema = Schema_exports.Struct({
|
|
171627
|
+
id: ReactionId,
|
|
171628
|
+
messageId: ActivityMessageId,
|
|
171629
|
+
emoji: EmojiCode,
|
|
171630
|
+
createdBy: Schema_exports.optional(PersonId)
|
|
171631
|
+
});
|
|
171632
|
+
var SavedMessageWireSchema = Schema_exports.Struct({
|
|
171633
|
+
id: SavedMessageId,
|
|
171634
|
+
messageId: ActivityMessageId
|
|
171635
|
+
});
|
|
171636
|
+
var MentionWireSchema = Schema_exports.Struct({
|
|
171637
|
+
id: MentionId,
|
|
171638
|
+
messageId: ActivityMessageId,
|
|
171639
|
+
userId: PersonId,
|
|
171640
|
+
content: Schema_exports.optional(Schema_exports.String)
|
|
171641
|
+
});
|
|
171642
|
+
var AddReactionResultSchema = Schema_exports.Struct({
|
|
171643
|
+
reactionId: ReactionId,
|
|
171644
|
+
messageId: ActivityMessageId
|
|
171645
|
+
});
|
|
171646
|
+
var RemoveReactionResultSchema = Schema_exports.Struct({
|
|
171647
|
+
messageId: ActivityMessageId,
|
|
171648
|
+
removed: Schema_exports.Boolean
|
|
171649
|
+
});
|
|
171650
|
+
var SaveMessageResultSchema = Schema_exports.Struct({
|
|
171651
|
+
savedId: SavedMessageId,
|
|
171652
|
+
messageId: ActivityMessageId
|
|
171653
|
+
});
|
|
171654
|
+
var UnsaveMessageResultSchema = Schema_exports.Struct({
|
|
171655
|
+
messageId: ActivityMessageId,
|
|
171656
|
+
removed: Schema_exports.Boolean
|
|
171657
|
+
});
|
|
171658
|
+
var ListActivityResultSchema = Schema_exports.Array(ActivityMessageWireSchema);
|
|
171659
|
+
var ListReactionsResultSchema = Schema_exports.Array(ReactionWireSchema);
|
|
171660
|
+
var ListSavedMessagesResultSchema = Schema_exports.Array(SavedMessageWireSchema);
|
|
171661
|
+
var ListMentionsResultSchema = Schema_exports.Array(MentionWireSchema);
|
|
171603
171662
|
|
|
171604
171663
|
// src/huly/operations/activity.ts
|
|
171605
171664
|
var import_core19 = __toESM(require_lib4(), 1);
|
|
@@ -171644,6 +171703,10 @@ var time3 = require_lib35().default;
|
|
|
171644
171703
|
var tracker = require_lib36().default;
|
|
171645
171704
|
|
|
171646
171705
|
// src/huly/operations/activity.ts
|
|
171706
|
+
var optionalTimestamp = (value3) => value3 === void 0 ? void 0 : Timestamp.make(value3);
|
|
171707
|
+
var optionalNullableTimestamp = (value3) => value3 === void 0 || value3 === null ? value3 : Timestamp.make(value3);
|
|
171708
|
+
var optionalActivityCount = (value3) => value3 === void 0 ? void 0 : ActivityCount.make(value3);
|
|
171709
|
+
var optionalPersonId = (value3) => value3 === void 0 || value3 === "" ? void 0 : PersonId.make(value3);
|
|
171647
171710
|
var serverPopulatedCreateBy = "";
|
|
171648
171711
|
var listActivity = (params) => Effect_exports.gen(function* () {
|
|
171649
171712
|
const client = yield* HulyClient;
|
|
@@ -171663,14 +171726,14 @@ var listActivity = (params) => Effect_exports.gen(function* () {
|
|
|
171663
171726
|
);
|
|
171664
171727
|
const result = messages.map((msg) => ({
|
|
171665
171728
|
id: ActivityMessageId.make(msg._id),
|
|
171666
|
-
objectId: msg.attachedTo,
|
|
171729
|
+
objectId: NonEmptyString2.make(msg.attachedTo),
|
|
171667
171730
|
objectClass: ObjectClassName.make(msg.attachedToClass),
|
|
171668
|
-
modifiedBy: msg.modifiedBy,
|
|
171669
|
-
modifiedOn: msg.modifiedOn,
|
|
171731
|
+
modifiedBy: PersonId.make(msg.modifiedBy),
|
|
171732
|
+
modifiedOn: optionalTimestamp(msg.modifiedOn),
|
|
171670
171733
|
isPinned: msg.isPinned,
|
|
171671
|
-
replies: msg.replies,
|
|
171672
|
-
reactions: msg.reactions,
|
|
171673
|
-
editedOn: msg.editedOn
|
|
171734
|
+
replies: optionalActivityCount(msg.replies),
|
|
171735
|
+
reactions: optionalActivityCount(msg.reactions),
|
|
171736
|
+
editedOn: optionalNullableTimestamp(msg.editedOn)
|
|
171674
171737
|
}));
|
|
171675
171738
|
return result;
|
|
171676
171739
|
});
|
|
@@ -171697,7 +171760,7 @@ var addReaction = (params) => Effect_exports.gen(function* () {
|
|
|
171697
171760
|
reactionId
|
|
171698
171761
|
);
|
|
171699
171762
|
return {
|
|
171700
|
-
reactionId:
|
|
171763
|
+
reactionId: ReactionId.make(reactionId),
|
|
171701
171764
|
messageId: ActivityMessageId.make(params.messageId)
|
|
171702
171765
|
};
|
|
171703
171766
|
});
|
|
@@ -171736,10 +171799,10 @@ var listReactions = (params) => Effect_exports.gen(function* () {
|
|
|
171736
171799
|
{ limit }
|
|
171737
171800
|
);
|
|
171738
171801
|
const result = reactions.map((r) => ({
|
|
171739
|
-
id: r._id,
|
|
171802
|
+
id: ReactionId.make(r._id),
|
|
171740
171803
|
messageId: ActivityMessageId.make(r.attachedTo),
|
|
171741
171804
|
emoji: EmojiCode.make(r.emoji),
|
|
171742
|
-
createdBy: r.createBy
|
|
171805
|
+
createdBy: optionalPersonId(r.createBy)
|
|
171743
171806
|
}));
|
|
171744
171807
|
return result;
|
|
171745
171808
|
});
|
|
@@ -171761,7 +171824,7 @@ var saveMessage = (params) => Effect_exports.gen(function* () {
|
|
|
171761
171824
|
savedId
|
|
171762
171825
|
);
|
|
171763
171826
|
return {
|
|
171764
|
-
savedId:
|
|
171827
|
+
savedId: SavedMessageId.make(savedId),
|
|
171765
171828
|
messageId: ActivityMessageId.make(params.messageId)
|
|
171766
171829
|
};
|
|
171767
171830
|
});
|
|
@@ -171794,7 +171857,7 @@ var listSavedMessages = (params) => Effect_exports.gen(function* () {
|
|
|
171794
171857
|
{ limit }
|
|
171795
171858
|
);
|
|
171796
171859
|
const result = saved.map((s) => ({
|
|
171797
|
-
id: s._id,
|
|
171860
|
+
id: SavedMessageId.make(s._id),
|
|
171798
171861
|
messageId: ActivityMessageId.make(s.attachedTo)
|
|
171799
171862
|
}));
|
|
171800
171863
|
return result;
|
|
@@ -171813,9 +171876,9 @@ var listMentions = (params) => Effect_exports.gen(function* () {
|
|
|
171813
171876
|
}
|
|
171814
171877
|
);
|
|
171815
171878
|
const result = mentions.map((m) => ({
|
|
171816
|
-
id: m._id,
|
|
171879
|
+
id: MentionId.make(m._id),
|
|
171817
171880
|
messageId: ActivityMessageId.make(m.attachedTo),
|
|
171818
|
-
userId: m.user,
|
|
171881
|
+
userId: PersonId.make(m.user),
|
|
171819
171882
|
content: m.content
|
|
171820
171883
|
}));
|
|
171821
171884
|
return result;
|
|
@@ -171925,10 +171988,11 @@ var activityTools = [
|
|
|
171925
171988
|
description: "List activity messages for a Huly object. Returns activity sorted by date (newest first).",
|
|
171926
171989
|
category: CATEGORY,
|
|
171927
171990
|
inputSchema: listActivityParamsJsonSchema,
|
|
171928
|
-
handler:
|
|
171991
|
+
handler: createEncodedToolHandler(
|
|
171929
171992
|
"list_activity",
|
|
171930
171993
|
parseListActivityParams,
|
|
171931
|
-
listActivity
|
|
171994
|
+
listActivity,
|
|
171995
|
+
ListActivityResultSchema
|
|
171932
171996
|
)
|
|
171933
171997
|
},
|
|
171934
171998
|
{
|
|
@@ -171936,10 +172000,11 @@ var activityTools = [
|
|
|
171936
172000
|
description: "Add an emoji reaction to an activity message.",
|
|
171937
172001
|
category: CATEGORY,
|
|
171938
172002
|
inputSchema: addReactionParamsJsonSchema,
|
|
171939
|
-
handler:
|
|
172003
|
+
handler: createEncodedToolHandler(
|
|
171940
172004
|
"add_reaction",
|
|
171941
172005
|
parseAddReactionParams,
|
|
171942
|
-
addReaction
|
|
172006
|
+
addReaction,
|
|
172007
|
+
AddReactionResultSchema
|
|
171943
172008
|
)
|
|
171944
172009
|
},
|
|
171945
172010
|
{
|
|
@@ -171947,10 +172012,11 @@ var activityTools = [
|
|
|
171947
172012
|
description: "Remove an emoji reaction from an activity message.",
|
|
171948
172013
|
category: CATEGORY,
|
|
171949
172014
|
inputSchema: removeReactionParamsJsonSchema,
|
|
171950
|
-
handler:
|
|
172015
|
+
handler: createEncodedToolHandler(
|
|
171951
172016
|
"remove_reaction",
|
|
171952
172017
|
parseRemoveReactionParams,
|
|
171953
|
-
removeReaction
|
|
172018
|
+
removeReaction,
|
|
172019
|
+
RemoveReactionResultSchema
|
|
171954
172020
|
)
|
|
171955
172021
|
},
|
|
171956
172022
|
{
|
|
@@ -171958,10 +172024,11 @@ var activityTools = [
|
|
|
171958
172024
|
description: "List reactions on an activity message.",
|
|
171959
172025
|
category: CATEGORY,
|
|
171960
172026
|
inputSchema: listReactionsParamsJsonSchema,
|
|
171961
|
-
handler:
|
|
172027
|
+
handler: createEncodedToolHandler(
|
|
171962
172028
|
"list_reactions",
|
|
171963
172029
|
parseListReactionsParams,
|
|
171964
|
-
listReactions
|
|
172030
|
+
listReactions,
|
|
172031
|
+
ListReactionsResultSchema
|
|
171965
172032
|
)
|
|
171966
172033
|
},
|
|
171967
172034
|
{
|
|
@@ -171969,10 +172036,11 @@ var activityTools = [
|
|
|
171969
172036
|
description: "Save/bookmark an activity message for later reference.",
|
|
171970
172037
|
category: CATEGORY,
|
|
171971
172038
|
inputSchema: saveMessageParamsJsonSchema,
|
|
171972
|
-
handler:
|
|
172039
|
+
handler: createEncodedToolHandler(
|
|
171973
172040
|
"save_message",
|
|
171974
172041
|
parseSaveMessageParams,
|
|
171975
|
-
saveMessage
|
|
172042
|
+
saveMessage,
|
|
172043
|
+
SaveMessageResultSchema
|
|
171976
172044
|
)
|
|
171977
172045
|
},
|
|
171978
172046
|
{
|
|
@@ -171980,10 +172048,11 @@ var activityTools = [
|
|
|
171980
172048
|
description: "Remove an activity message from saved/bookmarks.",
|
|
171981
172049
|
category: CATEGORY,
|
|
171982
172050
|
inputSchema: unsaveMessageParamsJsonSchema,
|
|
171983
|
-
handler:
|
|
172051
|
+
handler: createEncodedToolHandler(
|
|
171984
172052
|
"unsave_message",
|
|
171985
172053
|
parseUnsaveMessageParams,
|
|
171986
|
-
unsaveMessage
|
|
172054
|
+
unsaveMessage,
|
|
172055
|
+
UnsaveMessageResultSchema
|
|
171987
172056
|
)
|
|
171988
172057
|
},
|
|
171989
172058
|
{
|
|
@@ -171991,10 +172060,11 @@ var activityTools = [
|
|
|
171991
172060
|
description: "List saved/bookmarked activity messages.",
|
|
171992
172061
|
category: CATEGORY,
|
|
171993
172062
|
inputSchema: listSavedMessagesParamsJsonSchema,
|
|
171994
|
-
handler:
|
|
172063
|
+
handler: createEncodedToolHandler(
|
|
171995
172064
|
"list_saved_messages",
|
|
171996
172065
|
parseListSavedMessagesParams,
|
|
171997
|
-
listSavedMessages
|
|
172066
|
+
listSavedMessages,
|
|
172067
|
+
ListSavedMessagesResultSchema
|
|
171998
172068
|
)
|
|
171999
172069
|
},
|
|
172000
172070
|
{
|
|
@@ -172002,10 +172072,11 @@ var activityTools = [
|
|
|
172002
172072
|
description: "List @mentions of the current user in activity messages.",
|
|
172003
172073
|
category: CATEGORY,
|
|
172004
172074
|
inputSchema: listMentionsParamsJsonSchema,
|
|
172005
|
-
handler:
|
|
172075
|
+
handler: createEncodedToolHandler(
|
|
172006
172076
|
"list_mentions",
|
|
172007
172077
|
parseListMentionsParams,
|
|
172008
|
-
listMentions
|
|
172078
|
+
listMentions,
|
|
172079
|
+
ListMentionsResultSchema
|
|
172009
172080
|
)
|
|
172010
172081
|
}
|
|
172011
172082
|
];
|
|
@@ -174520,26 +174591,67 @@ var SetCustomFieldParamsSchema = Schema_exports.Struct({
|
|
|
174520
174591
|
title: "SetCustomFieldParams",
|
|
174521
174592
|
description: "Parameters for setting a custom field value on a document"
|
|
174522
174593
|
});
|
|
174523
|
-
var
|
|
174524
|
-
|
|
174525
|
-
|
|
174526
|
-
"boolean",
|
|
174594
|
+
var CUSTOM_FIELD_PRIMITIVE_TYPE_NAMES = ["string", "number", "boolean", "date", "markup"];
|
|
174595
|
+
var CUSTOM_FIELD_TYPE_NAMES = [
|
|
174596
|
+
...CUSTOM_FIELD_PRIMITIVE_TYPE_NAMES,
|
|
174527
174597
|
"enum",
|
|
174528
174598
|
"array",
|
|
174529
174599
|
"ref",
|
|
174530
|
-
"date",
|
|
174531
|
-
"markup",
|
|
174532
174600
|
"unknown"
|
|
174601
|
+
];
|
|
174602
|
+
var CustomFieldTypeNameSchema = Schema_exports.Literal(...CUSTOM_FIELD_TYPE_NAMES);
|
|
174603
|
+
var EmptyCustomFieldTypeDetailsSchema = Schema_exports.Record({ key: Schema_exports.String, value: Schema_exports.Never });
|
|
174604
|
+
var CustomFieldTypeDetailsRecordSchema = Schema_exports.Record({ key: Schema_exports.String, value: Schema_exports.Unknown });
|
|
174605
|
+
var EnumCustomFieldTypeDetailsSchema = CustomFieldTypeDetailsRecordSchema.pipe(
|
|
174606
|
+
Schema_exports.filter((details) => "enumRef" in details, {
|
|
174607
|
+
message: () => "enum custom field typeDetails must include enumRef"
|
|
174608
|
+
})
|
|
174609
|
+
);
|
|
174610
|
+
var ArrayCustomFieldTypeDetailsSchema = CustomFieldTypeDetailsRecordSchema.pipe(
|
|
174611
|
+
Schema_exports.filter((details) => "of" in details, {
|
|
174612
|
+
message: () => "array custom field typeDetails must include of"
|
|
174613
|
+
})
|
|
174533
174614
|
);
|
|
174534
|
-
var
|
|
174615
|
+
var RefCustomFieldTypeDetailsSchema = CustomFieldTypeDetailsRecordSchema.pipe(
|
|
174616
|
+
Schema_exports.filter((details) => "to" in details, {
|
|
174617
|
+
message: () => "ref custom field typeDetails must include to"
|
|
174618
|
+
})
|
|
174619
|
+
);
|
|
174620
|
+
var UnknownCustomFieldTypeDetailsSchema = CustomFieldTypeDetailsRecordSchema;
|
|
174621
|
+
var CustomFieldInfoBaseWireFields = {
|
|
174535
174622
|
id: CustomFieldId,
|
|
174536
174623
|
name: Schema_exports.String,
|
|
174537
174624
|
label: Schema_exports.String,
|
|
174538
174625
|
ownerClassId: ObjectClassName,
|
|
174539
|
-
ownerLabel: Schema_exports.String
|
|
174540
|
-
|
|
174541
|
-
|
|
174542
|
-
|
|
174626
|
+
ownerLabel: Schema_exports.String
|
|
174627
|
+
};
|
|
174628
|
+
var CustomFieldInfoWireSchema = Schema_exports.Union(
|
|
174629
|
+
Schema_exports.Struct({
|
|
174630
|
+
...CustomFieldInfoBaseWireFields,
|
|
174631
|
+
type: Schema_exports.Literal(...CUSTOM_FIELD_PRIMITIVE_TYPE_NAMES),
|
|
174632
|
+
typeDetails: EmptyCustomFieldTypeDetailsSchema
|
|
174633
|
+
}),
|
|
174634
|
+
Schema_exports.Struct({
|
|
174635
|
+
...CustomFieldInfoBaseWireFields,
|
|
174636
|
+
type: Schema_exports.Literal("enum"),
|
|
174637
|
+
typeDetails: EnumCustomFieldTypeDetailsSchema
|
|
174638
|
+
}),
|
|
174639
|
+
Schema_exports.Struct({
|
|
174640
|
+
...CustomFieldInfoBaseWireFields,
|
|
174641
|
+
type: Schema_exports.Literal("array"),
|
|
174642
|
+
typeDetails: ArrayCustomFieldTypeDetailsSchema
|
|
174643
|
+
}),
|
|
174644
|
+
Schema_exports.Struct({
|
|
174645
|
+
...CustomFieldInfoBaseWireFields,
|
|
174646
|
+
type: Schema_exports.Literal("ref"),
|
|
174647
|
+
typeDetails: RefCustomFieldTypeDetailsSchema
|
|
174648
|
+
}),
|
|
174649
|
+
Schema_exports.Struct({
|
|
174650
|
+
...CustomFieldInfoBaseWireFields,
|
|
174651
|
+
type: Schema_exports.Literal("unknown"),
|
|
174652
|
+
typeDetails: UnknownCustomFieldTypeDetailsSchema
|
|
174653
|
+
})
|
|
174654
|
+
);
|
|
174543
174655
|
var CustomFieldValueWireSchema = Schema_exports.Struct({
|
|
174544
174656
|
fieldId: CustomFieldId,
|
|
174545
174657
|
label: Schema_exports.String,
|
|
@@ -174641,8 +174753,8 @@ var ListIssuesParamsBase = Schema_exports.Struct({
|
|
|
174641
174753
|
status: Schema_exports.optional(StatusName.annotations({
|
|
174642
174754
|
description: "Filter by status name"
|
|
174643
174755
|
})),
|
|
174644
|
-
assignee: Schema_exports.optional(
|
|
174645
|
-
description: "Filter by assignee email"
|
|
174756
|
+
assignee: Schema_exports.optional(PersonRefInput.annotations({
|
|
174757
|
+
description: "Filter by assignee email or display name"
|
|
174646
174758
|
})),
|
|
174647
174759
|
parentIssue: Schema_exports.optional(IssueIdentifier.annotations({
|
|
174648
174760
|
description: "Filter to children of this parent issue (e.g., 'HULY-42')"
|
|
@@ -174721,8 +174833,8 @@ var CreateIssueParamsSchema = Schema_exports.Struct({
|
|
|
174721
174833
|
priority: Schema_exports.optional(IssuePrioritySchema.annotations({
|
|
174722
174834
|
description: "Issue priority (urgent, high, medium, low, no-priority)"
|
|
174723
174835
|
})),
|
|
174724
|
-
assignee: Schema_exports.optional(
|
|
174725
|
-
description: "Assignee email address"
|
|
174836
|
+
assignee: Schema_exports.optional(PersonRefInput.annotations({
|
|
174837
|
+
description: "Assignee email address or display name"
|
|
174726
174838
|
})),
|
|
174727
174839
|
status: Schema_exports.optional(StatusName.annotations({
|
|
174728
174840
|
description: "Initial status (uses project default if not specified)"
|
|
@@ -174759,8 +174871,8 @@ var UpdateIssueParamsSchema = Schema_exports.Struct({
|
|
|
174759
174871
|
description: "New issue priority"
|
|
174760
174872
|
})),
|
|
174761
174873
|
assignee: Schema_exports.optional(
|
|
174762
|
-
Schema_exports.NullOr(
|
|
174763
|
-
description: "New assignee email (null to unassign)"
|
|
174874
|
+
Schema_exports.NullOr(PersonRefInput).annotations({
|
|
174875
|
+
description: "New assignee email or display name (null to unassign)"
|
|
174764
174876
|
})
|
|
174765
174877
|
),
|
|
174766
174878
|
status: Schema_exports.optional(StatusName.annotations({
|
|
@@ -174913,8 +175025,8 @@ var CreateComponentParamsSchema = Schema_exports.Struct({
|
|
|
174913
175025
|
description: Schema_exports.optional(Schema_exports.String.annotations({
|
|
174914
175026
|
description: "Component description (markdown supported)"
|
|
174915
175027
|
})),
|
|
174916
|
-
lead: Schema_exports.optional(
|
|
174917
|
-
description: "Lead person email address"
|
|
175028
|
+
lead: Schema_exports.optional(PersonRefInput.annotations({
|
|
175029
|
+
description: "Lead person email address or display name"
|
|
174918
175030
|
}))
|
|
174919
175031
|
}).annotations({
|
|
174920
175032
|
title: "CreateComponentParams",
|
|
@@ -174934,8 +175046,8 @@ var UpdateComponentParamsSchema = Schema_exports.Struct({
|
|
|
174934
175046
|
description: "New component description (markdown supported)"
|
|
174935
175047
|
})),
|
|
174936
175048
|
lead: Schema_exports.optional(
|
|
174937
|
-
Schema_exports.NullOr(
|
|
174938
|
-
description: "New lead person email (null to unassign)"
|
|
175049
|
+
Schema_exports.NullOr(PersonRefInput).annotations({
|
|
175050
|
+
description: "New lead person email or display name (null to unassign)"
|
|
174939
175051
|
})
|
|
174940
175052
|
)
|
|
174941
175053
|
}).annotations({
|
|
@@ -175197,8 +175309,8 @@ var ChildTemplateFieldsSchema = Schema_exports.Struct({
|
|
|
175197
175309
|
priority: Schema_exports.optional(IssuePrioritySchema.annotations({
|
|
175198
175310
|
description: "Child default priority"
|
|
175199
175311
|
})),
|
|
175200
|
-
assignee: Schema_exports.optional(
|
|
175201
|
-
description: "Child default assignee email"
|
|
175312
|
+
assignee: Schema_exports.optional(PersonRefInput.annotations({
|
|
175313
|
+
description: "Child default assignee email or display name"
|
|
175202
175314
|
})),
|
|
175203
175315
|
component: Schema_exports.optional(ComponentIdentifier.annotations({
|
|
175204
175316
|
description: "Child default component ID or label"
|
|
@@ -175274,8 +175386,8 @@ var CreateIssueTemplateParamsSchema = Schema_exports.Struct({
|
|
|
175274
175386
|
priority: Schema_exports.optional(IssuePrioritySchema.annotations({
|
|
175275
175387
|
description: "Default priority for issues created from this template"
|
|
175276
175388
|
})),
|
|
175277
|
-
assignee: Schema_exports.optional(
|
|
175278
|
-
description: "Default assignee email address"
|
|
175389
|
+
assignee: Schema_exports.optional(PersonRefInput.annotations({
|
|
175390
|
+
description: "Default assignee email address or display name"
|
|
175279
175391
|
})),
|
|
175280
175392
|
component: Schema_exports.optional(ComponentIdentifier.annotations({
|
|
175281
175393
|
description: "Default component ID or label"
|
|
@@ -175308,8 +175420,8 @@ var CreateIssueFromTemplateParamsSchema = Schema_exports.Struct({
|
|
|
175308
175420
|
priority: Schema_exports.optional(IssuePrioritySchema.annotations({
|
|
175309
175421
|
description: "Override priority"
|
|
175310
175422
|
})),
|
|
175311
|
-
assignee: Schema_exports.optional(
|
|
175312
|
-
description: "Override assignee email"
|
|
175423
|
+
assignee: Schema_exports.optional(PersonRefInput.annotations({
|
|
175424
|
+
description: "Override assignee email or display name"
|
|
175313
175425
|
})),
|
|
175314
175426
|
status: Schema_exports.optional(StatusName.annotations({
|
|
175315
175427
|
description: "Initial status (uses project default if not specified)"
|
|
@@ -175338,8 +175450,8 @@ var UpdateIssueTemplateParamsSchema = Schema_exports.Struct({
|
|
|
175338
175450
|
description: "New default priority"
|
|
175339
175451
|
})),
|
|
175340
175452
|
assignee: Schema_exports.optional(
|
|
175341
|
-
Schema_exports.NullOr(
|
|
175342
|
-
description: "New default assignee email (null to unassign)"
|
|
175453
|
+
Schema_exports.NullOr(PersonRefInput).annotations({
|
|
175454
|
+
description: "New default assignee email or display name (null to unassign)"
|
|
175343
175455
|
})
|
|
175344
175456
|
),
|
|
175345
175457
|
component: Schema_exports.optional(
|
|
@@ -176490,7 +176602,7 @@ var parseCreateWorkSlotParams = Schema_exports.decodeUnknown(CreateWorkSlotParam
|
|
|
176490
176602
|
var parseStartTimerParams = Schema_exports.decodeUnknown(StartTimerParamsSchema);
|
|
176491
176603
|
var parseStopTimerParams = Schema_exports.decodeUnknown(StopTimerParamsSchema);
|
|
176492
176604
|
var TimeSpendReportWireSchema = Schema_exports.Struct({
|
|
176493
|
-
id:
|
|
176605
|
+
id: TimeSpendReportId,
|
|
176494
176606
|
identifier: Schema_exports.optional(IssueIdentifier),
|
|
176495
176607
|
employee: Schema_exports.optional(NonEmptyString2),
|
|
176496
176608
|
date: Schema_exports.optional(Schema_exports.NullOr(Timestamp)),
|
|
@@ -176505,7 +176617,7 @@ var TimeReportSummarySchema = Schema_exports.Struct({
|
|
|
176505
176617
|
reports: Schema_exports.Array(TimeSpendReportWireSchema)
|
|
176506
176618
|
});
|
|
176507
176619
|
var WorkSlotWireSchema = Schema_exports.Struct({
|
|
176508
|
-
id:
|
|
176620
|
+
id: WorkSlotId,
|
|
176509
176621
|
todoId: TodoId,
|
|
176510
176622
|
date: Timestamp,
|
|
176511
176623
|
dueDate: Timestamp,
|
|
@@ -176530,11 +176642,11 @@ var DetailedTimeReportSchema = Schema_exports.Struct({
|
|
|
176530
176642
|
)
|
|
176531
176643
|
});
|
|
176532
176644
|
var LogTimeResultSchema = Schema_exports.Struct({
|
|
176533
|
-
reportId:
|
|
176645
|
+
reportId: TimeSpendReportId,
|
|
176534
176646
|
identifier: IssueIdentifier
|
|
176535
176647
|
});
|
|
176536
176648
|
var CreateWorkSlotResultSchema = Schema_exports.Struct({
|
|
176537
|
-
slotId:
|
|
176649
|
+
slotId: WorkSlotId
|
|
176538
176650
|
});
|
|
176539
176651
|
var StartTimerResultSchema = Schema_exports.Struct({
|
|
176540
176652
|
identifier: IssueIdentifier,
|
|
@@ -176543,7 +176655,7 @@ var StartTimerResultSchema = Schema_exports.Struct({
|
|
|
176543
176655
|
var StopTimerResultSchema = Schema_exports.Struct({
|
|
176544
176656
|
identifier: IssueIdentifier,
|
|
176545
176657
|
stoppedAt: Timestamp,
|
|
176546
|
-
reportId: Schema_exports.optional(
|
|
176658
|
+
reportId: Schema_exports.optional(TimeSpendReportId)
|
|
176547
176659
|
});
|
|
176548
176660
|
var ListTimeSpendReportsResultSchema = Schema_exports.Array(TimeSpendReportWireSchema);
|
|
176549
176661
|
var ListWorkSlotsResultSchema = Schema_exports.Array(WorkSlotWireSchema);
|
|
@@ -176942,36 +177054,36 @@ var parseUpdateUserProfileParams = Schema_exports.decodeUnknown(UpdateUserProfil
|
|
|
176942
177054
|
var parseUpdateGuestSettingsParams = Schema_exports.decodeUnknown(UpdateGuestSettingsParamsSchema);
|
|
176943
177055
|
var parseGetRegionsParams = Schema_exports.decodeUnknown(GetRegionsParamsSchema);
|
|
176944
177056
|
var WorkspaceMemberSchema = Schema_exports.Struct({
|
|
176945
|
-
personId:
|
|
177057
|
+
personId: PersonUuid,
|
|
176946
177058
|
role: AccountRoleSchema,
|
|
176947
177059
|
name: Schema_exports.optional(NonEmptyString2),
|
|
176948
|
-
email: Schema_exports.optional(
|
|
177060
|
+
email: Schema_exports.optional(Email)
|
|
176949
177061
|
});
|
|
176950
177062
|
var WorkspaceInfoSchema = Schema_exports.Struct({
|
|
176951
|
-
uuid:
|
|
176952
|
-
name:
|
|
176953
|
-
url:
|
|
176954
|
-
region: Schema_exports.optional(
|
|
177063
|
+
uuid: WorkspaceUuid,
|
|
177064
|
+
name: WorkspaceName,
|
|
177065
|
+
url: UrlString,
|
|
177066
|
+
region: Schema_exports.optional(RegionId),
|
|
176955
177067
|
createdOn: Schema_exports.Number,
|
|
176956
177068
|
allowReadOnlyGuest: Schema_exports.optional(Schema_exports.Boolean),
|
|
176957
177069
|
allowGuestSignUp: Schema_exports.optional(Schema_exports.Boolean),
|
|
176958
|
-
version: Schema_exports.optional(
|
|
176959
|
-
mode: Schema_exports.optional(
|
|
177070
|
+
version: Schema_exports.optional(WorkspaceVersion),
|
|
177071
|
+
mode: Schema_exports.optional(WorkspaceMode)
|
|
176960
177072
|
});
|
|
176961
177073
|
var WorkspaceSummarySchema = Schema_exports.Struct({
|
|
176962
|
-
uuid:
|
|
176963
|
-
name:
|
|
176964
|
-
url:
|
|
176965
|
-
region: Schema_exports.optional(
|
|
177074
|
+
uuid: WorkspaceUuid,
|
|
177075
|
+
name: WorkspaceName,
|
|
177076
|
+
url: UrlString,
|
|
177077
|
+
region: Schema_exports.optional(RegionId),
|
|
176966
177078
|
createdOn: Schema_exports.Number,
|
|
176967
177079
|
lastVisit: Schema_exports.optional(Schema_exports.Number)
|
|
176968
177080
|
});
|
|
176969
177081
|
var RegionInfoSchema = Schema_exports.Struct({
|
|
176970
|
-
region:
|
|
177082
|
+
region: RegionId,
|
|
176971
177083
|
name: Schema_exports.String
|
|
176972
177084
|
});
|
|
176973
177085
|
var UserProfileSchema = Schema_exports.Struct({
|
|
176974
|
-
personUuid:
|
|
177086
|
+
personUuid: PersonUuid,
|
|
176975
177087
|
firstName: Schema_exports.String,
|
|
176976
177088
|
lastName: Schema_exports.String,
|
|
176977
177089
|
bio: Schema_exports.optional(Schema_exports.String),
|
|
@@ -176982,14 +177094,14 @@ var UserProfileSchema = Schema_exports.Struct({
|
|
|
176982
177094
|
isPublic: Schema_exports.Boolean
|
|
176983
177095
|
});
|
|
176984
177096
|
var UpdateMemberRoleResultSchema = Schema_exports.Struct({
|
|
176985
|
-
accountId:
|
|
177097
|
+
accountId: AccountId,
|
|
176986
177098
|
role: AccountRoleSchema,
|
|
176987
177099
|
updated: Schema_exports.Boolean
|
|
176988
177100
|
});
|
|
176989
177101
|
var CreateWorkspaceResultSchema = Schema_exports.Struct({
|
|
176990
|
-
uuid:
|
|
176991
|
-
url:
|
|
176992
|
-
name:
|
|
177102
|
+
uuid: WorkspaceUuid,
|
|
177103
|
+
url: UrlString,
|
|
177104
|
+
name: WorkspaceName
|
|
176993
177105
|
});
|
|
176994
177106
|
var DeleteWorkspaceResultSchema = Schema_exports.Struct({
|
|
176995
177107
|
deleted: Schema_exports.Boolean
|
|
@@ -179067,9 +179179,9 @@ var decodeTypeDescriptor = (value3) => {
|
|
|
179067
179179
|
if (_class.includes("TypeString")) return { typeName: "string", typeDetails: {} };
|
|
179068
179180
|
if (_class.includes("TypeNumber")) return { typeName: "number", typeDetails: {} };
|
|
179069
179181
|
if (_class.includes("TypeBoolean")) return { typeName: "boolean", typeDetails: {} };
|
|
179070
|
-
if (_class.includes("EnumOf")) return { typeName: "enum", typeDetails: { enumRef: record4.of } };
|
|
179071
|
-
if (_class.includes("ArrOf")) return { typeName: "array", typeDetails: { of: record4.of } };
|
|
179072
|
-
if (_class.includes("RefTo")) return { typeName: "ref", typeDetails: { to: record4.to } };
|
|
179182
|
+
if (_class.includes("EnumOf")) return { typeName: "enum", typeDetails: { ...record4, enumRef: record4.of } };
|
|
179183
|
+
if (_class.includes("ArrOf")) return { typeName: "array", typeDetails: { ...record4, of: record4.of } };
|
|
179184
|
+
if (_class.includes("RefTo")) return { typeName: "ref", typeDetails: { ...record4, to: record4.to } };
|
|
179073
179185
|
if (_class.includes("TypeDate")) return { typeName: "date", typeDetails: {} };
|
|
179074
179186
|
if (_class.includes("TypeMarkup")) return { typeName: "markup", typeDetails: {} };
|
|
179075
179187
|
return { typeName: "unknown", typeDetails: record4 };
|
|
@@ -179130,6 +179242,47 @@ var parseValueForType = (value3, typeName) => {
|
|
|
179130
179242
|
return value3;
|
|
179131
179243
|
}
|
|
179132
179244
|
};
|
|
179245
|
+
var toCustomFieldInfo = (attr, ownerLabel) => {
|
|
179246
|
+
const base = {
|
|
179247
|
+
id: attr.id,
|
|
179248
|
+
name: attr.name,
|
|
179249
|
+
label: attr.label,
|
|
179250
|
+
ownerClassId: attr.ownerClassId,
|
|
179251
|
+
ownerLabel
|
|
179252
|
+
};
|
|
179253
|
+
switch (attr.typeDescriptor.typeName) {
|
|
179254
|
+
case "enum":
|
|
179255
|
+
return {
|
|
179256
|
+
...base,
|
|
179257
|
+
type: "enum",
|
|
179258
|
+
typeDetails: attr.typeDescriptor.typeDetails
|
|
179259
|
+
};
|
|
179260
|
+
case "array":
|
|
179261
|
+
return {
|
|
179262
|
+
...base,
|
|
179263
|
+
type: "array",
|
|
179264
|
+
typeDetails: attr.typeDescriptor.typeDetails
|
|
179265
|
+
};
|
|
179266
|
+
case "ref":
|
|
179267
|
+
return {
|
|
179268
|
+
...base,
|
|
179269
|
+
type: "ref",
|
|
179270
|
+
typeDetails: attr.typeDescriptor.typeDetails
|
|
179271
|
+
};
|
|
179272
|
+
case "unknown":
|
|
179273
|
+
return {
|
|
179274
|
+
...base,
|
|
179275
|
+
type: "unknown",
|
|
179276
|
+
typeDetails: attr.typeDescriptor.typeDetails
|
|
179277
|
+
};
|
|
179278
|
+
default:
|
|
179279
|
+
return {
|
|
179280
|
+
...base,
|
|
179281
|
+
type: attr.typeDescriptor.typeName,
|
|
179282
|
+
typeDetails: {}
|
|
179283
|
+
};
|
|
179284
|
+
}
|
|
179285
|
+
};
|
|
179133
179286
|
var listCustomFields = (params) => Effect_exports.gen(function* () {
|
|
179134
179287
|
const client = yield* HulyClient;
|
|
179135
179288
|
const limit = clampLimit(params.limit ?? DEFAULT_LIMIT2);
|
|
@@ -179147,15 +179300,7 @@ var listCustomFields = (params) => Effect_exports.gen(function* () {
|
|
|
179147
179300
|
client,
|
|
179148
179301
|
[...new Set(decodedAttrs.map((attr) => attr.ownerClassId))]
|
|
179149
179302
|
);
|
|
179150
|
-
return decodedAttrs.map((attr) => (
|
|
179151
|
-
id: attr.id,
|
|
179152
|
-
name: attr.name,
|
|
179153
|
-
label: attr.label,
|
|
179154
|
-
ownerClassId: attr.ownerClassId,
|
|
179155
|
-
ownerLabel: ownerLabels.get(attr.ownerClassId) ?? attr.ownerClassId,
|
|
179156
|
-
type: attr.typeDescriptor.typeName,
|
|
179157
|
-
typeDetails: attr.typeDescriptor.typeDetails
|
|
179158
|
-
}));
|
|
179303
|
+
return decodedAttrs.map((attr) => toCustomFieldInfo(attr, ownerLabels.get(attr.ownerClassId) ?? attr.ownerClassId));
|
|
179159
179304
|
});
|
|
179160
179305
|
var getCustomFieldValues = (params) => Effect_exports.gen(function* () {
|
|
179161
179306
|
const client = yield* HulyClient;
|
|
@@ -182793,10 +182938,15 @@ var getTaskTypes = (client, taskTypeIds) => taskTypeIds.length === 0 ? Effect_ex
|
|
|
182793
182938
|
var getTaskTypesByProjectType = (client, projectTypeId) => client.findAll(task.class.TaskType, { parent: projectTypeId }).pipe(
|
|
182794
182939
|
Effect_exports.map((result) => [...result])
|
|
182795
182940
|
);
|
|
182796
|
-
var
|
|
182941
|
+
var getRecoverableStatusesByName = (client, name) => client.findAll(core.class.Status, { ofAttribute: tracker.attribute.IssueStatus }).pipe(
|
|
182797
182942
|
Effect_exports.map(
|
|
182798
182943
|
(result) => [...result].filter((status) => normalizeForComparison(status.name) === normalizeForComparison(name))
|
|
182799
|
-
)
|
|
182944
|
+
),
|
|
182945
|
+
// Compatibility fallback for https://github.com/dearlordylord/huly-mcp/issues/34:
|
|
182946
|
+
// this broad recovery query was reported to null-deref on an older self-hosted
|
|
182947
|
+
// Huly. The primary project-type status data is already loaded, so losing only
|
|
182948
|
+
// cross-project duplicate recovery is preferable to failing status creation.
|
|
182949
|
+
Effect_exports.catchAll(() => Effect_exports.succeed([]))
|
|
182800
182950
|
);
|
|
182801
182951
|
var loadWorkflowData = (client, projectType) => Effect_exports.gen(function* () {
|
|
182802
182952
|
const taskTypes = yield* getTaskTypes(client, projectType.tasks);
|
|
@@ -183030,7 +183180,7 @@ var createIssueStatus = (params) => Effect_exports.gen(function* () {
|
|
|
183030
183180
|
const workflowData = yield* loadWorkflowData(client, projectType);
|
|
183031
183181
|
const targetTaskTypes = params.taskType === void 0 ? workflowData.taskTypes : [yield* resolveTaskType(workflowData.taskTypes, params.taskType)];
|
|
183032
183182
|
const statusClass = yield* resolveStatusClass(targetTaskTypes);
|
|
183033
|
-
const statusesByName = yield*
|
|
183183
|
+
const statusesByName = yield* getRecoverableStatusesByName(client, params.name);
|
|
183034
183184
|
const existingStatus = existingStatusByName(
|
|
183035
183185
|
[...workflowData.statuses, ...statusesByName],
|
|
183036
183186
|
params.name
|