@firfi/huly-mcp 0.1.52 → 0.1.54
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 +12 -1
- package/dist/index.cjs +157 -48
- 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):
|
|
@@ -210,7 +221,7 @@ MCP_TRANSPORT=http MCP_HTTP_PORT=8080 MCP_HTTP_HOST=0.0.0.0 npx -y @firfi/huly-m
|
|
|
210
221
|
| `list_documents` | List documents in a Huly teamspace. Returns documents sorted by modification date (newest first). Supports searching by title substring (titleSearch) and content (contentSearch). |
|
|
211
222
|
| `get_document` | Retrieve full details for a Huly document including markdown content. Use this to view document content and metadata. |
|
|
212
223
|
| `create_document` | Create a new document in a Huly teamspace. Content supports markdown formatting. Returns the created document id. |
|
|
213
|
-
| `
|
|
224
|
+
| `edit_document` | Edit an existing Huly document. Two content modes (mutually exclusive): (1) 'content' for full replace, (2) 'old_text' + 'new_text' for targeted search-and-replace. Multiple matches error unless replace_all is true. Empty new_text deletes matched text. Also supports renaming via 'title'. |
|
|
214
225
|
| `delete_document` | Permanently delete a Huly document. This action cannot be undone. |
|
|
215
226
|
|
|
216
227
|
### Storage
|
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
|
}
|
|
@@ -174139,7 +174139,7 @@ var PostHog = class extends PostHogBackendClient {
|
|
|
174139
174139
|
};
|
|
174140
174140
|
|
|
174141
174141
|
// src/version.ts
|
|
174142
|
-
var VERSION = true ? "0.1.
|
|
174142
|
+
var VERSION = true ? "0.1.53" : "0.0.0-dev";
|
|
174143
174143
|
|
|
174144
174144
|
// src/telemetry/posthog.ts
|
|
174145
174145
|
var POSTHOG_API_KEY = "phc_TGfFqCGdnF0p68wuFzd5WSw1IsBvOJW0YgoMJDyZPjm";
|
|
@@ -175218,6 +175218,9 @@ var listDocuments = (params) => Effect_exports.gen(function* () {
|
|
|
175218
175218
|
if (params.titleSearch !== void 0 && params.titleSearch.trim() !== "") {
|
|
175219
175219
|
query.title = { $like: `%${escapeLikeWildcards(params.titleSearch)}%` };
|
|
175220
175220
|
}
|
|
175221
|
+
if (params.titleRegex !== void 0 && params.titleRegex.trim() !== "") {
|
|
175222
|
+
query.title = { $regex: params.titleRegex };
|
|
175223
|
+
}
|
|
175221
175224
|
if (params.contentSearch !== void 0 && params.contentSearch.trim() !== "") {
|
|
175222
175225
|
query.$search = params.contentSearch;
|
|
175223
175226
|
}
|
|
@@ -176450,7 +176453,7 @@ var ListMasterTagsParamsSchema = Schema_exports.Struct({
|
|
|
176450
176453
|
title: "ListMasterTagsParams",
|
|
176451
176454
|
description: "Parameters for listing master tags (card types) available in a card space"
|
|
176452
176455
|
});
|
|
176453
|
-
var
|
|
176456
|
+
var ListCardsParamsBase = Schema_exports.Struct({
|
|
176454
176457
|
cardSpace: CardSpaceIdentifier.annotations({
|
|
176455
176458
|
description: "Card space name or ID"
|
|
176456
176459
|
}),
|
|
@@ -176458,7 +176461,10 @@ var ListCardsParamsSchema = Schema_exports.Struct({
|
|
|
176458
176461
|
description: "Filter by master tag (card type) name or ID"
|
|
176459
176462
|
})),
|
|
176460
176463
|
titleSearch: Schema_exports.optional(Schema_exports.String.annotations({
|
|
176461
|
-
description: "Search cards by title substring (case-insensitive)"
|
|
176464
|
+
description: "Search cards by title substring (case-insensitive). Mutually exclusive with titleRegex."
|
|
176465
|
+
})),
|
|
176466
|
+
titleRegex: Schema_exports.optional(Schema_exports.String.annotations({
|
|
176467
|
+
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
176468
|
})),
|
|
176463
176469
|
contentSearch: Schema_exports.optional(Schema_exports.String.annotations({
|
|
176464
176470
|
description: "Search cards by content (fulltext search)"
|
|
@@ -176468,7 +176474,15 @@ var ListCardsParamsSchema = Schema_exports.Struct({
|
|
|
176468
176474
|
description: "Maximum number of cards to return (default: 50)"
|
|
176469
176475
|
})
|
|
176470
176476
|
)
|
|
176471
|
-
})
|
|
176477
|
+
});
|
|
176478
|
+
var ListCardsParamsSchema = ListCardsParamsBase.pipe(
|
|
176479
|
+
Schema_exports.filter((params) => {
|
|
176480
|
+
if (params.titleSearch !== void 0 && params.titleRegex !== void 0) {
|
|
176481
|
+
return "Cannot provide both 'titleSearch' and 'titleRegex'. Use one or the other.";
|
|
176482
|
+
}
|
|
176483
|
+
return void 0;
|
|
176484
|
+
})
|
|
176485
|
+
).annotations({
|
|
176472
176486
|
title: "ListCardsParams",
|
|
176473
176487
|
description: "Parameters for listing cards in a card space"
|
|
176474
176488
|
});
|
|
@@ -176616,7 +176630,7 @@ var IssueSchema = Schema_exports.Struct({
|
|
|
176616
176630
|
title: "Issue",
|
|
176617
176631
|
description: "Full issue with all fields"
|
|
176618
176632
|
});
|
|
176619
|
-
var
|
|
176633
|
+
var ListIssuesParamsBase = Schema_exports.Struct({
|
|
176620
176634
|
project: ProjectIdentifier.annotations({
|
|
176621
176635
|
description: "Project identifier (e.g., 'HULY')"
|
|
176622
176636
|
}),
|
|
@@ -176630,7 +176644,10 @@ var ListIssuesParamsSchema = Schema_exports.Struct({
|
|
|
176630
176644
|
description: "Filter to children of this parent issue (e.g., 'HULY-42')"
|
|
176631
176645
|
})),
|
|
176632
176646
|
titleSearch: Schema_exports.optional(Schema_exports.String.annotations({
|
|
176633
|
-
description: "Search issues by title substring (case-insensitive)"
|
|
176647
|
+
description: "Search issues by title substring (case-insensitive). Mutually exclusive with titleRegex."
|
|
176648
|
+
})),
|
|
176649
|
+
titleRegex: Schema_exports.optional(Schema_exports.String.annotations({
|
|
176650
|
+
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
176651
|
})),
|
|
176635
176652
|
descriptionSearch: Schema_exports.optional(Schema_exports.String.annotations({
|
|
176636
176653
|
description: "Search issues by description content (fulltext search)"
|
|
@@ -176638,12 +176655,41 @@ var ListIssuesParamsSchema = Schema_exports.Struct({
|
|
|
176638
176655
|
component: Schema_exports.optional(ComponentIdentifier.annotations({
|
|
176639
176656
|
description: "Filter by component ID or label"
|
|
176640
176657
|
})),
|
|
176658
|
+
hasAssignee: Schema_exports.optional(Schema_exports.Boolean.annotations({
|
|
176659
|
+
description: "Filter by assignee presence. true = only assigned issues, false = only unassigned issues."
|
|
176660
|
+
})),
|
|
176661
|
+
hasDueDate: Schema_exports.optional(Schema_exports.Boolean.annotations({
|
|
176662
|
+
description: "Filter by due date presence. true = only issues with a due date, false = only issues without."
|
|
176663
|
+
})),
|
|
176664
|
+
hasComponent: Schema_exports.optional(Schema_exports.Boolean.annotations({
|
|
176665
|
+
description: "Filter by component presence. true = only issues with a component, false = only issues without."
|
|
176666
|
+
})),
|
|
176667
|
+
isTopLevel: Schema_exports.optional(Schema_exports.Boolean.annotations({
|
|
176668
|
+
description: "When true, only return top-level issues (not sub-issues). false or omitted returns all issues."
|
|
176669
|
+
})),
|
|
176641
176670
|
limit: Schema_exports.optional(
|
|
176642
176671
|
LimitParam.annotations({
|
|
176643
176672
|
description: "Maximum number of issues to return (default: 50)"
|
|
176644
176673
|
})
|
|
176645
176674
|
)
|
|
176646
|
-
})
|
|
176675
|
+
});
|
|
176676
|
+
var ListIssuesParamsSchema = ListIssuesParamsBase.pipe(
|
|
176677
|
+
Schema_exports.filter((params) => {
|
|
176678
|
+
if (params.titleSearch !== void 0 && params.titleRegex !== void 0) {
|
|
176679
|
+
return "Cannot provide both 'titleSearch' and 'titleRegex'. Use one or the other.";
|
|
176680
|
+
}
|
|
176681
|
+
if (params.assignee !== void 0 && params.hasAssignee !== void 0) {
|
|
176682
|
+
return "Cannot provide both 'assignee' and 'hasAssignee'. Use one or the other.";
|
|
176683
|
+
}
|
|
176684
|
+
if (params.component !== void 0 && params.hasComponent !== void 0) {
|
|
176685
|
+
return "Cannot provide both 'component' and 'hasComponent'. Use one or the other.";
|
|
176686
|
+
}
|
|
176687
|
+
if (params.parentIssue !== void 0 && params.isTopLevel === true) {
|
|
176688
|
+
return "Cannot provide both 'parentIssue' and 'isTopLevel: true'. parentIssue requests children; isTopLevel requests parentless issues.";
|
|
176689
|
+
}
|
|
176690
|
+
return void 0;
|
|
176691
|
+
})
|
|
176692
|
+
).annotations({
|
|
176647
176693
|
title: "ListIssuesParams",
|
|
176648
176694
|
description: "Parameters for listing issues"
|
|
176649
176695
|
});
|
|
@@ -177358,12 +177404,15 @@ var ListTeamspacesParamsSchema = Schema_exports.Struct({
|
|
|
177358
177404
|
title: "ListTeamspacesParams",
|
|
177359
177405
|
description: "Parameters for listing teamspaces"
|
|
177360
177406
|
});
|
|
177361
|
-
var
|
|
177407
|
+
var ListDocumentsParamsBase = Schema_exports.Struct({
|
|
177362
177408
|
teamspace: TeamspaceIdentifier.annotations({
|
|
177363
177409
|
description: "Teamspace name or ID"
|
|
177364
177410
|
}),
|
|
177365
177411
|
titleSearch: Schema_exports.optional(Schema_exports.String.annotations({
|
|
177366
|
-
description: "Search documents by title substring (case-insensitive)"
|
|
177412
|
+
description: "Search documents by title substring (case-insensitive). Mutually exclusive with titleRegex."
|
|
177413
|
+
})),
|
|
177414
|
+
titleRegex: Schema_exports.optional(Schema_exports.String.annotations({
|
|
177415
|
+
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
177416
|
})),
|
|
177368
177417
|
contentSearch: Schema_exports.optional(Schema_exports.String.annotations({
|
|
177369
177418
|
description: "Search documents by content (fulltext search)"
|
|
@@ -177373,7 +177422,15 @@ var ListDocumentsParamsSchema = Schema_exports.Struct({
|
|
|
177373
177422
|
description: "Maximum number of documents to return (default: 50)"
|
|
177374
177423
|
})
|
|
177375
177424
|
)
|
|
177376
|
-
})
|
|
177425
|
+
});
|
|
177426
|
+
var ListDocumentsParamsSchema = ListDocumentsParamsBase.pipe(
|
|
177427
|
+
Schema_exports.filter((params) => {
|
|
177428
|
+
if (params.titleSearch !== void 0 && params.titleRegex !== void 0) {
|
|
177429
|
+
return "Cannot provide both 'titleSearch' and 'titleRegex'. Use one or the other.";
|
|
177430
|
+
}
|
|
177431
|
+
return void 0;
|
|
177432
|
+
})
|
|
177433
|
+
).annotations({
|
|
177377
177434
|
title: "ListDocumentsParams",
|
|
177378
177435
|
description: "Parameters for listing documents in a teamspace"
|
|
177379
177436
|
});
|
|
@@ -177772,9 +177829,12 @@ var parseSetIssueMilestoneParams = Schema_exports.decodeUnknown(SetIssueMileston
|
|
|
177772
177829
|
var parseDeleteMilestoneParams = Schema_exports.decodeUnknown(DeleteMilestoneParamsSchema);
|
|
177773
177830
|
|
|
177774
177831
|
// src/domain/schemas/contacts.ts
|
|
177775
|
-
var
|
|
177832
|
+
var ListPersonsParamsBase = Schema_exports.Struct({
|
|
177776
177833
|
nameSearch: Schema_exports.optional(Schema_exports.String.annotations({
|
|
177777
|
-
description: "Search persons by name substring (case-insensitive)"
|
|
177834
|
+
description: "Search persons by name substring (case-insensitive). Mutually exclusive with nameRegex."
|
|
177835
|
+
})),
|
|
177836
|
+
nameRegex: Schema_exports.optional(Schema_exports.String.annotations({
|
|
177837
|
+
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
177838
|
})),
|
|
177779
177839
|
emailSearch: Schema_exports.optional(Schema_exports.String.annotations({
|
|
177780
177840
|
description: "Search persons by email substring (case-insensitive)"
|
|
@@ -177784,7 +177844,15 @@ var ListPersonsParamsSchema = Schema_exports.Struct({
|
|
|
177784
177844
|
description: "Maximum number of persons to return (default: 50)"
|
|
177785
177845
|
})
|
|
177786
177846
|
)
|
|
177787
|
-
})
|
|
177847
|
+
});
|
|
177848
|
+
var ListPersonsParamsSchema = ListPersonsParamsBase.pipe(
|
|
177849
|
+
Schema_exports.filter((params) => {
|
|
177850
|
+
if (params.nameSearch !== void 0 && params.nameRegex !== void 0) {
|
|
177851
|
+
return "Cannot provide both 'nameSearch' and 'nameRegex'. Use one or the other.";
|
|
177852
|
+
}
|
|
177853
|
+
return void 0;
|
|
177854
|
+
})
|
|
177855
|
+
).annotations({
|
|
177788
177856
|
title: "ListPersonsParams",
|
|
177789
177857
|
description: "Parameters for listing persons"
|
|
177790
177858
|
});
|
|
@@ -177906,9 +177974,12 @@ var parseListOrganizationsParams = Schema_exports.decodeUnknown(ListOrganization
|
|
|
177906
177974
|
var parseCreateOrganizationParams = Schema_exports.decodeUnknown(CreateOrganizationParamsSchema);
|
|
177907
177975
|
|
|
177908
177976
|
// src/domain/schemas/channels.ts
|
|
177909
|
-
var
|
|
177977
|
+
var ListChannelsParamsBase = Schema_exports.Struct({
|
|
177910
177978
|
nameSearch: Schema_exports.optional(Schema_exports.String.annotations({
|
|
177911
|
-
description: "Search channels by name substring (case-insensitive)"
|
|
177979
|
+
description: "Search channels by name substring (case-insensitive). Mutually exclusive with nameRegex."
|
|
177980
|
+
})),
|
|
177981
|
+
nameRegex: Schema_exports.optional(Schema_exports.String.annotations({
|
|
177982
|
+
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
177983
|
})),
|
|
177913
177984
|
topicSearch: Schema_exports.optional(Schema_exports.String.annotations({
|
|
177914
177985
|
description: "Search channels by topic substring (case-insensitive)"
|
|
@@ -177923,7 +177994,15 @@ var ListChannelsParamsSchema = Schema_exports.Struct({
|
|
|
177923
177994
|
description: "Include archived channels in results (default: false)"
|
|
177924
177995
|
})
|
|
177925
177996
|
)
|
|
177926
|
-
})
|
|
177997
|
+
});
|
|
177998
|
+
var ListChannelsParamsSchema = ListChannelsParamsBase.pipe(
|
|
177999
|
+
Schema_exports.filter((params) => {
|
|
178000
|
+
if (params.nameSearch !== void 0 && params.nameRegex !== void 0) {
|
|
178001
|
+
return "Cannot provide both 'nameSearch' and 'nameRegex'. Use one or the other.";
|
|
178002
|
+
}
|
|
178003
|
+
return void 0;
|
|
178004
|
+
})
|
|
178005
|
+
).annotations({
|
|
177927
178006
|
title: "ListChannelsParams",
|
|
177928
178007
|
description: "Parameters for listing channels"
|
|
177929
178008
|
});
|
|
@@ -179089,6 +179168,9 @@ var listCards = (params) => Effect_exports.gen(function* () {
|
|
|
179089
179168
|
if (params.titleSearch !== void 0 && params.titleSearch.trim() !== "") {
|
|
179090
179169
|
query.title = { $like: `%${escapeLikeWildcards(params.titleSearch)}%` };
|
|
179091
179170
|
}
|
|
179171
|
+
if (params.titleRegex !== void 0 && params.titleRegex.trim() !== "") {
|
|
179172
|
+
query.title = { $regex: params.titleRegex };
|
|
179173
|
+
}
|
|
179092
179174
|
if (params.contentSearch !== void 0 && params.contentSearch.trim() !== "") {
|
|
179093
179175
|
query.$search = params.contentSearch;
|
|
179094
179176
|
}
|
|
@@ -179409,6 +179491,9 @@ var listChannels = (params) => Effect_exports.gen(function* () {
|
|
|
179409
179491
|
if (params.nameSearch !== void 0 && params.nameSearch.trim() !== "") {
|
|
179410
179492
|
query.name = { $like: `%${escapeLikeWildcards(params.nameSearch)}%` };
|
|
179411
179493
|
}
|
|
179494
|
+
if (params.nameRegex !== void 0 && params.nameRegex.trim() !== "") {
|
|
179495
|
+
query.name = { $regex: params.nameRegex };
|
|
179496
|
+
}
|
|
179412
179497
|
if (params.topicSearch !== void 0 && params.topicSearch.trim() !== "") {
|
|
179413
179498
|
query.topic = { $like: `%${escapeLikeWildcards(params.topicSearch)}%` };
|
|
179414
179499
|
}
|
|
@@ -180075,6 +180160,9 @@ var listPersons = (params) => Effect_exports.gen(function* () {
|
|
|
180075
180160
|
if (params.nameSearch !== void 0 && params.nameSearch.trim() !== "") {
|
|
180076
180161
|
query.name = { $like: `%${escapeLikeWildcards(params.nameSearch)}%` };
|
|
180077
180162
|
}
|
|
180163
|
+
if (params.nameRegex !== void 0 && params.nameRegex.trim() !== "") {
|
|
180164
|
+
query.name = { $regex: params.nameRegex };
|
|
180165
|
+
}
|
|
180078
180166
|
if (emailSearch !== void 0 && emailSearch !== "") {
|
|
180079
180167
|
const matchingPersonIds = yield* findPersonIdsByEmail(client, emailSearch);
|
|
180080
180168
|
if (matchingPersonIds.length === 0) {
|
|
@@ -181073,6 +181161,9 @@ var listIssues = (params) => Effect_exports.gen(function* () {
|
|
|
181073
181161
|
if (params.titleSearch !== void 0 && params.titleSearch.trim() !== "") {
|
|
181074
181162
|
query.title = { $like: `%${escapeLikeWildcards(params.titleSearch)}%` };
|
|
181075
181163
|
}
|
|
181164
|
+
if (params.titleRegex !== void 0 && params.titleRegex.trim() !== "") {
|
|
181165
|
+
query.title = { $regex: params.titleRegex };
|
|
181166
|
+
}
|
|
181076
181167
|
if (params.descriptionSearch !== void 0 && params.descriptionSearch.trim() !== "") {
|
|
181077
181168
|
query.$search = params.descriptionSearch;
|
|
181078
181169
|
}
|
|
@@ -181088,6 +181179,24 @@ var listIssues = (params) => Effect_exports.gen(function* () {
|
|
|
181088
181179
|
return [];
|
|
181089
181180
|
}
|
|
181090
181181
|
}
|
|
181182
|
+
if (params.hasAssignee === true) {
|
|
181183
|
+
query.assignee = { $ne: null };
|
|
181184
|
+
} else if (params.hasAssignee === false) {
|
|
181185
|
+
query.assignee = null;
|
|
181186
|
+
}
|
|
181187
|
+
if (params.hasDueDate === true) {
|
|
181188
|
+
query.dueDate = { $ne: null };
|
|
181189
|
+
} else if (params.hasDueDate === false) {
|
|
181190
|
+
query.dueDate = null;
|
|
181191
|
+
}
|
|
181192
|
+
if (params.hasComponent === true) {
|
|
181193
|
+
query.component = { $ne: null };
|
|
181194
|
+
} else if (params.hasComponent === false) {
|
|
181195
|
+
query.component = null;
|
|
181196
|
+
}
|
|
181197
|
+
if (params.isTopLevel === true) {
|
|
181198
|
+
query.attachedToClass = tracker.class.Project;
|
|
181199
|
+
}
|
|
181091
181200
|
const limit = clampLimit(params.limit);
|
|
181092
181201
|
const issues = yield* client.findAll(
|
|
181093
181202
|
tracker.class.Issue,
|