@vornrun/connector-sdk 0.7.0-beta.7 → 0.7.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 +285 -2
- package/dist/check-62s2GvcO.d.ts +1137 -0
- package/dist/chunk-ZKHXHE3O.js +3511 -0
- package/dist/cli.d.ts +14 -1
- package/dist/cli.js +105 -12
- package/dist/index.d.ts +176 -412
- package/dist/index.js +98 -34
- package/package.json +4 -2
- package/dist/chunk-457KOZUU.js +0 -773
package/dist/index.js
CHANGED
|
@@ -1,74 +1,138 @@
|
|
|
1
1
|
import {
|
|
2
|
+
BROWSER_HOST_ENV,
|
|
3
|
+
BROWSER_TOKEN_ENV,
|
|
4
|
+
CHECK_OWNERS,
|
|
5
|
+
EXTENSION_PERMISSIONS,
|
|
6
|
+
HOST_PERMISSIONS,
|
|
7
|
+
HOST_TOKEN_ENV,
|
|
8
|
+
HOST_URL_ENV,
|
|
2
9
|
MANIFEST_TOOL,
|
|
10
|
+
MAX_PACK_BYTES,
|
|
3
11
|
MAX_POLL_PAGES,
|
|
12
|
+
MAX_REQUEST_PAGES,
|
|
13
|
+
MockRouteMissError,
|
|
14
|
+
OPTIONS_TOOL,
|
|
15
|
+
ORIGIN_PATTERN,
|
|
4
16
|
PREFLIGHT_TOOL,
|
|
17
|
+
PermissionDeniedError,
|
|
18
|
+
SESSION_CALL_HEADER,
|
|
19
|
+
SESSION_CALL_META,
|
|
20
|
+
SessionRefusedError,
|
|
21
|
+
SessionUnavailableError,
|
|
22
|
+
applyPostReceive,
|
|
23
|
+
asOutput,
|
|
24
|
+
backoffMs,
|
|
25
|
+
bundleDependencyFindings,
|
|
26
|
+
bundledRequireFindings,
|
|
5
27
|
checkConnector,
|
|
6
28
|
connectionSetup,
|
|
7
29
|
connectorManifest,
|
|
30
|
+
createConnectorHarness,
|
|
8
31
|
createConnectorServer,
|
|
32
|
+
createExtensionHost,
|
|
33
|
+
createSessionFetch,
|
|
9
34
|
defineConnector,
|
|
35
|
+
defineExtension,
|
|
10
36
|
drainPoll,
|
|
11
37
|
envNameFor,
|
|
38
|
+
esbuildBundle,
|
|
39
|
+
escapedMockHttp,
|
|
40
|
+
executeRequest,
|
|
41
|
+
footerToolName,
|
|
12
42
|
formatFindings,
|
|
43
|
+
handlerToolName,
|
|
44
|
+
lifecycleScriptFindings,
|
|
45
|
+
mockExtensionHost,
|
|
46
|
+
nextLink,
|
|
13
47
|
normalizeItem,
|
|
14
48
|
normalizeItems,
|
|
49
|
+
packConnector,
|
|
50
|
+
packFileName,
|
|
15
51
|
pollToolName,
|
|
16
52
|
pollWithDedupe,
|
|
53
|
+
readNearestPackageJson,
|
|
54
|
+
resilientFetch,
|
|
17
55
|
resolveConfig,
|
|
56
|
+
resolveRequest,
|
|
57
|
+
resolveTemplates,
|
|
58
|
+
retryAfterMs,
|
|
18
59
|
runAction,
|
|
60
|
+
runConformance,
|
|
61
|
+
runOptions,
|
|
19
62
|
runPoll,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
...harnessOptions.now && { now: harnessOptions.now },
|
|
28
|
-
...options
|
|
29
|
-
});
|
|
30
|
-
return {
|
|
31
|
-
poll: (triggerType, options) => runPoll(connector, triggerType, defaults(options)),
|
|
32
|
-
drain: (triggerType, options) => drainPoll(connector, triggerType, defaults(options)),
|
|
33
|
-
execute: (actionType, args = {}) => runAction(connector, actionType, args, {
|
|
34
|
-
...harnessOptions.config && { config: harnessOptions.config },
|
|
35
|
-
...harnessOptions.now && { now: harnessOptions.now }
|
|
36
|
-
}),
|
|
37
|
-
manifest: () => connectorManifest(connector),
|
|
38
|
-
async pollTwice(triggerType, options) {
|
|
39
|
-
const first = await drainPoll(connector, triggerType, defaults(options));
|
|
40
|
-
const watermark = first.reduce(
|
|
41
|
-
(newest, item) => newest === void 0 || item.updatedAt > newest ? item.updatedAt : newest,
|
|
42
|
-
options?.since
|
|
43
|
-
);
|
|
44
|
-
const second = await drainPoll(
|
|
45
|
-
connector,
|
|
46
|
-
triggerType,
|
|
47
|
-
defaults({ ...options, ...watermark !== void 0 && { since: watermark } })
|
|
48
|
-
);
|
|
49
|
-
return watermark === void 0 ? second : second.filter((item) => item.updatedAt > watermark);
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
}
|
|
63
|
+
scaffoldFiles,
|
|
64
|
+
serveConnector,
|
|
65
|
+
titleCase,
|
|
66
|
+
valueAt,
|
|
67
|
+
withMockHttp,
|
|
68
|
+
withinOrigins
|
|
69
|
+
} from "./chunk-ZKHXHE3O.js";
|
|
53
70
|
export {
|
|
71
|
+
BROWSER_HOST_ENV,
|
|
72
|
+
BROWSER_TOKEN_ENV,
|
|
73
|
+
CHECK_OWNERS,
|
|
74
|
+
EXTENSION_PERMISSIONS,
|
|
75
|
+
HOST_PERMISSIONS,
|
|
76
|
+
HOST_TOKEN_ENV,
|
|
77
|
+
HOST_URL_ENV,
|
|
54
78
|
MANIFEST_TOOL,
|
|
79
|
+
MAX_PACK_BYTES,
|
|
55
80
|
MAX_POLL_PAGES,
|
|
81
|
+
MAX_REQUEST_PAGES,
|
|
82
|
+
MockRouteMissError,
|
|
83
|
+
OPTIONS_TOOL,
|
|
84
|
+
ORIGIN_PATTERN,
|
|
56
85
|
PREFLIGHT_TOOL,
|
|
86
|
+
PermissionDeniedError,
|
|
87
|
+
SESSION_CALL_HEADER,
|
|
88
|
+
SESSION_CALL_META,
|
|
89
|
+
SessionRefusedError,
|
|
90
|
+
SessionUnavailableError,
|
|
91
|
+
applyPostReceive,
|
|
92
|
+
asOutput,
|
|
93
|
+
backoffMs,
|
|
94
|
+
bundleDependencyFindings,
|
|
95
|
+
bundledRequireFindings,
|
|
57
96
|
checkConnector,
|
|
58
97
|
connectionSetup,
|
|
59
98
|
connectorManifest,
|
|
60
99
|
createConnectorHarness,
|
|
61
100
|
createConnectorServer,
|
|
101
|
+
createExtensionHost,
|
|
102
|
+
createSessionFetch,
|
|
62
103
|
defineConnector,
|
|
104
|
+
defineExtension,
|
|
63
105
|
drainPoll,
|
|
64
106
|
envNameFor,
|
|
107
|
+
esbuildBundle,
|
|
108
|
+
escapedMockHttp,
|
|
109
|
+
executeRequest,
|
|
110
|
+
footerToolName,
|
|
65
111
|
formatFindings,
|
|
112
|
+
handlerToolName,
|
|
113
|
+
lifecycleScriptFindings,
|
|
114
|
+
mockExtensionHost,
|
|
115
|
+
nextLink,
|
|
66
116
|
normalizeItem,
|
|
67
117
|
normalizeItems,
|
|
118
|
+
packConnector,
|
|
119
|
+
packFileName,
|
|
68
120
|
pollToolName,
|
|
69
121
|
pollWithDedupe,
|
|
122
|
+
readNearestPackageJson,
|
|
123
|
+
resilientFetch,
|
|
70
124
|
resolveConfig,
|
|
125
|
+
resolveRequest,
|
|
126
|
+
resolveTemplates,
|
|
127
|
+
retryAfterMs,
|
|
71
128
|
runAction,
|
|
129
|
+
runConformance,
|
|
130
|
+
runOptions,
|
|
72
131
|
runPoll,
|
|
73
|
-
|
|
132
|
+
scaffoldFiles,
|
|
133
|
+
serveConnector,
|
|
134
|
+
titleCase,
|
|
135
|
+
valueAt,
|
|
136
|
+
withMockHttp,
|
|
137
|
+
withinOrigins
|
|
74
138
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vornrun/connector-sdk",
|
|
3
|
-
"version": "0.7.0
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Build and share Vorn pull connectors as ordinary npm packages",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -37,7 +37,9 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
40
|
-
"
|
|
40
|
+
"esbuild": "^0.28.2",
|
|
41
|
+
"tar": "^7.5.21",
|
|
42
|
+
"zod": "^4.5.4"
|
|
41
43
|
},
|
|
42
44
|
"devDependencies": {
|
|
43
45
|
"tsup": "^8.5.1",
|