@pulsemcp/air-sdk 0.0.6 → 0.0.10
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/dist/extension-loader.d.ts +23 -0
- package/dist/extension-loader.d.ts.map +1 -0
- package/dist/extension-loader.js +70 -0
- package/dist/extension-loader.js.map +1 -0
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/install.d.ts +28 -0
- package/dist/install.d.ts.map +1 -0
- package/dist/install.js +134 -0
- package/dist/install.js.map +1 -0
- package/dist/prepare.d.ts +21 -2
- package/dist/prepare.d.ts.map +1 -1
- package/dist/prepare.js +56 -10
- package/dist/prepare.js.map +1 -1
- package/dist/transform-runner.d.ts +24 -0
- package/dist/transform-runner.d.ts.map +1 -0
- package/dist/transform-runner.js +28 -0
- package/dist/transform-runner.js.map +1 -0
- package/dist/validate-config.d.ts +15 -0
- package/dist/validate-config.d.ts.map +1 -0
- package/dist/validate-config.js +52 -0
- package/dist/validate-config.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { AirExtension } from "@pulsemcp/air-core";
|
|
2
|
+
export interface LoadedExtensions {
|
|
3
|
+
/** Extensions that provide an adapter */
|
|
4
|
+
adapters: AirExtension[];
|
|
5
|
+
/** Extensions that provide a provider */
|
|
6
|
+
providers: AirExtension[];
|
|
7
|
+
/** Extensions that provide a transform (in declaration order) */
|
|
8
|
+
transforms: AirExtension[];
|
|
9
|
+
/** All loaded extensions in declaration order */
|
|
10
|
+
all: AirExtension[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Load extensions from the `extensions` array in air.json.
|
|
14
|
+
*
|
|
15
|
+
* Each entry is either an npm package name or a local path (starting
|
|
16
|
+
* with `./`, `../`, or `/`). The default export of each module must be
|
|
17
|
+
* either an `AirExtension` object or a bare transform function.
|
|
18
|
+
*
|
|
19
|
+
* Extensions are loaded sequentially in declaration order because
|
|
20
|
+
* order matters for transforms.
|
|
21
|
+
*/
|
|
22
|
+
export declare function loadExtensions(extensions: string[], airJsonDir: string): Promise<LoadedExtensions>;
|
|
23
|
+
//# sourceMappingURL=extension-loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension-loader.d.ts","sourceRoot":"","sources":["../src/extension-loader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAoB,MAAM,oBAAoB,CAAC;AAEzE,MAAM,WAAW,gBAAgB;IAC/B,yCAAyC;IACzC,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,yCAAyC;IACzC,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,iEAAiE;IACjE,UAAU,EAAE,YAAY,EAAE,CAAC;IAC3B,iDAAiD;IACjD,GAAG,EAAE,YAAY,EAAE,CAAC;CACrB;AAED;;;;;;;;;GASG;AACH,wBAAsB,cAAc,CAClC,UAAU,EAAE,MAAM,EAAE,EACpB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,gBAAgB,CAAC,CAiB3B"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { resolve } from "path";
|
|
2
|
+
import { pathToFileURL } from "url";
|
|
3
|
+
/**
|
|
4
|
+
* Load extensions from the `extensions` array in air.json.
|
|
5
|
+
*
|
|
6
|
+
* Each entry is either an npm package name or a local path (starting
|
|
7
|
+
* with `./`, `../`, or `/`). The default export of each module must be
|
|
8
|
+
* either an `AirExtension` object or a bare transform function.
|
|
9
|
+
*
|
|
10
|
+
* Extensions are loaded sequentially in declaration order because
|
|
11
|
+
* order matters for transforms.
|
|
12
|
+
*/
|
|
13
|
+
export async function loadExtensions(extensions, airJsonDir) {
|
|
14
|
+
const result = {
|
|
15
|
+
adapters: [],
|
|
16
|
+
providers: [],
|
|
17
|
+
transforms: [],
|
|
18
|
+
all: [],
|
|
19
|
+
};
|
|
20
|
+
for (const specifier of extensions) {
|
|
21
|
+
const ext = await loadSingleExtension(specifier, airJsonDir);
|
|
22
|
+
result.all.push(ext);
|
|
23
|
+
if (ext.adapter)
|
|
24
|
+
result.adapters.push(ext);
|
|
25
|
+
if (ext.provider)
|
|
26
|
+
result.providers.push(ext);
|
|
27
|
+
if (ext.transform)
|
|
28
|
+
result.transforms.push(ext);
|
|
29
|
+
}
|
|
30
|
+
return result;
|
|
31
|
+
}
|
|
32
|
+
async function loadSingleExtension(specifier, airJsonDir) {
|
|
33
|
+
let mod;
|
|
34
|
+
try {
|
|
35
|
+
if (specifier.startsWith("./") ||
|
|
36
|
+
specifier.startsWith("../") ||
|
|
37
|
+
specifier.startsWith("/")) {
|
|
38
|
+
const absPath = resolve(airJsonDir, specifier);
|
|
39
|
+
const fileUrl = pathToFileURL(absPath).href;
|
|
40
|
+
mod = await import(fileUrl);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
mod = await import(specifier);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
catch (err) {
|
|
47
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
48
|
+
throw new Error(`Failed to load extension "${specifier}": ${message}`);
|
|
49
|
+
}
|
|
50
|
+
const defaultExport = mod.default;
|
|
51
|
+
// Bare function → shorthand for a transform-only extension
|
|
52
|
+
if (typeof defaultExport === "function") {
|
|
53
|
+
return {
|
|
54
|
+
name: specifier,
|
|
55
|
+
transform: {
|
|
56
|
+
transform: defaultExport,
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
if (!defaultExport || typeof defaultExport !== "object") {
|
|
61
|
+
throw new Error(`Extension "${specifier}" does not have a valid default export. ` +
|
|
62
|
+
`Expected an AirExtension object or a transform function.`);
|
|
63
|
+
}
|
|
64
|
+
const ext = defaultExport;
|
|
65
|
+
if (!ext.name || typeof ext.name !== "string") {
|
|
66
|
+
throw new Error(`Extension "${specifier}" is missing a required "name" field.`);
|
|
67
|
+
}
|
|
68
|
+
return ext;
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=extension-loader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension-loader.js","sourceRoot":"","sources":["../src/extension-loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAcpC;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,UAAoB,EACpB,UAAkB;IAElB,MAAM,MAAM,GAAqB;QAC/B,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,EAAE;QACb,UAAU,EAAE,EAAE;QACd,GAAG,EAAE,EAAE;KACR,CAAC;IAEF,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,MAAM,GAAG,GAAG,MAAM,mBAAmB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;QAC7D,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACrB,IAAI,GAAG,CAAC,OAAO;YAAE,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC3C,IAAI,GAAG,CAAC,QAAQ;YAAE,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC7C,IAAI,GAAG,CAAC,SAAS;YAAE,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACjD,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,KAAK,UAAU,mBAAmB,CAChC,SAAiB,EACjB,UAAkB;IAElB,IAAI,GAA4B,CAAC;IAEjC,IAAI,CAAC;QACH,IACE,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC;YAC1B,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC;YAC3B,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,EACzB,CAAC;YACD,M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onPath, resolveArtifacts, mergeArtifacts, expandPlugins, emptyArtifacts, validateJson, getSchemasDir, getSchemaPath, loadSchema, detectSchemaType, detectSchemaFromValue, getAllSchemaTypes, isValidSchemaType, } from "@pulsemcp/air-core";
|
|
2
|
-
export type { AirConfig, ResolvedArtifacts, SkillEntry, ReferenceEntry, McpOAuthConfig, McpServerEntry, PluginAuthor, PluginEntry, RootEntry, HookEntry, AgentAdapter, CatalogProvider,
|
|
2
|
+
export type { AirConfig, ResolvedArtifacts, SkillEntry, ReferenceEntry, McpOAuthConfig, McpServerEntry, PluginAuthor, PluginEntry, RootEntry, HookEntry, AgentAdapter, CatalogProvider, AirExtension, PrepareTransform, McpConfig, TransformContext, ExtensionCliOption, AgentSessionConfig, StartCommand, PrepareSessionOptions as CorePrepareSessionOptions, PreparedSession, ValidationResult, ValidationError, ResolveOptions, SchemaType, } from "@pulsemcp/air-core";
|
|
3
3
|
export { findAdapter, listAvailableAdapters } from "./adapter-registry.js";
|
|
4
4
|
export { normalizeGitUrl, detectRoot } from "./root-detection.js";
|
|
5
5
|
export { validateFile } from "./validate.js";
|
|
@@ -12,4 +12,11 @@ export { startSession } from "./start.js";
|
|
|
12
12
|
export type { StartSessionOptions, StartSessionResult } from "./start.js";
|
|
13
13
|
export { prepareSession } from "./prepare.js";
|
|
14
14
|
export type { PrepareSessionOptions, PrepareSessionResult, } from "./prepare.js";
|
|
15
|
+
export { installExtensions } from "./install.js";
|
|
16
|
+
export type { InstallExtensionsOptions, InstallExtensionsResult, } from "./install.js";
|
|
17
|
+
export { loadExtensions } from "./extension-loader.js";
|
|
18
|
+
export type { LoadedExtensions } from "./extension-loader.js";
|
|
19
|
+
export { runTransforms } from "./transform-runner.js";
|
|
20
|
+
export type { RunTransformsOptions } from "./transform-runner.js";
|
|
21
|
+
export { findUnresolvedVars, validateNoUnresolvedVars, unresolvedVarsMessage, } from "./validate-config.js";
|
|
15
22
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,aAAa,EACb,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,cAAc,EAEd,YAAY,EAEZ,aAAa,EACb,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAG5B,YAAY,EAEV,SAAS,EACT,iBAAiB,EACjB,UAAU,EACV,cAAc,EACd,cAAc,EACd,cAAc,EACd,YAAY,EACZ,WAAW,EACX,SAAS,EACT,SAAS,EAET,YAAY,EACZ,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,aAAa,EACb,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,cAAc,EAEd,YAAY,EAEZ,aAAa,EACb,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAG5B,YAAY,EAEV,SAAS,EACT,iBAAiB,EACjB,UAAU,EACV,cAAc,EACd,cAAc,EACd,cAAc,EACd,YAAY,EACZ,WAAW,EACX,SAAS,EACT,SAAS,EAET,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,YAAY,EACZ,qBAAqB,IAAI,yBAAyB,EAClD,eAAe,EAEf,gBAAgB,EAChB,eAAe,EAEf,cAAc,EAEd,UAAU,GACX,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAG3E,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGlE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,YAAY,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAE7E,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAErE,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAChE,YAAY,EAAE,YAAY,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAEzF,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,YAAY,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAE1E,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,YAAY,EACV,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,YAAY,EACV,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAG9D,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAGlE,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -16,4 +16,12 @@ export { initConfig } from "./init.js";
|
|
|
16
16
|
export { listArtifacts, VALID_ARTIFACT_TYPES } from "./list.js";
|
|
17
17
|
export { startSession } from "./start.js";
|
|
18
18
|
export { prepareSession } from "./prepare.js";
|
|
19
|
+
// Extension installer
|
|
20
|
+
export { installExtensions } from "./install.js";
|
|
21
|
+
// Extension loader
|
|
22
|
+
export { loadExtensions } from "./extension-loader.js";
|
|
23
|
+
// Transform runner
|
|
24
|
+
export { runTransforms } from "./transform-runner.js";
|
|
25
|
+
// Config validation
|
|
26
|
+
export { findUnresolvedVars, validateNoUnresolvedVars, unresolvedVarsMessage, } from "./validate-config.js";
|
|
19
27
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,OAAO;AACL,oBAAoB;AACpB,aAAa,EACb,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,cAAc;AACd,aAAa;AACb,YAAY;AACZ,UAAU;AACV,aAAa,EACb,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,OAAO;AACL,oBAAoB;AACpB,aAAa,EACb,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,cAAc;AACd,aAAa;AACb,YAAY;AACZ,UAAU;AACV,aAAa,EACb,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAoC5B,mBAAmB;AACnB,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAE3E,iBAAiB;AACjB,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAElE,wBAAwB;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAG7C,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAGvC,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAGhE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAG1C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAM9C,sBAAsB;AACtB,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAMjD,mBAAmB;AACnB,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGvD,mBAAmB;AACnB,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAGtD,oBAAoB;AACpB,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface InstallExtensionsOptions {
|
|
2
|
+
/** Path to air.json. Uses AIR_CONFIG env or ~/.air/air.json if not set. */
|
|
3
|
+
config?: string;
|
|
4
|
+
/** npm install prefix (--prefix). Defaults to the directory containing air.json. */
|
|
5
|
+
prefix?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface InstallExtensionsResult {
|
|
8
|
+
/** Extensions that were already installed. */
|
|
9
|
+
alreadyInstalled: string[];
|
|
10
|
+
/** Extensions that were installed by this call. */
|
|
11
|
+
installed: string[];
|
|
12
|
+
/** Extensions that were skipped (local paths, not npm packages). */
|
|
13
|
+
skipped: string[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Install missing extensions declared in air.json.
|
|
17
|
+
*
|
|
18
|
+
* Reads the `extensions` array from air.json, checks which npm packages
|
|
19
|
+
* are already present in node_modules, and installs any missing ones
|
|
20
|
+
* using `npm install` with the specified prefix.
|
|
21
|
+
*
|
|
22
|
+
* Local path extensions (starting with ./, ../, or /) are skipped since
|
|
23
|
+
* they don't need npm installation.
|
|
24
|
+
*
|
|
25
|
+
* @throws Error if air.json is not found, or if npm install fails.
|
|
26
|
+
*/
|
|
27
|
+
export declare function installExtensions(options?: InstallExtensionsOptions): Promise<InstallExtensionsResult>;
|
|
28
|
+
//# sourceMappingURL=install.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../src/install.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,wBAAwB;IACvC,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oFAAoF;IACpF,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,uBAAuB;IACtC,8CAA8C;IAC9C,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,mDAAmD;IACnD,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,oEAAoE;IACpE,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAkFD;;;;;;;;;;;GAWG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,CAAC,EAAE,wBAAwB,GACjC,OAAO,CAAC,uBAAuB,CAAC,CA4DlC"}
|
package/dist/install.js
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { resolve, dirname, join } from "path";
|
|
2
|
+
import { existsSync } from "fs";
|
|
3
|
+
import { execFile } from "child_process";
|
|
4
|
+
import { loadAirConfig, getAirJsonPath } from "@pulsemcp/air-core";
|
|
5
|
+
/**
|
|
6
|
+
* Strip a version suffix from an npm specifier for node_modules lookup.
|
|
7
|
+
* E.g., "@scope/pkg@1.2.3" → "@scope/pkg", "pkg@^2.0.0" → "pkg".
|
|
8
|
+
* Bare specifiers without a version are returned unchanged.
|
|
9
|
+
*/
|
|
10
|
+
function stripVersion(specifier) {
|
|
11
|
+
// Scoped: @scope/name@version → split on the second @
|
|
12
|
+
if (specifier.startsWith("@")) {
|
|
13
|
+
const slashIdx = specifier.indexOf("/");
|
|
14
|
+
if (slashIdx !== -1) {
|
|
15
|
+
const afterSlash = specifier.slice(slashIdx + 1);
|
|
16
|
+
const atIdx = afterSlash.indexOf("@");
|
|
17
|
+
if (atIdx !== -1) {
|
|
18
|
+
return specifier.slice(0, slashIdx + 1 + atIdx);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return specifier;
|
|
22
|
+
}
|
|
23
|
+
// Unscoped: name@version → split on first @
|
|
24
|
+
const atIdx = specifier.indexOf("@");
|
|
25
|
+
if (atIdx > 0) {
|
|
26
|
+
return specifier.slice(0, atIdx);
|
|
27
|
+
}
|
|
28
|
+
return specifier;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Check if an npm package is installed under a given prefix.
|
|
32
|
+
*
|
|
33
|
+
* Checks for the package directory in `<prefix>/node_modules/<name>`.
|
|
34
|
+
* Strips version suffixes from the specifier before checking.
|
|
35
|
+
* This works for both CJS and ESM-only packages, unlike `require.resolve`
|
|
36
|
+
* which fails for packages that only export `import` conditions.
|
|
37
|
+
*/
|
|
38
|
+
function isPackageInstalled(specifier, prefix) {
|
|
39
|
+
const name = stripVersion(specifier);
|
|
40
|
+
return existsSync(join(prefix, "node_modules", name));
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Check if an extension specifier is a local path (not an npm package).
|
|
44
|
+
*/
|
|
45
|
+
function isLocalPath(specifier) {
|
|
46
|
+
return (specifier.startsWith("./") ||
|
|
47
|
+
specifier.startsWith("../") ||
|
|
48
|
+
specifier.startsWith("/"));
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Run `npm install` asynchronously and return a promise.
|
|
52
|
+
*/
|
|
53
|
+
function npmInstall(args) {
|
|
54
|
+
return new Promise((resolve, reject) => {
|
|
55
|
+
execFile("npm", ["install", ...args], { stdio: "pipe" }, (err, stdout, stderr) => {
|
|
56
|
+
if (err) {
|
|
57
|
+
reject(Object.assign(err, {
|
|
58
|
+
stdout: stdout?.toString() ?? "",
|
|
59
|
+
stderr: stderr?.toString() ?? "",
|
|
60
|
+
}));
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
resolve({
|
|
64
|
+
stdout: stdout?.toString() ?? "",
|
|
65
|
+
stderr: stderr?.toString() ?? "",
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Install missing extensions declared in air.json.
|
|
73
|
+
*
|
|
74
|
+
* Reads the `extensions` array from air.json, checks which npm packages
|
|
75
|
+
* are already present in node_modules, and installs any missing ones
|
|
76
|
+
* using `npm install` with the specified prefix.
|
|
77
|
+
*
|
|
78
|
+
* Local path extensions (starting with ./, ../, or /) are skipped since
|
|
79
|
+
* they don't need npm installation.
|
|
80
|
+
*
|
|
81
|
+
* @throws Error if air.json is not found, or if npm install fails.
|
|
82
|
+
*/
|
|
83
|
+
export async function installExtensions(options) {
|
|
84
|
+
const airJsonPath = options?.config || getAirJsonPath();
|
|
85
|
+
if (!airJsonPath) {
|
|
86
|
+
throw new Error("No air.json found. Specify a config path or set AIR_CONFIG env var.");
|
|
87
|
+
}
|
|
88
|
+
const airConfig = loadAirConfig(airJsonPath);
|
|
89
|
+
const extensions = airConfig.extensions || [];
|
|
90
|
+
if (extensions.length === 0) {
|
|
91
|
+
return { alreadyInstalled: [], installed: [], skipped: [] };
|
|
92
|
+
}
|
|
93
|
+
const prefix = options?.prefix
|
|
94
|
+
? resolve(options.prefix)
|
|
95
|
+
: dirname(resolve(airJsonPath));
|
|
96
|
+
const alreadyInstalled = [];
|
|
97
|
+
const toInstall = [];
|
|
98
|
+
const skipped = [];
|
|
99
|
+
const seen = new Set();
|
|
100
|
+
for (const specifier of extensions) {
|
|
101
|
+
if (typeof specifier !== "string")
|
|
102
|
+
continue;
|
|
103
|
+
if (seen.has(specifier))
|
|
104
|
+
continue;
|
|
105
|
+
seen.add(specifier);
|
|
106
|
+
if (isLocalPath(specifier)) {
|
|
107
|
+
skipped.push(specifier);
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
if (isPackageInstalled(specifier, prefix)) {
|
|
111
|
+
alreadyInstalled.push(specifier);
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
toInstall.push(specifier);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
if (toInstall.length > 0) {
|
|
118
|
+
try {
|
|
119
|
+
await npmInstall(["--prefix", prefix, ...toInstall]);
|
|
120
|
+
}
|
|
121
|
+
catch (err) {
|
|
122
|
+
const stderr = err instanceof Error && "stderr" in err
|
|
123
|
+
? String(err.stderr)
|
|
124
|
+
: "";
|
|
125
|
+
throw new Error(`npm install failed for: ${toInstall.join(", ")}${stderr ? `\n${stderr}` : ""}`);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return {
|
|
129
|
+
alreadyInstalled,
|
|
130
|
+
installed: toInstall,
|
|
131
|
+
skipped,
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
//# sourceMappingURL=install.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.js","sourceRoot":"","sources":["../src/install.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAkBnE;;;;GAIG;AACH,SAAS,YAAY,CAAC,SAAiB;IACrC,sDAAsD;IACtD,IAAI,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QAC9B,MAAM,QAAQ,GAAG,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACxC,IAAI,QAAQ,KAAK,CAAC,CAAC,EAAE,CAAC;YACpB,MAAM,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;YACjD,M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
1
1
|
import { type RootEntry, type PreparedSession } from "@pulsemcp/air-core";
|
|
2
|
+
import { type LoadedExtensions } from "./extension-loader.js";
|
|
2
3
|
export interface PrepareSessionOptions {
|
|
3
4
|
/** Path to air.json. Uses AIR_CONFIG env or ~/.air/air.json if not set. */
|
|
4
5
|
config?: string;
|
|
@@ -17,6 +18,23 @@ export interface PrepareSessionOptions {
|
|
|
17
18
|
* Orchestrators that manage subagent composition externally should set this.
|
|
18
19
|
*/
|
|
19
20
|
skipSubagentMerge?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Parsed CLI option values contributed by extensions.
|
|
23
|
+
* Passed through to transforms via TransformContext.options.
|
|
24
|
+
*/
|
|
25
|
+
extensionOptions?: Record<string, unknown>;
|
|
26
|
+
/**
|
|
27
|
+
* Skip the final validation that checks for unresolved ${VAR} patterns.
|
|
28
|
+
* Use when partial resolution is intentional (e.g., orchestrators that
|
|
29
|
+
* resolve remaining variables themselves).
|
|
30
|
+
*/
|
|
31
|
+
skipValidation?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Pre-loaded extensions. When provided, the SDK skips loading extensions
|
|
34
|
+
* from air.json — useful when the CLI has already loaded them to discover
|
|
35
|
+
* contributed CLI options.
|
|
36
|
+
*/
|
|
37
|
+
extensions?: LoadedExtensions;
|
|
20
38
|
}
|
|
21
39
|
export interface PrepareSessionResult {
|
|
22
40
|
/** The prepared session result from the adapter. */
|
|
@@ -29,8 +47,9 @@ export interface PrepareSessionResult {
|
|
|
29
47
|
/**
|
|
30
48
|
* Prepare a target directory for an agent session.
|
|
31
49
|
*
|
|
32
|
-
*
|
|
33
|
-
* prepareSession() to write .mcp.json
|
|
50
|
+
* Loads extensions from air.json, resolves artifacts (using providers from
|
|
51
|
+
* extensions), delegates to the adapter's prepareSession() to write .mcp.json
|
|
52
|
+
* and inject skills, then runs transforms in declaration order.
|
|
34
53
|
*
|
|
35
54
|
* @throws Error if the adapter is not found, air.json is not found, or the specified root doesn't exist.
|
|
36
55
|
*/
|
package/dist/prepare.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepare.d.ts","sourceRoot":"","sources":["../src/prepare.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"prepare.d.ts","sourceRoot":"","sources":["../src/prepare.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,eAAe,EACrB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAkB,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAS9E,MAAM,WAAW,qBAAqB;IACpC,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uFAAuF;IACvF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC3C;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;OAIG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAED,MAAM,WAAW,oBAAoB;IACnC,oDAAoD;IACpD,OAAO,EAAE,eAAe,CAAC;IACzB,mDAAmD;IACnD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,2FAA2F;IAC3F,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;;;;;;;GAQG;AACH,wBAAsB,cAAc,CAClC,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC,oBAAoB,CAAC,CAsG/B"}
|
package/dist/prepare.js
CHANGED
|
@@ -1,18 +1,42 @@
|
|
|
1
|
-
import { resolve } from "path";
|
|
2
|
-
import { getAirJsonPath, resolveArtifacts, } from "@pulsemcp/air-core";
|
|
1
|
+
import { resolve, dirname } from "path";
|
|
2
|
+
import { loadAirConfig, getAirJsonPath, resolveArtifacts, } from "@pulsemcp/air-core";
|
|
3
3
|
import { findAdapter, listAvailableAdapters } from "./adapter-registry.js";
|
|
4
4
|
import { detectRoot } from "./root-detection.js";
|
|
5
|
+
import { loadExtensions } from "./extension-loader.js";
|
|
6
|
+
import { runTransforms } from "./transform-runner.js";
|
|
7
|
+
import { readFileSync } from "fs";
|
|
8
|
+
import { findUnresolvedVars, unresolvedVarsMessage, } from "./validate-config.js";
|
|
5
9
|
/**
|
|
6
10
|
* Prepare a target directory for an agent session.
|
|
7
11
|
*
|
|
8
|
-
*
|
|
9
|
-
* prepareSession() to write .mcp.json
|
|
12
|
+
* Loads extensions from air.json, resolves artifacts (using providers from
|
|
13
|
+
* extensions), delegates to the adapter's prepareSession() to write .mcp.json
|
|
14
|
+
* and inject skills, then runs transforms in declaration order.
|
|
10
15
|
*
|
|
11
16
|
* @throws Error if the adapter is not found, air.json is not found, or the specified root doesn't exist.
|
|
12
17
|
*/
|
|
13
18
|
export async function prepareSession(options) {
|
|
19
|
+
const airJsonPath = options?.config || getAirJsonPath();
|
|
20
|
+
if (!airJsonPath) {
|
|
21
|
+
throw new Error("No air.json found. Specify a config path or set AIR_CONFIG env var.");
|
|
22
|
+
}
|
|
23
|
+
// Use pre-loaded extensions or load from air.json
|
|
24
|
+
let loaded;
|
|
25
|
+
if (options?.extensions) {
|
|
26
|
+
loaded = options.extensions;
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
const airConfig = loadAirConfig(airJsonPath);
|
|
30
|
+
const airJsonDir = dirname(resolve(airJsonPath));
|
|
31
|
+
loaded = await loadExtensions(airConfig.extensions || [], airJsonDir);
|
|
32
|
+
}
|
|
33
|
+
// Find adapter: prefer extension-provided, fall back to registry
|
|
14
34
|
const adapterName = options?.adapter ?? "claude";
|
|
15
|
-
|
|
35
|
+
let adapter = loaded.adapters.find((ext) => ext.adapter?.name === adapterName)?.adapter ??
|
|
36
|
+
null;
|
|
37
|
+
if (!adapter) {
|
|
38
|
+
adapter = await findAdapter(adapterName);
|
|
39
|
+
}
|
|
16
40
|
if (!adapter) {
|
|
17
41
|
const available = await listAvailableAdapters();
|
|
18
42
|
const availableMsg = available.length > 0
|
|
@@ -20,11 +44,12 @@ export async function prepareSession(options) {
|
|
|
20
44
|
: "No adapters installed";
|
|
21
45
|
throw new Error(`No adapter found for "${adapterName}". ${availableMsg}.`);
|
|
22
46
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const artifacts = await resolveArtifacts(airJsonPath);
|
|
47
|
+
// Extract providers from extensions and resolve artifacts
|
|
48
|
+
const providers = loaded.providers
|
|
49
|
+
.map((ext) => ext.provider)
|
|
50
|
+
.filter(Boolean);
|
|
51
|
+
const artifacts = await resolveArtifacts(airJsonPath, { providers });
|
|
52
|
+
// Detect or validate root
|
|
28
53
|
let root;
|
|
29
54
|
let rootAutoDetected = false;
|
|
30
55
|
if (options?.root) {
|
|
@@ -40,12 +65,33 @@ export async function prepareSession(options) {
|
|
|
40
65
|
rootAutoDetected = true;
|
|
41
66
|
}
|
|
42
67
|
}
|
|
68
|
+
// Adapter writes .mcp.json and injects skills (no secret resolution)
|
|
43
69
|
const session = await adapter.prepareSession(artifacts, options?.target ?? process.cwd(), {
|
|
44
70
|
root,
|
|
45
71
|
skillOverrides: options?.skills,
|
|
46
72
|
mcpServerOverrides: options?.mcpServers,
|
|
47
73
|
skipSubagentMerge: options?.skipSubagentMerge,
|
|
48
74
|
});
|
|
75
|
+
// Run transforms in extension-list order on the written .mcp.json
|
|
76
|
+
const mcpConfigPath = session.configFiles.find((f) => f.endsWith(".mcp.json"));
|
|
77
|
+
if (loaded.transforms.length > 0 && mcpConfigPath) {
|
|
78
|
+
await runTransforms({
|
|
79
|
+
transforms: loaded.transforms,
|
|
80
|
+
mcpConfigPath,
|
|
81
|
+
targetDir: options?.target ?? process.cwd(),
|
|
82
|
+
root,
|
|
83
|
+
artifacts,
|
|
84
|
+
extensionOptions: options?.extensionOptions ?? {},
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
// Final validation: ensure no unresolved ${VAR} patterns remain
|
|
88
|
+
if (!options?.skipValidation && mcpConfigPath) {
|
|
89
|
+
const config = JSON.parse(readFileSync(mcpConfigPath, "utf-8"));
|
|
90
|
+
const unresolved = findUnresolvedVars(config);
|
|
91
|
+
if (unresolved.length > 0) {
|
|
92
|
+
throw new Error(unresolvedVarsMessage(mcpConfigPath, unresolved));
|
|
93
|
+
}
|
|
94
|
+
}
|
|
49
95
|
return { session, root, rootAutoDetected };
|
|
50
96
|
}
|
|
51
97
|
//# sourceMappingURL=prepare.js.map
|
package/dist/prepare.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepare.js","sourceRoot":"","sources":["../src/prepare.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"prepare.js","sourceRoot":"","sources":["../src/prepare.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACxC,OAAO,EACL,aAAa,EACb,cAAc,EACd,gBAAgB,GAGjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAyB,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM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EAAE,OAAO,EAAE,MAAM;QAC/B,kBAAkB,EAAE,OAAO,EAAE,UAAU;QACvC,iBAAiB,EAAE,OAAO,EAAE,iBAAiB;KAC9C,CACF,CAAC;IAEF,kEAAkE;IAClE,MAAM,aAAa,GAAG,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CACnD,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CACxB,CAAC;IAEF,IAAI,MAAM,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,IAAI,aAAa,EAAE,CAAC;QAClD,MAAM,aAAa,CAAC;YAClB,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,aAAa;YACb,SAAS,EAAE,OAAO,EAAE,MAAM,IAAI,OAAO,CAAC,GAAG,EAAE;YAC3C,IAAI;YACJ,SAAS;YACT,gBAAgB,EAAE,OAAO,EAAE,gBAAgB,IAAI,EAAE;SAClD,CAAC,CAAC;IACL,CAAC;IAED,gEAAgE;IAChE,IAAI,CAAC,OAAO,EAAE,cAAc,IAAI,aAAa,EAAE,CAAC;QAC9C,MAAM,MAAM,GAAc,IAAI,CAAC,KAAK,CAClC,YAAY,CAAC,aAAa,EAAE,OAAO,CAAC,CACrC,CAAC;QACF,MAAM,UAAU,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;QAC9C,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC;QACpE,CAAC;IACH,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;AAC7C,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { AirExtension, ResolvedArtifacts, RootEntry } from "@pulsemcp/air-core";
|
|
2
|
+
export interface RunTransformsOptions {
|
|
3
|
+
/** Extensions that provide transforms, in declaration order */
|
|
4
|
+
transforms: AirExtension[];
|
|
5
|
+
/** Path to the .mcp.json file to transform */
|
|
6
|
+
mcpConfigPath: string;
|
|
7
|
+
/** Target directory being prepared */
|
|
8
|
+
targetDir: string;
|
|
9
|
+
/** Root being activated */
|
|
10
|
+
root?: RootEntry;
|
|
11
|
+
/** Full resolved artifacts */
|
|
12
|
+
artifacts: ResolvedArtifacts;
|
|
13
|
+
/** Parsed CLI option values contributed by extensions */
|
|
14
|
+
extensionOptions: Record<string, unknown>;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Run transforms sequentially on the written .mcp.json file.
|
|
18
|
+
*
|
|
19
|
+
* Reads the current file, pipes it through each transform in
|
|
20
|
+
* declaration order, and writes the final result back.
|
|
21
|
+
* No-op if there are no transforms.
|
|
22
|
+
*/
|
|
23
|
+
export declare function runTransforms(opts: RunTransformsOptions): Promise<void>;
|
|
24
|
+
//# sourceMappingURL=transform-runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transform-runner.d.ts","sourceRoot":"","sources":["../src/transform-runner.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACV,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,oBAAoB;IACnC,+DAA+D;IAC/D,UAAU,EAAE,YAAY,EAAE,CAAC;IAC3B,8CAA8C;IAC9C,aAAa,EAAE,MAAM,CAAC;IACtB,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,2BAA2B;IAC3B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,8BAA8B;IAC9B,SAAS,EAAE,iBAAiB,CAAC;IAC7B,yDAAyD;IACzD,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC3C;AAED;;;;;;GAMG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CA4B7E"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { readFileSync, writeFileSync } from "fs";
|
|
2
|
+
/**
|
|
3
|
+
* Run transforms sequentially on the written .mcp.json file.
|
|
4
|
+
*
|
|
5
|
+
* Reads the current file, pipes it through each transform in
|
|
6
|
+
* declaration order, and writes the final result back.
|
|
7
|
+
* No-op if there are no transforms.
|
|
8
|
+
*/
|
|
9
|
+
export async function runTransforms(opts) {
|
|
10
|
+
const { transforms, mcpConfigPath, targetDir, root, artifacts, extensionOptions, } = opts;
|
|
11
|
+
if (transforms.length === 0)
|
|
12
|
+
return;
|
|
13
|
+
let config = JSON.parse(readFileSync(mcpConfigPath, "utf-8"));
|
|
14
|
+
const context = {
|
|
15
|
+
targetDir,
|
|
16
|
+
root,
|
|
17
|
+
artifacts,
|
|
18
|
+
options: extensionOptions,
|
|
19
|
+
mcpConfigPath,
|
|
20
|
+
};
|
|
21
|
+
for (const ext of transforms) {
|
|
22
|
+
if (!ext.transform)
|
|
23
|
+
continue;
|
|
24
|
+
config = await ext.transform.transform(config, context);
|
|
25
|
+
}
|
|
26
|
+
writeFileSync(mcpConfigPath, JSON.stringify(config, null, 2) + "\n");
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=transform-runner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transform-runner.js","sourceRoot":"","sources":["../src/transform-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAwBjD;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,IAA0B;IAC5D,MAAM,EACJ,UAAU,EACV,aAAa,EACb,SAAS,EACT,IAAI,EACJ,SAAS,EACT,gBAAgB,GACjB,GAAG,IAAI,CAAC;IAET,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAEpC,IAAI,MAAM,GAAc,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC;IAEzE,MAAM,OAAO,GAAqB;QAChC,SAAS;QACT,IAAI;QACJ,SAAS;QACT,OAAO,EAAE,gBAAgB;QACzB,aAAa;KACd,CAAC;IAEF,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;QAC7B,IAAI,CAAC,GAAG,CAAC,SAAS;YAAE,SAAS;QAC7B,MAAM,GAAG,MAAM,GAAG,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED,aAAa,CAAC,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;AACvE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { McpConfig } from "@pulsemcp/air-core";
|
|
2
|
+
/**
|
|
3
|
+
* Find all unresolved ${VAR} patterns in an MCP config.
|
|
4
|
+
* Recursively walks all string values in the entire config object.
|
|
5
|
+
*/
|
|
6
|
+
export declare function findUnresolvedVars(config: McpConfig): string[];
|
|
7
|
+
/**
|
|
8
|
+
* Validate that no unresolved ${VAR} patterns remain in the .mcp.json file.
|
|
9
|
+
* This is a final validation step that runs after all transforms complete.
|
|
10
|
+
*
|
|
11
|
+
* @throws Error listing all unresolved variables if any are found.
|
|
12
|
+
*/
|
|
13
|
+
export declare function validateNoUnresolvedVars(mcpConfigPath: string): void;
|
|
14
|
+
export declare function unresolvedVarsMessage(mcpConfigPath: string, unresolved: string[]): string;
|
|
15
|
+
//# sourceMappingURL=validate-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-config.d.ts","sourceRoot":"","sources":["../src/validate-config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAIpD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,EAAE,CAM9D;AAwBD;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAQpE;AAED,wBAAgB,qBAAqB,CACnC,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAAE,GACnB,MAAM,CAKR"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { readFileSync } from "fs";
|
|
2
|
+
const ENV_VAR_PATTERN = /\$\{([^}]+)\}/g;
|
|
3
|
+
/**
|
|
4
|
+
* Find all unresolved ${VAR} patterns in an MCP config.
|
|
5
|
+
* Recursively walks all string values in the entire config object.
|
|
6
|
+
*/
|
|
7
|
+
export function findUnresolvedVars(config) {
|
|
8
|
+
const vars = new Set();
|
|
9
|
+
if (config.mcpServers) {
|
|
10
|
+
walkValue(config.mcpServers, vars);
|
|
11
|
+
}
|
|
12
|
+
return [...vars];
|
|
13
|
+
}
|
|
14
|
+
function walkValue(value, vars) {
|
|
15
|
+
if (typeof value === "string") {
|
|
16
|
+
let match;
|
|
17
|
+
ENV_VAR_PATTERN.lastIndex = 0;
|
|
18
|
+
while ((match = ENV_VAR_PATTERN.exec(value)) !== null) {
|
|
19
|
+
vars.add(match[1]);
|
|
20
|
+
}
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
if (Array.isArray(value)) {
|
|
24
|
+
for (const item of value) {
|
|
25
|
+
walkValue(item, vars);
|
|
26
|
+
}
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
if (value !== null && typeof value === "object") {
|
|
30
|
+
for (const v of Object.values(value)) {
|
|
31
|
+
walkValue(v, vars);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Validate that no unresolved ${VAR} patterns remain in the .mcp.json file.
|
|
37
|
+
* This is a final validation step that runs after all transforms complete.
|
|
38
|
+
*
|
|
39
|
+
* @throws Error listing all unresolved variables if any are found.
|
|
40
|
+
*/
|
|
41
|
+
export function validateNoUnresolvedVars(mcpConfigPath) {
|
|
42
|
+
const config = JSON.parse(readFileSync(mcpConfigPath, "utf-8"));
|
|
43
|
+
const unresolved = findUnresolvedVars(config);
|
|
44
|
+
if (unresolved.length > 0) {
|
|
45
|
+
throw new Error(unresolvedVarsMessage(mcpConfigPath, unresolved));
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export function unresolvedVarsMessage(mcpConfigPath, unresolved) {
|
|
49
|
+
return (`Unresolved variable${unresolved.length === 1 ? "" : "s"} in ${mcpConfigPath}: ${unresolved.map((v) => `\${${v}}`).join(", ")}. ` +
|
|
50
|
+
`Ensure all variables are provided via environment or a secrets transform.`);
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=validate-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-config.js","sourceRoot":"","sources":["../src/validate-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAGlC,MAAM,eAAe,GAAG,gBAAgB,CAAC;AAEzC;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAAiB;IAClD,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;QACtB,SAAS,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IACrC,CAAC;IACD,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;AACnB,CAAC;AAED,SAAS,SAAS,CAAC,KAAc,EAAE,IAAiB;IAClD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,IAAI,KAAK,CAAC;QACV,eAAe,CAAC,SAAS,GAAG,CAAC,CAAC;QAC9B,OAAO,CAAC,KAAK,GAAG,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;YACtD,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC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|
2
2
|
"name": "@pulsemcp/air-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"lint": "tsc --noEmit"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@pulsemcp/air-core": "0.0.
|
|
32
|
+
"@pulsemcp/air-core": "0.0.10"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/node": "^22.10.0",
|