backlog-mcp-server 0.18.0 → 0.18.1
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.ja.md +16 -0
- package/README.md +16 -0
- package/build/auth/oauthRoutes.js +1 -1
- package/build/backlog/customFields.js +12 -9
- package/build/httpMcpServer.js +8 -1
- package/build/loadDescriptionOverrides.js +2 -2
- package/build/tools/addDocument.d.ts +1 -1
- package/build/tools/addDocument.js +1 -1
- package/build/tools/addIssue.d.ts +1 -1
- package/build/tools/addIssueComment.d.ts +1 -1
- package/build/tools/addProject.d.ts +1 -1
- package/build/tools/addPullRequest.d.ts +1 -1
- package/build/tools/addPullRequestComment.d.ts +1 -1
- package/build/tools/addRelatedIssue.d.ts +1 -1
- package/build/tools/addVersionMilestone.d.ts +1 -1
- package/build/tools/addWatching.d.ts +1 -1
- package/build/tools/addWiki.d.ts +1 -1
- package/build/tools/countIssues.d.ts +1 -1
- package/build/tools/deleteIssue.d.ts +1 -1
- package/build/tools/deleteProject.d.ts +1 -1
- package/build/tools/deleteVersion.d.ts +1 -1
- package/build/tools/deleteWatching.d.ts +1 -1
- package/build/tools/getCategories.d.ts +1 -1
- package/build/tools/getCustomFields.d.ts +1 -1
- package/build/tools/getDocument.d.ts +1 -1
- package/build/tools/getDocumentTree.d.ts +1 -1
- package/build/tools/getDocuments.d.ts +1 -1
- package/build/tools/getGitRepositories.d.ts +1 -1
- package/build/tools/getGitRepository.d.ts +1 -1
- package/build/tools/getIssue.d.ts +1 -1
- package/build/tools/getIssueComments.d.ts +1 -1
- package/build/tools/getIssueTypes.d.ts +1 -1
- package/build/tools/getIssues.d.ts +15 -15
- package/build/tools/getMyself.d.ts +1 -1
- package/build/tools/getNotifications.d.ts +1 -1
- package/build/tools/getNotificationsCount.d.ts +1 -1
- package/build/tools/getPriorities.d.ts +1 -1
- package/build/tools/getProject.d.ts +1 -1
- package/build/tools/getProjectList.d.ts +1 -1
- package/build/tools/getProjectUsers.d.ts +1 -1
- package/build/tools/getPullRequest.d.ts +1 -1
- package/build/tools/getPullRequestComments.d.ts +1 -1
- package/build/tools/getPullRequests.d.ts +1 -1
- package/build/tools/getPullRequestsCount.d.ts +1 -1
- package/build/tools/getRelatedIssues.d.ts +1 -1
- package/build/tools/getResolutions.d.ts +1 -1
- package/build/tools/getSpace.d.ts +1 -1
- package/build/tools/getSpaceActivities.d.ts +1 -1
- package/build/tools/getUserRecentUpdates.d.ts +1 -1
- package/build/tools/getUserStarsCount.d.ts +1 -1
- package/build/tools/getUsers.d.ts +1 -1
- package/build/tools/getVersionMilestoneList.d.ts +1 -1
- package/build/tools/getWatchingListCount.d.ts +1 -1
- package/build/tools/getWatchingListItems.d.ts +1 -1
- package/build/tools/getWiki.d.ts +1 -1
- package/build/tools/getWikiPages.d.ts +1 -1
- package/build/tools/getWikisCount.d.ts +1 -1
- package/build/tools/markNotificationAsRead.d.ts +1 -1
- package/build/tools/markWatchingAsRead.d.ts +1 -1
- package/build/tools/removeRelatedIssue.d.ts +1 -1
- package/build/tools/resetUnreadNotificationCount.d.ts +1 -1
- package/build/tools/shared/customFieldFiltersSchema.d.ts +1 -1
- package/build/tools/updateIssue.d.ts +1 -1
- package/build/tools/updateIssueComment.d.ts +1 -1
- package/build/tools/updateProject.d.ts +1 -1
- package/build/tools/updatePullRequest.d.ts +1 -1
- package/build/tools/updatePullRequestComment.d.ts +1 -1
- package/build/tools/updateVersionMilestone.d.ts +1 -1
- package/build/tools/updateWatching.d.ts +1 -1
- package/build/tools/updateWiki.d.ts +1 -1
- package/build/types/tool.d.ts +1 -1
- package/build/utils/logger.js +41 -3
- package/build/utils/resolveIdOrKey.d.ts +2 -2
- package/package.json +17 -24
package/README.ja.md
CHANGED
|
@@ -469,6 +469,22 @@ MAX_TOKENS=10000
|
|
|
469
469
|
|
|
470
470
|
> 注:これはベストエフォートの緩和策であり、保証された強制ではありません。
|
|
471
471
|
|
|
472
|
+
### ログ出力
|
|
473
|
+
|
|
474
|
+
ログは **stderr** に出力されます(stdio トランスポートでは stdout が JSON-RPC のストリームに使われるため)。
|
|
475
|
+
|
|
476
|
+
| 変数 | 説明 |
|
|
477
|
+
| ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
478
|
+
| `LOG_LEVEL` | `fatal` / `error` / `warn` / `info` / `debug` / `trace` / `silent`。既定は `NODE_ENV` が `production`(未設定時もこれに含まれる)のとき `error`、それ以外は `debug`。認識できない値は通知した上で既定値にフォールバックします。 |
|
|
479
|
+
|
|
480
|
+
出力**フォーマット**は引き続き `NODE_ENV` が決めます(`production` 以外では `pino-pretty` が利用可能なら人間向けの整形出力に切り替わります)。ログ量を変えたいときは `NODE_ENV` ではなく `LOG_LEVEL` を設定してください。デプロイ先で構造化 JSON のまま保てます。
|
|
481
|
+
|
|
482
|
+
`pino-pretty` は開発用の依存なので、公開されている npm パッケージにもコンテナイメージにも含まれていません。そのため、これらでは `NODE_ENV` の値に関わらず常に構造化 JSON が出力され、出力を変えられるのは `LOG_LEVEL` だけです。
|
|
483
|
+
|
|
484
|
+
```
|
|
485
|
+
LOG_LEVEL=info node build/index.js --transport http
|
|
486
|
+
```
|
|
487
|
+
|
|
472
488
|
### 完全なカスタム設定例
|
|
473
489
|
|
|
474
490
|
このセクションでは、複数の環境変数を使用した高度な設定を示します。これらは実験的な機能であり、すべてのMCPクライアントでサポートされているとは限りません。これはMCP標準仕様の一部ではなく、注意して使用する必要があります。
|
package/README.md
CHANGED
|
@@ -586,6 +586,22 @@ If a response exceeds the limit, it will be truncated with a warning.
|
|
|
586
586
|
|
|
587
587
|
> Note: This is a best-effort mitigation, not a guaranteed enforcement.
|
|
588
588
|
|
|
589
|
+
### Logging
|
|
590
|
+
|
|
591
|
+
The server logs to **stderr** (stdout carries the JSON-RPC stream on the stdio transport).
|
|
592
|
+
|
|
593
|
+
| Variable | Description |
|
|
594
|
+
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
595
|
+
| `LOG_LEVEL` | `fatal`, `error`, `warn`, `info`, `debug`, `trace` or `silent`. Defaults to `error` when `NODE_ENV` is `production` — which is also the default when `NODE_ENV` is unset — and to `debug` otherwise. An unrecognised value is reported and the default is used. |
|
|
596
|
+
|
|
597
|
+
`NODE_ENV` still selects the output *format*: any value other than `production` switches to human-readable `pino-pretty` output when that package is available. Use `LOG_LEVEL`, not `NODE_ENV`, to change how much is logged, so that a deployment keeps structured JSON:
|
|
598
|
+
|
|
599
|
+
`pino-pretty` is a development dependency, so neither the published npm package nor the container image carries a copy. In those, logs are structured JSON whatever `NODE_ENV` says, and `LOG_LEVEL` is the only setting that changes the output.
|
|
600
|
+
|
|
601
|
+
```
|
|
602
|
+
LOG_LEVEL=info node build/index.js --transport http
|
|
603
|
+
```
|
|
604
|
+
|
|
589
605
|
### Full Custom Configuration Example
|
|
590
606
|
|
|
591
607
|
This section demonstrates advanced configuration using multiple environment variables. These are experimental features and may not be supported across all MCP clients. This is not part of the MCP standard specification and should be used with caution.
|
|
@@ -119,7 +119,7 @@ export function createOAuthRoutes(config, store, mcpPath) {
|
|
|
119
119
|
const declaredApplicationType = body.application_type ?? undefined;
|
|
120
120
|
if (declaredApplicationType !== undefined &&
|
|
121
121
|
!APPLICATION_TYPES.includes(declaredApplicationType)) {
|
|
122
|
-
return c.json(oauthError('invalid_client_metadata', `Unsupported application_type: ${
|
|
122
|
+
return c.json(oauthError('invalid_client_metadata', `Unsupported application_type: ${JSON.stringify(declaredApplicationType)}. Supported: ${APPLICATION_TYPES.join(', ')}`), 400);
|
|
123
123
|
}
|
|
124
124
|
const applicationType = resolveApplicationType(declaredApplicationType, redirectUris);
|
|
125
125
|
if (applicationType === 'web') {
|
|
@@ -49,20 +49,23 @@ export function customFieldFiltersToPayload(customFields) {
|
|
|
49
49
|
break;
|
|
50
50
|
}
|
|
51
51
|
case 'list': {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
52
|
+
// Always an array, single value included. Backlog matches a list custom
|
|
53
|
+
// field only on the indexed parameters `customField_1[0]=…`, which
|
|
54
|
+
// `Request.toQueryString` produces from an array under a `customField_`
|
|
55
|
+
// key. A bare `customField_1=…` is not matched, and neither is the
|
|
56
|
+
// `customField_1[][0]=…` that a `[]` suffix on this key would produce.
|
|
57
|
+
// Neither is rejected either — the filter is silently ignored and every
|
|
58
|
+
// issue comes back, so the caller cannot tell a filtered query from an
|
|
59
|
+
// unfiltered one.
|
|
60
|
+
const values = (Array.isArray(field.value) ? field.value : [field.value]).filter((value) => Number.isFinite(value));
|
|
61
|
+
if (values.length > 0) {
|
|
62
|
+
result[baseKey] = values;
|
|
60
63
|
}
|
|
61
64
|
break;
|
|
62
65
|
}
|
|
63
66
|
default: {
|
|
64
67
|
const exhaustiveCheck = field;
|
|
65
|
-
throw new Error(`Unsupported custom field filter type: ${exhaustiveCheck}`);
|
|
68
|
+
throw new Error(`Unsupported custom field filter type: ${JSON.stringify(exhaustiveCheck)}`);
|
|
66
69
|
}
|
|
67
70
|
}
|
|
68
71
|
}
|
package/build/httpMcpServer.js
CHANGED
|
@@ -16,6 +16,14 @@ export const runHttpMcpServer = async (options) => {
|
|
|
16
16
|
const app = new Hono();
|
|
17
17
|
const isLocalhostBind = LOCALHOST_BINDS.includes(host);
|
|
18
18
|
const oauthEnabled = !!(oauthConfig && tokenStore);
|
|
19
|
+
// Registered before the Host and Origin guards so that it stays reachable
|
|
20
|
+
// under an allow list. A load balancer health check addresses the target
|
|
21
|
+
// directly and puts its address in `Host` — AWS ALB gives no way to override
|
|
22
|
+
// it — so a guarded `/health` can only ever answer 403, leaving an operator
|
|
23
|
+
// to choose between dropping the allow list and treating 403 as healthy.
|
|
24
|
+
// Exempting it costs nothing: the response is constant and reaches no state,
|
|
25
|
+
// so there is nothing here for a rebinding page to reach either.
|
|
26
|
+
app.get('/health', (c) => c.json({ status: 'healthy', timestamp: new Date().toISOString(), version }));
|
|
19
27
|
// DNS rebinding protection. `Host` is the actual defense: a rebinding page
|
|
20
28
|
// reaches us carrying its own hostname, which the allow list rejects.
|
|
21
29
|
if (allowedHosts?.length) {
|
|
@@ -36,7 +44,6 @@ export const runHttpMcpServer = async (options) => {
|
|
|
36
44
|
else if (isLocalhostBind && !allowedHosts?.length) {
|
|
37
45
|
app.use('*', localhostOriginValidation());
|
|
38
46
|
}
|
|
39
|
-
app.get('/health', (c) => c.json({ status: 'healthy', timestamp: new Date().toISOString(), version }));
|
|
40
47
|
if (oauthEnabled) {
|
|
41
48
|
const { createOAuthRoutes } = await import('./auth/oauthRoutes.js');
|
|
42
49
|
const { createBearerAuthMiddleware } = await import('./auth/bearerAuthMiddleware.js');
|
|
@@ -69,8 +69,8 @@ export function loadDescriptionOverrides(options) {
|
|
|
69
69
|
continue;
|
|
70
70
|
if (outcome.status === 'unreadable') {
|
|
71
71
|
// `logger.error`, not `warn`: the logger runs at level `error` unless
|
|
72
|
-
// NODE_ENV says otherwise, so a warning here would never
|
|
73
|
-
// this message exists for.
|
|
72
|
+
// LOG_LEVEL or NODE_ENV says otherwise, so a warning here would never
|
|
73
|
+
// reach the user this message exists for.
|
|
74
74
|
logger.error({ err: outcome.error, filePath }, 'Could not read the description override file; continuing with the built-in defaults');
|
|
75
75
|
return {};
|
|
76
76
|
}
|
|
@@ -3,7 +3,7 @@ import { Backlog } from 'backlog-js';
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
5
5
|
import { ToolDefinition } from '../types/tool.js';
|
|
6
|
-
declare const addDocumentSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const addDocumentSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
projectId: z.ZodNumber;
|
|
8
8
|
title: z.ZodOptional<z.ZodString>;
|
|
9
9
|
content: z.ZodOptional<z.ZodString>;
|
|
@@ -28,7 +28,7 @@ const addDocumentSchema = buildToolSchema((t) => ({
|
|
|
28
28
|
}));
|
|
29
29
|
export const addDocumentTool = (backlog, { t }) => {
|
|
30
30
|
return {
|
|
31
|
-
name: '
|
|
31
|
+
name: 'add_document',
|
|
32
32
|
description: t('TOOL_ADD_DOCUMENT_DESCRIPTION', 'Adds a new document to the specified project.'),
|
|
33
33
|
schema: z.object(addDocumentSchema(t)),
|
|
34
34
|
returnsList: false,
|
|
@@ -3,7 +3,7 @@ import { Backlog } from 'backlog-js';
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
5
5
|
import { ToolDefinition } from '../types/tool.js';
|
|
6
|
-
declare const addIssueSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const addIssueSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
projectId: z.ZodNumber;
|
|
8
8
|
summary: z.ZodString;
|
|
9
9
|
issueTypeId: z.ZodNumber;
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const addIssueCommentSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const addIssueCommentSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
issueId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
issueKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
content: z.ZodString;
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const addProjectSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const addProjectSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
name: z.ZodString;
|
|
8
8
|
key: z.ZodString;
|
|
9
9
|
chartEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const addPullRequestSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const addPullRequestSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
projectId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
projectKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
repoId: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const addPullRequestCommentSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const addPullRequestCommentSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
projectId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
projectKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
repoId: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const addRelatedIssueSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const addRelatedIssueSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
issueId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
issueKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
targetIssueId: z.ZodNumber;
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const addVersionMilestoneSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const addVersionMilestoneSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
projectId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
projectKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
name: z.ZodString;
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const addWatchingSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const addWatchingSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
issueIdOrKey: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
8
8
|
note: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
9
9
|
};
|
package/build/tools/addWiki.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const addWikiSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const addWikiSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
projectId: z.ZodNumber;
|
|
8
8
|
name: z.ZodString;
|
|
9
9
|
content: z.ZodString;
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const countIssuesSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const countIssuesSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
projectId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
8
8
|
issueTypeId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
9
9
|
categoryId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const deleteIssueSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const deleteIssueSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
issueId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
issueKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const deleteProjectSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const deleteProjectSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
projectId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
projectKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const deleteVersionSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const deleteVersionSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
projectId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
projectKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
id: z.ZodNumber;
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const deleteWatchingSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const deleteWatchingSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
watchId: z.ZodNumber;
|
|
8
8
|
};
|
|
9
9
|
export declare const deleteWatchingTool: (backlog: Backlog, { t }: DescriptionHelper) => ToolDefinition<ReturnType<typeof deleteWatchingSchema>, Entity.WatchingList.WatchingListItem>;
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const getCategoriesSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const getCategoriesSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
projectId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
projectKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ import { Backlog } from 'backlog-js';
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const getCustomFieldsInputSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const getCustomFieldsInputSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
projectId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
projectKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ import { Backlog } from 'backlog-js';
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
5
5
|
import { ToolDefinition } from '../types/tool.js';
|
|
6
|
-
declare const getDocumentSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const getDocumentSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
documentId: z.ZodString;
|
|
8
8
|
};
|
|
9
9
|
export declare const getDocumentTool: (backlog: Backlog, { t }: DescriptionHelper) => ToolDefinition<ReturnType<typeof getDocumentSchema>, Entity.Document.Document>;
|
|
@@ -3,7 +3,7 @@ import { Backlog } from 'backlog-js';
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
5
5
|
import { ToolDefinition } from '../types/tool.js';
|
|
6
|
-
declare const getDocumentTreeSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const getDocumentTreeSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
projectIdOrKey: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
8
8
|
};
|
|
9
9
|
export declare const getDocumentTreeTool: (backlog: Backlog, { t }: DescriptionHelper) => ToolDefinition<ReturnType<typeof getDocumentTreeSchema>, Entity.Document.DocumentTree>;
|
|
@@ -3,7 +3,7 @@ import { Backlog } from 'backlog-js';
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
5
5
|
import { ToolDefinition } from '../types/tool.js';
|
|
6
|
-
declare const getDocumentsSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const getDocumentsSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
projectIds: z.ZodArray<z.ZodNumber>;
|
|
8
8
|
offset: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const getGitRepositoriesSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const getGitRepositoriesSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
projectId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
projectKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const getGitRepositorySchema: (t: DescriptionHelper[
|
|
6
|
+
declare const getGitRepositorySchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
projectId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
projectKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
repoId: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const getIssueSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const getIssueSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
issueId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
issueKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const getIssueCommentsSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const getIssueCommentsSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
issueId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
issueKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
minId: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const getIssueTypesSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const getIssueTypesSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
projectId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
projectKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const getIssuesSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const getIssuesSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
projectId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
8
8
|
issueTypeId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
9
9
|
categoryId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
@@ -25,25 +25,25 @@ declare const getIssuesSchema: (t: DescriptionHelper["t"]) => {
|
|
|
25
25
|
updatedSince: z.ZodOptional<z.ZodString>;
|
|
26
26
|
updatedUntil: z.ZodOptional<z.ZodString>;
|
|
27
27
|
sort: z.ZodOptional<z.ZodEnum<{
|
|
28
|
-
version: "version";
|
|
29
|
-
priority: "priority";
|
|
30
|
-
summary: "summary";
|
|
31
|
-
startDate: "startDate";
|
|
32
|
-
dueDate: "dueDate";
|
|
33
|
-
estimatedHours: "estimatedHours";
|
|
34
28
|
actualHours: "actualHours";
|
|
35
|
-
issueType: "issueType";
|
|
36
|
-
status: "status";
|
|
37
29
|
assignee: "assignee";
|
|
30
|
+
attachment: "attachment";
|
|
38
31
|
category: "category";
|
|
39
|
-
|
|
40
|
-
createdUser: "createdUser";
|
|
32
|
+
childIssue: "childIssue";
|
|
41
33
|
created: "created";
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
34
|
+
createdUser: "createdUser";
|
|
35
|
+
dueDate: "dueDate";
|
|
36
|
+
estimatedHours: "estimatedHours";
|
|
37
|
+
issueType: "issueType";
|
|
38
|
+
milestone: "milestone";
|
|
39
|
+
priority: "priority";
|
|
45
40
|
sharedFile: "sharedFile";
|
|
46
|
-
|
|
41
|
+
startDate: "startDate";
|
|
42
|
+
status: "status";
|
|
43
|
+
summary: "summary";
|
|
44
|
+
updated: "updated";
|
|
45
|
+
updatedUser: "updatedUser";
|
|
46
|
+
version: "version";
|
|
47
47
|
}>>;
|
|
48
48
|
order: z.ZodOptional<z.ZodEnum<{
|
|
49
49
|
asc: "asc";
|
|
@@ -2,6 +2,6 @@ import type { Entity } from 'backlog-js';
|
|
|
2
2
|
import { Backlog } from 'backlog-js';
|
|
3
3
|
import { ToolDefinition } from '../types/tool.js';
|
|
4
4
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
5
|
-
declare const getMyselfSchema: (t: DescriptionHelper[
|
|
5
|
+
declare const getMyselfSchema: (t: DescriptionHelper['t']) => {};
|
|
6
6
|
export declare const getMyselfTool: (backlog: Backlog, { t }: DescriptionHelper) => ToolDefinition<ReturnType<typeof getMyselfSchema>, Entity.User.User>;
|
|
7
7
|
export {};
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const getNotificationsSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const getNotificationsSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
minId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
maxId: z.ZodOptional<z.ZodNumber>;
|
|
9
9
|
count: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const getNotificationsCountSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const getNotificationsCountSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
alreadyRead: z.ZodBoolean;
|
|
8
8
|
resourceAlreadyRead: z.ZodBoolean;
|
|
9
9
|
};
|
|
@@ -2,6 +2,6 @@ import type { Entity } from 'backlog-js';
|
|
|
2
2
|
import { Backlog } from 'backlog-js';
|
|
3
3
|
import { ToolDefinition } from '../types/tool.js';
|
|
4
4
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
5
|
-
declare const getPrioritiesSchema: (t: DescriptionHelper[
|
|
5
|
+
declare const getPrioritiesSchema: (t: DescriptionHelper['t']) => {};
|
|
6
6
|
export declare const getPrioritiesTool: (backlog: Backlog, { t }: DescriptionHelper) => ToolDefinition<ReturnType<typeof getPrioritiesSchema>, Entity.Issue.Priority>;
|
|
7
7
|
export {};
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const getProjectSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const getProjectSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
projectId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
projectKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const getProjectListSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const getProjectListSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
archived: z.ZodOptional<z.ZodBoolean>;
|
|
8
8
|
all: z.ZodOptional<z.ZodBoolean>;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const getProjectUsersSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const getProjectUsersSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
projectId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
projectKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const getPullRequestSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const getPullRequestSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
projectId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
projectKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
repoId: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const getPullRequestCommentsSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const getPullRequestCommentsSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
projectId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
projectKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
repoId: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const getPullRequestsSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const getPullRequestsSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
projectId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
projectKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
repoId: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const getPullRequestsCountSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const getPullRequestsCountSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
projectId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
projectKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
repoId: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const getRelatedIssuesSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const getRelatedIssuesSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
issueId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
issueKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
};
|
|
@@ -2,6 +2,6 @@ import type { Entity } from 'backlog-js';
|
|
|
2
2
|
import { Backlog } from 'backlog-js';
|
|
3
3
|
import { ToolDefinition } from '../types/tool.js';
|
|
4
4
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
5
|
-
declare const getResolutionsSchema: (t: DescriptionHelper[
|
|
5
|
+
declare const getResolutionsSchema: (t: DescriptionHelper['t']) => {};
|
|
6
6
|
export declare const getResolutionsTool: (backlog: Backlog, { t }: DescriptionHelper) => ToolDefinition<ReturnType<typeof getResolutionsSchema>, Entity.Issue.Resolution>;
|
|
7
7
|
export {};
|
|
@@ -2,6 +2,6 @@ import type { Entity } from 'backlog-js';
|
|
|
2
2
|
import { Backlog } from 'backlog-js';
|
|
3
3
|
import { ToolDefinition } from '../types/tool.js';
|
|
4
4
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
5
|
-
declare const getSpaceSchema: (t: DescriptionHelper[
|
|
5
|
+
declare const getSpaceSchema: (t: DescriptionHelper['t']) => {};
|
|
6
6
|
export declare const getSpaceTool: (backlog: Backlog, { t }: DescriptionHelper) => ToolDefinition<ReturnType<typeof getSpaceSchema>, Entity.Space.Space>;
|
|
7
7
|
export {};
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const getSpaceActivitiesSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const getSpaceActivitiesSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
activityTypeId: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
8
8
|
Undefined: number;
|
|
9
9
|
IssueCreated: number;
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const getUserRecentUpdatesSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const getUserRecentUpdatesSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
userId: z.ZodNumber;
|
|
8
8
|
activityTypeId: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
9
9
|
Undefined: number;
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const getUserStarsCountSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const getUserStarsCountSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
userId: z.ZodNumber;
|
|
8
8
|
since: z.ZodOptional<z.ZodString>;
|
|
9
9
|
until: z.ZodOptional<z.ZodString>;
|
|
@@ -2,6 +2,6 @@ import type { Entity } from 'backlog-js';
|
|
|
2
2
|
import { Backlog } from 'backlog-js';
|
|
3
3
|
import { ToolDefinition } from '../types/tool.js';
|
|
4
4
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
5
|
-
declare const getUsersSchema: (t: DescriptionHelper[
|
|
5
|
+
declare const getUsersSchema: (t: DescriptionHelper['t']) => {};
|
|
6
6
|
export declare const getUsersTool: (backlog: Backlog, { t }: DescriptionHelper) => ToolDefinition<ReturnType<typeof getUsersSchema>, Entity.User.User>;
|
|
7
7
|
export {};
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const getVersionMilestoneListSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const getVersionMilestoneListSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
projectId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
projectKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const getWatchingListCountSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const getWatchingListCountSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
userId: z.ZodNumber;
|
|
8
8
|
};
|
|
9
9
|
export declare const getWatchingListCountTool: (backlog: Backlog, { t }: DescriptionHelper) => ToolDefinition<ReturnType<typeof getWatchingListCountSchema>, Entity.WatchingList.WatchingListCount>;
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const getWatchingListItemsSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const getWatchingListItemsSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
userId: z.ZodNumber;
|
|
8
8
|
};
|
|
9
9
|
export declare const getWatchingListItemsTool: (backlog: Backlog, { t }: DescriptionHelper) => ToolDefinition<ReturnType<typeof getWatchingListItemsSchema>, Entity.WatchingList.WatchingListItem>;
|
package/build/tools/getWiki.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const getWikiSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const getWikiSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
wikiId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
8
8
|
};
|
|
9
9
|
export declare const getWikiTool: (backlog: Backlog, { t }: DescriptionHelper) => ToolDefinition<ReturnType<typeof getWikiSchema>, Entity.Wiki.Wiki>;
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const getWikiPagesSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const getWikiPagesSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
projectId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
projectKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
keyword: z.ZodOptional<z.ZodString>;
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const getWikisCountSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const getWikisCountSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
projectId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
projectKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
};
|
|
@@ -7,7 +7,7 @@ type MarkNotificationAsReadResult = {
|
|
|
7
7
|
message: string;
|
|
8
8
|
};
|
|
9
9
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
10
|
-
declare const markNotificationAsReadSchema: (t: DescriptionHelper[
|
|
10
|
+
declare const markNotificationAsReadSchema: (t: DescriptionHelper['t']) => {
|
|
11
11
|
id: z.ZodNumber;
|
|
12
12
|
};
|
|
13
13
|
export declare const MarkNotificationAsReadResultSchema: z.ZodObject<{
|
|
@@ -7,7 +7,7 @@ type MarkWatchingAsReadResult = {
|
|
|
7
7
|
message: string;
|
|
8
8
|
};
|
|
9
9
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
10
|
-
declare const markWatchingAsReadSchema: (t: DescriptionHelper[
|
|
10
|
+
declare const markWatchingAsReadSchema: (t: DescriptionHelper['t']) => {
|
|
11
11
|
watchId: z.ZodNumber;
|
|
12
12
|
};
|
|
13
13
|
export declare const MarkWatchingAsReadResultSchema: z.ZodObject<{
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const removeRelatedIssueSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const removeRelatedIssueSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
issueId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
issueKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
relatedIssueId: z.ZodNumber;
|
|
@@ -2,6 +2,6 @@ import type { Entity } from 'backlog-js';
|
|
|
2
2
|
import { Backlog } from 'backlog-js';
|
|
3
3
|
import { ToolDefinition } from '../types/tool.js';
|
|
4
4
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
5
|
-
declare const resetUnreadNotificationCountSchema: (t: DescriptionHelper[
|
|
5
|
+
declare const resetUnreadNotificationCountSchema: (t: DescriptionHelper['t']) => {};
|
|
6
6
|
export declare const resetUnreadNotificationCountTool: (backlog: Backlog, { t }: DescriptionHelper) => ToolDefinition<ReturnType<typeof resetUnreadNotificationCountSchema>, Entity.Notification.NotificationCount>;
|
|
7
7
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { DescriptionHelper } from '../../createDescriptionHelper.js';
|
|
3
|
-
export declare const buildCustomFieldFilterSchema: (t: DescriptionHelper[
|
|
3
|
+
export declare const buildCustomFieldFilterSchema: (t: DescriptionHelper['t']) => z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4
4
|
type: z.ZodLiteral<"text">;
|
|
5
5
|
id: z.ZodNumber;
|
|
6
6
|
value: z.ZodString;
|
|
@@ -3,7 +3,7 @@ import { Backlog } from 'backlog-js';
|
|
|
3
3
|
import type { Entity } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const updateIssueSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const updateIssueSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
issueId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
issueKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
summary: z.ZodOptional<z.ZodString>;
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const updateIssueCommentSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const updateIssueCommentSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
issueId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
issueKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
commentId: z.ZodNumber;
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const updateProjectSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const updateProjectSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
projectId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
projectKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const updatePullRequestSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const updatePullRequestSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
projectId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
projectKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
repoId: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const updatePullRequestCommentSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const updatePullRequestCommentSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
projectId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
projectKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
repoId: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const updateVersionMilestoneSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const updateVersionMilestoneSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
projectId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
projectKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
id: z.ZodNumber;
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const updateWatchingSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const updateWatchingSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
watchId: z.ZodNumber;
|
|
8
8
|
note: z.ZodString;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ import type { Entity } from 'backlog-js';
|
|
|
3
3
|
import { Backlog } from 'backlog-js';
|
|
4
4
|
import { ToolDefinition } from '../types/tool.js';
|
|
5
5
|
import { DescriptionHelper } from '../createDescriptionHelper.js';
|
|
6
|
-
declare const updateWikiSchema: (t: DescriptionHelper[
|
|
6
|
+
declare const updateWikiSchema: (t: DescriptionHelper['t']) => {
|
|
7
7
|
wikiId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
8
8
|
name: z.ZodOptional<z.ZodString>;
|
|
9
9
|
content: z.ZodOptional<z.ZodString>;
|
package/build/types/tool.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export type ToolDefinition<Shape extends z.ZodRawShape, Result> = {
|
|
|
28
28
|
*/
|
|
29
29
|
returnsList: boolean;
|
|
30
30
|
};
|
|
31
|
-
export declare const buildToolSchema: <T extends z.ZodRawShape>(fn: (t: DescriptionHelper[
|
|
31
|
+
export declare const buildToolSchema: <T extends z.ZodRawShape>(fn: (t: DescriptionHelper['t']) => T) => (t: DescriptionHelper['t']) => T;
|
|
32
32
|
export type DynamicToolDefinition<Shape extends z.ZodRawShape> = {
|
|
33
33
|
name: string;
|
|
34
34
|
description: string;
|
package/build/utils/logger.js
CHANGED
|
@@ -2,10 +2,42 @@ import pino from 'pino';
|
|
|
2
2
|
if (!process.env.NODE_ENV) {
|
|
3
3
|
process.env.NODE_ENV = 'production';
|
|
4
4
|
}
|
|
5
|
-
|
|
5
|
+
// Normalised the same way LOG_LEVEL is below. A strict `=== 'production'` makes
|
|
6
|
+
// `Production`, or a stray space picked up from a shell or a container runtime,
|
|
7
|
+
// silently mean "not production" — and that flips the default level *and* the
|
|
8
|
+
// output format, with nothing logged to say so. A typo here is worth less
|
|
9
|
+
// tolerance than a typo in LOG_LEVEL, not more.
|
|
10
|
+
const isProd = process.env.NODE_ENV?.trim().toLowerCase() === 'production';
|
|
11
|
+
// pino's levels plus `silent`. Listed here so an unusable LOG_LEVEL is caught
|
|
12
|
+
// while the fallback is still available, rather than by pino throwing during
|
|
13
|
+
// construction — a server that refuses to start is a worse answer to a typo in
|
|
14
|
+
// an environment variable than one that logs at its default level and says so.
|
|
15
|
+
const LEVELS = [
|
|
16
|
+
'fatal',
|
|
17
|
+
'error',
|
|
18
|
+
'warn',
|
|
19
|
+
'info',
|
|
20
|
+
'debug',
|
|
21
|
+
'trace',
|
|
22
|
+
'silent',
|
|
23
|
+
];
|
|
24
|
+
const defaultLevel = isProd ? 'error' : 'debug';
|
|
25
|
+
// LOG_LEVEL decides how much is logged; NODE_ENV decides how it is formatted.
|
|
26
|
+
// The two are independent questions, and conflating them bites on the HTTP
|
|
27
|
+
// transport in particular: there the log stream is the only channel an operator
|
|
28
|
+
// has, so raising the level to diagnose something must not also switch the
|
|
29
|
+
// output to colorized, human-formatted lines that a log collector stores
|
|
30
|
+
// verbatim.
|
|
31
|
+
// An empty or blank LOG_LEVEL counts as not set: it is what an unset variable
|
|
32
|
+
// looks like once it has been through a shell or a container runtime.
|
|
33
|
+
const normalisedLevel = process.env.LOG_LEVEL?.trim().toLowerCase() || undefined;
|
|
34
|
+
const requestedLevel = normalisedLevel && LEVELS.includes(normalisedLevel)
|
|
35
|
+
? normalisedLevel
|
|
36
|
+
: undefined;
|
|
37
|
+
const level = requestedLevel ?? defaultLevel;
|
|
6
38
|
// Plain JSON on stderr. stdout carries the JSON-RPC stream on the stdio
|
|
7
39
|
// transport, so a log line landing there would corrupt the protocol.
|
|
8
|
-
const plainLogger = () => pino({ level
|
|
40
|
+
const plainLogger = () => pino({ level }, pino.destination({ dest: 2, sync: false }));
|
|
9
41
|
// `pino-pretty` is a development-only dependency, so an installed copy of this
|
|
10
42
|
// package does not have it. pino resolves a transport target eagerly and throws
|
|
11
43
|
// synchronously when it cannot, so asking is cheaper than probing the module
|
|
@@ -13,7 +45,7 @@ const plainLogger = () => pino({ level: isProd ? 'error' : 'debug' }, pino.desti
|
|
|
13
45
|
const prettyLogger = () => {
|
|
14
46
|
try {
|
|
15
47
|
return pino({
|
|
16
|
-
level
|
|
48
|
+
level,
|
|
17
49
|
transport: {
|
|
18
50
|
target: 'pino-pretty',
|
|
19
51
|
options: {
|
|
@@ -31,3 +63,9 @@ const prettyLogger = () => {
|
|
|
31
63
|
}
|
|
32
64
|
};
|
|
33
65
|
export const logger = isProd ? plainLogger() : prettyLogger();
|
|
66
|
+
if (normalisedLevel && !requestedLevel) {
|
|
67
|
+
// `logger.error`, not `warn`: the level in force here is the default one,
|
|
68
|
+
// which on a deployed server swallows anything lower — and this message
|
|
69
|
+
// exists precisely for the operator whose LOG_LEVEL did not take effect.
|
|
70
|
+
logger.error({ requested: process.env.LOG_LEVEL, effective: level, supported: LEVELS }, 'Unrecognised LOG_LEVEL; falling back to the default level');
|
|
71
|
+
}
|
|
@@ -10,9 +10,9 @@ type ResolveResult = {
|
|
|
10
10
|
export declare const resolveIdOrKey: <E extends EntityName>(entity: E, values: {
|
|
11
11
|
id?: number;
|
|
12
12
|
key?: string;
|
|
13
|
-
}, t: DescriptionHelper[
|
|
13
|
+
}, t: DescriptionHelper['t']) => ResolveResult;
|
|
14
14
|
export declare const resolveIdOrName: <E extends EntityName>(entity: E, values: {
|
|
15
15
|
id?: number;
|
|
16
16
|
name?: string;
|
|
17
|
-
}, t: DescriptionHelper[
|
|
17
|
+
}, t: DescriptionHelper['t']) => ResolveResult;
|
|
18
18
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "backlog-mcp-server",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"backlog-mcp-server": "./build/index.js"
|
|
@@ -33,34 +33,29 @@
|
|
|
33
33
|
"build"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@hono/node-server": "^2.
|
|
36
|
+
"@hono/node-server": "^2.1.1",
|
|
37
37
|
"@modelcontextprotocol/hono": "^2.0.0",
|
|
38
38
|
"@modelcontextprotocol/server": "^2.0.0",
|
|
39
39
|
"backlog-js": "^0.19.1",
|
|
40
40
|
"env-var": "^7.5.0",
|
|
41
|
-
"hono": "^4.
|
|
42
|
-
"js-yaml": "^5.
|
|
41
|
+
"hono": "^4.13.5",
|
|
42
|
+
"js-yaml": "^5.4.1",
|
|
43
43
|
"pino": "^10.3.1",
|
|
44
|
-
"yargs": "^18.
|
|
44
|
+
"yargs": "^18.1.0",
|
|
45
45
|
"zod": "^4.4.3"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@eslint/js": "^10.0.1",
|
|
49
48
|
"@types/js-yaml": "^4.0.9",
|
|
50
|
-
"@types/node": "^26.
|
|
49
|
+
"@types/node": "^26.4.0",
|
|
51
50
|
"@types/yargs": "^17.0.35",
|
|
52
|
-
"@
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"eslint": "^10.4.1",
|
|
57
|
-
"eslint-config-prettier": "^10.1.8",
|
|
58
|
-
"eslint-plugin-prettier": "^5.5.6",
|
|
51
|
+
"@vitest/coverage-v8": "^4.1.11",
|
|
52
|
+
"oxfmt": "^0.65.0",
|
|
53
|
+
"oxlint": "^1.80.0",
|
|
54
|
+
"oxlint-tsgolint": "^7.0.2001",
|
|
59
55
|
"pino-pretty": "^13.1.3",
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"vitest": "^4.1.8"
|
|
56
|
+
"tsx": "^4.23.12",
|
|
57
|
+
"typescript": "^7.0.2",
|
|
58
|
+
"vitest": "^4.1.11"
|
|
64
59
|
},
|
|
65
60
|
"scripts": {
|
|
66
61
|
"preinstall": "npx only-allow pnpm",
|
|
@@ -69,11 +64,9 @@
|
|
|
69
64
|
"test": "vitest run",
|
|
70
65
|
"test:watch": "vitest",
|
|
71
66
|
"test:coverage": "vitest run --coverage",
|
|
72
|
-
"lint": "
|
|
73
|
-
"lint:fix": "
|
|
74
|
-
"format": "
|
|
75
|
-
"format:fix": "
|
|
76
|
-
"typecheck": "tsc --noEmit",
|
|
77
|
-
"typecheck:all": "tsc --noEmit --project tsconfig.test.json"
|
|
67
|
+
"lint": "oxlint --type-aware --type-check",
|
|
68
|
+
"lint:fix": "oxlint --type-aware --type-check --fix",
|
|
69
|
+
"format": "oxfmt --check src vitest.config.ts",
|
|
70
|
+
"format:fix": "oxfmt src vitest.config.ts"
|
|
78
71
|
}
|
|
79
72
|
}
|