@introspection-ai/recipes 0.50.0 → 0.52.0
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 +3 -3
- package/dist/api/api-bindings.d.ts +3 -0
- package/dist/api/api-bindings.d.ts.map +1 -0
- package/dist/api/api-bindings.js +2 -0
- package/dist/api/api-bindings.js.map +1 -0
- package/dist/api/session.d.ts +1 -0
- package/dist/api/session.d.ts.map +1 -1
- package/dist/api-bindings.d.ts +101 -0
- package/dist/api-bindings.d.ts.map +1 -0
- package/dist/api-bindings.js +406 -0
- package/dist/api-bindings.js.map +1 -0
- package/dist/channels/arguments.d.ts +116 -0
- package/dist/channels/arguments.d.ts.map +1 -0
- package/dist/channels/arguments.generated.d.ts +15 -0
- package/dist/channels/arguments.generated.d.ts.map +1 -0
- package/dist/channels/arguments.generated.js +181 -0
- package/dist/channels/arguments.generated.js.map +1 -0
- package/dist/channels/arguments.js +8 -0
- package/dist/channels/arguments.js.map +1 -0
- package/dist/channels/module.d.ts +5 -0
- package/dist/channels/module.d.ts.map +1 -1
- package/dist/channels/module.js +10 -5
- package/dist/channels/module.js.map +1 -1
- package/dist/channels/tools.d.ts.map +1 -1
- package/dist/channels/tools.js +22 -59
- package/dist/channels/tools.js.map +1 -1
- package/dist/channels/types.d.ts +5 -0
- package/dist/channels/types.d.ts.map +1 -1
- package/dist/child/session.d.ts +5 -0
- package/dist/child/session.d.ts.map +1 -1
- package/dist/child/session.js +2 -0
- package/dist/child/session.js.map +1 -1
- package/dist/clock.d.ts +80 -0
- package/dist/clock.d.ts.map +1 -0
- package/dist/clock.js +169 -0
- package/dist/clock.js.map +1 -0
- package/dist/command-parameters.d.ts +37 -5
- package/dist/command-parameters.d.ts.map +1 -1
- package/dist/command-parameters.js +73 -11
- package/dist/command-parameters.js.map +1 -1
- package/dist/connector-tools.d.ts +18 -0
- package/dist/connector-tools.d.ts.map +1 -1
- package/dist/connector-tools.js +49 -6
- package/dist/connector-tools.js.map +1 -1
- package/dist/documents/module.d.ts.map +1 -1
- package/dist/documents/module.js +1 -3
- package/dist/documents/module.js.map +1 -1
- package/dist/documents/tools.d.ts.map +1 -1
- package/dist/documents/tools.js +3 -3
- package/dist/documents/tools.js.map +1 -1
- package/dist/egress.d.ts +23 -0
- package/dist/egress.d.ts.map +1 -0
- package/dist/egress.js +36 -0
- package/dist/egress.js.map +1 -0
- package/dist/issues/index.d.ts +7 -0
- package/dist/issues/index.d.ts.map +1 -0
- package/dist/issues/index.js +4 -0
- package/dist/issues/index.js.map +1 -0
- package/dist/issues/module.d.ts +38 -0
- package/dist/issues/module.d.ts.map +1 -0
- package/dist/issues/module.js +114 -0
- package/dist/issues/module.js.map +1 -0
- package/dist/issues/tool.d.ts +95 -0
- package/dist/issues/tool.d.ts.map +1 -0
- package/dist/issues/tool.js +479 -0
- package/dist/issues/tool.js.map +1 -0
- package/dist/issues/types.d.ts +280 -0
- package/dist/issues/types.d.ts.map +1 -0
- package/dist/issues/types.js +79 -0
- package/dist/issues/types.js.map +1 -0
- package/dist/mcp/cli/command-context.d.ts +20 -1
- package/dist/mcp/cli/command-context.d.ts.map +1 -1
- package/dist/mcp/cli/command-context.js.map +1 -1
- package/dist/mcp/cli/core.d.ts +0 -2
- package/dist/mcp/cli/core.d.ts.map +1 -1
- package/dist/mcp/cli/core.js +9 -33
- package/dist/mcp/cli/core.js.map +1 -1
- package/dist/mcp/cli/handshake-retry.d.ts +5 -0
- package/dist/mcp/cli/handshake-retry.d.ts.map +1 -0
- package/dist/mcp/cli/handshake-retry.js +32 -0
- package/dist/mcp/cli/handshake-retry.js.map +1 -0
- package/dist/mcp/daemon/index.js +3 -4
- package/dist/mcp/daemon/index.js.map +1 -1
- package/dist/mcp/pi-client.d.ts +2 -0
- package/dist/mcp/pi-client.d.ts.map +1 -1
- package/dist/mcp/pi-client.js +5 -1
- package/dist/mcp/pi-client.js.map +1 -1
- package/dist/mcp/pi-mcp-runtime.d.ts +25 -0
- package/dist/mcp/pi-mcp-runtime.d.ts.map +1 -0
- package/dist/mcp/pi-mcp-runtime.js +215 -0
- package/dist/mcp/pi-mcp-runtime.js.map +1 -0
- package/dist/mcp/pi-runtime.d.ts +7 -0
- package/dist/mcp/pi-runtime.d.ts.map +1 -0
- package/dist/mcp/pi-runtime.js +26 -0
- package/dist/mcp/pi-runtime.js.map +1 -0
- package/dist/mcp-chunks/chunk-3UVHZECT.js +31 -0
- package/dist/mcp-chunks/{chunk-PO2SOBEN.js → chunk-CGJ2XOSF.js} +43 -35
- package/dist/mcp-chunks/{chunk-GTETFUPQ.js → chunk-IMG2JMBS.js} +8 -8
- package/dist/mcp-chunks/{chunk-UFV6SVQG.js → chunk-LQKMNWDE.js} +2 -2
- package/dist/mcp-chunks/{chunk-S2F7DDP5.js → chunk-QUDOU7MQ.js} +1 -1
- package/dist/mcp-chunks/{cli-IYD7Y7MO.js → cli-BM23ZXPJ.js} +54 -54
- package/dist/mcp-chunks/{client-5MNBV3Z7.js → client-RKTAKDAY.js} +7 -7
- package/dist/mcp-chunks/{daemon-command-V3B3EMXD.js → daemon-command-VU6WTFCJ.js} +8 -8
- package/dist/mcp-chunks/{generate-cli-runner-PW5WJ7KI.js → generate-cli-runner-JAAPSWGX.js} +12 -12
- package/dist/mcp-chunks/{generated-daemon-runtime-3C4NWGAU.js → generated-daemon-runtime-LX4L2X7Z.js} +8 -8
- package/dist/mcp-chunks/pi-mcp-runtime-GHDEPXUL.js +1231 -0
- package/dist/mcp-chunks/{runtime-RMI3XCYJ.js → runtime-T63YI7TC.js} +6 -6
- package/dist/mcp-chunks/{serve-command-UF5SVREV.js → serve-command-75P4VBJ6.js} +7 -7
- package/dist/mcp-daemon.js +21 -19
- package/dist/mcp-run-worker.js +11 -10
- package/dist/pi-extension.d.ts +3 -0
- package/dist/pi-extension.d.ts.map +1 -1
- package/dist/pi-extension.js +82 -18
- package/dist/pi-extension.js.map +1 -1
- package/dist/productivity/arguments.d.ts +298 -0
- package/dist/productivity/arguments.d.ts.map +1 -0
- package/dist/productivity/arguments.generated.d.ts +28 -0
- package/dist/productivity/arguments.generated.d.ts.map +1 -0
- package/dist/productivity/arguments.generated.js +489 -0
- package/dist/productivity/arguments.generated.js.map +1 -0
- package/dist/productivity/arguments.js +10 -0
- package/dist/productivity/arguments.js.map +1 -0
- package/dist/productivity/http.d.ts.map +1 -1
- package/dist/productivity/http.js +12 -22
- package/dist/productivity/http.js.map +1 -1
- package/dist/productivity/index.d.ts +1 -1
- package/dist/productivity/index.d.ts.map +1 -1
- package/dist/productivity/index.js +1 -1
- package/dist/productivity/index.js.map +1 -1
- package/dist/productivity/module.d.ts +15 -2
- package/dist/productivity/module.d.ts.map +1 -1
- package/dist/productivity/module.js +24 -21
- package/dist/productivity/module.js.map +1 -1
- package/dist/productivity/tools.d.ts +6 -0
- package/dist/productivity/tools.d.ts.map +1 -1
- package/dist/productivity/tools.js +64 -224
- package/dist/productivity/tools.js.map +1 -1
- package/dist/productivity/types.d.ts +2 -0
- package/dist/productivity/types.d.ts.map +1 -1
- package/dist/productivity/types.js.map +1 -1
- package/dist/recipe/agent.d.ts +40 -10
- package/dist/recipe/agent.d.ts.map +1 -1
- package/dist/recipe/agent.js +209 -30
- package/dist/recipe/agent.js.map +1 -1
- package/dist/recipe/companions.d.ts +2 -1
- package/dist/recipe/companions.d.ts.map +1 -1
- package/dist/recipe/companions.js +11 -9
- package/dist/recipe/companions.js.map +1 -1
- package/dist/recipe/manifest.generated.d.ts +4 -1
- package/dist/recipe/manifest.generated.d.ts.map +1 -1
- package/dist/recipe/manifest.generated.js +5 -2
- package/dist/recipe/manifest.generated.js.map +1 -1
- package/dist/recipe/package.d.ts +28 -3
- package/dist/recipe/package.d.ts.map +1 -1
- package/dist/recipe/package.js +155 -1
- package/dist/recipe/package.js.map +1 -1
- package/dist/recipe/providers.d.ts +62 -0
- package/dist/recipe/providers.d.ts.map +1 -0
- package/dist/recipe/providers.js +95 -0
- package/dist/recipe/providers.js.map +1 -0
- package/dist/recipe/resolve.d.ts +7 -3
- package/dist/recipe/resolve.d.ts.map +1 -1
- package/dist/recipe/resolve.js +7 -2
- package/dist/recipe/resolve.js.map +1 -1
- package/dist/run-controller.d.ts +6 -0
- package/dist/run-controller.d.ts.map +1 -1
- package/dist/run-controller.js +2 -0
- package/dist/run-controller.js.map +1 -1
- package/dist/search/egress.d.ts +12 -0
- package/dist/search/egress.d.ts.map +1 -0
- package/dist/search/egress.js +24 -0
- package/dist/search/egress.js.map +1 -0
- package/dist/search/http.d.ts +16 -0
- package/dist/search/http.d.ts.map +1 -0
- package/dist/search/http.js +75 -0
- package/dist/search/http.js.map +1 -0
- package/dist/search/index.d.ts +10 -0
- package/dist/search/index.d.ts.map +1 -0
- package/dist/search/index.js +5 -0
- package/dist/search/index.js.map +1 -0
- package/dist/search/mcp.d.ts +58 -0
- package/dist/search/mcp.d.ts.map +1 -0
- package/dist/search/mcp.js +84 -0
- package/dist/search/mcp.js.map +1 -0
- package/dist/search/module.d.ts +28 -0
- package/dist/search/module.d.ts.map +1 -0
- package/dist/search/module.js +49 -0
- package/dist/search/module.js.map +1 -0
- package/dist/search/tool.d.ts +101 -0
- package/dist/search/tool.d.ts.map +1 -0
- package/dist/search/tool.js +518 -0
- package/dist/search/tool.js.map +1 -0
- package/dist/search/types.d.ts +257 -0
- package/dist/search/types.d.ts.map +1 -0
- package/dist/search/types.js +63 -0
- package/dist/search/types.js.map +1 -0
- package/dist/session.d.ts +21 -1
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +132 -43
- package/dist/session.js.map +1 -1
- package/dist/test-utils.d.ts +2 -0
- package/dist/test-utils.d.ts.map +1 -1
- package/dist/test-utils.js +3 -1
- package/dist/test-utils.js.map +1 -1
- package/dist/tool-search.d.ts +9 -0
- package/dist/tool-search.d.ts.map +1 -1
- package/dist/tool-search.js +23 -0
- package/dist/tool-search.js.map +1 -1
- package/dist/tools/bridge.d.ts +44 -0
- package/dist/tools/bridge.d.ts.map +1 -0
- package/dist/tools/bridge.js +106 -0
- package/dist/tools/bridge.js.map +1 -0
- package/dist/tools/cli.d.ts +20 -0
- package/dist/tools/cli.d.ts.map +1 -0
- package/dist/tools/cli.js +246 -0
- package/dist/tools/cli.js.map +1 -0
- package/dist/tools/entry.d.ts +2 -0
- package/dist/tools/entry.d.ts.map +1 -0
- package/dist/tools/entry.js +3 -0
- package/dist/tools/entry.js.map +1 -0
- package/dist/tools/shell.d.ts +12 -0
- package/dist/tools/shell.d.ts.map +1 -0
- package/dist/tools/shell.js +50 -0
- package/dist/tools/shell.js.map +1 -0
- package/dist/tuning/tpe.d.ts +112 -0
- package/dist/tuning/tpe.d.ts.map +1 -0
- package/dist/tuning/tpe.js +286 -0
- package/dist/tuning/tpe.js.map +1 -0
- package/docs/README.md +4 -1
- package/docs/channels/README.md +10 -0
- package/docs/documents/README.md +20 -19
- package/docs/host-api.md +10 -0
- package/docs/issues/README.md +183 -0
- package/docs/mcp-configuration.md +67 -2
- package/docs/pi-extension.md +5 -0
- package/docs/productivity/README.md +8 -3
- package/docs/providers.md +321 -0
- package/docs/recipe-format.md +103 -32
- package/docs/search/README.md +818 -0
- package/package.json +33 -10
- package/skills/documents/SKILL.md +2 -1
- package/skills/search/SKILL.md +72 -0
- package/dist/mcp-chunks/{auth-command-M7TQE3AL.js → auth-command-UYFOGGQR.js} +6 -6
- package/dist/mcp-chunks/{call-command-7LD7UEFK.js → call-command-6U5BNDR7.js} +17 -17
- package/dist/mcp-chunks/{chunk-PSE442BC.js → chunk-36D4FILJ.js} +26 -26
- package/dist/mcp-chunks/{config-command-6DXILFNO.js → config-command-ZSPJI34E.js} +10 -10
- package/dist/mcp-chunks/{emit-ts-command-NDCDFDRM.js → emit-ts-command-SY4LQE4S.js} +3 -3
- package/dist/mcp-chunks/{inspect-cli-command-4MGF5CPP.js → inspect-cli-command-JPX4ON6N.js} +4 -4
- package/dist/mcp-chunks/{resource-command-SRFQQROJ.js → resource-command-DUY4SVE5.js} +4 -4
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provider-neutral issues vocabulary: the `issues` tool, its commands, the one
|
|
3
|
+
* shape every issue is returned in, and what a provider module implements
|
|
4
|
+
* (`docs/providers.md`, The `issues` family).
|
|
5
|
+
*
|
|
6
|
+
* A provider receives and returns its own references (`ENG-123`, `PROJ-45`,
|
|
7
|
+
* a display index); the host prefixes each with the provider's id to make the
|
|
8
|
+
* handle the model sees (`linear:ENG-123`) and strips it before calling the
|
|
9
|
+
* provider again.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* The issues contract this host implements. A provider module, and the bundle
|
|
13
|
+
* that exports it, declare the version they were written against, and the
|
|
14
|
+
* host refuses one that differs; bump it on any breaking change to
|
|
15
|
+
* `RecipeIssuesProviderModule` or the types it uses. Separate from the search
|
|
16
|
+
* and productivity versions.
|
|
17
|
+
*/
|
|
18
|
+
export declare const ISSUES_MODULE_API_VERSION: 1;
|
|
19
|
+
/** The one tool the family serves. */
|
|
20
|
+
export declare const ISSUES_TOOL_NAME = "issues";
|
|
21
|
+
export declare const ISSUES_COMMANDS: readonly ["search", "get", "create", "update", "comment", "transition"];
|
|
22
|
+
export type IssuesCommand = (typeof ISSUES_COMMANDS)[number];
|
|
23
|
+
/** The first-party providers, served by `@introspection-ai/recipe-issues`. */
|
|
24
|
+
export declare const ISSUES_PROVIDER_IDS: readonly ["linear", "jira", "introspection"];
|
|
25
|
+
/**
|
|
26
|
+
* The family's fallback: included whenever a Recipe declares `pi.issues`
|
|
27
|
+
* unless it is disabled, and offered only when no other declared provider
|
|
28
|
+
* has a working credential path.
|
|
29
|
+
*/
|
|
30
|
+
export declare const ISSUES_FALLBACK_PROVIDER = "introspection";
|
|
31
|
+
/** The type of one value in a declaration's `options`. */
|
|
32
|
+
export type IssuesOptionType = "string" | "boolean";
|
|
33
|
+
/**
|
|
34
|
+
* The options a provider takes, by name. A declaration's `options` may carry
|
|
35
|
+
* only these, each of its type; `server` names the Recipe's MCP server for a
|
|
36
|
+
* provider with an `mcp` adapter.
|
|
37
|
+
*/
|
|
38
|
+
export type IssuesOptionsSchema = Readonly<Record<string, IssuesOptionType>>;
|
|
39
|
+
/** A declaration's `options`, checked against the provider's schema. */
|
|
40
|
+
export type IssuesProviderOptions = Readonly<Record<string, string | boolean>>;
|
|
41
|
+
/**
|
|
42
|
+
* The options each first-party provider takes, for `introspection check`,
|
|
43
|
+
* which does not load providers. Each equals its module's
|
|
44
|
+
* `capabilities.options`.
|
|
45
|
+
*/
|
|
46
|
+
export declare const ISSUES_FIRST_PARTY_OPTIONS: Readonly<Record<string, IssuesOptionsSchema>>;
|
|
47
|
+
export declare const ISSUE_STATUS_CATEGORIES: readonly ["open", "in_progress", "done", "cancelled"];
|
|
48
|
+
export type IssueStatusCategory = (typeof ISSUE_STATUS_CATEGORIES)[number];
|
|
49
|
+
export declare const ISSUE_PRIORITIES: readonly ["none", "low", "medium", "high", "urgent"];
|
|
50
|
+
export type IssuePriority = (typeof ISSUE_PRIORITIES)[number];
|
|
51
|
+
/** The fields of the issue shape a provider may or may not serve. */
|
|
52
|
+
export declare const ISSUE_FIELDS: readonly ["description", "priority", "assignee", "labels", "container", "comments", "url"];
|
|
53
|
+
export type IssueField = (typeof ISSUE_FIELDS)[number];
|
|
54
|
+
export interface IssueStatus {
|
|
55
|
+
/** The provider's own name: a Linear workflow state, a Jira status. */
|
|
56
|
+
readonly name: string;
|
|
57
|
+
readonly category: IssueStatusCategory;
|
|
58
|
+
}
|
|
59
|
+
export interface IssuePerson {
|
|
60
|
+
readonly name?: string;
|
|
61
|
+
readonly email?: string;
|
|
62
|
+
/** The provider's id for the person. */
|
|
63
|
+
readonly id?: string;
|
|
64
|
+
}
|
|
65
|
+
/** Where an issue lives: a Linear team, a Jira project and issue type, an Introspection project. */
|
|
66
|
+
export interface IssueContainer {
|
|
67
|
+
readonly name: string;
|
|
68
|
+
readonly id?: string;
|
|
69
|
+
/** Jira's issue type. */
|
|
70
|
+
readonly type?: string;
|
|
71
|
+
}
|
|
72
|
+
export interface IssueComment {
|
|
73
|
+
readonly id?: string;
|
|
74
|
+
readonly author?: IssuePerson;
|
|
75
|
+
/** Markdown. */
|
|
76
|
+
readonly body: string;
|
|
77
|
+
readonly created_at?: string;
|
|
78
|
+
}
|
|
79
|
+
/** One issue, as a provider returns it: its own `ref`, which the host turns into a handle. */
|
|
80
|
+
export interface ProviderIssue {
|
|
81
|
+
/** The provider's reference: `ENG-123`, `PROJ-45`, a display index. */
|
|
82
|
+
readonly ref: string;
|
|
83
|
+
readonly title: string;
|
|
84
|
+
/** Markdown. */
|
|
85
|
+
readonly description?: string;
|
|
86
|
+
readonly status: IssueStatus;
|
|
87
|
+
readonly priority?: IssuePriority;
|
|
88
|
+
readonly assignee?: IssuePerson | null;
|
|
89
|
+
readonly labels?: readonly string[];
|
|
90
|
+
readonly container?: IssueContainer;
|
|
91
|
+
readonly url?: string;
|
|
92
|
+
readonly created_at?: string;
|
|
93
|
+
readonly updated_at?: string;
|
|
94
|
+
/** Present on `get`. */
|
|
95
|
+
readonly comments?: readonly IssueComment[];
|
|
96
|
+
}
|
|
97
|
+
/** One issue as the tool returns it. */
|
|
98
|
+
export interface Issue extends ProviderIssue {
|
|
99
|
+
/** `<provider>:<ref>`, which every later command takes. */
|
|
100
|
+
readonly handle: string;
|
|
101
|
+
readonly provider: string;
|
|
102
|
+
}
|
|
103
|
+
export interface IssuesSearchArgs {
|
|
104
|
+
/** Free text. */
|
|
105
|
+
readonly query?: string;
|
|
106
|
+
/** A status name or category. */
|
|
107
|
+
readonly status?: string;
|
|
108
|
+
/** A person's name or email, or `me`. */
|
|
109
|
+
readonly assignee?: string;
|
|
110
|
+
/** A team, project or container name. */
|
|
111
|
+
readonly container?: string;
|
|
112
|
+
readonly label?: string;
|
|
113
|
+
readonly limit?: number;
|
|
114
|
+
}
|
|
115
|
+
export interface IssuesSearchResult {
|
|
116
|
+
readonly issues: readonly ProviderIssue[];
|
|
117
|
+
}
|
|
118
|
+
export interface IssuesGetArgs {
|
|
119
|
+
readonly ref: string;
|
|
120
|
+
}
|
|
121
|
+
export interface IssuesCreateArgs {
|
|
122
|
+
readonly title: string;
|
|
123
|
+
readonly description?: string;
|
|
124
|
+
readonly priority?: IssuePriority;
|
|
125
|
+
readonly labels?: readonly string[];
|
|
126
|
+
readonly assignee?: string;
|
|
127
|
+
/** A team (Linear) or project (Jira); defaults to the declaration's. */
|
|
128
|
+
readonly container?: string;
|
|
129
|
+
/** Jira's issue type; defaults to the declaration's. */
|
|
130
|
+
readonly issue_type?: string;
|
|
131
|
+
}
|
|
132
|
+
export interface IssuesUpdateArgs {
|
|
133
|
+
readonly ref: string;
|
|
134
|
+
readonly title?: string;
|
|
135
|
+
readonly description?: string;
|
|
136
|
+
readonly priority?: IssuePriority;
|
|
137
|
+
/** Replaces the labels. */
|
|
138
|
+
readonly labels?: readonly string[];
|
|
139
|
+
/** A person's name or email, `me`, or `none` to unassign. */
|
|
140
|
+
readonly assignee?: string;
|
|
141
|
+
}
|
|
142
|
+
export interface IssuesCommentArgs {
|
|
143
|
+
readonly ref: string;
|
|
144
|
+
/** Markdown. */
|
|
145
|
+
readonly body: string;
|
|
146
|
+
}
|
|
147
|
+
export interface IssuesTransitionArgs {
|
|
148
|
+
readonly ref: string;
|
|
149
|
+
/** A status name, or one of the categories. */
|
|
150
|
+
readonly status: string;
|
|
151
|
+
}
|
|
152
|
+
export interface IssuesCommandCapability {
|
|
153
|
+
/** One sentence on how this provider differs, shown with the command. */
|
|
154
|
+
readonly note?: string;
|
|
155
|
+
}
|
|
156
|
+
/** What a provider supports, as static data the host reads before any session exists. */
|
|
157
|
+
export interface IssuesCapabilities {
|
|
158
|
+
/** Per command it serves; an absent command is not offered. */
|
|
159
|
+
readonly commands: Partial<Readonly<Record<IssuesCommand, IssuesCommandCapability>>>;
|
|
160
|
+
/** The fields of the shape it fills; `update` and `create` take only these. */
|
|
161
|
+
readonly fields: readonly IssueField[];
|
|
162
|
+
/**
|
|
163
|
+
* Every host the provider sends to, REST and MCP, so the egress can attach
|
|
164
|
+
* a credential for each and a provider the platform does not know is
|
|
165
|
+
* explicit about where a call goes.
|
|
166
|
+
*/
|
|
167
|
+
readonly hosts: readonly string[];
|
|
168
|
+
/** The options a declaration may set for it. Absent: none. */
|
|
169
|
+
readonly options?: IssuesOptionsSchema;
|
|
170
|
+
}
|
|
171
|
+
/** An MCP `CallToolResult`, without `_meta`. */
|
|
172
|
+
export interface IssuesMcpCallToolResult {
|
|
173
|
+
content?: Array<{
|
|
174
|
+
type: string;
|
|
175
|
+
text?: string;
|
|
176
|
+
}>;
|
|
177
|
+
structuredContent?: unknown;
|
|
178
|
+
isError?: boolean;
|
|
179
|
+
}
|
|
180
|
+
/** One call to the provider's bound MCP server, which the host routes and traces. */
|
|
181
|
+
export interface IssuesMcpCaller {
|
|
182
|
+
hasTool(tool: string): boolean;
|
|
183
|
+
callTool(tool: string, args: Record<string, unknown>, signal?: AbortSignal): Promise<IssuesMcpCallToolResult>;
|
|
184
|
+
}
|
|
185
|
+
/** One entry of an adapter's tool map: which server tool serves what. */
|
|
186
|
+
export interface IssuesMcpToolMapping {
|
|
187
|
+
/** The tool's name as the server's tool list names it. */
|
|
188
|
+
readonly tool: string;
|
|
189
|
+
/** The commands it serves, or `setup` for a lookup the adapter needs. */
|
|
190
|
+
readonly serves: readonly (IssuesCommand | "setup")[];
|
|
191
|
+
/**
|
|
192
|
+
* Whether the name and arguments were checked against a tool list captured
|
|
193
|
+
* from the live server (`introspection bindings mcp capture`). False when
|
|
194
|
+
* they come from the vendor's documentation alone.
|
|
195
|
+
*/
|
|
196
|
+
readonly verified: boolean;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* A provider's hosted MCP server. When the Recipe binds it, the provider's
|
|
200
|
+
* session reaches it through the `issues` tool's nested calls.
|
|
201
|
+
*/
|
|
202
|
+
export interface IssuesMcpAdapter {
|
|
203
|
+
/** The vendor's hosted server, for docs and bindings; the bound URL may differ. */
|
|
204
|
+
readonly url: string;
|
|
205
|
+
/** The Recipe MCP server id it expects by default; the `server` option overrides it. */
|
|
206
|
+
readonly server: string;
|
|
207
|
+
/** Every tool it may call. */
|
|
208
|
+
readonly tools: readonly IssuesMcpToolMapping[];
|
|
209
|
+
}
|
|
210
|
+
export declare const ISSUES_ERROR_CODES: readonly ["not_connected", "not_supported", "not_found", "invalid_request", "provider_error"];
|
|
211
|
+
export type IssuesErrorCode = (typeof ISSUES_ERROR_CODES)[number];
|
|
212
|
+
export interface IssuesErrorInfo {
|
|
213
|
+
readonly code: IssuesErrorCode;
|
|
214
|
+
/** Safe for the model: never a token, never a raw provider payload. */
|
|
215
|
+
readonly message: string;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* The shape a provider throws: any `Error` carrying `issues`. Plain data, so a
|
|
219
|
+
* provider needs no host import. Any other thrown error is a `provider_error`.
|
|
220
|
+
*/
|
|
221
|
+
export interface IssuesProviderError extends Error {
|
|
222
|
+
readonly issues: IssuesErrorInfo;
|
|
223
|
+
}
|
|
224
|
+
export interface IssuesCallContext {
|
|
225
|
+
readonly signal?: AbortSignal;
|
|
226
|
+
/** The provider's bound MCP server, for a provider with an `mcp` adapter. */
|
|
227
|
+
readonly mcp?: IssuesMcpCaller;
|
|
228
|
+
}
|
|
229
|
+
export type IssuesMethod<A, R> = (args: A, ctx: IssuesCallContext) => Promise<R>;
|
|
230
|
+
/**
|
|
231
|
+
* One run's connection to a provider. Each method is present exactly when
|
|
232
|
+
* `capabilities.commands` declares it.
|
|
233
|
+
*/
|
|
234
|
+
export interface IssuesSession {
|
|
235
|
+
search?: IssuesMethod<IssuesSearchArgs, IssuesSearchResult>;
|
|
236
|
+
get?: IssuesMethod<IssuesGetArgs, ProviderIssue>;
|
|
237
|
+
create?: IssuesMethod<IssuesCreateArgs, ProviderIssue>;
|
|
238
|
+
update?: IssuesMethod<IssuesUpdateArgs, ProviderIssue>;
|
|
239
|
+
comment?: IssuesMethod<IssuesCommentArgs, IssueComment>;
|
|
240
|
+
transition?: IssuesMethod<IssuesTransitionArgs, ProviderIssue>;
|
|
241
|
+
}
|
|
242
|
+
/** The declaration a session is created for: its id and options. */
|
|
243
|
+
export interface IssuesProviderConfig {
|
|
244
|
+
readonly provider: string;
|
|
245
|
+
readonly options: IssuesProviderOptions;
|
|
246
|
+
}
|
|
247
|
+
export interface IssuesSessionOptions {
|
|
248
|
+
readonly config: IssuesProviderConfig;
|
|
249
|
+
readonly env: NodeJS.ProcessEnv;
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* An issues provider: a plain descriptor and the session it creates. It
|
|
253
|
+
* imports only types from `@introspection-ai/recipes`; the host holds
|
|
254
|
+
* credentials, transports and spans.
|
|
255
|
+
*/
|
|
256
|
+
export interface RecipeIssuesProviderModule {
|
|
257
|
+
readonly kind: "issues";
|
|
258
|
+
readonly apiVersion: typeof ISSUES_MODULE_API_VERSION;
|
|
259
|
+
readonly id: string;
|
|
260
|
+
readonly capabilities: IssuesCapabilities;
|
|
261
|
+
/** Present for a provider served through its vendor's MCP server. */
|
|
262
|
+
readonly mcp?: IssuesMcpAdapter;
|
|
263
|
+
/**
|
|
264
|
+
* Whether a REST provider has a working credential path in this
|
|
265
|
+
* environment. Absent: it has one. An MCP provider has one when its server
|
|
266
|
+
* is bound, which the host checks.
|
|
267
|
+
*/
|
|
268
|
+
available?(env: NodeJS.ProcessEnv): boolean;
|
|
269
|
+
createSession(options: IssuesSessionOptions): IssuesSession | Promise<IssuesSession>;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* What `@introspection-ai/recipe-issues` exports as its default: its providers
|
|
273
|
+
* by id.
|
|
274
|
+
*/
|
|
275
|
+
export interface RecipeIssuesModule {
|
|
276
|
+
readonly kind: "issues";
|
|
277
|
+
readonly apiVersion: typeof ISSUES_MODULE_API_VERSION;
|
|
278
|
+
readonly providers: Readonly<Record<string, RecipeIssuesProviderModule>>;
|
|
279
|
+
}
|
|
280
|
+
//# sourceMappingURL=types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C,oBAAoB,EAAE,aAAa,CAAC,CAAC;CAChE;AAED,oEAAoE;AACpE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,qBAAqB,CAAC;CACzC;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAAC;IACtC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;CACjC;AAED;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,OAAO,yBAAyB,CAAC;IACtD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,YAAY,EAAE,kBAAkB,CAAC;IAC1C,qEAAqE;IACrE,QAAQ,CAAC,GAAG,CAAC,EAAE,gBAAgB,CAAC;IAChC;;;;OAIG;IACH,SAAS,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,OAAO,CAAC;IAC5C,aAAa,CACX,OAAO,EAAE,oBAAoB,GAC5B,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;CAC3C;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,OAAO,yBAAyB,CAAC;IACtD,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAAC,CAAC;CAC1E"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provider-neutral issues vocabulary: the `issues` tool, its commands, the one
|
|
3
|
+
* shape every issue is returned in, and what a provider module implements
|
|
4
|
+
* (`docs/providers.md`, The `issues` family).
|
|
5
|
+
*
|
|
6
|
+
* A provider receives and returns its own references (`ENG-123`, `PROJ-45`,
|
|
7
|
+
* a display index); the host prefixes each with the provider's id to make the
|
|
8
|
+
* handle the model sees (`linear:ENG-123`) and strips it before calling the
|
|
9
|
+
* provider again.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* The issues contract this host implements. A provider module, and the bundle
|
|
13
|
+
* that exports it, declare the version they were written against, and the
|
|
14
|
+
* host refuses one that differs; bump it on any breaking change to
|
|
15
|
+
* `RecipeIssuesProviderModule` or the types it uses. Separate from the search
|
|
16
|
+
* and productivity versions.
|
|
17
|
+
*/
|
|
18
|
+
export const ISSUES_MODULE_API_VERSION = 1;
|
|
19
|
+
/** The one tool the family serves. */
|
|
20
|
+
export const ISSUES_TOOL_NAME = "issues";
|
|
21
|
+
export const ISSUES_COMMANDS = [
|
|
22
|
+
"search",
|
|
23
|
+
"get",
|
|
24
|
+
"create",
|
|
25
|
+
"update",
|
|
26
|
+
"comment",
|
|
27
|
+
"transition",
|
|
28
|
+
];
|
|
29
|
+
/** The first-party providers, served by `@introspection-ai/recipe-issues`. */
|
|
30
|
+
export const ISSUES_PROVIDER_IDS = ["linear", "jira", "introspection"];
|
|
31
|
+
/**
|
|
32
|
+
* The family's fallback: included whenever a Recipe declares `pi.issues`
|
|
33
|
+
* unless it is disabled, and offered only when no other declared provider
|
|
34
|
+
* has a working credential path.
|
|
35
|
+
*/
|
|
36
|
+
export const ISSUES_FALLBACK_PROVIDER = "introspection";
|
|
37
|
+
/**
|
|
38
|
+
* The options each first-party provider takes, for `introspection check`,
|
|
39
|
+
* which does not load providers. Each equals its module's
|
|
40
|
+
* `capabilities.options`.
|
|
41
|
+
*/
|
|
42
|
+
export const ISSUES_FIRST_PARTY_OPTIONS = {
|
|
43
|
+
linear: { team: "string", server: "string" },
|
|
44
|
+
jira: { project: "string", issueType: "string", server: "string" },
|
|
45
|
+
introspection: {},
|
|
46
|
+
};
|
|
47
|
+
export const ISSUE_STATUS_CATEGORIES = [
|
|
48
|
+
"open",
|
|
49
|
+
"in_progress",
|
|
50
|
+
"done",
|
|
51
|
+
"cancelled",
|
|
52
|
+
];
|
|
53
|
+
export const ISSUE_PRIORITIES = [
|
|
54
|
+
"none",
|
|
55
|
+
"low",
|
|
56
|
+
"medium",
|
|
57
|
+
"high",
|
|
58
|
+
"urgent",
|
|
59
|
+
];
|
|
60
|
+
/** The fields of the issue shape a provider may or may not serve. */
|
|
61
|
+
export const ISSUE_FIELDS = [
|
|
62
|
+
"description",
|
|
63
|
+
"priority",
|
|
64
|
+
"assignee",
|
|
65
|
+
"labels",
|
|
66
|
+
"container",
|
|
67
|
+
"comments",
|
|
68
|
+
"url",
|
|
69
|
+
];
|
|
70
|
+
// ---------------------------------------------------------------------------
|
|
71
|
+
// Errors
|
|
72
|
+
export const ISSUES_ERROR_CODES = [
|
|
73
|
+
"not_connected",
|
|
74
|
+
"not_supported",
|
|
75
|
+
"not_found",
|
|
76
|
+
"invalid_request",
|
|
77
|
+
"provider_error",
|
|
78
|
+
];
|
|
79
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/issues/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAU,CAAC;AAEpD,sCAAsC;AACtC,MAAM,CAAC,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AAEzC,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,QAAQ;IACR,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,YAAY;CACJ,CAAC;AAGX,8EAA8E;AAC9E,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,CAAU,CAAC;AAEhF;;;;GAIG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,eAAe,CAAC;AAexD;;;;GAIG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAEnC;IACF,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE;IAC5C,IAAI,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE;IAClE,aAAa,EAAE,EAAE;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,MAAM;IACN,aAAa;IACb,MAAM;IACN,WAAW;CACH,CAAC;AAGX,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,MAAM;IACN,KAAK;IACL,QAAQ;IACR,MAAM;IACN,QAAQ;CACA,CAAC;AAGX,qEAAqE;AACrE,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,aAAa;IACb,UAAU;IACV,UAAU;IACV,QAAQ;IACR,WAAW;IACX,UAAU;IACV,KAAK;CACG,CAAC;AAiMX,8EAA8E;AAC9E,SAAS;AAET,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,eAAe;IACf,eAAe;IACf,WAAW;IACX,iBAAiB;IACjB,gBAAgB;CACR,CAAC"}
|
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
import type { Readable, Writable } from "node:stream";
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* What the `mcp` command and its daemon use of an MCP runtime: mcporter's, or
|
|
4
|
+
* the pi-mcp one (`../pi-runtime.ts`).
|
|
5
|
+
*/
|
|
6
|
+
export interface McpRuntime {
|
|
7
|
+
listServers(): string[];
|
|
8
|
+
listTools(server: string, options?: {
|
|
9
|
+
includeSchema?: boolean;
|
|
10
|
+
autoAuthorize?: boolean;
|
|
11
|
+
allowCachedAuth?: boolean;
|
|
12
|
+
disableOAuth?: boolean;
|
|
13
|
+
}): Promise<unknown[]>;
|
|
14
|
+
callTool(server: string, tool: string, options?: {
|
|
15
|
+
args?: Record<string, unknown>;
|
|
16
|
+
timeoutMs?: number;
|
|
17
|
+
disableOAuth?: boolean;
|
|
18
|
+
signal?: AbortSignal;
|
|
19
|
+
}): Promise<unknown>;
|
|
20
|
+
close(): Promise<void>;
|
|
21
|
+
}
|
|
3
22
|
export interface McpCommandContext {
|
|
4
23
|
runtime: McpRuntime;
|
|
5
24
|
stdin: Readable;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-context.d.ts","sourceRoot":"","sources":["../../../src/mcp/cli/command-context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEtD,MAAM,
|
|
1
|
+
{"version":3,"file":"command-context.d.ts","sourceRoot":"","sources":["../../../src/mcp/cli/command-context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEtD;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,WAAW,IAAI,MAAM,EAAE,CAAC;IACxB,SAAS,CACP,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE;QACR,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,YAAY,CAAC,EAAE,OAAO,CAAC;KACxB,GACA,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;IACtB,QAAQ,CACN,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,MAAM,CAAC,EAAE,WAAW,CAAC;KACtB,GACA,OAAO,CAAC,OAAO,CAAC,CAAC;IACpB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,UAAU,CAAC;IACpB,KAAK,EAAE,QAAQ,CAAC;IAChB,MAAM,EAAE,QAAQ,CAAC;IACjB,MAAM,EAAE,QAAQ,CAAC;IACjB,MAAM,EAAE,WAAW,CAAC;CACrB;AAID,wBAAgB,wBAAwB,IAAI,iBAAiB,GAAG,SAAS,CAExE;AAED,wBAAgB,wBAAwB,CAAC,CAAC,EACxC,OAAO,EAAE,iBAAiB,EAC1B,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACrB,OAAO,CAAC,CAAC,CAAC,CAEZ;AAED,wBAAgB,0BAA0B,IAAI,MAAM,IAAI,CAqBvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-context.js","sourceRoot":"","sources":["../../../src/mcp/cli/command-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"command-context.js","sourceRoot":"","sources":["../../../src/mcp/cli/command-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAuCrD,MAAM,OAAO,GAAG,IAAI,iBAAiB,EAAqB,CAAC;AAE3D,MAAM,UAAU,wBAAwB;IACtC,OAAO,OAAO,CAAC,QAAQ,EAAE,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,OAA0B,EAC1B,IAAsB;IAEtB,OAAO,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,0BAA0B;IACxC,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC9D,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAE9D,OAAO,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,KAAc,EAAE,GAAG,IAAe,EAAE,EAAE;QAC7D,MAAM,MAAM,GAAG,wBAAwB,EAAE,EAAE,MAAM,CAAC;QAClD,OAAO,MAAM;YACX,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,KAAc,CAAC;YAC9B,CAAC,CAAC,WAAW,CAAC,KAAc,EAAE,GAAI,IAAgB,CAAC,CAAC;IACxD,CAAC,CAAgC,CAAC;IAClC,OAAO,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,KAAc,EAAE,GAAG,IAAe,EAAE,EAAE;QAC7D,MAAM,MAAM,GAAG,wBAAwB,EAAE,EAAE,MAAM,CAAC;QAClD,OAAO,MAAM;YACX,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,KAAc,CAAC;YAC9B,CAAC,CAAC,WAAW,CAAC,KAAc,EAAE,GAAI,IAAgB,CAAC,CAAC;IACxD,CAAC,CAAgC,CAAC;IAElC,OAAO,GAAG,EAAE;QACV,OAAO,CAAC,MAAM,CAAC,KAAK,GAAG,WAA0C,CAAC;QAClE,OAAO,CAAC,MAAM,CAAC,KAAK,GAAG,WAA0C,CAAC;IACpE,CAAC,CAAC;AACJ,CAAC"}
|
package/dist/mcp/cli/core.d.ts
CHANGED
|
@@ -37,8 +37,6 @@ export declare function parseListTimeoutMs(args: readonly string[]): number | st
|
|
|
37
37
|
export declare function compactListArgumentError(args: readonly string[]): string | undefined;
|
|
38
38
|
export declare function describeUnknownRunServer(server: string, servers: string[]): string;
|
|
39
39
|
export declare function describeUnavailableRunTool(server: string, tool: string, knownTools: string[]): string;
|
|
40
|
-
type McpCallOptions = NonNullable<Parameters<McpRuntime["callTool"]>[2]>;
|
|
41
|
-
export declare function callToolWithHandshakeRetry(runtime: McpRuntime, server: string, tool: string, options: () => McpCallOptions, deadlineMs?: number): Promise<unknown>;
|
|
42
40
|
export declare function callJsonArgumentError(args: readonly string[]): string | null;
|
|
43
41
|
export declare function main(args?: string[]): Promise<number>;
|
|
44
42
|
export declare function executeMcpCommand(opts: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../src/mcp/cli/core.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../src/mcp/cli/core.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAQtD,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,sBAAsB,CAAC;AAc9B,OAAO,EAKL,KAAK,gBAAgB,EAErB,KAAK,mBAAmB,EACzB,MAAM,aAAa,CAAC;AAKrB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAiD9D,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC;AAgFD,OAAO,EACL,eAAe,EACf,eAAe,EACf,cAAc,EACd,iBAAiB,GAClB,MAAM,WAAW,CAAC;AAiQnB,wBAAgB,cAAc,CAC5B,OAAO,EAAE,gBAAgB,EACzB,KAAK,EAAE,MAAM,EACb,IAAI,GAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GAC7C,eAAe,EAAE,CAqCnB;AAmOD,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,UAAU,E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AAQ,CAAC;IACjB,MAAM,EAAE,WAAW,CAAC;CACrB,GAAG,OAAO,CAAC,MAAM,CAAC,CASlB"}
|
package/dist/mcp/cli/core.js
CHANGED
|
@@ -6,7 +6,9 @@ import { setTimeout as delay } from "node:timers/promises";
|
|
|
6
6
|
import { stdin as input, stderr, stdout } from "node:process";
|
|
7
7
|
import { inspect, parseArgs } from "node:util";
|
|
8
8
|
import { isMainThread, Worker } from "node:worker_threads";
|
|
9
|
-
import { createCallResult,
|
|
9
|
+
import { createCallResult, describeConnectionIssue, } from "mcporter";
|
|
10
|
+
import { createMcpRuntime, usesPiMcpClient } from "../pi-runtime.js";
|
|
11
|
+
import { callToolWithHandshakeRetry } from "./handshake-retry.js";
|
|
10
12
|
import { currentMcpCommandContext, runWithMcpCommandContext, } from "./command-context.js";
|
|
11
13
|
import { catalogOutputSchema, renderToolContract, renderToolSignature, } from "../contract.js";
|
|
12
14
|
import { mcpCallHelpText, mcpCliHelpText, mcpListHelpText, mcpRunHelpText, mcpSearchHelpText, } from "./help.js";
|
|
@@ -43,7 +45,7 @@ async function acquireRuntime() {
|
|
|
43
45
|
const shared = currentMcpCommandContext()?.runtime;
|
|
44
46
|
return shared
|
|
45
47
|
? { runtime: shared, owned: false }
|
|
46
|
-
: { runtime: await
|
|
48
|
+
: { runtime: await createMcpRuntime(), owned: true };
|
|
47
49
|
}
|
|
48
50
|
async function closeOwnedRuntime(runtime, owned) {
|
|
49
51
|
if (owned)
|
|
@@ -1019,36 +1021,6 @@ function improveRunToolError(error, server, tool, knownTools) {
|
|
|
1019
1021
|
cause: error,
|
|
1020
1022
|
});
|
|
1021
1023
|
}
|
|
1022
|
-
// A refused version probe means the connection never opened, so the tool did
|
|
1023
|
-
// not run and the call can be made again. Any later failure may follow a
|
|
1024
|
-
// remote side effect and is left to the caller.
|
|
1025
|
-
const HANDSHAKE_RETRY_DELAYS_MS = [500, 1500];
|
|
1026
|
-
function refusedHandshake(error) {
|
|
1027
|
-
let current = error;
|
|
1028
|
-
for (let depth = 0; current instanceof Error && depth < 5; depth += 1) {
|
|
1029
|
-
if (/Version negotiation failed: the server answered the probe with HTTP 5\d\d/.test(current.message)) {
|
|
1030
|
-
return true;
|
|
1031
|
-
}
|
|
1032
|
-
current = current.cause;
|
|
1033
|
-
}
|
|
1034
|
-
return false;
|
|
1035
|
-
}
|
|
1036
|
-
export async function callToolWithHandshakeRetry(runtime, server, tool, options, deadlineMs = Number.POSITIVE_INFINITY) {
|
|
1037
|
-
for (let attempt = 0;; attempt += 1) {
|
|
1038
|
-
try {
|
|
1039
|
-
return await runtime.callTool(server, tool, options());
|
|
1040
|
-
}
|
|
1041
|
-
catch (error) {
|
|
1042
|
-
const wait = HANDSHAKE_RETRY_DELAYS_MS[attempt];
|
|
1043
|
-
if (wait === undefined ||
|
|
1044
|
-
!refusedHandshake(error) ||
|
|
1045
|
-
Date.now() + wait >= deadlineMs) {
|
|
1046
|
-
throw error;
|
|
1047
|
-
}
|
|
1048
|
-
await delay(wait);
|
|
1049
|
-
}
|
|
1050
|
-
}
|
|
1051
|
-
}
|
|
1052
1024
|
async function createTools(opts) {
|
|
1053
1025
|
const { runtime, owned } = await acquireRuntime();
|
|
1054
1026
|
const session = await readSession();
|
|
@@ -1565,6 +1537,9 @@ async function callWithMcporter(args) {
|
|
|
1565
1537
|
let owned = false;
|
|
1566
1538
|
try {
|
|
1567
1539
|
({ runtime, owned } = await acquireRuntime());
|
|
1540
|
+
// pi-mcp takes the daemon's path; mcporter's own `call` drives mcporter's runtime.
|
|
1541
|
+
if (usesPiMcpClient())
|
|
1542
|
+
return await callWithSharedRuntime(runtime, args);
|
|
1568
1543
|
const { handleCall } = await loadMcporterCli();
|
|
1569
1544
|
await handleCall(runtime, args);
|
|
1570
1545
|
return process.exitCode ?? 0;
|
|
@@ -1623,12 +1598,13 @@ async function callWithSharedRuntime(runtime, args) {
|
|
|
1623
1598
|
const parsed = parseCallArguments(normalizedArgs);
|
|
1624
1599
|
const timeoutMs = resolveCallTimeout(parsed.timeoutMs);
|
|
1625
1600
|
const values = await restoreSchemaStringArguments(runtime, server, tool, parsed.args, parsed.schemaStringCoercionCandidates, timeoutMs);
|
|
1601
|
+
const signal = currentMcpCommandContext()?.signal;
|
|
1626
1602
|
const call = callToolWithHandshakeRetry(runtime, server, tool, () => ({
|
|
1627
1603
|
args: values,
|
|
1628
1604
|
timeoutMs,
|
|
1629
1605
|
disableOAuth: true,
|
|
1606
|
+
...(signal ? { signal } : {}),
|
|
1630
1607
|
}));
|
|
1631
|
-
const signal = currentMcpCommandContext()?.signal;
|
|
1632
1608
|
let cancelled;
|
|
1633
1609
|
const raw = signal
|
|
1634
1610
|
? await Promise.race([
|