@firfi/huly-mcp 0.9.1 → 0.9.2
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 +227 -79
- 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");
|
|
@@ -171272,7 +171275,7 @@ var PostHog = class extends PostHogBackendClient {
|
|
|
171272
171275
|
};
|
|
171273
171276
|
|
|
171274
171277
|
// src/version.ts
|
|
171275
|
-
var VERSION = true ? "0.9.
|
|
171278
|
+
var VERSION = true ? "0.9.2" : "0.0.0-dev";
|
|
171276
171279
|
|
|
171277
171280
|
// src/telemetry/posthog.ts
|
|
171278
171281
|
var POSTHOG_API_KEY = "phc_TGfFqCGdnF0p68wuFzd5WSw1IsBvOJW0YgoMJDyZPjm";
|
|
@@ -171497,6 +171500,12 @@ var toMcpResponse = (response) => {
|
|
|
171497
171500
|
};
|
|
171498
171501
|
|
|
171499
171502
|
// src/domain/schemas/activity.ts
|
|
171503
|
+
var ActivityCount = Schema_exports.NonNegativeInt.annotations({
|
|
171504
|
+
identifier: "ActivityCount",
|
|
171505
|
+
title: "ActivityCount",
|
|
171506
|
+
description: "Non-negative integer count for activity replies or reactions"
|
|
171507
|
+
});
|
|
171508
|
+
var ActivityAction = Schema_exports.Literal("create", "update", "remove");
|
|
171500
171509
|
var ListActivityParamsSchema = Schema_exports.Struct({
|
|
171501
171510
|
objectId: NonEmptyString2.annotations({
|
|
171502
171511
|
description: "ID of the object to get activity for"
|
|
@@ -171600,6 +171609,55 @@ var parseSaveMessageParams = Schema_exports.decodeUnknown(SaveMessageParamsSchem
|
|
|
171600
171609
|
var parseUnsaveMessageParams = Schema_exports.decodeUnknown(UnsaveMessageParamsSchema);
|
|
171601
171610
|
var parseListSavedMessagesParams = Schema_exports.decodeUnknown(ListSavedMessagesParamsSchema);
|
|
171602
171611
|
var parseListMentionsParams = Schema_exports.decodeUnknown(ListMentionsParamsSchema);
|
|
171612
|
+
var ActivityMessageWireSchema = Schema_exports.Struct({
|
|
171613
|
+
id: ActivityMessageId,
|
|
171614
|
+
objectId: NonEmptyString2,
|
|
171615
|
+
objectClass: ObjectClassName,
|
|
171616
|
+
modifiedBy: Schema_exports.optional(PersonId),
|
|
171617
|
+
modifiedOn: Schema_exports.optional(Timestamp),
|
|
171618
|
+
isPinned: Schema_exports.optional(Schema_exports.Boolean),
|
|
171619
|
+
replies: Schema_exports.optional(ActivityCount),
|
|
171620
|
+
reactions: Schema_exports.optional(ActivityCount),
|
|
171621
|
+
editedOn: Schema_exports.optional(Schema_exports.NullOr(Timestamp)),
|
|
171622
|
+
action: Schema_exports.optional(ActivityAction),
|
|
171623
|
+
message: Schema_exports.optional(Schema_exports.String)
|
|
171624
|
+
});
|
|
171625
|
+
var ReactionWireSchema = Schema_exports.Struct({
|
|
171626
|
+
id: ReactionId,
|
|
171627
|
+
messageId: ActivityMessageId,
|
|
171628
|
+
emoji: EmojiCode,
|
|
171629
|
+
createdBy: Schema_exports.optional(PersonId)
|
|
171630
|
+
});
|
|
171631
|
+
var SavedMessageWireSchema = Schema_exports.Struct({
|
|
171632
|
+
id: SavedMessageId,
|
|
171633
|
+
messageId: ActivityMessageId
|
|
171634
|
+
});
|
|
171635
|
+
var MentionWireSchema = Schema_exports.Struct({
|
|
171636
|
+
id: MentionId,
|
|
171637
|
+
messageId: ActivityMessageId,
|
|
171638
|
+
userId: PersonId,
|
|
171639
|
+
content: Schema_exports.optional(Schema_exports.String)
|
|
171640
|
+
});
|
|
171641
|
+
var AddReactionResultSchema = Schema_exports.Struct({
|
|
171642
|
+
reactionId: ReactionId,
|
|
171643
|
+
messageId: ActivityMessageId
|
|
171644
|
+
});
|
|
171645
|
+
var RemoveReactionResultSchema = Schema_exports.Struct({
|
|
171646
|
+
messageId: ActivityMessageId,
|
|
171647
|
+
removed: Schema_exports.Boolean
|
|
171648
|
+
});
|
|
171649
|
+
var SaveMessageResultSchema = Schema_exports.Struct({
|
|
171650
|
+
savedId: SavedMessageId,
|
|
171651
|
+
messageId: ActivityMessageId
|
|
171652
|
+
});
|
|
171653
|
+
var UnsaveMessageResultSchema = Schema_exports.Struct({
|
|
171654
|
+
messageId: ActivityMessageId,
|
|
171655
|
+
removed: Schema_exports.Boolean
|
|
171656
|
+
});
|
|
171657
|
+
var ListActivityResultSchema = Schema_exports.Array(ActivityMessageWireSchema);
|
|
171658
|
+
var ListReactionsResultSchema = Schema_exports.Array(ReactionWireSchema);
|
|
171659
|
+
var ListSavedMessagesResultSchema = Schema_exports.Array(SavedMessageWireSchema);
|
|
171660
|
+
var ListMentionsResultSchema = Schema_exports.Array(MentionWireSchema);
|
|
171603
171661
|
|
|
171604
171662
|
// src/huly/operations/activity.ts
|
|
171605
171663
|
var import_core19 = __toESM(require_lib4(), 1);
|
|
@@ -171644,6 +171702,9 @@ var time3 = require_lib35().default;
|
|
|
171644
171702
|
var tracker = require_lib36().default;
|
|
171645
171703
|
|
|
171646
171704
|
// src/huly/operations/activity.ts
|
|
171705
|
+
var optionalTimestamp = (value3) => value3 === void 0 ? void 0 : Timestamp.make(value3);
|
|
171706
|
+
var optionalNullableTimestamp = (value3) => value3 === void 0 || value3 === null ? value3 : Timestamp.make(value3);
|
|
171707
|
+
var optionalActivityCount = (value3) => value3 === void 0 ? void 0 : ActivityCount.make(value3);
|
|
171647
171708
|
var serverPopulatedCreateBy = "";
|
|
171648
171709
|
var listActivity = (params) => Effect_exports.gen(function* () {
|
|
171649
171710
|
const client = yield* HulyClient;
|
|
@@ -171663,14 +171724,14 @@ var listActivity = (params) => Effect_exports.gen(function* () {
|
|
|
171663
171724
|
);
|
|
171664
171725
|
const result = messages.map((msg) => ({
|
|
171665
171726
|
id: ActivityMessageId.make(msg._id),
|
|
171666
|
-
objectId: msg.attachedTo,
|
|
171727
|
+
objectId: NonEmptyString2.make(msg.attachedTo),
|
|
171667
171728
|
objectClass: ObjectClassName.make(msg.attachedToClass),
|
|
171668
|
-
modifiedBy: msg.modifiedBy,
|
|
171669
|
-
modifiedOn: msg.modifiedOn,
|
|
171729
|
+
modifiedBy: PersonId.make(msg.modifiedBy),
|
|
171730
|
+
modifiedOn: optionalTimestamp(msg.modifiedOn),
|
|
171670
171731
|
isPinned: msg.isPinned,
|
|
171671
|
-
replies: msg.replies,
|
|
171672
|
-
reactions: msg.reactions,
|
|
171673
|
-
editedOn: msg.editedOn
|
|
171732
|
+
replies: optionalActivityCount(msg.replies),
|
|
171733
|
+
reactions: optionalActivityCount(msg.reactions),
|
|
171734
|
+
editedOn: optionalNullableTimestamp(msg.editedOn)
|
|
171674
171735
|
}));
|
|
171675
171736
|
return result;
|
|
171676
171737
|
});
|
|
@@ -171697,7 +171758,7 @@ var addReaction = (params) => Effect_exports.gen(function* () {
|
|
|
171697
171758
|
reactionId
|
|
171698
171759
|
);
|
|
171699
171760
|
return {
|
|
171700
|
-
reactionId:
|
|
171761
|
+
reactionId: ReactionId.make(reactionId),
|
|
171701
171762
|
messageId: ActivityMessageId.make(params.messageId)
|
|
171702
171763
|
};
|
|
171703
171764
|
});
|
|
@@ -171736,10 +171797,10 @@ var listReactions = (params) => Effect_exports.gen(function* () {
|
|
|
171736
171797
|
{ limit }
|
|
171737
171798
|
);
|
|
171738
171799
|
const result = reactions.map((r) => ({
|
|
171739
|
-
id: r._id,
|
|
171800
|
+
id: ReactionId.make(r._id),
|
|
171740
171801
|
messageId: ActivityMessageId.make(r.attachedTo),
|
|
171741
171802
|
emoji: EmojiCode.make(r.emoji),
|
|
171742
|
-
createdBy: r.createBy
|
|
171803
|
+
createdBy: PersonId.make(r.createBy)
|
|
171743
171804
|
}));
|
|
171744
171805
|
return result;
|
|
171745
171806
|
});
|
|
@@ -171761,7 +171822,7 @@ var saveMessage = (params) => Effect_exports.gen(function* () {
|
|
|
171761
171822
|
savedId
|
|
171762
171823
|
);
|
|
171763
171824
|
return {
|
|
171764
|
-
savedId:
|
|
171825
|
+
savedId: SavedMessageId.make(savedId),
|
|
171765
171826
|
messageId: ActivityMessageId.make(params.messageId)
|
|
171766
171827
|
};
|
|
171767
171828
|
});
|
|
@@ -171794,7 +171855,7 @@ var listSavedMessages = (params) => Effect_exports.gen(function* () {
|
|
|
171794
171855
|
{ limit }
|
|
171795
171856
|
);
|
|
171796
171857
|
const result = saved.map((s) => ({
|
|
171797
|
-
id: s._id,
|
|
171858
|
+
id: SavedMessageId.make(s._id),
|
|
171798
171859
|
messageId: ActivityMessageId.make(s.attachedTo)
|
|
171799
171860
|
}));
|
|
171800
171861
|
return result;
|
|
@@ -171813,9 +171874,9 @@ var listMentions = (params) => Effect_exports.gen(function* () {
|
|
|
171813
171874
|
}
|
|
171814
171875
|
);
|
|
171815
171876
|
const result = mentions.map((m) => ({
|
|
171816
|
-
id: m._id,
|
|
171877
|
+
id: MentionId.make(m._id),
|
|
171817
171878
|
messageId: ActivityMessageId.make(m.attachedTo),
|
|
171818
|
-
userId: m.user,
|
|
171879
|
+
userId: PersonId.make(m.user),
|
|
171819
171880
|
content: m.content
|
|
171820
171881
|
}));
|
|
171821
171882
|
return result;
|
|
@@ -171925,10 +171986,11 @@ var activityTools = [
|
|
|
171925
171986
|
description: "List activity messages for a Huly object. Returns activity sorted by date (newest first).",
|
|
171926
171987
|
category: CATEGORY,
|
|
171927
171988
|
inputSchema: listActivityParamsJsonSchema,
|
|
171928
|
-
handler:
|
|
171989
|
+
handler: createEncodedToolHandler(
|
|
171929
171990
|
"list_activity",
|
|
171930
171991
|
parseListActivityParams,
|
|
171931
|
-
listActivity
|
|
171992
|
+
listActivity,
|
|
171993
|
+
ListActivityResultSchema
|
|
171932
171994
|
)
|
|
171933
171995
|
},
|
|
171934
171996
|
{
|
|
@@ -171936,10 +171998,11 @@ var activityTools = [
|
|
|
171936
171998
|
description: "Add an emoji reaction to an activity message.",
|
|
171937
171999
|
category: CATEGORY,
|
|
171938
172000
|
inputSchema: addReactionParamsJsonSchema,
|
|
171939
|
-
handler:
|
|
172001
|
+
handler: createEncodedToolHandler(
|
|
171940
172002
|
"add_reaction",
|
|
171941
172003
|
parseAddReactionParams,
|
|
171942
|
-
addReaction
|
|
172004
|
+
addReaction,
|
|
172005
|
+
AddReactionResultSchema
|
|
171943
172006
|
)
|
|
171944
172007
|
},
|
|
171945
172008
|
{
|
|
@@ -171947,10 +172010,11 @@ var activityTools = [
|
|
|
171947
172010
|
description: "Remove an emoji reaction from an activity message.",
|
|
171948
172011
|
category: CATEGORY,
|
|
171949
172012
|
inputSchema: removeReactionParamsJsonSchema,
|
|
171950
|
-
handler:
|
|
172013
|
+
handler: createEncodedToolHandler(
|
|
171951
172014
|
"remove_reaction",
|
|
171952
172015
|
parseRemoveReactionParams,
|
|
171953
|
-
removeReaction
|
|
172016
|
+
removeReaction,
|
|
172017
|
+
RemoveReactionResultSchema
|
|
171954
172018
|
)
|
|
171955
172019
|
},
|
|
171956
172020
|
{
|
|
@@ -171958,10 +172022,11 @@ var activityTools = [
|
|
|
171958
172022
|
description: "List reactions on an activity message.",
|
|
171959
172023
|
category: CATEGORY,
|
|
171960
172024
|
inputSchema: listReactionsParamsJsonSchema,
|
|
171961
|
-
handler:
|
|
172025
|
+
handler: createEncodedToolHandler(
|
|
171962
172026
|
"list_reactions",
|
|
171963
172027
|
parseListReactionsParams,
|
|
171964
|
-
listReactions
|
|
172028
|
+
listReactions,
|
|
172029
|
+
ListReactionsResultSchema
|
|
171965
172030
|
)
|
|
171966
172031
|
},
|
|
171967
172032
|
{
|
|
@@ -171969,10 +172034,11 @@ var activityTools = [
|
|
|
171969
172034
|
description: "Save/bookmark an activity message for later reference.",
|
|
171970
172035
|
category: CATEGORY,
|
|
171971
172036
|
inputSchema: saveMessageParamsJsonSchema,
|
|
171972
|
-
handler:
|
|
172037
|
+
handler: createEncodedToolHandler(
|
|
171973
172038
|
"save_message",
|
|
171974
172039
|
parseSaveMessageParams,
|
|
171975
|
-
saveMessage
|
|
172040
|
+
saveMessage,
|
|
172041
|
+
SaveMessageResultSchema
|
|
171976
172042
|
)
|
|
171977
172043
|
},
|
|
171978
172044
|
{
|
|
@@ -171980,10 +172046,11 @@ var activityTools = [
|
|
|
171980
172046
|
description: "Remove an activity message from saved/bookmarks.",
|
|
171981
172047
|
category: CATEGORY,
|
|
171982
172048
|
inputSchema: unsaveMessageParamsJsonSchema,
|
|
171983
|
-
handler:
|
|
172049
|
+
handler: createEncodedToolHandler(
|
|
171984
172050
|
"unsave_message",
|
|
171985
172051
|
parseUnsaveMessageParams,
|
|
171986
|
-
unsaveMessage
|
|
172052
|
+
unsaveMessage,
|
|
172053
|
+
UnsaveMessageResultSchema
|
|
171987
172054
|
)
|
|
171988
172055
|
},
|
|
171989
172056
|
{
|
|
@@ -171991,10 +172058,11 @@ var activityTools = [
|
|
|
171991
172058
|
description: "List saved/bookmarked activity messages.",
|
|
171992
172059
|
category: CATEGORY,
|
|
171993
172060
|
inputSchema: listSavedMessagesParamsJsonSchema,
|
|
171994
|
-
handler:
|
|
172061
|
+
handler: createEncodedToolHandler(
|
|
171995
172062
|
"list_saved_messages",
|
|
171996
172063
|
parseListSavedMessagesParams,
|
|
171997
|
-
listSavedMessages
|
|
172064
|
+
listSavedMessages,
|
|
172065
|
+
ListSavedMessagesResultSchema
|
|
171998
172066
|
)
|
|
171999
172067
|
},
|
|
172000
172068
|
{
|
|
@@ -172002,10 +172070,11 @@ var activityTools = [
|
|
|
172002
172070
|
description: "List @mentions of the current user in activity messages.",
|
|
172003
172071
|
category: CATEGORY,
|
|
172004
172072
|
inputSchema: listMentionsParamsJsonSchema,
|
|
172005
|
-
handler:
|
|
172073
|
+
handler: createEncodedToolHandler(
|
|
172006
172074
|
"list_mentions",
|
|
172007
172075
|
parseListMentionsParams,
|
|
172008
|
-
listMentions
|
|
172076
|
+
listMentions,
|
|
172077
|
+
ListMentionsResultSchema
|
|
172009
172078
|
)
|
|
172010
172079
|
}
|
|
172011
172080
|
];
|
|
@@ -174520,26 +174589,67 @@ var SetCustomFieldParamsSchema = Schema_exports.Struct({
|
|
|
174520
174589
|
title: "SetCustomFieldParams",
|
|
174521
174590
|
description: "Parameters for setting a custom field value on a document"
|
|
174522
174591
|
});
|
|
174523
|
-
var
|
|
174524
|
-
|
|
174525
|
-
|
|
174526
|
-
"boolean",
|
|
174592
|
+
var CUSTOM_FIELD_PRIMITIVE_TYPE_NAMES = ["string", "number", "boolean", "date", "markup"];
|
|
174593
|
+
var CUSTOM_FIELD_TYPE_NAMES = [
|
|
174594
|
+
...CUSTOM_FIELD_PRIMITIVE_TYPE_NAMES,
|
|
174527
174595
|
"enum",
|
|
174528
174596
|
"array",
|
|
174529
174597
|
"ref",
|
|
174530
|
-
"date",
|
|
174531
|
-
"markup",
|
|
174532
174598
|
"unknown"
|
|
174599
|
+
];
|
|
174600
|
+
var CustomFieldTypeNameSchema = Schema_exports.Literal(...CUSTOM_FIELD_TYPE_NAMES);
|
|
174601
|
+
var EmptyCustomFieldTypeDetailsSchema = Schema_exports.Record({ key: Schema_exports.String, value: Schema_exports.Never });
|
|
174602
|
+
var CustomFieldTypeDetailsRecordSchema = Schema_exports.Record({ key: Schema_exports.String, value: Schema_exports.Unknown });
|
|
174603
|
+
var EnumCustomFieldTypeDetailsSchema = CustomFieldTypeDetailsRecordSchema.pipe(
|
|
174604
|
+
Schema_exports.filter((details) => "enumRef" in details, {
|
|
174605
|
+
message: () => "enum custom field typeDetails must include enumRef"
|
|
174606
|
+
})
|
|
174607
|
+
);
|
|
174608
|
+
var ArrayCustomFieldTypeDetailsSchema = CustomFieldTypeDetailsRecordSchema.pipe(
|
|
174609
|
+
Schema_exports.filter((details) => "of" in details, {
|
|
174610
|
+
message: () => "array custom field typeDetails must include of"
|
|
174611
|
+
})
|
|
174533
174612
|
);
|
|
174534
|
-
var
|
|
174613
|
+
var RefCustomFieldTypeDetailsSchema = CustomFieldTypeDetailsRecordSchema.pipe(
|
|
174614
|
+
Schema_exports.filter((details) => "to" in details, {
|
|
174615
|
+
message: () => "ref custom field typeDetails must include to"
|
|
174616
|
+
})
|
|
174617
|
+
);
|
|
174618
|
+
var UnknownCustomFieldTypeDetailsSchema = CustomFieldTypeDetailsRecordSchema;
|
|
174619
|
+
var CustomFieldInfoBaseWireFields = {
|
|
174535
174620
|
id: CustomFieldId,
|
|
174536
174621
|
name: Schema_exports.String,
|
|
174537
174622
|
label: Schema_exports.String,
|
|
174538
174623
|
ownerClassId: ObjectClassName,
|
|
174539
|
-
ownerLabel: Schema_exports.String
|
|
174540
|
-
|
|
174541
|
-
|
|
174542
|
-
|
|
174624
|
+
ownerLabel: Schema_exports.String
|
|
174625
|
+
};
|
|
174626
|
+
var CustomFieldInfoWireSchema = Schema_exports.Union(
|
|
174627
|
+
Schema_exports.Struct({
|
|
174628
|
+
...CustomFieldInfoBaseWireFields,
|
|
174629
|
+
type: Schema_exports.Literal(...CUSTOM_FIELD_PRIMITIVE_TYPE_NAMES),
|
|
174630
|
+
typeDetails: EmptyCustomFieldTypeDetailsSchema
|
|
174631
|
+
}),
|
|
174632
|
+
Schema_exports.Struct({
|
|
174633
|
+
...CustomFieldInfoBaseWireFields,
|
|
174634
|
+
type: Schema_exports.Literal("enum"),
|
|
174635
|
+
typeDetails: EnumCustomFieldTypeDetailsSchema
|
|
174636
|
+
}),
|
|
174637
|
+
Schema_exports.Struct({
|
|
174638
|
+
...CustomFieldInfoBaseWireFields,
|
|
174639
|
+
type: Schema_exports.Literal("array"),
|
|
174640
|
+
typeDetails: ArrayCustomFieldTypeDetailsSchema
|
|
174641
|
+
}),
|
|
174642
|
+
Schema_exports.Struct({
|
|
174643
|
+
...CustomFieldInfoBaseWireFields,
|
|
174644
|
+
type: Schema_exports.Literal("ref"),
|
|
174645
|
+
typeDetails: RefCustomFieldTypeDetailsSchema
|
|
174646
|
+
}),
|
|
174647
|
+
Schema_exports.Struct({
|
|
174648
|
+
...CustomFieldInfoBaseWireFields,
|
|
174649
|
+
type: Schema_exports.Literal("unknown"),
|
|
174650
|
+
typeDetails: UnknownCustomFieldTypeDetailsSchema
|
|
174651
|
+
})
|
|
174652
|
+
);
|
|
174543
174653
|
var CustomFieldValueWireSchema = Schema_exports.Struct({
|
|
174544
174654
|
fieldId: CustomFieldId,
|
|
174545
174655
|
label: Schema_exports.String,
|
|
@@ -176490,7 +176600,7 @@ var parseCreateWorkSlotParams = Schema_exports.decodeUnknown(CreateWorkSlotParam
|
|
|
176490
176600
|
var parseStartTimerParams = Schema_exports.decodeUnknown(StartTimerParamsSchema);
|
|
176491
176601
|
var parseStopTimerParams = Schema_exports.decodeUnknown(StopTimerParamsSchema);
|
|
176492
176602
|
var TimeSpendReportWireSchema = Schema_exports.Struct({
|
|
176493
|
-
id:
|
|
176603
|
+
id: TimeSpendReportId,
|
|
176494
176604
|
identifier: Schema_exports.optional(IssueIdentifier),
|
|
176495
176605
|
employee: Schema_exports.optional(NonEmptyString2),
|
|
176496
176606
|
date: Schema_exports.optional(Schema_exports.NullOr(Timestamp)),
|
|
@@ -176505,7 +176615,7 @@ var TimeReportSummarySchema = Schema_exports.Struct({
|
|
|
176505
176615
|
reports: Schema_exports.Array(TimeSpendReportWireSchema)
|
|
176506
176616
|
});
|
|
176507
176617
|
var WorkSlotWireSchema = Schema_exports.Struct({
|
|
176508
|
-
id:
|
|
176618
|
+
id: WorkSlotId,
|
|
176509
176619
|
todoId: TodoId,
|
|
176510
176620
|
date: Timestamp,
|
|
176511
176621
|
dueDate: Timestamp,
|
|
@@ -176530,11 +176640,11 @@ var DetailedTimeReportSchema = Schema_exports.Struct({
|
|
|
176530
176640
|
)
|
|
176531
176641
|
});
|
|
176532
176642
|
var LogTimeResultSchema = Schema_exports.Struct({
|
|
176533
|
-
reportId:
|
|
176643
|
+
reportId: TimeSpendReportId,
|
|
176534
176644
|
identifier: IssueIdentifier
|
|
176535
176645
|
});
|
|
176536
176646
|
var CreateWorkSlotResultSchema = Schema_exports.Struct({
|
|
176537
|
-
slotId:
|
|
176647
|
+
slotId: WorkSlotId
|
|
176538
176648
|
});
|
|
176539
176649
|
var StartTimerResultSchema = Schema_exports.Struct({
|
|
176540
176650
|
identifier: IssueIdentifier,
|
|
@@ -176543,7 +176653,7 @@ var StartTimerResultSchema = Schema_exports.Struct({
|
|
|
176543
176653
|
var StopTimerResultSchema = Schema_exports.Struct({
|
|
176544
176654
|
identifier: IssueIdentifier,
|
|
176545
176655
|
stoppedAt: Timestamp,
|
|
176546
|
-
reportId: Schema_exports.optional(
|
|
176656
|
+
reportId: Schema_exports.optional(TimeSpendReportId)
|
|
176547
176657
|
});
|
|
176548
176658
|
var ListTimeSpendReportsResultSchema = Schema_exports.Array(TimeSpendReportWireSchema);
|
|
176549
176659
|
var ListWorkSlotsResultSchema = Schema_exports.Array(WorkSlotWireSchema);
|
|
@@ -176942,36 +177052,36 @@ var parseUpdateUserProfileParams = Schema_exports.decodeUnknown(UpdateUserProfil
|
|
|
176942
177052
|
var parseUpdateGuestSettingsParams = Schema_exports.decodeUnknown(UpdateGuestSettingsParamsSchema);
|
|
176943
177053
|
var parseGetRegionsParams = Schema_exports.decodeUnknown(GetRegionsParamsSchema);
|
|
176944
177054
|
var WorkspaceMemberSchema = Schema_exports.Struct({
|
|
176945
|
-
personId:
|
|
177055
|
+
personId: PersonUuid,
|
|
176946
177056
|
role: AccountRoleSchema,
|
|
176947
177057
|
name: Schema_exports.optional(NonEmptyString2),
|
|
176948
|
-
email: Schema_exports.optional(
|
|
177058
|
+
email: Schema_exports.optional(Email)
|
|
176949
177059
|
});
|
|
176950
177060
|
var WorkspaceInfoSchema = Schema_exports.Struct({
|
|
176951
|
-
uuid:
|
|
176952
|
-
name:
|
|
176953
|
-
url:
|
|
176954
|
-
region: Schema_exports.optional(
|
|
177061
|
+
uuid: WorkspaceUuid,
|
|
177062
|
+
name: WorkspaceName,
|
|
177063
|
+
url: UrlString,
|
|
177064
|
+
region: Schema_exports.optional(RegionId),
|
|
176955
177065
|
createdOn: Schema_exports.Number,
|
|
176956
177066
|
allowReadOnlyGuest: Schema_exports.optional(Schema_exports.Boolean),
|
|
176957
177067
|
allowGuestSignUp: Schema_exports.optional(Schema_exports.Boolean),
|
|
176958
|
-
version: Schema_exports.optional(
|
|
176959
|
-
mode: Schema_exports.optional(
|
|
177068
|
+
version: Schema_exports.optional(WorkspaceVersion),
|
|
177069
|
+
mode: Schema_exports.optional(WorkspaceMode)
|
|
176960
177070
|
});
|
|
176961
177071
|
var WorkspaceSummarySchema = Schema_exports.Struct({
|
|
176962
|
-
uuid:
|
|
176963
|
-
name:
|
|
176964
|
-
url:
|
|
176965
|
-
region: Schema_exports.optional(
|
|
177072
|
+
uuid: WorkspaceUuid,
|
|
177073
|
+
name: WorkspaceName,
|
|
177074
|
+
url: UrlString,
|
|
177075
|
+
region: Schema_exports.optional(RegionId),
|
|
176966
177076
|
createdOn: Schema_exports.Number,
|
|
176967
177077
|
lastVisit: Schema_exports.optional(Schema_exports.Number)
|
|
176968
177078
|
});
|
|
176969
177079
|
var RegionInfoSchema = Schema_exports.Struct({
|
|
176970
|
-
region:
|
|
177080
|
+
region: RegionId,
|
|
176971
177081
|
name: Schema_exports.String
|
|
176972
177082
|
});
|
|
176973
177083
|
var UserProfileSchema = Schema_exports.Struct({
|
|
176974
|
-
personUuid:
|
|
177084
|
+
personUuid: PersonUuid,
|
|
176975
177085
|
firstName: Schema_exports.String,
|
|
176976
177086
|
lastName: Schema_exports.String,
|
|
176977
177087
|
bio: Schema_exports.optional(Schema_exports.String),
|
|
@@ -176982,14 +177092,14 @@ var UserProfileSchema = Schema_exports.Struct({
|
|
|
176982
177092
|
isPublic: Schema_exports.Boolean
|
|
176983
177093
|
});
|
|
176984
177094
|
var UpdateMemberRoleResultSchema = Schema_exports.Struct({
|
|
176985
|
-
accountId:
|
|
177095
|
+
accountId: AccountId,
|
|
176986
177096
|
role: AccountRoleSchema,
|
|
176987
177097
|
updated: Schema_exports.Boolean
|
|
176988
177098
|
});
|
|
176989
177099
|
var CreateWorkspaceResultSchema = Schema_exports.Struct({
|
|
176990
|
-
uuid:
|
|
176991
|
-
url:
|
|
176992
|
-
name:
|
|
177100
|
+
uuid: WorkspaceUuid,
|
|
177101
|
+
url: UrlString,
|
|
177102
|
+
name: WorkspaceName
|
|
176993
177103
|
});
|
|
176994
177104
|
var DeleteWorkspaceResultSchema = Schema_exports.Struct({
|
|
176995
177105
|
deleted: Schema_exports.Boolean
|
|
@@ -179067,9 +179177,9 @@ var decodeTypeDescriptor = (value3) => {
|
|
|
179067
179177
|
if (_class.includes("TypeString")) return { typeName: "string", typeDetails: {} };
|
|
179068
179178
|
if (_class.includes("TypeNumber")) return { typeName: "number", typeDetails: {} };
|
|
179069
179179
|
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 } };
|
|
179180
|
+
if (_class.includes("EnumOf")) return { typeName: "enum", typeDetails: { ...record4, enumRef: record4.of } };
|
|
179181
|
+
if (_class.includes("ArrOf")) return { typeName: "array", typeDetails: { ...record4, of: record4.of } };
|
|
179182
|
+
if (_class.includes("RefTo")) return { typeName: "ref", typeDetails: { ...record4, to: record4.to } };
|
|
179073
179183
|
if (_class.includes("TypeDate")) return { typeName: "date", typeDetails: {} };
|
|
179074
179184
|
if (_class.includes("TypeMarkup")) return { typeName: "markup", typeDetails: {} };
|
|
179075
179185
|
return { typeName: "unknown", typeDetails: record4 };
|
|
@@ -179130,6 +179240,47 @@ var parseValueForType = (value3, typeName) => {
|
|
|
179130
179240
|
return value3;
|
|
179131
179241
|
}
|
|
179132
179242
|
};
|
|
179243
|
+
var toCustomFieldInfo = (attr, ownerLabel) => {
|
|
179244
|
+
const base = {
|
|
179245
|
+
id: attr.id,
|
|
179246
|
+
name: attr.name,
|
|
179247
|
+
label: attr.label,
|
|
179248
|
+
ownerClassId: attr.ownerClassId,
|
|
179249
|
+
ownerLabel
|
|
179250
|
+
};
|
|
179251
|
+
switch (attr.typeDescriptor.typeName) {
|
|
179252
|
+
case "enum":
|
|
179253
|
+
return {
|
|
179254
|
+
...base,
|
|
179255
|
+
type: "enum",
|
|
179256
|
+
typeDetails: attr.typeDescriptor.typeDetails
|
|
179257
|
+
};
|
|
179258
|
+
case "array":
|
|
179259
|
+
return {
|
|
179260
|
+
...base,
|
|
179261
|
+
type: "array",
|
|
179262
|
+
typeDetails: attr.typeDescriptor.typeDetails
|
|
179263
|
+
};
|
|
179264
|
+
case "ref":
|
|
179265
|
+
return {
|
|
179266
|
+
...base,
|
|
179267
|
+
type: "ref",
|
|
179268
|
+
typeDetails: attr.typeDescriptor.typeDetails
|
|
179269
|
+
};
|
|
179270
|
+
case "unknown":
|
|
179271
|
+
return {
|
|
179272
|
+
...base,
|
|
179273
|
+
type: "unknown",
|
|
179274
|
+
typeDetails: attr.typeDescriptor.typeDetails
|
|
179275
|
+
};
|
|
179276
|
+
default:
|
|
179277
|
+
return {
|
|
179278
|
+
...base,
|
|
179279
|
+
type: attr.typeDescriptor.typeName,
|
|
179280
|
+
typeDetails: {}
|
|
179281
|
+
};
|
|
179282
|
+
}
|
|
179283
|
+
};
|
|
179133
179284
|
var listCustomFields = (params) => Effect_exports.gen(function* () {
|
|
179134
179285
|
const client = yield* HulyClient;
|
|
179135
179286
|
const limit = clampLimit(params.limit ?? DEFAULT_LIMIT2);
|
|
@@ -179147,15 +179298,7 @@ var listCustomFields = (params) => Effect_exports.gen(function* () {
|
|
|
179147
179298
|
client,
|
|
179148
179299
|
[...new Set(decodedAttrs.map((attr) => attr.ownerClassId))]
|
|
179149
179300
|
);
|
|
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
|
-
}));
|
|
179301
|
+
return decodedAttrs.map((attr) => toCustomFieldInfo(attr, ownerLabels.get(attr.ownerClassId) ?? attr.ownerClassId));
|
|
179159
179302
|
});
|
|
179160
179303
|
var getCustomFieldValues = (params) => Effect_exports.gen(function* () {
|
|
179161
179304
|
const client = yield* HulyClient;
|
|
@@ -182793,10 +182936,15 @@ var getTaskTypes = (client, taskTypeIds) => taskTypeIds.length === 0 ? Effect_ex
|
|
|
182793
182936
|
var getTaskTypesByProjectType = (client, projectTypeId) => client.findAll(task.class.TaskType, { parent: projectTypeId }).pipe(
|
|
182794
182937
|
Effect_exports.map((result) => [...result])
|
|
182795
182938
|
);
|
|
182796
|
-
var
|
|
182939
|
+
var getRecoverableStatusesByName = (client, name) => client.findAll(core.class.Status, { ofAttribute: tracker.attribute.IssueStatus }).pipe(
|
|
182797
182940
|
Effect_exports.map(
|
|
182798
182941
|
(result) => [...result].filter((status) => normalizeForComparison(status.name) === normalizeForComparison(name))
|
|
182799
|
-
)
|
|
182942
|
+
),
|
|
182943
|
+
// Compatibility fallback for https://github.com/dearlordylord/huly-mcp/issues/34:
|
|
182944
|
+
// this broad recovery query was reported to null-deref on an older self-hosted
|
|
182945
|
+
// Huly. The primary project-type status data is already loaded, so losing only
|
|
182946
|
+
// cross-project duplicate recovery is preferable to failing status creation.
|
|
182947
|
+
Effect_exports.catchAll(() => Effect_exports.succeed([]))
|
|
182800
182948
|
);
|
|
182801
182949
|
var loadWorkflowData = (client, projectType) => Effect_exports.gen(function* () {
|
|
182802
182950
|
const taskTypes = yield* getTaskTypes(client, projectType.tasks);
|
|
@@ -183030,7 +183178,7 @@ var createIssueStatus = (params) => Effect_exports.gen(function* () {
|
|
|
183030
183178
|
const workflowData = yield* loadWorkflowData(client, projectType);
|
|
183031
183179
|
const targetTaskTypes = params.taskType === void 0 ? workflowData.taskTypes : [yield* resolveTaskType(workflowData.taskTypes, params.taskType)];
|
|
183032
183180
|
const statusClass = yield* resolveStatusClass(targetTaskTypes);
|
|
183033
|
-
const statusesByName = yield*
|
|
183181
|
+
const statusesByName = yield* getRecoverableStatusesByName(client, params.name);
|
|
183034
183182
|
const existingStatus = existingStatusByName(
|
|
183035
183183
|
[...workflowData.statuses, ...statusesByName],
|
|
183036
183184
|
params.name
|