@vornrun/connector-sdk 0.7.1-beta.2 → 0.7.1-beta.4
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 +44 -27
- package/dist/{check-CzSTEQD8.d.ts → check-DQttwqgl.d.ts} +20 -87
- package/dist/{chunk-C2WRZCMZ.js → chunk-NNCU2VFL.js} +490 -393
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +7 -11
- package/dist/index.d.ts +212 -23
- package/dist/index.js +17 -15
- package/package.json +2 -6
package/dist/cli.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { B as BundleRequest, a as BundleOutput, C as CheckFinding } from './check-
|
|
2
|
+
import { B as BundleRequest, a as BundleOutput, C as CheckFinding } from './check-DQttwqgl.js';
|
|
3
3
|
|
|
4
4
|
interface CliDeps {
|
|
5
5
|
load(modulePath: string): Promise<unknown>;
|
package/dist/cli.js
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
runPoll,
|
|
11
11
|
scaffoldFiles,
|
|
12
12
|
serveConnector
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-NNCU2VFL.js";
|
|
14
14
|
|
|
15
15
|
// src/cli.ts
|
|
16
16
|
import { fileURLToPath, pathToFileURL } from "url";
|
|
@@ -22,7 +22,7 @@ var USAGE = `vorn-connector <command> <module | id> [options]
|
|
|
22
22
|
Commands:
|
|
23
23
|
new <id> Scaffold a new connector, ready to build
|
|
24
24
|
manifest <module> Print the connector manifest as JSON
|
|
25
|
-
setup <module> [trigger] Print
|
|
25
|
+
setup <module> [trigger] Print each trigger and the environment it reads
|
|
26
26
|
check <module> Verify the connector against Vorn's contract
|
|
27
27
|
pack <module> Build an installable .vorn.tgz pack
|
|
28
28
|
poll <module> <trigger> Run one poll against the current environment
|
|
@@ -121,15 +121,11 @@ Next: cd ${root} && yarn install && yarn check`);
|
|
|
121
121
|
const triggers = positional[0] ? [positional[0]] : connector.triggers.map((t) => t.type);
|
|
122
122
|
for (const triggerType of triggers) {
|
|
123
123
|
const setup = connectionSetup(connector, triggerType);
|
|
124
|
-
|
|
125
|
-
deps.write(
|
|
126
|
-
deps.write(
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
deps.write(
|
|
130
|
-
`Environment: ${setup.env.map((entry) => `${entry.name}${entry.required ? " (required)" : ""}`).join(", ")}`
|
|
131
|
-
);
|
|
132
|
-
}
|
|
124
|
+
const label = connector.triggers.find((trigger) => trigger.type === triggerType)?.label;
|
|
125
|
+
deps.write(`# ${connector.name} \u2014 ${label} (${setup.triggerType})`);
|
|
126
|
+
deps.write(
|
|
127
|
+
`Environment: ${setup.env.map((entry) => `${entry.name}${entry.required ? " (required)" : ""}`).join(", ") || "none"}`
|
|
128
|
+
);
|
|
133
129
|
}
|
|
134
130
|
return 0;
|
|
135
131
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { E as ExtensionPermission, b as ExtensionHostMethod, c as ConnectorDefinition, d as Connector, e as ExtensionDefinition, f as ConnectorConfig, g as ExtensionHost, T as TriggerDefinition, P as PollContext, h as PollOutcome, i as ConnectorItem, N as NormalizedItem, j as PostReceiveOp, A as ActionRequest, B as BundleRequest, a as BundleOutput, C as CheckFinding } from './check-
|
|
2
|
-
export { k as ActionContext, l as ActionDefinition, m as ActionInputField, n as ActionInputOption, o as ActionInputType, p as ActionOutputField, q as ActivationPredicate, r as AuthRung, s as BrowserSignIn, t as CHECK_OWNERS, u as CheckCode, v as CheckOptions, w as ConformanceRun, x as ConnectionSetup, y as ConnectorAuth, z as ConnectorConfigField, D as ConnectorHarness, F as ConnectorIcon, G as ConnectorKind, H as ConnectorManifest, I as ConnectorVerification, J as DedupeStrategy, K as DefaultWorkflow, L as ExtensionAgent, M as ExtensionContext, O as ExtensionContributions, Q as ExtensionPlatform, R as ExtensionUsage, S as ExtensionUsageWindow, U as FetchContext, V as FooterContribution, W as FooterItem, X as HarnessOptions, Y as LinkContext, Z as LinkHandled, _ as LinkHandlerContribution, $ as
|
|
3
|
-
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
1
|
+
import { E as ExtensionPermission, b as ExtensionHostMethod, c as ConnectorDefinition, d as Connector, e as ExtensionDefinition, f as ConnectorConfig, g as ExtensionHost, T as TriggerDefinition, P as PollContext, h as PollOutcome, i as ConnectorItem, N as NormalizedItem, j as PostReceiveOp, A as ActionRequest, B as BundleRequest, a as BundleOutput, C as CheckFinding } from './check-DQttwqgl.js';
|
|
2
|
+
export { k as ActionContext, l as ActionDefinition, m as ActionInputField, n as ActionInputOption, o as ActionInputType, p as ActionOutputField, q as ActivationPredicate, r as AuthRung, s as BrowserSignIn, t as CHECK_OWNERS, u as CheckCode, v as CheckOptions, w as ConformanceRun, x as ConnectionSetup, y as ConnectorAuth, z as ConnectorConfigField, D as ConnectorHarness, F as ConnectorIcon, G as ConnectorKind, H as ConnectorManifest, I as ConnectorVerification, J as DedupeStrategy, K as DefaultWorkflow, L as ExtensionAgent, M as ExtensionContext, O as ExtensionContributions, Q as ExtensionPlatform, R as ExtensionUsage, S as ExtensionUsageWindow, U as FetchContext, V as FooterContribution, W as FooterItem, X as HarnessOptions, Y as LinkContext, Z as LinkHandled, _ as LinkHandlerContribution, $ as MAX_PACK_BYTES, a0 as MAX_POLL_PAGES, a1 as ManifestContributions, a2 as MockCall, a3 as MockHostAnswers, a4 as MockHostRun, a5 as MockRoute, a6 as MockRouteMissError, a7 as MockRun, a8 as OptionsContext, a9 as OptionsLoader, aa as PaginationStrategy, ab as PaneContribution, ac as PollPage, ad as PreflightResult, ae as ResilientFetchOptions, af as RetryPolicy, ag as RunActionOptions, ah as RunPollOptions, ai as SessionContext, aj as StatusSuggestion, ak as backoffMs, al as bundleDependencyFindings, am as bundledRequireFindings, an as checkConnector, ao as connectionSetup, ap as connectorManifest, aq as createConnectorHarness, ar as drainPoll, as as esbuildBundle, at as escapedMockHttp, au as formatFindings, av as lifecycleScriptFindings, aw as mockExtensionHost, ax as readNearestPackageJson, ay as resilientFetch, az as retryAfterMs, aA as runAction, aB as runConformance, aC as runOptions, aD as runPoll, aE as withMockHttp } from './check-DQttwqgl.js';
|
|
4
3
|
|
|
5
4
|
/** Everything an extension may ask the host for; anything else is not grantable. */
|
|
6
5
|
declare const EXTENSION_PERMISSIONS: ExtensionPermission[];
|
|
@@ -8,13 +7,7 @@ declare const EXTENSION_PERMISSIONS: ExtensionPermission[];
|
|
|
8
7
|
declare const HOST_PERMISSIONS: Record<ExtensionHostMethod, ExtensionPermission>;
|
|
9
8
|
/** Environment variable a config field reads from, e.g. `apiToken` → `API_TOKEN`. */
|
|
10
9
|
declare function envNameFor(key: string, explicit?: string): string;
|
|
11
|
-
/**
|
|
12
|
-
* Validate a connector definition and fill in its defaults.
|
|
13
|
-
*
|
|
14
|
-
* Failing here — at import time — is the whole point: a typo in a trigger
|
|
15
|
-
* type or a duplicate action key otherwise surfaces as a silently missing
|
|
16
|
-
* MCP tool once the connector is already installed in someone's app.
|
|
17
|
-
*/
|
|
10
|
+
/** Validate a definition and fill its defaults, failing at import time rather than as a missing action in someone's app. */
|
|
18
11
|
declare function defineConnector(definition: ConnectorDefinition): Connector;
|
|
19
12
|
/**
|
|
20
13
|
* Validate an extension and fill in its defaults.
|
|
@@ -62,8 +55,7 @@ declare function createExtensionHost(options: HostBridgeOptions): ExtensionHost;
|
|
|
62
55
|
/** Where Vorn serves a browser-sign-in connector the window it signed in through. */
|
|
63
56
|
declare const BROWSER_HOST_ENV = "VORN_BROWSER_HOST";
|
|
64
57
|
declare const BROWSER_TOKEN_ENV = "VORN_BROWSER_TOKEN";
|
|
65
|
-
/** The
|
|
66
|
-
declare const SESSION_CALL_META = "vorn/sessionCall";
|
|
58
|
+
/** The call a window request belongs to, so Vorn can tell a step's own requests from another's. */
|
|
67
59
|
declare const SESSION_CALL_HEADER = "x-vorn-session-call";
|
|
68
60
|
/** The signed-in window could not make the call: Vorn is closed, too old, or not the caller. */
|
|
69
61
|
declare class SessionUnavailableError extends Error {
|
|
@@ -80,12 +72,210 @@ interface SessionFetchOptions {
|
|
|
80
72
|
env?: NodeJS.ProcessEnv;
|
|
81
73
|
/** Replaced in tests so nothing opens a socket. */
|
|
82
74
|
fetchImpl?: typeof fetch;
|
|
83
|
-
/** The key of the
|
|
75
|
+
/** The key of the call these requests belong to, from its `sessionCall` param. */
|
|
84
76
|
call?: string;
|
|
85
77
|
}
|
|
86
78
|
/** A fetch whose requests run inside the connection's signed-in Vorn window, so no cookie reaches this process. */
|
|
87
79
|
declare function createSessionFetch(options?: SessionFetchOptions): typeof fetch;
|
|
88
80
|
|
|
81
|
+
/** The protocol this build speaks when it opens with `vorn/hello`. */
|
|
82
|
+
declare const PROTOCOL_VERSION = 1;
|
|
83
|
+
/** Every protocol this build can speak, offered in `vorn/hello`. */
|
|
84
|
+
declare const SUPPORTED_PROTOCOLS: readonly number[];
|
|
85
|
+
/** A line longer than this ends the child rather than being buffered. */
|
|
86
|
+
declare const MAX_FRAME_BYTES: number;
|
|
87
|
+
declare const PROTOCOL_METHODS: {
|
|
88
|
+
readonly hello: "vorn/hello";
|
|
89
|
+
readonly manifest: "connector/manifest";
|
|
90
|
+
readonly preflight: "connector/preflight";
|
|
91
|
+
readonly options: "connector/options";
|
|
92
|
+
readonly poll: "trigger/poll";
|
|
93
|
+
readonly action: "action/run";
|
|
94
|
+
readonly footer: "extension/footer";
|
|
95
|
+
readonly handler: "extension/handler";
|
|
96
|
+
};
|
|
97
|
+
declare const PROTOCOL_ERROR_CODES: {
|
|
98
|
+
readonly methodNotFound: -32601;
|
|
99
|
+
readonly invalidParams: -32602;
|
|
100
|
+
readonly connectorError: -32000;
|
|
101
|
+
readonly unsupportedProtocol: -32001;
|
|
102
|
+
readonly beforeHello: -32002;
|
|
103
|
+
};
|
|
104
|
+
declare const PROTOCOL_ERROR_KINDS: readonly ["validation", "app-offline", "signed-out", "upstream", "internal"];
|
|
105
|
+
type ProtocolErrorKind = (typeof PROTOCOL_ERROR_KINDS)[number];
|
|
106
|
+
type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
107
|
+
[key: string]: JsonValue;
|
|
108
|
+
};
|
|
109
|
+
interface VornHelloParams {
|
|
110
|
+
protocols: number[];
|
|
111
|
+
host: {
|
|
112
|
+
name: string;
|
|
113
|
+
version: string;
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
interface VornHelloResult {
|
|
117
|
+
protocol: number;
|
|
118
|
+
sdk: {
|
|
119
|
+
name: string;
|
|
120
|
+
version: string;
|
|
121
|
+
};
|
|
122
|
+
connector: {
|
|
123
|
+
id: string;
|
|
124
|
+
version: string;
|
|
125
|
+
kind: 'connector' | 'extension';
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
type ConnectorManifestParams = Record<string, never>;
|
|
129
|
+
/** The manifest the SDK writes to `manifest.json`, with the protocol it speaks; the host validates the rest. */
|
|
130
|
+
interface ConnectorManifestResult {
|
|
131
|
+
protocol: number;
|
|
132
|
+
id: string;
|
|
133
|
+
name: string;
|
|
134
|
+
version: string;
|
|
135
|
+
kind?: 'connector' | 'extension';
|
|
136
|
+
}
|
|
137
|
+
type ConnectorPreflightParams = Record<string, never>;
|
|
138
|
+
/** `ok: null` when the connector declares no preflight, which is not the same as passing one. */
|
|
139
|
+
interface ConnectorPreflightResult {
|
|
140
|
+
ok: boolean | null;
|
|
141
|
+
message?: string;
|
|
142
|
+
}
|
|
143
|
+
interface ConnectorOptionsParams {
|
|
144
|
+
name: string;
|
|
145
|
+
sessionCall?: string;
|
|
146
|
+
}
|
|
147
|
+
interface ConnectorOptionsResult {
|
|
148
|
+
options: Array<{
|
|
149
|
+
value: string;
|
|
150
|
+
label?: string;
|
|
151
|
+
}>;
|
|
152
|
+
}
|
|
153
|
+
interface TriggerPollParams {
|
|
154
|
+
trigger: string;
|
|
155
|
+
cursor?: string;
|
|
156
|
+
since?: string;
|
|
157
|
+
limit?: number;
|
|
158
|
+
sessionCall?: string;
|
|
159
|
+
}
|
|
160
|
+
interface TriggerPollItem {
|
|
161
|
+
externalId: string;
|
|
162
|
+
title: string;
|
|
163
|
+
url: string;
|
|
164
|
+
description: string;
|
|
165
|
+
status: string;
|
|
166
|
+
labels: string[];
|
|
167
|
+
updatedAt: string;
|
|
168
|
+
assignee?: string;
|
|
169
|
+
[key: string]: unknown;
|
|
170
|
+
}
|
|
171
|
+
interface TriggerPollResult {
|
|
172
|
+
items: TriggerPollItem[];
|
|
173
|
+
nextCursor?: string;
|
|
174
|
+
hasMore: boolean;
|
|
175
|
+
}
|
|
176
|
+
interface ActionRunParams {
|
|
177
|
+
action: string;
|
|
178
|
+
args: Record<string, JsonValue>;
|
|
179
|
+
sessionCall?: string;
|
|
180
|
+
}
|
|
181
|
+
type ActionRunResult = Record<string, unknown>;
|
|
182
|
+
interface ExtensionFooterParams {
|
|
183
|
+
footer: string;
|
|
184
|
+
sessionId: string;
|
|
185
|
+
worktreePath: string;
|
|
186
|
+
agent: string;
|
|
187
|
+
}
|
|
188
|
+
interface ExtensionFooterResult {
|
|
189
|
+
items: Array<{
|
|
190
|
+
label: string;
|
|
191
|
+
value: string;
|
|
192
|
+
tone?: 'default' | 'ok' | 'danger';
|
|
193
|
+
href?: string;
|
|
194
|
+
}>;
|
|
195
|
+
}
|
|
196
|
+
interface ExtensionHandlerParams {
|
|
197
|
+
handler: string;
|
|
198
|
+
sessionId: string;
|
|
199
|
+
worktreePath: string;
|
|
200
|
+
agent: string;
|
|
201
|
+
url: string;
|
|
202
|
+
}
|
|
203
|
+
interface ExtensionHandlerResult {
|
|
204
|
+
openPane?: string;
|
|
205
|
+
}
|
|
206
|
+
interface ProtocolMethods {
|
|
207
|
+
'vorn/hello': {
|
|
208
|
+
params: VornHelloParams;
|
|
209
|
+
result: VornHelloResult;
|
|
210
|
+
};
|
|
211
|
+
'connector/manifest': {
|
|
212
|
+
params: ConnectorManifestParams;
|
|
213
|
+
result: ConnectorManifestResult;
|
|
214
|
+
};
|
|
215
|
+
'connector/preflight': {
|
|
216
|
+
params: ConnectorPreflightParams;
|
|
217
|
+
result: ConnectorPreflightResult;
|
|
218
|
+
};
|
|
219
|
+
'connector/options': {
|
|
220
|
+
params: ConnectorOptionsParams;
|
|
221
|
+
result: ConnectorOptionsResult;
|
|
222
|
+
};
|
|
223
|
+
'trigger/poll': {
|
|
224
|
+
params: TriggerPollParams;
|
|
225
|
+
result: TriggerPollResult;
|
|
226
|
+
};
|
|
227
|
+
'action/run': {
|
|
228
|
+
params: ActionRunParams;
|
|
229
|
+
result: ActionRunResult;
|
|
230
|
+
};
|
|
231
|
+
'extension/footer': {
|
|
232
|
+
params: ExtensionFooterParams;
|
|
233
|
+
result: ExtensionFooterResult;
|
|
234
|
+
};
|
|
235
|
+
'extension/handler': {
|
|
236
|
+
params: ExtensionHandlerParams;
|
|
237
|
+
result: ExtensionHandlerResult;
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
type ProtocolMethod = keyof ProtocolMethods;
|
|
241
|
+
interface ProtocolErrorData {
|
|
242
|
+
kind: ProtocolErrorKind;
|
|
243
|
+
retryable?: boolean;
|
|
244
|
+
field?: string;
|
|
245
|
+
}
|
|
246
|
+
interface ProtocolError {
|
|
247
|
+
code: number;
|
|
248
|
+
message: string;
|
|
249
|
+
data?: ProtocolErrorData;
|
|
250
|
+
}
|
|
251
|
+
interface ProtocolRequest<M extends ProtocolMethod = ProtocolMethod> {
|
|
252
|
+
jsonrpc: '2.0';
|
|
253
|
+
id: number;
|
|
254
|
+
method: M;
|
|
255
|
+
params: ProtocolMethods[M]['params'];
|
|
256
|
+
}
|
|
257
|
+
type ProtocolResponse<M extends ProtocolMethod = ProtocolMethod> = {
|
|
258
|
+
jsonrpc: '2.0';
|
|
259
|
+
id: number;
|
|
260
|
+
result: ProtocolMethods[M]['result'];
|
|
261
|
+
} | {
|
|
262
|
+
jsonrpc: '2.0';
|
|
263
|
+
id: number;
|
|
264
|
+
error: ProtocolError;
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
/** An action argument that is missing or cannot be read as its declared type. */
|
|
268
|
+
declare class ActionArgumentError extends Error {
|
|
269
|
+
readonly field: string;
|
|
270
|
+
constructor(field: string, message: string);
|
|
271
|
+
}
|
|
272
|
+
/** An upstream answer with a failing status; `viaSession` marks one that came through the signed-in window. */
|
|
273
|
+
declare class UpstreamStatusError extends Error {
|
|
274
|
+
readonly status: number;
|
|
275
|
+
readonly viaSession: boolean;
|
|
276
|
+
constructor(status: number, message: string, viaSession?: boolean);
|
|
277
|
+
}
|
|
278
|
+
|
|
89
279
|
/** An origin a connector may act on: `https://host`, or `https://*.host` for every subdomain. */
|
|
90
280
|
declare const ORIGIN_PATTERN: RegExp;
|
|
91
281
|
/** Whether `url` is on one of the declared origins. */
|
|
@@ -159,6 +349,8 @@ interface ResolvedRequest {
|
|
|
159
349
|
declare function resolveRequest(request: ActionRequest, scope: RequestScope): ResolvedRequest;
|
|
160
350
|
interface SendOptions {
|
|
161
351
|
fetchImpl: typeof fetch;
|
|
352
|
+
/** Whether `fetchImpl` is the signed-in window, so a 401 or 403 reads as signed out. */
|
|
353
|
+
viaSession?: boolean;
|
|
162
354
|
}
|
|
163
355
|
/**
|
|
164
356
|
* The action's result, as Vorn stores it.
|
|
@@ -211,15 +403,12 @@ interface ConnectorServerOptions {
|
|
|
211
403
|
/** The host an extension's contributions talk to; defaults to the bridge Vorn served. */
|
|
212
404
|
host?(sessionId: string): ExtensionHost;
|
|
213
405
|
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
* contract — Vorn's generic MCP connector consumes it with no host changes.
|
|
221
|
-
*/
|
|
222
|
-
declare function createConnectorServer(connector: Connector, options?: ConnectorServerOptions): McpServer;
|
|
406
|
+
interface ConnectorServer {
|
|
407
|
+
/** Answer one decoded message; a notification, or anything that is not a request, gets no answer. */
|
|
408
|
+
handle(message: unknown): Promise<ProtocolResponse | undefined>;
|
|
409
|
+
}
|
|
410
|
+
/** Answer Vorn's connector protocol for one connector, one decoded message at a time. */
|
|
411
|
+
declare function createConnectorServer(connector: Connector, options?: ConnectorServerOptions): ConnectorServer;
|
|
223
412
|
/** Serve a connector on stdio. This is the one line a connector's bin needs. */
|
|
224
413
|
declare function serveConnector(connector: Connector, options?: ConnectorServerOptions): Promise<void>;
|
|
225
414
|
|
|
@@ -255,4 +444,4 @@ declare function titleCase(id: string): string;
|
|
|
255
444
|
/** Every file a new connector or extension starts with, ready to build, check and pack. */
|
|
256
445
|
declare function scaffoldFiles(options: ScaffoldOptions): ScaffoldFile[];
|
|
257
446
|
|
|
258
|
-
export { ActionRequest, BROWSER_HOST_ENV, BROWSER_TOKEN_ENV, BundleOutput, BundleRequest, CheckFinding, Connector, ConnectorConfig, ConnectorDefinition, ConnectorItem, type ConnectorServerOptions, EXTENSION_PERMISSIONS, ExtensionDefinition, ExtensionHost, ExtensionHostMethod, ExtensionPermission, HOST_PERMISSIONS, HOST_TOKEN_ENV, HOST_URL_ENV, type HostBridgeOptions, MAX_REQUEST_PAGES, NormalizedItem, ORIGIN_PATTERN, type PackOptions, type PackResult, PermissionDeniedError, PollContext, PollOutcome, PostReceiveOp, type RequestScope, type ResolvedRequest, SESSION_CALL_HEADER,
|
|
447
|
+
export { ActionArgumentError, ActionRequest, type ActionRunParams, type ActionRunResult, BROWSER_HOST_ENV, BROWSER_TOKEN_ENV, BundleOutput, BundleRequest, CheckFinding, Connector, ConnectorConfig, ConnectorDefinition, ConnectorItem, type ConnectorManifestParams, type ConnectorManifestResult, type ConnectorOptionsParams, type ConnectorOptionsResult, type ConnectorPreflightParams, type ConnectorPreflightResult, type ConnectorServer, type ConnectorServerOptions, EXTENSION_PERMISSIONS, ExtensionDefinition, type ExtensionFooterParams, type ExtensionFooterResult, type ExtensionHandlerParams, type ExtensionHandlerResult, ExtensionHost, ExtensionHostMethod, ExtensionPermission, HOST_PERMISSIONS, HOST_TOKEN_ENV, HOST_URL_ENV, type HostBridgeOptions, type JsonValue, MAX_FRAME_BYTES, MAX_REQUEST_PAGES, NormalizedItem, ORIGIN_PATTERN, PROTOCOL_ERROR_CODES, PROTOCOL_ERROR_KINDS, PROTOCOL_METHODS, PROTOCOL_VERSION, type PackOptions, type PackResult, PermissionDeniedError, PollContext, PollOutcome, PostReceiveOp, type ProtocolError, type ProtocolErrorData, type ProtocolErrorKind, type ProtocolMethod, type ProtocolMethods, type ProtocolRequest, type ProtocolResponse, type RequestScope, type ResolvedRequest, SESSION_CALL_HEADER, SUPPORTED_PROTOCOLS, type ScaffoldFile, type ScaffoldOptions, type SessionFetchOptions, SessionRefusedError, SessionUnavailableError, type Substitution, TriggerDefinition, type TriggerPollItem, type TriggerPollParams, type TriggerPollResult, UpstreamStatusError, type VornHelloParams, type VornHelloResult, applyPostReceive, asOutput, createConnectorServer, createExtensionHost, createSessionFetch, defineConnector, defineExtension, envNameFor, executeRequest, nextLink, normalizeItem, normalizeItems, packConnector, packFileName, pollWithDedupe, resolveConfig, resolveRequest, resolveTemplates, scaffoldFiles, serveConnector, titleCase, valueAt, withinOrigins };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ActionArgumentError,
|
|
2
3
|
BROWSER_HOST_ENV,
|
|
3
4
|
BROWSER_TOKEN_ENV,
|
|
4
5
|
CHECK_OWNERS,
|
|
@@ -6,19 +7,22 @@ import {
|
|
|
6
7
|
HOST_PERMISSIONS,
|
|
7
8
|
HOST_TOKEN_ENV,
|
|
8
9
|
HOST_URL_ENV,
|
|
9
|
-
|
|
10
|
+
MAX_FRAME_BYTES,
|
|
10
11
|
MAX_PACK_BYTES,
|
|
11
12
|
MAX_POLL_PAGES,
|
|
12
13
|
MAX_REQUEST_PAGES,
|
|
13
14
|
MockRouteMissError,
|
|
14
|
-
OPTIONS_TOOL,
|
|
15
15
|
ORIGIN_PATTERN,
|
|
16
|
-
|
|
16
|
+
PROTOCOL_ERROR_CODES,
|
|
17
|
+
PROTOCOL_ERROR_KINDS,
|
|
18
|
+
PROTOCOL_METHODS,
|
|
19
|
+
PROTOCOL_VERSION,
|
|
17
20
|
PermissionDeniedError,
|
|
18
21
|
SESSION_CALL_HEADER,
|
|
19
|
-
|
|
22
|
+
SUPPORTED_PROTOCOLS,
|
|
20
23
|
SessionRefusedError,
|
|
21
24
|
SessionUnavailableError,
|
|
25
|
+
UpstreamStatusError,
|
|
22
26
|
applyPostReceive,
|
|
23
27
|
asOutput,
|
|
24
28
|
backoffMs,
|
|
@@ -38,9 +42,7 @@ import {
|
|
|
38
42
|
esbuildBundle,
|
|
39
43
|
escapedMockHttp,
|
|
40
44
|
executeRequest,
|
|
41
|
-
footerToolName,
|
|
42
45
|
formatFindings,
|
|
43
|
-
handlerToolName,
|
|
44
46
|
lifecycleScriptFindings,
|
|
45
47
|
mockExtensionHost,
|
|
46
48
|
nextLink,
|
|
@@ -48,7 +50,6 @@ import {
|
|
|
48
50
|
normalizeItems,
|
|
49
51
|
packConnector,
|
|
50
52
|
packFileName,
|
|
51
|
-
pollToolName,
|
|
52
53
|
pollWithDedupe,
|
|
53
54
|
readNearestPackageJson,
|
|
54
55
|
resilientFetch,
|
|
@@ -66,8 +67,9 @@ import {
|
|
|
66
67
|
valueAt,
|
|
67
68
|
withMockHttp,
|
|
68
69
|
withinOrigins
|
|
69
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-NNCU2VFL.js";
|
|
70
71
|
export {
|
|
72
|
+
ActionArgumentError,
|
|
71
73
|
BROWSER_HOST_ENV,
|
|
72
74
|
BROWSER_TOKEN_ENV,
|
|
73
75
|
CHECK_OWNERS,
|
|
@@ -75,19 +77,22 @@ export {
|
|
|
75
77
|
HOST_PERMISSIONS,
|
|
76
78
|
HOST_TOKEN_ENV,
|
|
77
79
|
HOST_URL_ENV,
|
|
78
|
-
|
|
80
|
+
MAX_FRAME_BYTES,
|
|
79
81
|
MAX_PACK_BYTES,
|
|
80
82
|
MAX_POLL_PAGES,
|
|
81
83
|
MAX_REQUEST_PAGES,
|
|
82
84
|
MockRouteMissError,
|
|
83
|
-
OPTIONS_TOOL,
|
|
84
85
|
ORIGIN_PATTERN,
|
|
85
|
-
|
|
86
|
+
PROTOCOL_ERROR_CODES,
|
|
87
|
+
PROTOCOL_ERROR_KINDS,
|
|
88
|
+
PROTOCOL_METHODS,
|
|
89
|
+
PROTOCOL_VERSION,
|
|
86
90
|
PermissionDeniedError,
|
|
87
91
|
SESSION_CALL_HEADER,
|
|
88
|
-
|
|
92
|
+
SUPPORTED_PROTOCOLS,
|
|
89
93
|
SessionRefusedError,
|
|
90
94
|
SessionUnavailableError,
|
|
95
|
+
UpstreamStatusError,
|
|
91
96
|
applyPostReceive,
|
|
92
97
|
asOutput,
|
|
93
98
|
backoffMs,
|
|
@@ -107,9 +112,7 @@ export {
|
|
|
107
112
|
esbuildBundle,
|
|
108
113
|
escapedMockHttp,
|
|
109
114
|
executeRequest,
|
|
110
|
-
footerToolName,
|
|
111
115
|
formatFindings,
|
|
112
|
-
handlerToolName,
|
|
113
116
|
lifecycleScriptFindings,
|
|
114
117
|
mockExtensionHost,
|
|
115
118
|
nextLink,
|
|
@@ -117,7 +120,6 @@ export {
|
|
|
117
120
|
normalizeItems,
|
|
118
121
|
packConnector,
|
|
119
122
|
packFileName,
|
|
120
|
-
pollToolName,
|
|
121
123
|
pollWithDedupe,
|
|
122
124
|
readNearestPackageJson,
|
|
123
125
|
resilientFetch,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vornrun/connector-sdk",
|
|
3
|
-
"version": "0.7.1-beta.
|
|
3
|
+
"version": "0.7.1-beta.4",
|
|
4
4
|
"description": "Build and share Vorn pull connectors as ordinary npm packages",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -13,8 +13,6 @@
|
|
|
13
13
|
"keywords": [
|
|
14
14
|
"vorn",
|
|
15
15
|
"connector",
|
|
16
|
-
"mcp",
|
|
17
|
-
"model-context-protocol",
|
|
18
16
|
"integration"
|
|
19
17
|
],
|
|
20
18
|
"bin": {
|
|
@@ -36,10 +34,8 @@
|
|
|
36
34
|
"build": "tsup"
|
|
37
35
|
},
|
|
38
36
|
"dependencies": {
|
|
39
|
-
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
40
37
|
"esbuild": "^0.28.2",
|
|
41
|
-
"tar": "^7.5.21"
|
|
42
|
-
"zod": "^4.5.4"
|
|
38
|
+
"tar": "^7.5.21"
|
|
43
39
|
},
|
|
44
40
|
"devDependencies": {
|
|
45
41
|
"tsup": "^8.5.1",
|