@pulsemcp/air-cli 0.0.37 → 0.0.39
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/commands/deprecated-flags.d.ts +10 -6
- package/dist/commands/deprecated-flags.d.ts.map +1 -1
- package/dist/commands/deprecated-flags.js +14 -12
- package/dist/commands/deprecated-flags.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +19 -5
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/prepare.js +2 -2
- package/dist/commands/start.js +2 -2
- package/package.json +2 -2
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* (renamed in v0.0.32). Both `air start` and `air prepare` use
|
|
4
|
-
* `.allowUnknownOption(true)` so these would otherwise be silently dropped
|
|
2
|
+
* Hard-errors if the user invoked any of the old plural artifact-selection
|
|
3
|
+
* flags (renamed in v0.0.32). Both `air start` and `air prepare` use
|
|
4
|
+
* `.allowUnknownOption(true)` so these would otherwise be silently dropped —
|
|
5
|
+
* see https://github.com/pulsemcp/air/issues/95 for an incident where this
|
|
6
|
+
* caused a session to spin up missing its plugins.
|
|
5
7
|
*
|
|
6
|
-
* `start` forwards everything after `--` to the agent, so the scan stops
|
|
7
|
-
* to avoid
|
|
8
|
+
* `start` forwards everything after `--` to the agent, so the scan stops
|
|
9
|
+
* there to avoid rejecting agent flags that happen to share a name.
|
|
10
|
+
*
|
|
11
|
+
* Exits the process with code 1 on the first deprecated flag encountered.
|
|
8
12
|
*/
|
|
9
|
-
export declare function
|
|
13
|
+
export declare function rejectDeprecatedArtifactFlags(argv: readonly string[]): void;
|
|
10
14
|
//# sourceMappingURL=deprecated-flags.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deprecated-flags.d.ts","sourceRoot":"","sources":["../../src/commands/deprecated-flags.ts"],"names":[],"mappings":"AAWA
|
|
1
|
+
{"version":3,"file":"deprecated-flags.d.ts","sourceRoot":"","sources":["../../src/commands/deprecated-flags.ts"],"names":[],"mappings":"AAWA;;;;;;;;;;;GAWG;AACH,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAc3E"}
|
|
@@ -9,25 +9,27 @@ const RENAMED_FLAGS = {
|
|
|
9
9
|
"--without-plugins": "--without-plugin",
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
* (renamed in v0.0.32). Both `air start` and `air prepare` use
|
|
14
|
-
* `.allowUnknownOption(true)` so these would otherwise be silently dropped
|
|
12
|
+
* Hard-errors if the user invoked any of the old plural artifact-selection
|
|
13
|
+
* flags (renamed in v0.0.32). Both `air start` and `air prepare` use
|
|
14
|
+
* `.allowUnknownOption(true)` so these would otherwise be silently dropped —
|
|
15
|
+
* see https://github.com/pulsemcp/air/issues/95 for an incident where this
|
|
16
|
+
* caused a session to spin up missing its plugins.
|
|
15
17
|
*
|
|
16
|
-
* `start` forwards everything after `--` to the agent, so the scan stops
|
|
17
|
-
* to avoid
|
|
18
|
+
* `start` forwards everything after `--` to the agent, so the scan stops
|
|
19
|
+
* there to avoid rejecting agent flags that happen to share a name.
|
|
20
|
+
*
|
|
21
|
+
* Exits the process with code 1 on the first deprecated flag encountered.
|
|
18
22
|
*/
|
|
19
|
-
export function
|
|
23
|
+
export function rejectDeprecatedArtifactFlags(argv) {
|
|
20
24
|
const dashDashIdx = argv.indexOf("--");
|
|
21
25
|
const scan = dashDashIdx === -1 ? argv : argv.slice(0, dashDashIdx);
|
|
22
|
-
const seen = new Set();
|
|
23
26
|
for (const arg of scan) {
|
|
24
27
|
const base = arg.includes("=") ? arg.slice(0, arg.indexOf("=")) : arg;
|
|
25
28
|
const replacement = RENAMED_FLAGS[base];
|
|
26
|
-
if (replacement
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
`The old flag is being ignored.`);
|
|
29
|
+
if (replacement) {
|
|
30
|
+
console.error(`Error: ${base} was renamed to ${replacement} in v0.0.32 and is no longer accepted.\n` +
|
|
31
|
+
` Pass multiple IDs as \`${replacement} a b\` or by repeating the flag (\`${replacement} a ${replacement} b\`).`);
|
|
32
|
+
process.exit(1);
|
|
31
33
|
}
|
|
32
34
|
}
|
|
33
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deprecated-flags.js","sourceRoot":"","sources":["../../src/commands/deprecated-flags.ts"],"names":[],"mappings":"AAAA,MAAM,aAAa,GAA2B;IAC5C,UAAU,EAAE,SAAS;IACrB,eAAe,EAAE,cAAc;IAC/B,SAAS,EAAE,QAAQ;IACnB,WAAW,EAAE,UAAU;IACvB,kBAAkB,EAAE,iBAAiB;IACrC,uBAAuB,EAAE,sBAAsB;IAC/C,iBAAiB,EAAE,gBAAgB;IACnC,mBAAmB,EAAE,kBAAkB;CACxC,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"deprecated-flags.js","sourceRoot":"","sources":["../../src/commands/deprecated-flags.ts"],"names":[],"mappings":"AAAA,MAAM,aAAa,GAA2B;IAC5C,UAAU,EAAE,SAAS;IACrB,eAAe,EAAE,cAAc;IAC/B,SAAS,EAAE,QAAQ;IACnB,WAAW,EAAE,UAAU;IACvB,kBAAkB,EAAE,iBAAiB;IACrC,uBAAuB,EAAE,sBAAsB;IAC/C,iBAAiB,EAAE,gBAAgB;IACnC,mBAAmB,EAAE,kBAAkB;CACxC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,6BAA6B,CAAC,IAAuB;IACnE,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,MAAM,IAAI,GAAG,WAAW,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;IACpE,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,IAAI,GAAG,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;QACtE,MAAM,WAAW,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,WAAW,EAAE,CAAC;YAChB,OAAO,CAAC,KAAK,CACX,UAAU,IAAI,mBAAmB,WAAW,0CAA0C;gBACpF,iCAAiC,WAAW,sCAAsC,WAAW,MAAM,WAAW,QAAQ,CACzH,CAAC;YACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,wBAAgB,WAAW,IAAI,OAAO,
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,wBAAgB,WAAW,IAAI,OAAO,CAuGrC"}
|
package/dist/commands/init.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { relative } from "path";
|
|
2
2
|
import { Command } from "commander";
|
|
3
|
-
import { smartInit
|
|
3
|
+
import { smartInit } from "@pulsemcp/air-sdk";
|
|
4
4
|
export function initCommand() {
|
|
5
5
|
const cmd = new Command("init")
|
|
6
6
|
.description("Initialize an AIR configuration — discovers artifact files in the current git repo and generates ~/.air/air.json with GitHub resolvers, or scaffolds a blank ~/.air/ workspace when no repo is detected")
|
|
@@ -30,6 +30,24 @@ export function initCommand() {
|
|
|
30
30
|
console.log(`\nConfig written to ${result.airJsonPath}`);
|
|
31
31
|
console.log("Local entries in the index files above override the discovered catalog by ID.");
|
|
32
32
|
}
|
|
33
|
+
else if (result.mode === "topup") {
|
|
34
|
+
if (result.scaffolded.length === 0) {
|
|
35
|
+
console.log(`AIR configuration at ${result.airDir} is already fully scaffolded — nothing to do.`);
|
|
36
|
+
console.log("To regenerate air.json from scratch, re-run with --force.");
|
|
37
|
+
console.log("\nValidate anytime with: air validate " + result.airJsonPath);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
console.log(`Topped up existing AIR configuration at ${result.airDir}`);
|
|
41
|
+
console.log(`\nAdded ${result.scaffolded.length} missing file(s):`);
|
|
42
|
+
for (const file of result.scaffolded) {
|
|
43
|
+
console.log(` [${file.kind}] ${relative(result.airDir, file.path)}`);
|
|
44
|
+
}
|
|
45
|
+
console.log("\nYour existing air.json was left untouched. Open the directory" +
|
|
46
|
+
"\nin your editor — each new index file has a $schema reference," +
|
|
47
|
+
"\nso you'll get autocomplete as you add entries.");
|
|
48
|
+
console.log("\nValidate anytime with: air validate " + result.airJsonPath);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
33
51
|
else {
|
|
34
52
|
console.log(`Initialized AIR configuration at ${result.airDir}`);
|
|
35
53
|
console.log(`\nScaffolded ${result.scaffolded.length} file(s):`);
|
|
@@ -43,10 +61,6 @@ export function initCommand() {
|
|
|
43
61
|
}
|
|
44
62
|
}
|
|
45
63
|
catch (err) {
|
|
46
|
-
if (err instanceof InitFromRepoError && err.code === "EXISTS") {
|
|
47
|
-
console.error(`Error: ${err.message} Use --force to overwrite.`);
|
|
48
|
-
process.exit(1);
|
|
49
|
-
}
|
|
50
64
|
const message = err instanceof Error ? err.message : "Unknown error";
|
|
51
65
|
console.error(`Error: ${message}`);
|
|
52
66
|
process.exit(1);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAA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AC,EAAE,CACzD,CAAC;oBACJ,CAAC;oBACD,OAAO,CAAC,GAAG,CACT,iEAAiE;wBAC/D,iEAAiE;wBACjE,kDAAkD,CACrD,CAAC;oBACF,OAAO,CAAC,GAAG,CACT,wCAAwC,GAAG,MAAM,CAAC,WAAW,CAC9D,CAAC;gBACJ,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,GAAG,CACT,oCAAoC,MAAM,CAAC,MAAM,EAAE,CACpD,CAAC;gBACF,OAAO,CAAC,GAAG,CAAC,gBAAgB,MAAM,CAAC,UAAU,CAAC,MAAM,WAAW,CAAC,CAAC;gBACjE,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;oBACrC,OAAO,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBACxE,CAAC;gBACD,OAAO,CAAC,GAAG,CACT,qEAAqE;oBACnE,6DAA6D;oBAC7D,0DAA0D,CAC7D,CAAC;gBACF,OAAO,CAAC,GAAG,CACT,wCAAwC,GAAG,MAAM,CAAC,WAAW,CAC9D,CAAC;YACJ,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,OAAO,GACX,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;YACvD,OAAO,CAAC,KAAK,CAAC,UAAU,OAAO,EAAE,CAAC,CAAC;YACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;IAEL,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/commands/prepare.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { dirname, resolve } from "path";
|
|
2
2
|
import { Command } from "commander";
|
|
3
3
|
import { prepareSession, loadAirConfig, getAirJsonPath, loadExtensions, } from "@pulsemcp/air-sdk";
|
|
4
|
-
import {
|
|
4
|
+
import { rejectDeprecatedArtifactFlags } from "./deprecated-flags.js";
|
|
5
5
|
import { parseGitProtocolFlag } from "./git-protocol.js";
|
|
6
6
|
/**
|
|
7
7
|
* Extract the flag name from a Commander flag string.
|
|
@@ -51,7 +51,7 @@ export function prepareCommand() {
|
|
|
51
51
|
.option("--git-protocol <protocol>", "Protocol used by git-based catalog providers: \"ssh\" (default) or \"https\". Overrides the gitProtocol field in air.json.")
|
|
52
52
|
.allowUnknownOption(true)
|
|
53
53
|
.action(async (adapter, options) => {
|
|
54
|
-
|
|
54
|
+
rejectDeprecatedArtifactFlags(process.argv);
|
|
55
55
|
const gitProtocol = parseGitProtocolFlag(options.gitProtocol);
|
|
56
56
|
try {
|
|
57
57
|
// Load extensions once — pass to SDK to avoid double loading
|
package/dist/commands/start.js
CHANGED
|
@@ -2,7 +2,7 @@ import { spawn } from "child_process";
|
|
|
2
2
|
import { Command } from "commander";
|
|
3
3
|
import { startSession, prepareSession, detectRoot, computeMergedDefaults, resolveCategoryOverride, } from "@pulsemcp/air-sdk";
|
|
4
4
|
import { runInteractiveSelector } from "../tui/interactive-selector.js";
|
|
5
|
-
import {
|
|
5
|
+
import { rejectDeprecatedArtifactFlags } from "./deprecated-flags.js";
|
|
6
6
|
import { parseGitProtocolFlag } from "./git-protocol.js";
|
|
7
7
|
export function startCommand() {
|
|
8
8
|
const cmd = new Command("start")
|
|
@@ -26,7 +26,7 @@ export function startCommand() {
|
|
|
26
26
|
.action(async (agent, options) => {
|
|
27
27
|
const dashDashIdx = process.argv.indexOf("--");
|
|
28
28
|
const passthroughArgs = dashDashIdx !== -1 ? process.argv.slice(dashDashIdx + 1) : [];
|
|
29
|
-
|
|
29
|
+
rejectDeprecatedArtifactFlags(process.argv);
|
|
30
30
|
const gitProtocol = parseGitProtocolFlag(options.gitProtocol);
|
|
31
31
|
let result;
|
|
32
32
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pulsemcp/air-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.39",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"lint": "tsc --noEmit"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@pulsemcp/air-sdk": "0.0.
|
|
29
|
+
"@pulsemcp/air-sdk": "0.0.39",
|
|
30
30
|
"commander": "^12.1.0",
|
|
31
31
|
"chalk": "^5.3.0"
|
|
32
32
|
},
|