borgmcp 4.6.2 → 4.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/dist/assimilate-cmd.d.ts +8 -23
- package/dist/assimilate-cmd.d.ts.map +1 -1
- package/dist/assimilate-cmd.js +8 -5
- package/dist/assimilate-cmd.js.map +1 -1
- package/dist/assimilate-deps.d.ts.map +1 -1
- package/dist/assimilate-deps.js +1 -2
- package/dist/assimilate-deps.js.map +1 -1
- package/dist/cli-help.d.ts.map +1 -1
- package/dist/cli-help.js +1 -0
- package/dist/cli-help.js.map +1 -1
- package/dist/codex-launch.d.ts +1 -1
- package/dist/codex-launch.d.ts.map +1 -1
- package/dist/codex-launch.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +55 -18
- package/dist/config.js.map +1 -1
- package/dist/cubes.d.ts +0 -7
- package/dist/cubes.d.ts.map +1 -1
- package/dist/cubes.js +0 -9
- package/dist/cubes.js.map +1 -1
- package/dist/gc-orphan-inboxes.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -46
- package/dist/index.js.map +1 -1
- package/dist/log-stream.d.ts +6 -16
- package/dist/log-stream.d.ts.map +1 -1
- package/dist/log-stream.js.map +1 -1
- package/dist/quickstart-cmd.d.ts.map +1 -1
- package/dist/quickstart-cmd.js +9 -2
- package/dist/quickstart-cmd.js.map +1 -1
- package/dist/regen-format.d.ts +1 -2
- package/dist/regen-format.d.ts.map +1 -1
- package/dist/regen-format.js.map +1 -1
- package/dist/regen.js +1 -1
- package/dist/regen.js.map +1 -1
- package/dist/remote-client.d.ts.map +1 -1
- package/dist/remote-client.js +8 -8
- package/dist/remote-client.js.map +1 -1
- package/dist/repository-cube-init.d.ts +1 -1
- package/dist/repository-cube-init.d.ts.map +1 -1
- package/dist/repository-cube-init.js +2 -5
- package/dist/repository-cube-init.js.map +1 -1
- package/dist/repository-identity.d.ts +14 -4
- package/dist/repository-identity.d.ts.map +1 -1
- package/dist/repository-identity.js +86 -18
- package/dist/repository-identity.js.map +1 -1
- package/dist/self-path.d.ts.map +1 -1
- package/dist/self-path.js.map +1 -1
- package/dist/server-handshake.d.ts +1 -1
- package/dist/server-handshake.d.ts.map +1 -1
- package/dist/server-handshake.js +0 -1
- package/dist/server-handshake.js.map +1 -1
- package/dist/tool-manifest.js +3 -3
- package/dist/tool-manifest.js.map +1 -1
- package/dist/unknown-subcommand.d.ts +1 -1
- package/dist/unknown-subcommand.d.ts.map +1 -1
- package/dist/unknown-subcommand.js +1 -0
- package/dist/unknown-subcommand.js.map +1 -1
- package/dist/update-cmd.js +1 -1
- package/dist/update-cmd.js.map +1 -1
- package/docs/RELEASING.md +5 -4
- package/package.json +2 -2
- package/src/assimilate-cmd.ts +28 -37
- package/src/assimilate-deps.ts +0 -4
- package/src/cli-help.ts +1 -0
- package/src/codex-launch.ts +2 -1
- package/src/config.ts +58 -22
- package/src/cubes.ts +0 -10
- package/src/gc-orphan-inboxes.ts +1 -1
- package/src/index.ts +17 -50
- package/src/log-stream.ts +12 -17
- package/src/quickstart-cmd.ts +10 -2
- package/src/regen-format.ts +1 -3
- package/src/regen.ts +2 -3
- package/src/remote-client.ts +12 -9
- package/src/repository-cube-init.ts +3 -6
- package/src/repository-identity.ts +125 -20
- package/src/self-path.ts +0 -1
- package/src/server-handshake.ts +1 -2
- package/src/tool-manifest.ts +3 -3
- package/src/unknown-subcommand.ts +1 -0
- package/src/update-cmd.ts +1 -1
- package/dist/postinstall-banner.d.ts +0 -2
- package/dist/postinstall-banner.d.ts.map +0 -1
- package/dist/postinstall-banner.js +0 -27
- package/dist/postinstall-banner.js.map +0 -1
- package/dist/postinstall.d.ts +0 -11
- package/dist/postinstall.d.ts.map +0 -1
- package/dist/postinstall.js +0 -33
- package/dist/postinstall.js.map +0 -1
- package/dist/types.d.ts +0 -5
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -5
- package/dist/types.js.map +0 -1
- package/src/postinstall-banner.ts +0 -37
- package/src/postinstall.ts +0 -36
- package/src/types.ts +0 -5
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postinstall.d.ts","sourceRoot":"","sources":["../src/postinstall.ts"],"names":[],"mappings":";AACA;;;;;;;GAOG"}
|
package/dist/postinstall.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Post-install script
|
|
4
|
-
*
|
|
5
|
-
* Detects local vs global installation and rejects local installs.
|
|
6
|
-
* gh#653 B1: also detects whether an agent CLI (Claude Code / Codex) is present
|
|
7
|
-
* and adjusts the "next step" banner so a user with no agent CLI is told to
|
|
8
|
-
* install one FIRST rather than being sent into `borg setup`'s dead-end.
|
|
9
|
-
*/
|
|
10
|
-
import { detectCliAvailability, installedCliNames } from './cli-platform.js';
|
|
11
|
-
import { composeInstallBanner } from './postinstall-banner.js';
|
|
12
|
-
// Check if this is a local install (npm_config_global is not set)
|
|
13
|
-
const isGlobal = process.env.npm_config_global === 'true';
|
|
14
|
-
if (!isGlobal) {
|
|
15
|
-
console.error('\n◼ Error: borg must be installed globally\n');
|
|
16
|
-
console.error('Please install with:');
|
|
17
|
-
console.error(' npm install -g borgmcp\n');
|
|
18
|
-
console.error('Local installation is not supported.\n');
|
|
19
|
-
process.exit(1);
|
|
20
|
-
}
|
|
21
|
-
// Global install — show instructions. Detect agent-CLI presence so the banner
|
|
22
|
-
// never points a user with no Claude Code / Codex at `borg setup` (which would
|
|
23
|
-
// dead-end). On any detection error, default to assuming an agent CLI is
|
|
24
|
-
// present so we never emit a false "install an agent CLI" warning.
|
|
25
|
-
let hasAgentCli = true;
|
|
26
|
-
try {
|
|
27
|
-
hasAgentCli = installedCliNames(detectCliAvailability()).length > 0;
|
|
28
|
-
}
|
|
29
|
-
catch {
|
|
30
|
-
hasAgentCli = true;
|
|
31
|
-
}
|
|
32
|
-
console.log(composeInstallBanner(hasAgentCli));
|
|
33
|
-
//# sourceMappingURL=postinstall.js.map
|
package/dist/postinstall.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postinstall.js","sourceRoot":"","sources":["../src/postinstall.ts"],"names":[],"mappings":";AACA;;;;;;;GAOG;AAEH,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE/D,kEAAkE;AAClE,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,KAAK,MAAM,CAAC;AAE1D,IAAI,CAAC,QAAQ,EAAE,CAAC;IACd,OAAO,CAAC,KAAK,CAAC,8CAA8C,CAAC,CAAC;IAC9D,OAAO,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;IACtC,OAAO,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;IAC5C,OAAO,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC;IACxD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,8EAA8E;AAC9E,+EAA+E;AAC/E,yEAAyE;AACzE,mEAAmE;AACnE,IAAI,WAAW,GAAG,IAAI,CAAC;AACvB,IAAI,CAAC;IACH,WAAW,GAAG,iBAAiB,CAAC,qBAAqB,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;AACtE,CAAC;AAAC,MAAM,CAAC;IACP,WAAW,GAAG,IAAI,CAAC;AACrB,CAAC;AAED,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,WAAW,CAAC,CAAC,CAAC"}
|
package/dist/types.d.ts
DELETED
package/dist/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC"}
|
package/dist/types.js
DELETED
package/dist/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// Pure builder for the post-install banner text. Kept separate from
|
|
2
|
-
// postinstall.ts (which is a side-effectful entry script that runs detection
|
|
3
|
-
// + console output + process.exit on import) so the message content is unit-
|
|
4
|
-
// testable without triggering those side effects.
|
|
5
|
-
//
|
|
6
|
-
// gh#653 B1: a non-expert who installs borgmcp WITHOUT an agent CLI (Claude
|
|
7
|
-
// Code / Codex) present would otherwise be sent straight to "Next step: borg
|
|
8
|
-
// setup", which dead-ends at "No supported agent CLI found". When no agent CLI
|
|
9
|
-
// is detected, surface the install-an-agent-CLI step FIRST so the banner never
|
|
10
|
-
// points the user into a wall.
|
|
11
|
-
|
|
12
|
-
export function composeInstallBanner(hasAgentCli: boolean): string {
|
|
13
|
-
const lines = [
|
|
14
|
-
'',
|
|
15
|
-
'╔════════════════════════════════════╗',
|
|
16
|
-
'║ ◼ Borg MCP Installed ◼ ║',
|
|
17
|
-
'╚════════════════════════════════════╝',
|
|
18
|
-
'',
|
|
19
|
-
];
|
|
20
|
-
|
|
21
|
-
if (!hasAgentCli) {
|
|
22
|
-
lines.push(
|
|
23
|
-
'⚠ No agent CLI detected. Borg runs on top of Claude Code or Codex —',
|
|
24
|
-
' install one first:',
|
|
25
|
-
' Claude Code: https://claude.ai/download',
|
|
26
|
-
' Codex: https://developers.openai.com/codex',
|
|
27
|
-
'',
|
|
28
|
-
'Then run:',
|
|
29
|
-
' borg setup',
|
|
30
|
-
'',
|
|
31
|
-
);
|
|
32
|
-
} else {
|
|
33
|
-
lines.push('Next step:', ' borg setup', '');
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return lines.join('\n');
|
|
37
|
-
}
|
package/src/postinstall.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Post-install script
|
|
4
|
-
*
|
|
5
|
-
* Detects local vs global installation and rejects local installs.
|
|
6
|
-
* gh#653 B1: also detects whether an agent CLI (Claude Code / Codex) is present
|
|
7
|
-
* and adjusts the "next step" banner so a user with no agent CLI is told to
|
|
8
|
-
* install one FIRST rather than being sent into `borg setup`'s dead-end.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import { detectCliAvailability, installedCliNames } from './cli-platform.js';
|
|
12
|
-
import { composeInstallBanner } from './postinstall-banner.js';
|
|
13
|
-
|
|
14
|
-
// Check if this is a local install (npm_config_global is not set)
|
|
15
|
-
const isGlobal = process.env.npm_config_global === 'true';
|
|
16
|
-
|
|
17
|
-
if (!isGlobal) {
|
|
18
|
-
console.error('\n◼ Error: borg must be installed globally\n');
|
|
19
|
-
console.error('Please install with:');
|
|
20
|
-
console.error(' npm install -g borgmcp\n');
|
|
21
|
-
console.error('Local installation is not supported.\n');
|
|
22
|
-
process.exit(1);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// Global install — show instructions. Detect agent-CLI presence so the banner
|
|
26
|
-
// never points a user with no Claude Code / Codex at `borg setup` (which would
|
|
27
|
-
// dead-end). On any detection error, default to assuming an agent CLI is
|
|
28
|
-
// present so we never emit a false "install an agent CLI" warning.
|
|
29
|
-
let hasAgentCli = true;
|
|
30
|
-
try {
|
|
31
|
-
hasAgentCli = installedCliNames(detectCliAvailability()).length > 0;
|
|
32
|
-
} catch {
|
|
33
|
-
hasAgentCli = true;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
console.log(composeInstallBanner(hasAgentCli));
|