@firfi/huly-mcp 0.1.53 → 0.1.55
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/README.md +11 -0
- package/dist/index.cjs +163 -58
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -94,6 +94,17 @@ Add the standard config to your Windsurf MCP configuration file.
|
|
|
94
94
|
|
|
95
95
|
</details>
|
|
96
96
|
|
|
97
|
+
## Updating
|
|
98
|
+
|
|
99
|
+
The `@latest` tag in the install command always fetches the newest version. Most MCP clients cache the installed package, so you need to force a re-fetch:
|
|
100
|
+
|
|
101
|
+
| Client | How to update |
|
|
102
|
+
|--------|--------------|
|
|
103
|
+
| **Claude Code** | `claude mcp remove huly` then re-add with the install command above |
|
|
104
|
+
| **Claude Desktop** | Restart the app (it runs `npx` on startup) |
|
|
105
|
+
| **VS Code / Cursor** | Restart the MCP server from the command palette or reload the window |
|
|
106
|
+
| **npx (manual)** | `npx -y @firfi/huly-mcp@latest` — the `-y` flag skips the cache when `@latest` resolves to a new version |
|
|
107
|
+
|
|
97
108
|
## HTTP Transport
|
|
98
109
|
|
|
99
110
|
By default, the server uses stdio transport. For HTTP transport (Streamable HTTP):
|
package/dist/index.cjs
CHANGED
|
@@ -81609,7 +81609,7 @@ var require_connection2 = __commonJS({
|
|
|
81609
81609
|
});
|
|
81610
81610
|
module2.exports = __toCommonJS2(connection_exports);
|
|
81611
81611
|
var import_analytics = require_lib2();
|
|
81612
|
-
var
|
|
81612
|
+
var import_client23 = __toESM2(require_lib6());
|
|
81613
81613
|
var import_core44 = __toESM2(require_lib4());
|
|
81614
81614
|
var import_platform2 = __toESM2(require_lib());
|
|
81615
81615
|
var import_rpc = require_lib18();
|
|
@@ -81720,7 +81720,7 @@ var require_connection2 = __commonJS({
|
|
|
81720
81720
|
}
|
|
81721
81721
|
if (!this.closed) {
|
|
81722
81722
|
void this.sendRequest({
|
|
81723
|
-
method:
|
|
81723
|
+
method: import_client23.pingConst,
|
|
81724
81724
|
params: [],
|
|
81725
81725
|
once: true,
|
|
81726
81726
|
handleResult: /* @__PURE__ */ __name(async (result) => {
|
|
@@ -81753,7 +81753,7 @@ var require_connection2 = __commonJS({
|
|
|
81753
81753
|
}
|
|
81754
81754
|
}
|
|
81755
81755
|
isConnected() {
|
|
81756
|
-
return this.websocket != null && this.websocket.readyState ===
|
|
81756
|
+
return this.websocket != null && this.websocket.readyState === import_client23.ClientSocketReadyState.OPEN && this.helloReceived;
|
|
81757
81757
|
}
|
|
81758
81758
|
delay = 0;
|
|
81759
81759
|
onConnectHandlers = [];
|
|
@@ -81893,8 +81893,8 @@ var require_connection2 = __commonJS({
|
|
|
81893
81893
|
}
|
|
81894
81894
|
return;
|
|
81895
81895
|
}
|
|
81896
|
-
if (resp.result ===
|
|
81897
|
-
void this.sendRequest({ method:
|
|
81896
|
+
if (resp.result === import_client23.pingConst) {
|
|
81897
|
+
void this.sendRequest({ method: import_client23.pingConst, params: [] }).catch((err) => {
|
|
81898
81898
|
this.ctx.error("failed to send ping", { err });
|
|
81899
81899
|
});
|
|
81900
81900
|
return;
|
|
@@ -81986,15 +81986,15 @@ var require_connection2 = __commonJS({
|
|
|
81986
81986
|
}
|
|
81987
81987
|
}
|
|
81988
81988
|
checkArrayBufferPing(data) {
|
|
81989
|
-
if (data.byteLength ===
|
|
81989
|
+
if (data.byteLength === import_client23.pingConst.length || data.byteLength === import_client23.pongConst.length) {
|
|
81990
81990
|
const text = new TextDecoder().decode(data);
|
|
81991
|
-
if (text ===
|
|
81992
|
-
void this.sendRequest({ method:
|
|
81991
|
+
if (text === import_client23.pingConst) {
|
|
81992
|
+
void this.sendRequest({ method: import_client23.pingConst, params: [] }).catch((err) => {
|
|
81993
81993
|
this.ctx.error("failed to send ping", { err });
|
|
81994
81994
|
});
|
|
81995
81995
|
return true;
|
|
81996
81996
|
}
|
|
81997
|
-
if (text ===
|
|
81997
|
+
if (text === import_client23.pongConst) {
|
|
81998
81998
|
this.pingResponse = Date.now();
|
|
81999
81999
|
return true;
|
|
82000
82000
|
}
|
|
@@ -82004,7 +82004,7 @@ var require_connection2 = __commonJS({
|
|
|
82004
82004
|
openConnection(ctx, socketId) {
|
|
82005
82005
|
this.binaryMode = false;
|
|
82006
82006
|
this.helloReceived = false;
|
|
82007
|
-
const clientSocketFactory = this.opt?.socketFactory ?? (0, import_platform2.getMetadata)(
|
|
82007
|
+
const clientSocketFactory = this.opt?.socketFactory ?? (0, import_platform2.getMetadata)(import_client23.default.metadata.ClientSocketFactory) ?? ((url4) => {
|
|
82008
82008
|
const s = new WebSocket(url4);
|
|
82009
82009
|
return s;
|
|
82010
82010
|
});
|
|
@@ -82039,12 +82039,12 @@ var require_connection2 = __commonJS({
|
|
|
82039
82039
|
if (this.websocket !== wsocket) {
|
|
82040
82040
|
return;
|
|
82041
82041
|
}
|
|
82042
|
-
if (event.data ===
|
|
82042
|
+
if (event.data === import_client23.pongConst) {
|
|
82043
82043
|
this.pingResponse = Date.now();
|
|
82044
82044
|
return;
|
|
82045
82045
|
}
|
|
82046
|
-
if (event.data ===
|
|
82047
|
-
void this.sendRequest({ method:
|
|
82046
|
+
if (event.data === import_client23.pingConst) {
|
|
82047
|
+
void this.sendRequest({ method: import_client23.pingConst, params: [] }).catch((err) => {
|
|
82048
82048
|
this.ctx.error("failed to send ping", { err });
|
|
82049
82049
|
});
|
|
82050
82050
|
return;
|
|
@@ -82109,8 +82109,8 @@ var require_connection2 = __commonJS({
|
|
|
82109
82109
|
if (this.websocket !== wsocket) {
|
|
82110
82110
|
return;
|
|
82111
82111
|
}
|
|
82112
|
-
const useBinary = this.opt?.useBinaryProtocol ?? (0, import_platform2.getMetadata)(
|
|
82113
|
-
this.compressionMode = this.opt?.useProtocolCompression ?? (0, import_platform2.getMetadata)(
|
|
82112
|
+
const useBinary = this.opt?.useBinaryProtocol ?? (0, import_platform2.getMetadata)(import_client23.default.metadata.UseBinaryProtocol) ?? true;
|
|
82113
|
+
this.compressionMode = this.opt?.useProtocolCompression ?? (0, import_platform2.getMetadata)(import_client23.default.metadata.UseProtocolCompression) ?? false;
|
|
82114
82114
|
const helloRequest = {
|
|
82115
82115
|
method: "hello",
|
|
82116
82116
|
params: [],
|
|
@@ -82156,13 +82156,13 @@ var require_connection2 = __commonJS({
|
|
|
82156
82156
|
if (w instanceof Promise) {
|
|
82157
82157
|
await w;
|
|
82158
82158
|
}
|
|
82159
|
-
if (data.method !==
|
|
82159
|
+
if (data.method !== import_client23.pingConst) {
|
|
82160
82160
|
this.requests.set(id, promise4);
|
|
82161
82161
|
}
|
|
82162
82162
|
promise4.sendData = () => {
|
|
82163
|
-
if (this.websocket?.readyState ===
|
|
82163
|
+
if (this.websocket?.readyState === import_client23.ClientSocketReadyState.OPEN) {
|
|
82164
82164
|
promise4.startTime = Date.now();
|
|
82165
|
-
if (data.method !==
|
|
82165
|
+
if (data.method !== import_client23.pingConst) {
|
|
82166
82166
|
const dta = this.rpcHandler.serialize(
|
|
82167
82167
|
{
|
|
82168
82168
|
method: data.method,
|
|
@@ -82175,7 +82175,7 @@ var require_connection2 = __commonJS({
|
|
|
82175
82175
|
);
|
|
82176
82176
|
this.websocket?.send(dta);
|
|
82177
82177
|
} else {
|
|
82178
|
-
this.websocket?.send(
|
|
82178
|
+
this.websocket?.send(import_client23.pingConst);
|
|
82179
82179
|
}
|
|
82180
82180
|
}
|
|
82181
82181
|
};
|
|
@@ -82189,7 +82189,7 @@ var require_connection2 = __commonJS({
|
|
|
82189
82189
|
};
|
|
82190
82190
|
}
|
|
82191
82191
|
promise4.sendData();
|
|
82192
|
-
if (data.method !==
|
|
82192
|
+
if (data.method !== import_client23.pingConst) {
|
|
82193
82193
|
return await promise4.promise;
|
|
82194
82194
|
}
|
|
82195
82195
|
},
|
|
@@ -82355,7 +82355,7 @@ var require_lib19 = __commonJS({
|
|
|
82355
82355
|
default: () => index_default
|
|
82356
82356
|
});
|
|
82357
82357
|
module2.exports = __toCommonJS2(index_exports2);
|
|
82358
|
-
var
|
|
82358
|
+
var import_client23 = __toESM2(require_lib6());
|
|
82359
82359
|
var import_core44 = __toESM2(require_lib4());
|
|
82360
82360
|
var import_platform2 = __toESM2(require_lib());
|
|
82361
82361
|
var import_connection = require_connection2();
|
|
@@ -82399,8 +82399,8 @@ var require_lib19 = __commonJS({
|
|
|
82399
82399
|
return {
|
|
82400
82400
|
function: {
|
|
82401
82401
|
GetClient: /* @__PURE__ */ __name(async (token, endpoint, opt) => {
|
|
82402
|
-
const filterModel = (0, import_platform2.getMetadata)(
|
|
82403
|
-
const extraFilter = (0, import_platform2.getMetadata)(
|
|
82402
|
+
const filterModel = (0, import_platform2.getMetadata)(import_client23.default.metadata.FilterModel) ?? "none";
|
|
82403
|
+
const extraFilter = (0, import_platform2.getMetadata)(import_client23.default.metadata.ExtraFilter) ?? [];
|
|
82404
82404
|
const handler = /* @__PURE__ */ __name(async (handler2) => {
|
|
82405
82405
|
const url4 = (0, import_core44.concatLink)(endpoint, `/${token}`);
|
|
82406
82406
|
const upgradeHandler = /* @__PURE__ */ __name((...txes) => {
|
|
@@ -82428,7 +82428,7 @@ var require_lib19 = __commonJS({
|
|
|
82428
82428
|
throw new Error("Workspace or account not found in token");
|
|
82429
82429
|
}
|
|
82430
82430
|
const newOpt = { ...opt };
|
|
82431
|
-
const connectTimeout = opt?.connectionTimeout ?? (0, import_platform2.getMetadata)(
|
|
82431
|
+
const connectTimeout = opt?.connectionTimeout ?? (0, import_platform2.getMetadata)(import_client23.default.metadata.ConnectionTimeout);
|
|
82432
82432
|
let connectPromise;
|
|
82433
82433
|
if ((connectTimeout ?? 0) > 0) {
|
|
82434
82434
|
connectPromise = new Promise((resolve2, reject) => {
|
|
@@ -82480,7 +82480,7 @@ var require_lib19 = __commonJS({
|
|
|
82480
82480
|
function returnUITxes(txes, extraFilter) {
|
|
82481
82481
|
const configs = /* @__PURE__ */ new Map();
|
|
82482
82482
|
(0, import_core44.fillConfiguration)(txes, configs);
|
|
82483
|
-
const allowedPlugins = [...(0, import_platform2.getPlugins)(), ...(0, import_platform2.getMetadata)(
|
|
82483
|
+
const allowedPlugins = [...(0, import_platform2.getPlugins)(), ...(0, import_platform2.getMetadata)(import_client23.default.metadata.ExtraPlugins) ?? []];
|
|
82484
82484
|
const excludedPlugins = Array.from(configs.values()).filter(
|
|
82485
82485
|
(it) => !it.enabled || !allowedPlugins.includes(it.pluginId) || extraFilter.includes(it.pluginId)
|
|
82486
82486
|
);
|
|
@@ -82528,7 +82528,7 @@ var require_lib19 = __commonJS({
|
|
|
82528
82528
|
}
|
|
82529
82529
|
__name(returnClientTxes, "returnClientTxes");
|
|
82530
82530
|
function createModelPersistence(workspace) {
|
|
82531
|
-
const overrideStore = (0, import_platform2.getMetadata)(
|
|
82531
|
+
const overrideStore = (0, import_platform2.getMetadata)(import_client23.default.metadata.OverridePersistenceStore);
|
|
82532
82532
|
if (overrideStore !== void 0) {
|
|
82533
82533
|
return overrideStore;
|
|
82534
82534
|
}
|
|
@@ -82625,7 +82625,7 @@ var require_client6 = __commonJS({
|
|
|
82625
82625
|
});
|
|
82626
82626
|
module2.exports = __toCommonJS2(client_exports);
|
|
82627
82627
|
var import_account_client2 = require_lib5();
|
|
82628
|
-
var
|
|
82628
|
+
var import_client23 = __toESM2(require_lib6());
|
|
82629
82629
|
var import_core44 = require_lib4();
|
|
82630
82630
|
var import_platform2 = require_lib();
|
|
82631
82631
|
var import_config8 = require_config();
|
|
@@ -82651,9 +82651,9 @@ var require_client6 = __commonJS({
|
|
|
82651
82651
|
}
|
|
82652
82652
|
__name(connect, "connect");
|
|
82653
82653
|
async function createClient(url4, endpoint, token, workspaceUuid, account, config3, options) {
|
|
82654
|
-
(0, import_platform2.addLocation)(
|
|
82654
|
+
(0, import_platform2.addLocation)(import_client23.clientId, () => Promise.resolve().then(() => __toESM(require_lib19())));
|
|
82655
82655
|
const { socketFactory, connectionTimeout } = options;
|
|
82656
|
-
const clientFactory = await (0, import_platform2.getResource)(
|
|
82656
|
+
const clientFactory = await (0, import_platform2.getResource)(import_client23.default.function.GetClient);
|
|
82657
82657
|
const connection = await clientFactory(token, endpoint, {
|
|
82658
82658
|
socketFactory,
|
|
82659
82659
|
connectionTimeout
|
|
@@ -83774,11 +83774,11 @@ var require_storage2 = __commonJS({
|
|
|
83774
83774
|
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
83775
83775
|
var storage_exports = {};
|
|
83776
83776
|
__export2(storage_exports, {
|
|
83777
|
-
connectStorage: () =>
|
|
83778
|
-
createStorageClient: () =>
|
|
83777
|
+
connectStorage: () => import_client23.connectStorage,
|
|
83778
|
+
createStorageClient: () => import_client23.createStorageClient
|
|
83779
83779
|
});
|
|
83780
83780
|
module2.exports = __toCommonJS2(storage_exports);
|
|
83781
|
-
var
|
|
83781
|
+
var import_client23 = require_client7();
|
|
83782
83782
|
__reExport2(storage_exports, require_error3(), module2.exports);
|
|
83783
83783
|
__reExport2(storage_exports, require_types8(), module2.exports);
|
|
83784
83784
|
}
|
|
@@ -154634,7 +154634,8 @@ var findProjectWithStatuses = (projectIdentifier) => Effect_exports.gen(function
|
|
|
154634
154634
|
}
|
|
154635
154635
|
}
|
|
154636
154636
|
}
|
|
154637
|
-
|
|
154637
|
+
const defaultStatusId = project3.defaultIssueStatus || statuses[0]?._id;
|
|
154638
|
+
return { client, project: project3, statuses, defaultStatusId };
|
|
154638
154639
|
});
|
|
154639
154640
|
var parseIssueIdentifier = (identifier2, projectIdentifier) => {
|
|
154640
154641
|
const idStr = String(identifier2).trim();
|
|
@@ -174139,7 +174140,7 @@ var PostHog = class extends PostHogBackendClient {
|
|
|
174139
174140
|
};
|
|
174140
174141
|
|
|
174141
174142
|
// src/version.ts
|
|
174142
|
-
var VERSION = true ? "0.1.
|
|
174143
|
+
var VERSION = true ? "0.1.54" : "0.0.0-dev";
|
|
174143
174144
|
|
|
174144
174145
|
// src/telemetry/posthog.ts
|
|
174145
174146
|
var POSTHOG_API_KEY = "phc_TGfFqCGdnF0p68wuFzd5WSw1IsBvOJW0YgoMJDyZPjm";
|
|
@@ -175218,6 +175219,9 @@ var listDocuments = (params) => Effect_exports.gen(function* () {
|
|
|
175218
175219
|
if (params.titleSearch !== void 0 && params.titleSearch.trim() !== "") {
|
|
175219
175220
|
query.title = { $like: `%${escapeLikeWildcards(params.titleSearch)}%` };
|
|
175220
175221
|
}
|
|
175222
|
+
if (params.titleRegex !== void 0 && params.titleRegex.trim() !== "") {
|
|
175223
|
+
query.title = { $regex: params.titleRegex };
|
|
175224
|
+
}
|
|
175221
175225
|
if (params.contentSearch !== void 0 && params.contentSearch.trim() !== "") {
|
|
175222
175226
|
query.$search = params.contentSearch;
|
|
175223
175227
|
}
|
|
@@ -176450,7 +176454,7 @@ var ListMasterTagsParamsSchema = Schema_exports.Struct({
|
|
|
176450
176454
|
title: "ListMasterTagsParams",
|
|
176451
176455
|
description: "Parameters for listing master tags (card types) available in a card space"
|
|
176452
176456
|
});
|
|
176453
|
-
var
|
|
176457
|
+
var ListCardsParamsBase = Schema_exports.Struct({
|
|
176454
176458
|
cardSpace: CardSpaceIdentifier.annotations({
|
|
176455
176459
|
description: "Card space name or ID"
|
|
176456
176460
|
}),
|
|
@@ -176458,7 +176462,10 @@ var ListCardsParamsSchema = Schema_exports.Struct({
|
|
|
176458
176462
|
description: "Filter by master tag (card type) name or ID"
|
|
176459
176463
|
})),
|
|
176460
176464
|
titleSearch: Schema_exports.optional(Schema_exports.String.annotations({
|
|
176461
|
-
description: "Search cards by title substring (case-insensitive)"
|
|
176465
|
+
description: "Search cards by title substring (case-insensitive). Mutually exclusive with titleRegex."
|
|
176466
|
+
})),
|
|
176467
|
+
titleRegex: Schema_exports.optional(Schema_exports.String.annotations({
|
|
176468
|
+
description: "Filter cards by title using a regex pattern (e.g., '^TODO'). Mutually exclusive with titleSearch. Note: regex support depends on the Huly backend; use titleSearch for broader compatibility."
|
|
176462
176469
|
})),
|
|
176463
176470
|
contentSearch: Schema_exports.optional(Schema_exports.String.annotations({
|
|
176464
176471
|
description: "Search cards by content (fulltext search)"
|
|
@@ -176468,7 +176475,15 @@ var ListCardsParamsSchema = Schema_exports.Struct({
|
|
|
176468
176475
|
description: "Maximum number of cards to return (default: 50)"
|
|
176469
176476
|
})
|
|
176470
176477
|
)
|
|
176471
|
-
})
|
|
176478
|
+
});
|
|
176479
|
+
var ListCardsParamsSchema = ListCardsParamsBase.pipe(
|
|
176480
|
+
Schema_exports.filter((params) => {
|
|
176481
|
+
if (params.titleSearch !== void 0 && params.titleRegex !== void 0) {
|
|
176482
|
+
return "Cannot provide both 'titleSearch' and 'titleRegex'. Use one or the other.";
|
|
176483
|
+
}
|
|
176484
|
+
return void 0;
|
|
176485
|
+
})
|
|
176486
|
+
).annotations({
|
|
176472
176487
|
title: "ListCardsParams",
|
|
176473
176488
|
description: "Parameters for listing cards in a card space"
|
|
176474
176489
|
});
|
|
@@ -176616,7 +176631,7 @@ var IssueSchema = Schema_exports.Struct({
|
|
|
176616
176631
|
title: "Issue",
|
|
176617
176632
|
description: "Full issue with all fields"
|
|
176618
176633
|
});
|
|
176619
|
-
var
|
|
176634
|
+
var ListIssuesParamsBase = Schema_exports.Struct({
|
|
176620
176635
|
project: ProjectIdentifier.annotations({
|
|
176621
176636
|
description: "Project identifier (e.g., 'HULY')"
|
|
176622
176637
|
}),
|
|
@@ -176630,7 +176645,10 @@ var ListIssuesParamsSchema = Schema_exports.Struct({
|
|
|
176630
176645
|
description: "Filter to children of this parent issue (e.g., 'HULY-42')"
|
|
176631
176646
|
})),
|
|
176632
176647
|
titleSearch: Schema_exports.optional(Schema_exports.String.annotations({
|
|
176633
|
-
description: "Search issues by title substring (case-insensitive)"
|
|
176648
|
+
description: "Search issues by title substring (case-insensitive). Mutually exclusive with titleRegex."
|
|
176649
|
+
})),
|
|
176650
|
+
titleRegex: Schema_exports.optional(Schema_exports.String.annotations({
|
|
176651
|
+
description: "Filter issues by title using a regex pattern (e.g., '^BUG'). Mutually exclusive with titleSearch. Note: regex support depends on the Huly backend; use titleSearch for broader compatibility."
|
|
176634
176652
|
})),
|
|
176635
176653
|
descriptionSearch: Schema_exports.optional(Schema_exports.String.annotations({
|
|
176636
176654
|
description: "Search issues by description content (fulltext search)"
|
|
@@ -176638,12 +176656,41 @@ var ListIssuesParamsSchema = Schema_exports.Struct({
|
|
|
176638
176656
|
component: Schema_exports.optional(ComponentIdentifier.annotations({
|
|
176639
176657
|
description: "Filter by component ID or label"
|
|
176640
176658
|
})),
|
|
176659
|
+
hasAssignee: Schema_exports.optional(Schema_exports.Boolean.annotations({
|
|
176660
|
+
description: "Filter by assignee presence. true = only assigned issues, false = only unassigned issues."
|
|
176661
|
+
})),
|
|
176662
|
+
hasDueDate: Schema_exports.optional(Schema_exports.Boolean.annotations({
|
|
176663
|
+
description: "Filter by due date presence. true = only issues with a due date, false = only issues without."
|
|
176664
|
+
})),
|
|
176665
|
+
hasComponent: Schema_exports.optional(Schema_exports.Boolean.annotations({
|
|
176666
|
+
description: "Filter by component presence. true = only issues with a component, false = only issues without."
|
|
176667
|
+
})),
|
|
176668
|
+
isTopLevel: Schema_exports.optional(Schema_exports.Boolean.annotations({
|
|
176669
|
+
description: "When true, only return top-level issues (not sub-issues). false or omitted returns all issues."
|
|
176670
|
+
})),
|
|
176641
176671
|
limit: Schema_exports.optional(
|
|
176642
176672
|
LimitParam.annotations({
|
|
176643
176673
|
description: "Maximum number of issues to return (default: 50)"
|
|
176644
176674
|
})
|
|
176645
176675
|
)
|
|
176646
|
-
})
|
|
176676
|
+
});
|
|
176677
|
+
var ListIssuesParamsSchema = ListIssuesParamsBase.pipe(
|
|
176678
|
+
Schema_exports.filter((params) => {
|
|
176679
|
+
if (params.titleSearch !== void 0 && params.titleRegex !== void 0) {
|
|
176680
|
+
return "Cannot provide both 'titleSearch' and 'titleRegex'. Use one or the other.";
|
|
176681
|
+
}
|
|
176682
|
+
if (params.assignee !== void 0 && params.hasAssignee !== void 0) {
|
|
176683
|
+
return "Cannot provide both 'assignee' and 'hasAssignee'. Use one or the other.";
|
|
176684
|
+
}
|
|
176685
|
+
if (params.component !== void 0 && params.hasComponent !== void 0) {
|
|
176686
|
+
return "Cannot provide both 'component' and 'hasComponent'. Use one or the other.";
|
|
176687
|
+
}
|
|
176688
|
+
if (params.parentIssue !== void 0 && params.isTopLevel === true) {
|
|
176689
|
+
return "Cannot provide both 'parentIssue' and 'isTopLevel: true'. parentIssue requests children; isTopLevel requests parentless issues.";
|
|
176690
|
+
}
|
|
176691
|
+
return void 0;
|
|
176692
|
+
})
|
|
176693
|
+
).annotations({
|
|
176647
176694
|
title: "ListIssuesParams",
|
|
176648
176695
|
description: "Parameters for listing issues"
|
|
176649
176696
|
});
|
|
@@ -177358,12 +177405,15 @@ var ListTeamspacesParamsSchema = Schema_exports.Struct({
|
|
|
177358
177405
|
title: "ListTeamspacesParams",
|
|
177359
177406
|
description: "Parameters for listing teamspaces"
|
|
177360
177407
|
});
|
|
177361
|
-
var
|
|
177408
|
+
var ListDocumentsParamsBase = Schema_exports.Struct({
|
|
177362
177409
|
teamspace: TeamspaceIdentifier.annotations({
|
|
177363
177410
|
description: "Teamspace name or ID"
|
|
177364
177411
|
}),
|
|
177365
177412
|
titleSearch: Schema_exports.optional(Schema_exports.String.annotations({
|
|
177366
|
-
description: "Search documents by title substring (case-insensitive)"
|
|
177413
|
+
description: "Search documents by title substring (case-insensitive). Mutually exclusive with titleRegex."
|
|
177414
|
+
})),
|
|
177415
|
+
titleRegex: Schema_exports.optional(Schema_exports.String.annotations({
|
|
177416
|
+
description: "Filter documents by title using a regex pattern (e.g., '^RFC'). Mutually exclusive with titleSearch. Note: regex support depends on the Huly backend; use titleSearch for broader compatibility."
|
|
177367
177417
|
})),
|
|
177368
177418
|
contentSearch: Schema_exports.optional(Schema_exports.String.annotations({
|
|
177369
177419
|
description: "Search documents by content (fulltext search)"
|
|
@@ -177373,7 +177423,15 @@ var ListDocumentsParamsSchema = Schema_exports.Struct({
|
|
|
177373
177423
|
description: "Maximum number of documents to return (default: 50)"
|
|
177374
177424
|
})
|
|
177375
177425
|
)
|
|
177376
|
-
})
|
|
177426
|
+
});
|
|
177427
|
+
var ListDocumentsParamsSchema = ListDocumentsParamsBase.pipe(
|
|
177428
|
+
Schema_exports.filter((params) => {
|
|
177429
|
+
if (params.titleSearch !== void 0 && params.titleRegex !== void 0) {
|
|
177430
|
+
return "Cannot provide both 'titleSearch' and 'titleRegex'. Use one or the other.";
|
|
177431
|
+
}
|
|
177432
|
+
return void 0;
|
|
177433
|
+
})
|
|
177434
|
+
).annotations({
|
|
177377
177435
|
title: "ListDocumentsParams",
|
|
177378
177436
|
description: "Parameters for listing documents in a teamspace"
|
|
177379
177437
|
});
|
|
@@ -177772,9 +177830,12 @@ var parseSetIssueMilestoneParams = Schema_exports.decodeUnknown(SetIssueMileston
|
|
|
177772
177830
|
var parseDeleteMilestoneParams = Schema_exports.decodeUnknown(DeleteMilestoneParamsSchema);
|
|
177773
177831
|
|
|
177774
177832
|
// src/domain/schemas/contacts.ts
|
|
177775
|
-
var
|
|
177833
|
+
var ListPersonsParamsBase = Schema_exports.Struct({
|
|
177776
177834
|
nameSearch: Schema_exports.optional(Schema_exports.String.annotations({
|
|
177777
|
-
description: "Search persons by name substring (case-insensitive)"
|
|
177835
|
+
description: "Search persons by name substring (case-insensitive). Mutually exclusive with nameRegex."
|
|
177836
|
+
})),
|
|
177837
|
+
nameRegex: Schema_exports.optional(Schema_exports.String.annotations({
|
|
177838
|
+
description: "Filter persons by name using a regex pattern (e.g., '^Smith'). Mutually exclusive with nameSearch. Note: regex support depends on the Huly backend; use nameSearch for broader compatibility."
|
|
177778
177839
|
})),
|
|
177779
177840
|
emailSearch: Schema_exports.optional(Schema_exports.String.annotations({
|
|
177780
177841
|
description: "Search persons by email substring (case-insensitive)"
|
|
@@ -177784,7 +177845,15 @@ var ListPersonsParamsSchema = Schema_exports.Struct({
|
|
|
177784
177845
|
description: "Maximum number of persons to return (default: 50)"
|
|
177785
177846
|
})
|
|
177786
177847
|
)
|
|
177787
|
-
})
|
|
177848
|
+
});
|
|
177849
|
+
var ListPersonsParamsSchema = ListPersonsParamsBase.pipe(
|
|
177850
|
+
Schema_exports.filter((params) => {
|
|
177851
|
+
if (params.nameSearch !== void 0 && params.nameRegex !== void 0) {
|
|
177852
|
+
return "Cannot provide both 'nameSearch' and 'nameRegex'. Use one or the other.";
|
|
177853
|
+
}
|
|
177854
|
+
return void 0;
|
|
177855
|
+
})
|
|
177856
|
+
).annotations({
|
|
177788
177857
|
title: "ListPersonsParams",
|
|
177789
177858
|
description: "Parameters for listing persons"
|
|
177790
177859
|
});
|
|
@@ -177906,9 +177975,12 @@ var parseListOrganizationsParams = Schema_exports.decodeUnknown(ListOrganization
|
|
|
177906
177975
|
var parseCreateOrganizationParams = Schema_exports.decodeUnknown(CreateOrganizationParamsSchema);
|
|
177907
177976
|
|
|
177908
177977
|
// src/domain/schemas/channels.ts
|
|
177909
|
-
var
|
|
177978
|
+
var ListChannelsParamsBase = Schema_exports.Struct({
|
|
177910
177979
|
nameSearch: Schema_exports.optional(Schema_exports.String.annotations({
|
|
177911
|
-
description: "Search channels by name substring (case-insensitive)"
|
|
177980
|
+
description: "Search channels by name substring (case-insensitive). Mutually exclusive with nameRegex."
|
|
177981
|
+
})),
|
|
177982
|
+
nameRegex: Schema_exports.optional(Schema_exports.String.annotations({
|
|
177983
|
+
description: "Filter channels by name using a regex pattern (e.g., '^dev-'). Mutually exclusive with nameSearch. Note: regex support depends on the Huly backend; use nameSearch for broader compatibility."
|
|
177912
177984
|
})),
|
|
177913
177985
|
topicSearch: Schema_exports.optional(Schema_exports.String.annotations({
|
|
177914
177986
|
description: "Search channels by topic substring (case-insensitive)"
|
|
@@ -177923,7 +177995,15 @@ var ListChannelsParamsSchema = Schema_exports.Struct({
|
|
|
177923
177995
|
description: "Include archived channels in results (default: false)"
|
|
177924
177996
|
})
|
|
177925
177997
|
)
|
|
177926
|
-
})
|
|
177998
|
+
});
|
|
177999
|
+
var ListChannelsParamsSchema = ListChannelsParamsBase.pipe(
|
|
178000
|
+
Schema_exports.filter((params) => {
|
|
178001
|
+
if (params.nameSearch !== void 0 && params.nameRegex !== void 0) {
|
|
178002
|
+
return "Cannot provide both 'nameSearch' and 'nameRegex'. Use one or the other.";
|
|
178003
|
+
}
|
|
178004
|
+
return void 0;
|
|
178005
|
+
})
|
|
178006
|
+
).annotations({
|
|
177927
178007
|
title: "ListChannelsParams",
|
|
177928
178008
|
description: "Parameters for listing channels"
|
|
177929
178009
|
});
|
|
@@ -179089,6 +179169,9 @@ var listCards = (params) => Effect_exports.gen(function* () {
|
|
|
179089
179169
|
if (params.titleSearch !== void 0 && params.titleSearch.trim() !== "") {
|
|
179090
179170
|
query.title = { $like: `%${escapeLikeWildcards(params.titleSearch)}%` };
|
|
179091
179171
|
}
|
|
179172
|
+
if (params.titleRegex !== void 0 && params.titleRegex.trim() !== "") {
|
|
179173
|
+
query.title = { $regex: params.titleRegex };
|
|
179174
|
+
}
|
|
179092
179175
|
if (params.contentSearch !== void 0 && params.contentSearch.trim() !== "") {
|
|
179093
179176
|
query.$search = params.contentSearch;
|
|
179094
179177
|
}
|
|
@@ -179409,6 +179492,9 @@ var listChannels = (params) => Effect_exports.gen(function* () {
|
|
|
179409
179492
|
if (params.nameSearch !== void 0 && params.nameSearch.trim() !== "") {
|
|
179410
179493
|
query.name = { $like: `%${escapeLikeWildcards(params.nameSearch)}%` };
|
|
179411
179494
|
}
|
|
179495
|
+
if (params.nameRegex !== void 0 && params.nameRegex.trim() !== "") {
|
|
179496
|
+
query.name = { $regex: params.nameRegex };
|
|
179497
|
+
}
|
|
179412
179498
|
if (params.topicSearch !== void 0 && params.topicSearch.trim() !== "") {
|
|
179413
179499
|
query.topic = { $like: `%${escapeLikeWildcards(params.topicSearch)}%` };
|
|
179414
179500
|
}
|
|
@@ -180075,6 +180161,9 @@ var listPersons = (params) => Effect_exports.gen(function* () {
|
|
|
180075
180161
|
if (params.nameSearch !== void 0 && params.nameSearch.trim() !== "") {
|
|
180076
180162
|
query.name = { $like: `%${escapeLikeWildcards(params.nameSearch)}%` };
|
|
180077
180163
|
}
|
|
180164
|
+
if (params.nameRegex !== void 0 && params.nameRegex.trim() !== "") {
|
|
180165
|
+
query.name = { $regex: params.nameRegex };
|
|
180166
|
+
}
|
|
180078
180167
|
if (emailSearch !== void 0 && emailSearch !== "") {
|
|
180079
180168
|
const matchingPersonIds = yield* findPersonIdsByEmail(client, emailSearch);
|
|
180080
180169
|
if (matchingPersonIds.length === 0) {
|
|
@@ -181073,6 +181162,9 @@ var listIssues = (params) => Effect_exports.gen(function* () {
|
|
|
181073
181162
|
if (params.titleSearch !== void 0 && params.titleSearch.trim() !== "") {
|
|
181074
181163
|
query.title = { $like: `%${escapeLikeWildcards(params.titleSearch)}%` };
|
|
181075
181164
|
}
|
|
181165
|
+
if (params.titleRegex !== void 0 && params.titleRegex.trim() !== "") {
|
|
181166
|
+
query.title = { $regex: params.titleRegex };
|
|
181167
|
+
}
|
|
181076
181168
|
if (params.descriptionSearch !== void 0 && params.descriptionSearch.trim() !== "") {
|
|
181077
181169
|
query.$search = params.descriptionSearch;
|
|
181078
181170
|
}
|
|
@@ -181088,6 +181180,24 @@ var listIssues = (params) => Effect_exports.gen(function* () {
|
|
|
181088
181180
|
return [];
|
|
181089
181181
|
}
|
|
181090
181182
|
}
|
|
181183
|
+
if (params.hasAssignee === true) {
|
|
181184
|
+
query.assignee = { $ne: null };
|
|
181185
|
+
} else if (params.hasAssignee === false) {
|
|
181186
|
+
query.assignee = null;
|
|
181187
|
+
}
|
|
181188
|
+
if (params.hasDueDate === true) {
|
|
181189
|
+
query.dueDate = { $ne: null };
|
|
181190
|
+
} else if (params.hasDueDate === false) {
|
|
181191
|
+
query.dueDate = null;
|
|
181192
|
+
}
|
|
181193
|
+
if (params.hasComponent === true) {
|
|
181194
|
+
query.component = { $ne: null };
|
|
181195
|
+
} else if (params.hasComponent === false) {
|
|
181196
|
+
query.component = null;
|
|
181197
|
+
}
|
|
181198
|
+
if (params.isTopLevel === true) {
|
|
181199
|
+
query.attachedToClass = tracker.class.Project;
|
|
181200
|
+
}
|
|
181091
181201
|
const limit = clampLimit(params.limit);
|
|
181092
181202
|
const issues = yield* client.findAll(
|
|
181093
181203
|
tracker.class.Issue,
|
|
@@ -181196,12 +181306,7 @@ var resolveAssignee = (client, assigneeIdentifier) => Effect_exports.gen(functio
|
|
|
181196
181306
|
return person;
|
|
181197
181307
|
});
|
|
181198
181308
|
var createIssue = (params) => Effect_exports.gen(function* () {
|
|
181199
|
-
const
|
|
181200
|
-
client: client2,
|
|
181201
|
-
project: project4,
|
|
181202
|
-
statuses: []
|
|
181203
|
-
}));
|
|
181204
|
-
const { client, project: project3, statuses } = result;
|
|
181309
|
+
const { client, defaultStatusId, project: project3, statuses } = yield* findProjectWithStatuses(params.project);
|
|
181205
181310
|
const issueId = (0, import_core32.generateId)();
|
|
181206
181311
|
const incOps = { $inc: { sequence: 1 } };
|
|
181207
181312
|
const incResult = yield* client.updateDoc(
|
|
@@ -181212,7 +181317,7 @@ var createIssue = (params) => Effect_exports.gen(function* () {
|
|
|
181212
181317
|
true
|
|
181213
181318
|
);
|
|
181214
181319
|
const sequence = extractUpdatedSequence(incResult) ?? project3.sequence + 1;
|
|
181215
|
-
const statusRef = params.status !== void 0 ? yield* resolveStatusByName(statuses, params.status, params.project) :
|
|
181320
|
+
const statusRef = params.status !== void 0 ? yield* resolveStatusByName(statuses, params.status, params.project) : defaultStatusId !== void 0 ? defaultStatusId : yield* Effect_exports.fail(new InvalidStatusError({ status: "(default)", project: params.project }));
|
|
181216
181321
|
const assigneeRef = params.assignee !== void 0 ? (yield* resolveAssignee(client, params.assignee))._id : null;
|
|
181217
181322
|
const lastIssue = yield* client.findOne(
|
|
181218
181323
|
tracker.class.Issue,
|
|
@@ -183111,8 +183216,8 @@ var listProjects = (params) => Effect_exports.gen(function* () {
|
|
|
183111
183216
|
};
|
|
183112
183217
|
});
|
|
183113
183218
|
var getProject = (params) => Effect_exports.gen(function* () {
|
|
183114
|
-
const { project: project3, statuses } = yield* findProjectWithStatuses(params.project);
|
|
183115
|
-
const defaultStatus = statuses.find((s) => s._id ===
|
|
183219
|
+
const { defaultStatusId, project: project3, statuses } = yield* findProjectWithStatuses(params.project);
|
|
183220
|
+
const defaultStatus = defaultStatusId !== void 0 ? statuses.find((s) => s._id === defaultStatusId) : void 0;
|
|
183116
183221
|
return yield* parseProject({
|
|
183117
183222
|
identifier: project3.identifier,
|
|
183118
183223
|
name: project3.name,
|