@pleri/olam-cli 0.1.112 → 0.1.113
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/mcp/index.d.ts +6 -3
- package/dist/commands/mcp/index.d.ts.map +1 -1
- package/dist/commands/mcp/index.js +13 -4
- package/dist/commands/mcp/index.js.map +1 -1
- package/dist/commands/mcp/install-shared.d.ts +22 -0
- package/dist/commands/mcp/install-shared.d.ts.map +1 -0
- package/dist/commands/mcp/install-shared.js +29 -0
- package/dist/commands/mcp/install-shared.js.map +1 -0
- package/dist/commands/mcp/install.d.ts +20 -0
- package/dist/commands/mcp/install.d.ts.map +1 -0
- package/dist/commands/mcp/install.js +59 -0
- package/dist/commands/mcp/install.js.map +1 -0
- package/dist/commands/mcp/serve.d.ts +12 -0
- package/dist/commands/mcp/serve.d.ts.map +1 -0
- package/dist/commands/mcp/serve.js +36 -0
- package/dist/commands/mcp/serve.js.map +1 -0
- package/dist/commands/mcp/uninstall.d.ts +20 -0
- package/dist/commands/mcp/uninstall.d.ts.map +1 -0
- package/dist/commands/mcp/uninstall.js +69 -0
- package/dist/commands/mcp/uninstall.js.map +1 -0
- package/dist/image-digests.json +4 -4
- package/dist/index.js +228 -62
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* olam mcp — MCP credential
|
|
2
|
+
* olam mcp — MCP server + credential + wiring verb namespace.
|
|
3
3
|
*
|
|
4
|
-
* Subcommands: login, add, list, remove, status, import
|
|
4
|
+
* Subcommands: serve, install, uninstall, login, add, list, remove, status, import, revoke
|
|
5
5
|
* Discoverable via: olam mcp --help
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* `serve` runs the local MCP server over stdio (consumed by Claude Code).
|
|
8
|
+
* `install` / `uninstall` shell to `claude mcp add` / `claude mcp remove`
|
|
9
|
+
* to wire olam in and out of Claude Code.
|
|
10
|
+
* The remaining subcommands manage MCP credentials used by worlds.
|
|
8
11
|
*/
|
|
9
12
|
import type { Command } from 'commander';
|
|
10
13
|
export declare function registerMcp(program: Command): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/mcp/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/mcp/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYzC,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAelD"}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* olam mcp — MCP credential
|
|
2
|
+
* olam mcp — MCP server + credential + wiring verb namespace.
|
|
3
3
|
*
|
|
4
|
-
* Subcommands: login, add, list, remove, status, import
|
|
4
|
+
* Subcommands: serve, install, uninstall, login, add, list, remove, status, import, revoke
|
|
5
5
|
* Discoverable via: olam mcp --help
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* `serve` runs the local MCP server over stdio (consumed by Claude Code).
|
|
8
|
+
* `install` / `uninstall` shell to `claude mcp add` / `claude mcp remove`
|
|
9
|
+
* to wire olam in and out of Claude Code.
|
|
10
|
+
* The remaining subcommands manage MCP credentials used by worlds.
|
|
8
11
|
*/
|
|
12
|
+
import { registerMcpServe } from './serve.js';
|
|
13
|
+
import { registerMcpInstall } from './install.js';
|
|
14
|
+
import { registerMcpUninstall } from './uninstall.js';
|
|
9
15
|
import { registerMcpLogin } from './login.js';
|
|
10
16
|
import { registerMcpAdd } from './add.js';
|
|
11
17
|
import { registerMcpList } from './list.js';
|
|
@@ -16,7 +22,10 @@ import { registerMcpRevoke } from './revoke.js';
|
|
|
16
22
|
export function registerMcp(program) {
|
|
17
23
|
const mcp = program
|
|
18
24
|
.command('mcp')
|
|
19
|
-
.description('
|
|
25
|
+
.description('Run the olam MCP server, wire it into Claude Code, or manage MCP credentials (serve, install, uninstall, login, add, list, remove, import, revoke)');
|
|
26
|
+
registerMcpServe(mcp);
|
|
27
|
+
registerMcpInstall(mcp);
|
|
28
|
+
registerMcpUninstall(mcp);
|
|
20
29
|
registerMcpLogin(mcp);
|
|
21
30
|
registerMcpAdd(mcp);
|
|
22
31
|
registerMcpList(mcp);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/mcp/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/mcp/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,UAAU,WAAW,CAAC,OAAgB;IAC1C,MAAM,GAAG,GAAG,OAAO;SAChB,OAAO,CAAC,KAAK,CAAC;SACd,WAAW,CAAC,oJAAoJ,CAAC,CAAC;IAErK,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACtB,kBAAkB,CAAC,GAAG,CAAC,CAAC;IACxB,oBAAoB,CAAC,GAAG,CAAC,CAAC;IAC1B,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACtB,cAAc,CAAC,GAAG,CAAC,CAAC;IACpB,eAAe,CAAC,GAAG,CAAC,CAAC;IACrB,iBAAiB,CAAC,GAAG,CAAC,CAAC;IACvB,iBAAiB,CAAC,GAAG,CAAC,CAAC;IACvB,iBAAiB,CAAC,GAAG,CAAC,CAAC;IACvB,iBAAiB,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared types + helpers for `olam mcp install` and `olam mcp uninstall`.
|
|
3
|
+
*
|
|
4
|
+
* Both subcommands shell out to `claude mcp add`/`claude mcp remove`, take
|
|
5
|
+
* a `--scope` flag with the same enum, and need a `which`-style PATH probe.
|
|
6
|
+
* Living in a sibling file keeps the seam injectable without spreading
|
|
7
|
+
* duplicate helpers across two files.
|
|
8
|
+
*/
|
|
9
|
+
import { type SpawnSyncReturns } from 'node:child_process';
|
|
10
|
+
export type McpScope = 'user' | 'project' | 'local';
|
|
11
|
+
export interface ClaudeShellDeps {
|
|
12
|
+
spawn: (cmd: string, args: string[], opts: {
|
|
13
|
+
encoding: 'utf8';
|
|
14
|
+
stdio: ['ignore', 'pipe', 'pipe' | 'ignore'];
|
|
15
|
+
}) => SpawnSyncReturns<string>;
|
|
16
|
+
log: (msg: string) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const DEFAULT_CLAUDE_SHELL_DEPS: ClaudeShellDeps;
|
|
19
|
+
export declare function isOnPath(deps: ClaudeShellDeps, bin: string): boolean;
|
|
20
|
+
export declare function normaliseScope(raw: string | undefined): McpScope | null;
|
|
21
|
+
export declare const REMEDY_CLAUDE_MISSING: string;
|
|
22
|
+
//# sourceMappingURL=install-shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install-shared.d.ts","sourceRoot":"","sources":["../../../src/commands/mcp/install-shared.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAa,KAAK,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtE,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AAEpD,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,CACL,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EAAE,EACd,IAAI,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAG,QAAQ,CAAC,CAAA;KAAE,KACrE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC9B,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5B;AAED,eAAO,MAAM,yBAAyB,EAAE,eAGvC,CAAC;AAEF,wBAAgB,QAAQ,CAAC,IAAI,EAAE,eAAe,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAQpE;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,IAAI,CAGvE;AAED,eAAO,MAAM,qBAAqB,QAEwC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared types + helpers for `olam mcp install` and `olam mcp uninstall`.
|
|
3
|
+
*
|
|
4
|
+
* Both subcommands shell out to `claude mcp add`/`claude mcp remove`, take
|
|
5
|
+
* a `--scope` flag with the same enum, and need a `which`-style PATH probe.
|
|
6
|
+
* Living in a sibling file keeps the seam injectable without spreading
|
|
7
|
+
* duplicate helpers across two files.
|
|
8
|
+
*/
|
|
9
|
+
import { spawnSync } from 'node:child_process';
|
|
10
|
+
export const DEFAULT_CLAUDE_SHELL_DEPS = {
|
|
11
|
+
spawn: spawnSync,
|
|
12
|
+
log: (msg) => console.log(msg),
|
|
13
|
+
};
|
|
14
|
+
export function isOnPath(deps, bin) {
|
|
15
|
+
// Mirror `auth.ts` / `login.ts` win32 handling: `where` is the Windows equivalent of `which`.
|
|
16
|
+
const probe = process.platform === 'win32' ? 'where' : 'which';
|
|
17
|
+
const result = deps.spawn(probe, [bin], {
|
|
18
|
+
encoding: 'utf8',
|
|
19
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
20
|
+
});
|
|
21
|
+
return result.status === 0;
|
|
22
|
+
}
|
|
23
|
+
export function normaliseScope(raw) {
|
|
24
|
+
const value = (raw ?? 'user').toLowerCase();
|
|
25
|
+
return value === 'user' || value === 'project' || value === 'local' ? value : null;
|
|
26
|
+
}
|
|
27
|
+
export const REMEDY_CLAUDE_MISSING = '`claude` not found on PATH. Install Claude Code (https://docs.claude.com/claude-code) ' +
|
|
28
|
+
'or paste the JSON snippet from docs/architecture/mcp-as-npx-served.md.';
|
|
29
|
+
//# sourceMappingURL=install-shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install-shared.js","sourceRoot":"","sources":["../../../src/commands/mcp/install-shared.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,SAAS,EAAyB,MAAM,oBAAoB,CAAC;AAatE,MAAM,CAAC,MAAM,yBAAyB,GAAoB;IACxD,KAAK,EAAE,SAAS;IAChB,GAAG,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC;CACvC,CAAC;AAEF,MAAM,UAAU,QAAQ,CAAC,IAAqB,EAAE,GAAW;IACzD,8FAA8F;IAC9F,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;IAC/D,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,EAAE;QACtC,QAAQ,EAAE,MAAM;QAChB,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC;KACpC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,GAAuB;IACpD,MAAM,KAAK,GAAG,CAAC,GAAG,IAAI,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;IAC5C,OAAO,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AACrF,CAAC;AAED,MAAM,CAAC,MAAM,qBAAqB,GAChC,wFAAwF;IACxF,wEAAwE,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* olam mcp install — Add olam to Claude Code's MCP servers via `claude mcp add`.
|
|
3
|
+
*
|
|
4
|
+
* Auto-detects whether `olam` is on PATH: prefers globally-installed olam
|
|
5
|
+
* (no npx cold-start cost) and falls back to `npx -y @pleri/olam-cli mcp serve`.
|
|
6
|
+
*
|
|
7
|
+
* Symmetric with `olam mcp uninstall` (B2 of this plan).
|
|
8
|
+
*/
|
|
9
|
+
import type { Command } from 'commander';
|
|
10
|
+
import { type ClaudeShellDeps, type McpScope } from './install-shared.js';
|
|
11
|
+
export interface InstallOpts {
|
|
12
|
+
scope: McpScope;
|
|
13
|
+
}
|
|
14
|
+
export declare function buildClaudeMcpAddArgs(scope: McpScope, useGlobal: boolean): {
|
|
15
|
+
command: string;
|
|
16
|
+
args: string[];
|
|
17
|
+
};
|
|
18
|
+
export declare function runInstall(opts: InstallOpts, deps?: ClaudeShellDeps): Promise<number>;
|
|
19
|
+
export declare function registerMcpInstall(cmd: Command): void;
|
|
20
|
+
//# sourceMappingURL=install.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../src/commands/mcp/install.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EAKL,KAAK,eAAe,EACpB,KAAK,QAAQ,EACd,MAAM,qBAAqB,CAAC;AAI7B,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,QAAQ,CAAC;CACjB;AAED,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,QAAQ,EACf,SAAS,EAAE,OAAO,GACjB;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,CAQrC;AAED,wBAAsB,UAAU,CAC9B,IAAI,EAAE,WAAW,EACjB,IAAI,GAAE,eAA2C,GAChD,OAAO,CAAC,MAAM,CAAC,CAyBjB;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAmBrD"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* olam mcp install — Add olam to Claude Code's MCP servers via `claude mcp add`.
|
|
3
|
+
*
|
|
4
|
+
* Auto-detects whether `olam` is on PATH: prefers globally-installed olam
|
|
5
|
+
* (no npx cold-start cost) and falls back to `npx -y @pleri/olam-cli mcp serve`.
|
|
6
|
+
*
|
|
7
|
+
* Symmetric with `olam mcp uninstall` (B2 of this plan).
|
|
8
|
+
*/
|
|
9
|
+
import { printError, printSuccess } from '../../output.js';
|
|
10
|
+
import { DEFAULT_CLAUDE_SHELL_DEPS, REMEDY_CLAUDE_MISSING, isOnPath, normaliseScope, } from './install-shared.js';
|
|
11
|
+
const NPM_PACKAGE_NAME = '@pleri/olam-cli';
|
|
12
|
+
export function buildClaudeMcpAddArgs(scope, useGlobal) {
|
|
13
|
+
const target = useGlobal
|
|
14
|
+
? { cmd: 'olam', args: ['mcp', 'serve'] }
|
|
15
|
+
: { cmd: 'npx', args: ['-y', NPM_PACKAGE_NAME, 'mcp', 'serve'] };
|
|
16
|
+
return {
|
|
17
|
+
command: 'claude',
|
|
18
|
+
args: ['mcp', 'add', 'olam', '--scope', scope, '--', target.cmd, ...target.args],
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export async function runInstall(opts, deps = DEFAULT_CLAUDE_SHELL_DEPS) {
|
|
22
|
+
if (!isOnPath(deps, 'claude')) {
|
|
23
|
+
printError(REMEDY_CLAUDE_MISSING);
|
|
24
|
+
return 1;
|
|
25
|
+
}
|
|
26
|
+
const useGlobal = isOnPath(deps, 'olam');
|
|
27
|
+
const { command, args } = buildClaudeMcpAddArgs(opts.scope, useGlobal);
|
|
28
|
+
deps.log(`Wiring: ${command} ${args.join(' ')}`);
|
|
29
|
+
const result = deps.spawn(command, args, {
|
|
30
|
+
encoding: 'utf8',
|
|
31
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
32
|
+
});
|
|
33
|
+
if (result.status !== 0) {
|
|
34
|
+
const detail = result.stderr?.trim() || result.stdout?.trim() || '(no output)';
|
|
35
|
+
printError(`claude mcp add failed (rc=${result.status ?? 'unknown'}): ${detail}`);
|
|
36
|
+
return result.status ?? 1;
|
|
37
|
+
}
|
|
38
|
+
printSuccess(`olam MCP registered with claude (--scope ${opts.scope}; command: ${useGlobal ? 'olam' : 'npx'}).`);
|
|
39
|
+
return 0;
|
|
40
|
+
}
|
|
41
|
+
export function registerMcpInstall(cmd) {
|
|
42
|
+
cmd
|
|
43
|
+
.command('install')
|
|
44
|
+
.description('Add olam to Claude Code as an MCP server (auto-detects whether `olam` is on PATH; shells to `claude mcp add`)')
|
|
45
|
+
.option('--scope <scope>', 'claude mcp scope: user | project | local', 'user')
|
|
46
|
+
.action(async (rawOpts) => {
|
|
47
|
+
const scope = normaliseScope(rawOpts.scope);
|
|
48
|
+
if (scope === null) {
|
|
49
|
+
printError(`--scope must be one of: user, project, local (got: ${rawOpts.scope})`);
|
|
50
|
+
process.exitCode = 1;
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const rc = await runInstall({ scope });
|
|
54
|
+
if (rc !== 0) {
|
|
55
|
+
process.exitCode = rc;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=install.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../../src/commands/mcp/install.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,QAAQ,EACR,cAAc,GAGf,MAAM,qBAAqB,CAAC;AAE7B,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;AAM3C,MAAM,UAAU,qBAAqB,CACnC,KAAe,EACf,SAAkB;IAElB,MAAM,MAAM,GAAG,SAAS;QACtB,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE;QACzC,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC;IACnE,OAAO;QACL,OAAO,EAAE,QAAQ;QACjB,IAAI,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC;KACjF,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,IAAiB,EACjB,OAAwB,yBAAyB;IAEjD,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,CAAC;QAC9B,UAAU,CAAC,qBAAqB,CAAC,CAAC;QAClC,OAAO,CAAC,CAAC;IACX,CAAC;IAED,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACzC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE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QAAQ,GAAG,CAAC,CAAC;YACrB,OAAO;QACT,CAAC;QACD,MAAM,EAAE,GAAG,MAAM,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;QACvC,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC;YACb,OAAO,CAAC,QAAQ,GAAG,EAAE,CAAC;QACxB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* olam mcp serve — Run the olam MCP server (stdio transport).
|
|
3
|
+
*
|
|
4
|
+
* Claude Code wires this via `claude mcp add olam --scope user -- npx -y @pleri/olam-cli mcp serve`.
|
|
5
|
+
*
|
|
6
|
+
* Consumes the publish-time bundle at `packages/cli/dist/mcp-server.js` (Decision 27
|
|
7
|
+
* in `docs/plans/olam-continuous-distribution/`). The bundle's top-level
|
|
8
|
+
* `main().catch(...)` invocation auto-runs the stdio loop on import.
|
|
9
|
+
*/
|
|
10
|
+
import type { Command } from 'commander';
|
|
11
|
+
export declare function registerMcpServe(cmd: Command): void;
|
|
12
|
+
//# sourceMappingURL=serve.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../../src/commands/mcp/serve.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAezC,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAiBnD"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* olam mcp serve — Run the olam MCP server (stdio transport).
|
|
3
|
+
*
|
|
4
|
+
* Claude Code wires this via `claude mcp add olam --scope user -- npx -y @pleri/olam-cli mcp serve`.
|
|
5
|
+
*
|
|
6
|
+
* Consumes the publish-time bundle at `packages/cli/dist/mcp-server.js` (Decision 27
|
|
7
|
+
* in `docs/plans/olam-continuous-distribution/`). The bundle's top-level
|
|
8
|
+
* `main().catch(...)` invocation auto-runs the stdio loop on import.
|
|
9
|
+
*/
|
|
10
|
+
import { existsSync } from 'node:fs';
|
|
11
|
+
import { dirname, resolve } from 'node:path';
|
|
12
|
+
import { fileURLToPath } from 'node:url';
|
|
13
|
+
import { printError } from '../../output.js';
|
|
14
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
15
|
+
// dist/commands/mcp/serve.js → dist/mcp-server.js
|
|
16
|
+
const BUNDLE_PATH = resolve(here, '..', '..', 'mcp-server.js');
|
|
17
|
+
const MISSING_BUNDLE_REMEDY = 'olam mcp server bundle missing at dist/mcp-server.js. ' +
|
|
18
|
+
'For local dev, run: node packages/cli/scripts/bundle-mcp-server.mjs. ' +
|
|
19
|
+
'Published @pleri/olam-cli tarballs always include this bundle (per prepublishOnly).';
|
|
20
|
+
export function registerMcpServe(cmd) {
|
|
21
|
+
cmd
|
|
22
|
+
.command('serve')
|
|
23
|
+
.description('Run the olam MCP server (stdio transport). Claude Code wires this via `claude mcp add olam --scope user -- npx -y @pleri/olam-cli mcp serve`.')
|
|
24
|
+
.action(async () => {
|
|
25
|
+
if (!existsSync(BUNDLE_PATH)) {
|
|
26
|
+
printError(MISSING_BUNDLE_REMEDY);
|
|
27
|
+
process.exitCode = 1;
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
// The bundle's top-level `main().catch(...)` auto-runs the stdio loop on import.
|
|
31
|
+
// Awaiting the dynamic import resolves once the module is loaded; the StdioServerTransport
|
|
32
|
+
// keeps the event loop alive until the client closes stdin.
|
|
33
|
+
await import(BUNDLE_PATH);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=serve.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serve.js","sourceRoot":"","sources":["../../../src/commands/mcp/serve.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACrD,kDAAkD;AAClD,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC;AAE/D,MAAM,qBAAqB,GACzB,wDAAwD;IACxD,uEAAuE;IACvE,qFAAqF,CAAC;AAExF,MAAM,UAAU,gBAAgB,CAAC,GAAY;IAC3C,GAAG;SACA,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CACV,+IAA+I,CAChJ;SACA,MAAM,CAAC,KAAK,IAAI,EAAE;QACjB,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;YAC7B,UAAU,CAAC,qBAAqB,CAAC,CAAC;YAClC,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;YACrB,OAAO;QACT,CAAC;QACD,iFAAiF;QACjF,2FAA2F;QAC3F,4DAA4D;QAC5D,MAAM,MAAM,CAAC,WAAW,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* olam mcp uninstall — Remove olam from Claude Code's MCP servers via
|
|
3
|
+
* `claude mcp remove`. Symmetric with `olam mcp install` (B1).
|
|
4
|
+
*
|
|
5
|
+
* Handles "not installed" gracefully — claude reports a non-zero exit
|
|
6
|
+
* with an informative stderr; we parse that and return success-as-noop
|
|
7
|
+
* so the command is idempotent.
|
|
8
|
+
*/
|
|
9
|
+
import type { Command } from 'commander';
|
|
10
|
+
import { type ClaudeShellDeps, type McpScope } from './install-shared.js';
|
|
11
|
+
export interface UninstallOpts {
|
|
12
|
+
scope: McpScope;
|
|
13
|
+
}
|
|
14
|
+
export declare function buildClaudeMcpRemoveArgs(scope: McpScope): {
|
|
15
|
+
command: string;
|
|
16
|
+
args: string[];
|
|
17
|
+
};
|
|
18
|
+
export declare function runUninstall(opts: UninstallOpts, deps?: ClaudeShellDeps): Promise<number>;
|
|
19
|
+
export declare function registerMcpUninstall(cmd: Command): void;
|
|
20
|
+
//# sourceMappingURL=uninstall.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../../../src/commands/mcp/uninstall.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EAKL,KAAK,eAAe,EACpB,KAAK,QAAQ,EACd,MAAM,qBAAqB,CAAC;AAE7B,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,QAAQ,CAAC;CACjB;AAaD,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,QAAQ,GAAG;IACzD,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAKA;AAED,wBAAsB,YAAY,CAChC,IAAI,EAAE,aAAa,EACnB,IAAI,GAAE,eAA2C,GAChD,OAAO,CAAC,MAAM,CAAC,CAkCjB;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAmBvD"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* olam mcp uninstall — Remove olam from Claude Code's MCP servers via
|
|
3
|
+
* `claude mcp remove`. Symmetric with `olam mcp install` (B1).
|
|
4
|
+
*
|
|
5
|
+
* Handles "not installed" gracefully — claude reports a non-zero exit
|
|
6
|
+
* with an informative stderr; we parse that and return success-as-noop
|
|
7
|
+
* so the command is idempotent.
|
|
8
|
+
*/
|
|
9
|
+
import { printError, printSuccess, printWarning } from '../../output.js';
|
|
10
|
+
import { DEFAULT_CLAUDE_SHELL_DEPS, REMEDY_CLAUDE_MISSING, isOnPath, normaliseScope, } from './install-shared.js';
|
|
11
|
+
// Real `claude mcp remove` output verified on this machine (2026-05-12):
|
|
12
|
+
// --scope user → "No user-scoped MCP server found with name: <n>"
|
|
13
|
+
// --scope local → "No project-local MCP server found with name: <n>"
|
|
14
|
+
// --scope project → "No MCP server found with name: <n> in .mcp.json"
|
|
15
|
+
// One pattern covers all three: "No <anything> MCP server found".
|
|
16
|
+
const NOT_INSTALLED_PATTERN = /no\s+(?:\S+\s+)*mcp\s+server\s+found/i;
|
|
17
|
+
function looksLikeNotInstalled(text) {
|
|
18
|
+
return NOT_INSTALLED_PATTERN.test(text);
|
|
19
|
+
}
|
|
20
|
+
export function buildClaudeMcpRemoveArgs(scope) {
|
|
21
|
+
return {
|
|
22
|
+
command: 'claude',
|
|
23
|
+
args: ['mcp', 'remove', 'olam', '--scope', scope],
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export async function runUninstall(opts, deps = DEFAULT_CLAUDE_SHELL_DEPS) {
|
|
27
|
+
if (!isOnPath(deps, 'claude')) {
|
|
28
|
+
printError(REMEDY_CLAUDE_MISSING);
|
|
29
|
+
return 1;
|
|
30
|
+
}
|
|
31
|
+
const { command, args } = buildClaudeMcpRemoveArgs(opts.scope);
|
|
32
|
+
deps.log(`Unwiring: ${command} ${args.join(' ')}`);
|
|
33
|
+
const result = deps.spawn(command, args, {
|
|
34
|
+
encoding: 'utf8',
|
|
35
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
36
|
+
});
|
|
37
|
+
if (result.status === 0) {
|
|
38
|
+
printSuccess(`olam MCP removed from claude (--scope ${opts.scope}).`);
|
|
39
|
+
return 0;
|
|
40
|
+
}
|
|
41
|
+
const stderr = result.stderr?.trim() ?? '';
|
|
42
|
+
const stdout = result.stdout?.trim() ?? '';
|
|
43
|
+
const combined = `${stderr}\n${stdout}`.trim();
|
|
44
|
+
if (looksLikeNotInstalled(combined)) {
|
|
45
|
+
printWarning(`olam MCP not registered with claude (--scope ${opts.scope}); nothing to remove.`);
|
|
46
|
+
return 0;
|
|
47
|
+
}
|
|
48
|
+
printError(`claude mcp remove failed (rc=${result.status ?? 'unknown'}): ${combined || '(no output)'}`);
|
|
49
|
+
return result.status ?? 1;
|
|
50
|
+
}
|
|
51
|
+
export function registerMcpUninstall(cmd) {
|
|
52
|
+
cmd
|
|
53
|
+
.command('uninstall')
|
|
54
|
+
.description('Remove olam from Claude Code (symmetric with `install`; idempotent — exits 0 when olam is not registered)')
|
|
55
|
+
.option('--scope <scope>', 'claude mcp scope: user | project | local', 'user')
|
|
56
|
+
.action(async (rawOpts) => {
|
|
57
|
+
const scope = normaliseScope(rawOpts.scope);
|
|
58
|
+
if (scope === null) {
|
|
59
|
+
printError(`--scope must be one of: user, project, local (got: ${rawOpts.scope})`);
|
|
60
|
+
process.exitCode = 1;
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
const rc = await runUninstall({ scope });
|
|
64
|
+
if (rc !== 0) {
|
|
65
|
+
process.exitCode = rc;
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=uninstall.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uninstall.js","sourceRoot":"","sources":["../../../src/commands/mcp/uninstall.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,QAAQ,EACR,cAAc,GAGf,MAAM,qBAAqB,CAAC;AAM7B,yEAAyE;AACzE,uEAAuE;AACvE,yEAAyE;AACzE,wEAAwE;AACxE,kEAAkE;AAClE,MAAM,qBAAqB,GAAG,uCAAuC,CAAC;AAEtE,SAAS,qBAA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EAAE,CAAC;IAE/C,IAAI,qBAAqB,CAAC,QAAQ,CAAC,EAAE,CAAC;QACpC,YAAY,CACV,gDAAgD,IAAI,CAAC,KAAK,uBAAuB,CAClF,CAAC;QACF,OAAO,CAAC,CAAC;IACX,CAAC;IAED,UAAU,CACR,gCAAgC,MAAM,CAAC,MAAM,IAAI,SAAS,MAAM,QAAQ,IAAI,aAAa,EAAE,CAC5F,CAAC;IACF,OAAO,MAAM,CAAC,MAAM,IAAI,CAAC,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,GAAY;IAC/C,GAAG;SACA,OAAO,CAAC,WAAW,CAAC;SACpB,WAAW,CACV,2GAA2G,CAC5G;SACA,MAAM,CAAC,iBAAiB,EAAE,0CAA0C,EAAE,MAAM,CAAC;SAC7E,MAAM,CAAC,KAAK,EAAE,OAA2B,EAAE,EAAE;QAC5C,MAAM,KAAK,GAAG,cAAc,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAC5C,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YACnB,UAAU,CAAC,sDAAsD,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC;YACnF,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;YACrB,OAAO;QACT,CAAC;QACD,MAAM,EAAE,GAAG,MAAM,YAAY,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;QACzC,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC;YACb,OAAO,CAAC,QAAQ,GAAG,EAAE,CAAC;QACxB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/dist/image-digests.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"auth": "sha256:c8ebf817e09719289c7d7e37056b24adacb9d9fbc555e2540fbe88dfd400f2d9",
|
|
3
|
-
"devbox": "sha256:
|
|
4
|
-
"devbox-base": "sha256:
|
|
5
|
-
"host-cp": "sha256:
|
|
3
|
+
"devbox": "sha256:e08235bedcb6c8fe431c2518176b1134f9473ba9f851cb8e61661d548d07aadb",
|
|
4
|
+
"devbox-base": "sha256:a0ddfbcf46227bdedcf1752dd203817154c0a15e3382056e3fa055005ff4d8e4",
|
|
5
|
+
"host-cp": "sha256:13a26950fea2917ebb268f7bda04fd54267ffe8e5ba4a550db89f28eb309553f",
|
|
6
6
|
"mcp-auth": "sha256:c82fcfca7ed1b139cbea252697487889b96b45a6575cfba076de7f57eaa943ac",
|
|
7
7
|
"$schema_version": 1,
|
|
8
|
-
"$published_version": "0.1.
|
|
8
|
+
"$published_version": "0.1.113",
|
|
9
9
|
"$registry": "ghcr.io/pleri"
|
|
10
10
|
}
|
package/dist/index.js
CHANGED
|
@@ -21,11 +21,11 @@ import * as path from "node:path";
|
|
|
21
21
|
import { fileURLToPath } from "node:url";
|
|
22
22
|
function readCliVersion() {
|
|
23
23
|
try {
|
|
24
|
-
const
|
|
24
|
+
const here2 = path.dirname(fileURLToPath(import.meta.url));
|
|
25
25
|
for (const candidate of [
|
|
26
|
-
path.join(
|
|
27
|
-
path.join(
|
|
28
|
-
path.join(
|
|
26
|
+
path.join(here2, "package.json"),
|
|
27
|
+
path.join(here2, "..", "package.json"),
|
|
28
|
+
path.join(here2, "..", "..", "package.json")
|
|
29
29
|
]) {
|
|
30
30
|
if (fs.existsSync(candidate)) {
|
|
31
31
|
const pkg = JSON.parse(fs.readFileSync(candidate, "utf-8"));
|
|
@@ -5198,7 +5198,7 @@ async function safeText(res) {
|
|
|
5198
5198
|
}
|
|
5199
5199
|
}
|
|
5200
5200
|
function sleep(ms) {
|
|
5201
|
-
return new Promise((
|
|
5201
|
+
return new Promise((resolve12) => setTimeout(resolve12, ms));
|
|
5202
5202
|
}
|
|
5203
5203
|
var DEFAULT_BASE_URL, DEFAULT_TIMEOUT_MS, RETRY_COUNT, RETRY_BACKOFF_MS, AuthClient;
|
|
5204
5204
|
var init_client = __esm({
|
|
@@ -5345,12 +5345,12 @@ import { existsSync as existsSync9 } from "node:fs";
|
|
|
5345
5345
|
import * as path9 from "node:path";
|
|
5346
5346
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
5347
5347
|
function resolveAuthServicePath() {
|
|
5348
|
-
const
|
|
5349
|
-
const pkgsDir = path9.resolve(path9.dirname(
|
|
5348
|
+
const here2 = fileURLToPath2(import.meta.url);
|
|
5349
|
+
const pkgsDir = path9.resolve(path9.dirname(here2), "..", "..", "..");
|
|
5350
5350
|
return path9.join(pkgsDir, "auth-service");
|
|
5351
5351
|
}
|
|
5352
5352
|
function sleep2(ms) {
|
|
5353
|
-
return new Promise((
|
|
5353
|
+
return new Promise((resolve12) => setTimeout(resolve12, ms));
|
|
5354
5354
|
}
|
|
5355
5355
|
var DEFAULT_PORT, DEFAULT_VOLUME, DEFAULT_CONTAINER, DEFAULT_IMAGE, AuthContainerController;
|
|
5356
5356
|
var init_container = __esm({
|
|
@@ -5648,7 +5648,7 @@ var init_network = __esm({
|
|
|
5648
5648
|
// ../adapters/dist/docker/pull.js
|
|
5649
5649
|
import { spawn } from "node:child_process";
|
|
5650
5650
|
function spawnAsync(cmd, args, opts = {}) {
|
|
5651
|
-
return new Promise((
|
|
5651
|
+
return new Promise((resolve12) => {
|
|
5652
5652
|
const child = spawn(cmd, [...args], {
|
|
5653
5653
|
stdio: ["ignore", "pipe", "pipe"],
|
|
5654
5654
|
signal: opts.signal
|
|
@@ -5662,10 +5662,10 @@ function spawnAsync(cmd, args, opts = {}) {
|
|
|
5662
5662
|
stderr += chunk.toString();
|
|
5663
5663
|
});
|
|
5664
5664
|
child.on("error", (err) => {
|
|
5665
|
-
|
|
5665
|
+
resolve12({ exitCode: -1, stdout, stderr: stderr + err.message });
|
|
5666
5666
|
});
|
|
5667
5667
|
child.on("close", (code) => {
|
|
5668
|
-
|
|
5668
|
+
resolve12({ exitCode: code ?? -1, stdout, stderr });
|
|
5669
5669
|
});
|
|
5670
5670
|
});
|
|
5671
5671
|
}
|
|
@@ -6050,7 +6050,7 @@ var demuxStream, execInContainer;
|
|
|
6050
6050
|
var init_exec = __esm({
|
|
6051
6051
|
"../adapters/dist/docker/exec.js"() {
|
|
6052
6052
|
"use strict";
|
|
6053
|
-
demuxStream = (stream) => new Promise((
|
|
6053
|
+
demuxStream = (stream) => new Promise((resolve12, reject) => {
|
|
6054
6054
|
const stdoutChunks = [];
|
|
6055
6055
|
const stderrChunks = [];
|
|
6056
6056
|
const stdout = new PassThrough();
|
|
@@ -6064,7 +6064,7 @@ var init_exec = __esm({
|
|
|
6064
6064
|
stream.pipe(stdout);
|
|
6065
6065
|
}
|
|
6066
6066
|
stream.on("end", () => {
|
|
6067
|
-
|
|
6067
|
+
resolve12({
|
|
6068
6068
|
stdout: Buffer.concat(stdoutChunks).toString("utf-8"),
|
|
6069
6069
|
stderr: Buffer.concat(stderrChunks).toString("utf-8")
|
|
6070
6070
|
});
|
|
@@ -6496,7 +6496,7 @@ var init_connection = __esm({
|
|
|
6496
6496
|
// -----------------------------------------------------------------------
|
|
6497
6497
|
async exec(host, command) {
|
|
6498
6498
|
const client = await this.getConnection(host);
|
|
6499
|
-
return new Promise((
|
|
6499
|
+
return new Promise((resolve12, reject) => {
|
|
6500
6500
|
client.exec(command, (err, stream) => {
|
|
6501
6501
|
if (err) {
|
|
6502
6502
|
reject(new Error(`SSH exec failed on ${host}: ${err.message}`));
|
|
@@ -6511,7 +6511,7 @@ var init_connection = __esm({
|
|
|
6511
6511
|
stderr += data.toString();
|
|
6512
6512
|
});
|
|
6513
6513
|
stream.on("close", (code) => {
|
|
6514
|
-
|
|
6514
|
+
resolve12({
|
|
6515
6515
|
exitCode: code ?? 0,
|
|
6516
6516
|
stdout: stdout.trimEnd(),
|
|
6517
6517
|
stderr: stderr.trimEnd()
|
|
@@ -6542,10 +6542,10 @@ var init_connection = __esm({
|
|
|
6542
6542
|
throw new Error(`No SSH configuration found for host: ${host}`);
|
|
6543
6543
|
}
|
|
6544
6544
|
const client = new SSHClient();
|
|
6545
|
-
return new Promise((
|
|
6545
|
+
return new Promise((resolve12, reject) => {
|
|
6546
6546
|
client.on("ready", () => {
|
|
6547
6547
|
this.connections.set(host, client);
|
|
6548
|
-
|
|
6548
|
+
resolve12(client);
|
|
6549
6549
|
}).on("error", (err) => {
|
|
6550
6550
|
this.connections.delete(host);
|
|
6551
6551
|
reject(new Error(`SSH connection to ${host} failed: ${err.message}`));
|
|
@@ -13086,7 +13086,7 @@ function isCloudflaredAvailable() {
|
|
|
13086
13086
|
}
|
|
13087
13087
|
}
|
|
13088
13088
|
function startTunnel(port) {
|
|
13089
|
-
return new Promise((
|
|
13089
|
+
return new Promise((resolve12, reject) => {
|
|
13090
13090
|
const child = spawn3("cloudflared", ["tunnel", "--url", `http://localhost:${port}`], {
|
|
13091
13091
|
stdio: ["ignore", "pipe", "pipe"],
|
|
13092
13092
|
detached: false
|
|
@@ -13108,7 +13108,7 @@ function startTunnel(port) {
|
|
|
13108
13108
|
if (match2) {
|
|
13109
13109
|
resolved = true;
|
|
13110
13110
|
clearTimeout(timeout);
|
|
13111
|
-
|
|
13111
|
+
resolve12(match2[0]);
|
|
13112
13112
|
}
|
|
13113
13113
|
}
|
|
13114
13114
|
child.stdout?.on("data", scan);
|
|
@@ -13195,8 +13195,8 @@ var init_dashboard = __esm({
|
|
|
13195
13195
|
}
|
|
13196
13196
|
throw err;
|
|
13197
13197
|
}
|
|
13198
|
-
await new Promise((
|
|
13199
|
-
this.server.on("listening",
|
|
13198
|
+
await new Promise((resolve12, reject) => {
|
|
13199
|
+
this.server.on("listening", resolve12);
|
|
13200
13200
|
this.server.on("error", reject);
|
|
13201
13201
|
});
|
|
13202
13202
|
this.info = { localUrl: `http://localhost:${port}` };
|
|
@@ -13242,8 +13242,8 @@ var init_dashboard = __esm({
|
|
|
13242
13242
|
async stop() {
|
|
13243
13243
|
stopTunnel();
|
|
13244
13244
|
if (this.server) {
|
|
13245
|
-
await new Promise((
|
|
13246
|
-
this.server.close(() =>
|
|
13245
|
+
await new Promise((resolve12) => {
|
|
13246
|
+
this.server.close(() => resolve12());
|
|
13247
13247
|
});
|
|
13248
13248
|
this.server = null;
|
|
13249
13249
|
}
|
|
@@ -14065,8 +14065,8 @@ import { existsSync as existsSync23 } from "node:fs";
|
|
|
14065
14065
|
import { dirname as dirname17, join as join28, resolve as resolve8 } from "node:path";
|
|
14066
14066
|
import { fileURLToPath as fileURLToPath5 } from "node:url";
|
|
14067
14067
|
function installRoot(metaUrl = import.meta.url) {
|
|
14068
|
-
const
|
|
14069
|
-
return resolve8(dirname17(
|
|
14068
|
+
const here2 = fileURLToPath5(metaUrl);
|
|
14069
|
+
return resolve8(dirname17(here2), "..");
|
|
14070
14070
|
}
|
|
14071
14071
|
function isDevMode(env = process.env, installRootDir = installRoot()) {
|
|
14072
14072
|
if (env.OLAM_DEV !== "1") return false;
|
|
@@ -15396,10 +15396,10 @@ async function confirm(message) {
|
|
|
15396
15396
|
if (!process.stdin.isTTY) return true;
|
|
15397
15397
|
const { createInterface: createInterface6 } = await import("node:readline");
|
|
15398
15398
|
const rl = createInterface6({ input: process.stdin, output: process.stdout });
|
|
15399
|
-
return new Promise((
|
|
15399
|
+
return new Promise((resolve12) => {
|
|
15400
15400
|
rl.question(`${message} [y/N] `, (answer) => {
|
|
15401
15401
|
rl.close();
|
|
15402
|
-
|
|
15402
|
+
resolve12(answer.toLowerCase() === "y" || answer.toLowerCase() === "yes");
|
|
15403
15403
|
});
|
|
15404
15404
|
});
|
|
15405
15405
|
}
|
|
@@ -15773,7 +15773,7 @@ var McpAuthContainerController = class {
|
|
|
15773
15773
|
}
|
|
15774
15774
|
};
|
|
15775
15775
|
function sleep3(ms) {
|
|
15776
|
-
return new Promise((
|
|
15776
|
+
return new Promise((resolve12) => setTimeout(resolve12, ms));
|
|
15777
15777
|
}
|
|
15778
15778
|
function dumpContainerLogs(container, tail = 40) {
|
|
15779
15779
|
try {
|
|
@@ -17333,14 +17333,14 @@ function printTable(entries) {
|
|
|
17333
17333
|
async function confirmInteractive() {
|
|
17334
17334
|
process.stdout.write(" Type `yes` to proceed: ");
|
|
17335
17335
|
const buf = [];
|
|
17336
|
-
return new Promise((
|
|
17336
|
+
return new Promise((resolve12) => {
|
|
17337
17337
|
const onData = (chunk) => {
|
|
17338
17338
|
buf.push(chunk);
|
|
17339
17339
|
if (Buffer.concat(buf).toString("utf-8").includes("\n")) {
|
|
17340
17340
|
process.stdin.removeListener("data", onData);
|
|
17341
17341
|
process.stdin.pause();
|
|
17342
17342
|
const answer = Buffer.concat(buf).toString("utf-8").trim();
|
|
17343
|
-
|
|
17343
|
+
resolve12(answer.toLowerCase() === "yes");
|
|
17344
17344
|
}
|
|
17345
17345
|
};
|
|
17346
17346
|
process.stdin.resume();
|
|
@@ -23055,10 +23055,10 @@ async function confirm2(message) {
|
|
|
23055
23055
|
if (!process.stdin.isTTY) return true;
|
|
23056
23056
|
const { createInterface: createInterface6 } = await import("node:readline");
|
|
23057
23057
|
const rl = createInterface6({ input: process.stdin, output: process.stdout });
|
|
23058
|
-
return new Promise((
|
|
23058
|
+
return new Promise((resolve12) => {
|
|
23059
23059
|
rl.question(`${message} [y/N] `, (answer) => {
|
|
23060
23060
|
rl.close();
|
|
23061
|
-
|
|
23061
|
+
resolve12(answer.toLowerCase() === "y" || answer.toLowerCase() === "yes");
|
|
23062
23062
|
});
|
|
23063
23063
|
});
|
|
23064
23064
|
}
|
|
@@ -25575,10 +25575,10 @@ var NEXT_STEPS_DOCS = [
|
|
|
25575
25575
|
"docs/architecture/manifest-spec.md \u2014 per-repo .adb.yaml schema",
|
|
25576
25576
|
"docs/architecture/config-spec.md \u2014 workspace .olam/config.yaml schema"
|
|
25577
25577
|
];
|
|
25578
|
-
var defaultSpawn = (cmd, args) => new Promise((
|
|
25578
|
+
var defaultSpawn = (cmd, args) => new Promise((resolve12) => {
|
|
25579
25579
|
const child = spawn5(cmd, [...args], { stdio: "inherit" });
|
|
25580
|
-
child.on("exit", (code) =>
|
|
25581
|
-
child.on("error", () =>
|
|
25580
|
+
child.on("exit", (code) => resolve12({ status: code }));
|
|
25581
|
+
child.on("error", () => resolve12({ status: 1 }));
|
|
25582
25582
|
});
|
|
25583
25583
|
var defaultPrompt = (question, defaultYes) => {
|
|
25584
25584
|
if (!process.stdin.isTTY) {
|
|
@@ -25588,18 +25588,18 @@ var defaultPrompt = (question, defaultYes) => {
|
|
|
25588
25588
|
);
|
|
25589
25589
|
return Promise.resolve(defaultYes);
|
|
25590
25590
|
}
|
|
25591
|
-
return new Promise((
|
|
25591
|
+
return new Promise((resolve12) => {
|
|
25592
25592
|
const rl = createInterface3({ input: process.stdin, output: process.stdout });
|
|
25593
25593
|
const suffix = defaultYes ? " [Y/n]: " : " [y/N]: ";
|
|
25594
25594
|
rl.question(`${question}${suffix}`, (answer) => {
|
|
25595
25595
|
rl.close();
|
|
25596
25596
|
const t = answer.trim().toLowerCase();
|
|
25597
|
-
if (t === "")
|
|
25598
|
-
else if (t === "y" || t === "yes")
|
|
25599
|
-
else if (t === "n" || t === "no")
|
|
25600
|
-
else
|
|
25597
|
+
if (t === "") resolve12(defaultYes);
|
|
25598
|
+
else if (t === "y" || t === "yes") resolve12(true);
|
|
25599
|
+
else if (t === "n" || t === "no") resolve12(false);
|
|
25600
|
+
else resolve12(defaultYes);
|
|
25601
25601
|
});
|
|
25602
|
-
rl.on("close", () =>
|
|
25602
|
+
rl.on("close", () => resolve12(defaultYes));
|
|
25603
25603
|
});
|
|
25604
25604
|
};
|
|
25605
25605
|
async function phase1SystemCheck(deps) {
|
|
@@ -26566,6 +26566,157 @@ function registerWorldUpgrade(program2) {
|
|
|
26566
26566
|
});
|
|
26567
26567
|
}
|
|
26568
26568
|
|
|
26569
|
+
// src/commands/mcp/serve.ts
|
|
26570
|
+
init_output();
|
|
26571
|
+
import { existsSync as existsSync50 } from "node:fs";
|
|
26572
|
+
import { dirname as dirname25, resolve as resolve10 } from "node:path";
|
|
26573
|
+
import { fileURLToPath as fileURLToPath6 } from "node:url";
|
|
26574
|
+
var here = dirname25(fileURLToPath6(import.meta.url));
|
|
26575
|
+
var BUNDLE_PATH = resolve10(here, "..", "..", "mcp-server.js");
|
|
26576
|
+
var MISSING_BUNDLE_REMEDY = "olam mcp server bundle missing at dist/mcp-server.js. For local dev, run: node packages/cli/scripts/bundle-mcp-server.mjs. Published @pleri/olam-cli tarballs always include this bundle (per prepublishOnly).";
|
|
26577
|
+
function registerMcpServe(cmd) {
|
|
26578
|
+
cmd.command("serve").description(
|
|
26579
|
+
"Run the olam MCP server (stdio transport). Claude Code wires this via `claude mcp add olam --scope user -- npx -y @pleri/olam-cli mcp serve`."
|
|
26580
|
+
).action(async () => {
|
|
26581
|
+
if (!existsSync50(BUNDLE_PATH)) {
|
|
26582
|
+
printError(MISSING_BUNDLE_REMEDY);
|
|
26583
|
+
process.exitCode = 1;
|
|
26584
|
+
return;
|
|
26585
|
+
}
|
|
26586
|
+
await import(BUNDLE_PATH);
|
|
26587
|
+
});
|
|
26588
|
+
}
|
|
26589
|
+
|
|
26590
|
+
// src/commands/mcp/install.ts
|
|
26591
|
+
init_output();
|
|
26592
|
+
|
|
26593
|
+
// src/commands/mcp/install-shared.ts
|
|
26594
|
+
import { spawnSync as spawnSync15 } from "node:child_process";
|
|
26595
|
+
var DEFAULT_CLAUDE_SHELL_DEPS = {
|
|
26596
|
+
spawn: spawnSync15,
|
|
26597
|
+
log: (msg) => console.log(msg)
|
|
26598
|
+
};
|
|
26599
|
+
function isOnPath(deps, bin) {
|
|
26600
|
+
const probe = process.platform === "win32" ? "where" : "which";
|
|
26601
|
+
const result = deps.spawn(probe, [bin], {
|
|
26602
|
+
encoding: "utf8",
|
|
26603
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
26604
|
+
});
|
|
26605
|
+
return result.status === 0;
|
|
26606
|
+
}
|
|
26607
|
+
function normaliseScope(raw) {
|
|
26608
|
+
const value = (raw ?? "user").toLowerCase();
|
|
26609
|
+
return value === "user" || value === "project" || value === "local" ? value : null;
|
|
26610
|
+
}
|
|
26611
|
+
var REMEDY_CLAUDE_MISSING = "`claude` not found on PATH. Install Claude Code (https://docs.claude.com/claude-code) or paste the JSON snippet from docs/architecture/mcp-as-npx-served.md.";
|
|
26612
|
+
|
|
26613
|
+
// src/commands/mcp/install.ts
|
|
26614
|
+
var NPM_PACKAGE_NAME = "@pleri/olam-cli";
|
|
26615
|
+
function buildClaudeMcpAddArgs(scope, useGlobal) {
|
|
26616
|
+
const target = useGlobal ? { cmd: "olam", args: ["mcp", "serve"] } : { cmd: "npx", args: ["-y", NPM_PACKAGE_NAME, "mcp", "serve"] };
|
|
26617
|
+
return {
|
|
26618
|
+
command: "claude",
|
|
26619
|
+
args: ["mcp", "add", "olam", "--scope", scope, "--", target.cmd, ...target.args]
|
|
26620
|
+
};
|
|
26621
|
+
}
|
|
26622
|
+
async function runInstall(opts, deps = DEFAULT_CLAUDE_SHELL_DEPS) {
|
|
26623
|
+
if (!isOnPath(deps, "claude")) {
|
|
26624
|
+
printError(REMEDY_CLAUDE_MISSING);
|
|
26625
|
+
return 1;
|
|
26626
|
+
}
|
|
26627
|
+
const useGlobal = isOnPath(deps, "olam");
|
|
26628
|
+
const { command, args } = buildClaudeMcpAddArgs(opts.scope, useGlobal);
|
|
26629
|
+
deps.log(`Wiring: ${command} ${args.join(" ")}`);
|
|
26630
|
+
const result = deps.spawn(command, args, {
|
|
26631
|
+
encoding: "utf8",
|
|
26632
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
26633
|
+
});
|
|
26634
|
+
if (result.status !== 0) {
|
|
26635
|
+
const detail = result.stderr?.trim() || result.stdout?.trim() || "(no output)";
|
|
26636
|
+
printError(`claude mcp add failed (rc=${result.status ?? "unknown"}): ${detail}`);
|
|
26637
|
+
return result.status ?? 1;
|
|
26638
|
+
}
|
|
26639
|
+
printSuccess(
|
|
26640
|
+
`olam MCP registered with claude (--scope ${opts.scope}; command: ${useGlobal ? "olam" : "npx"}).`
|
|
26641
|
+
);
|
|
26642
|
+
return 0;
|
|
26643
|
+
}
|
|
26644
|
+
function registerMcpInstall(cmd) {
|
|
26645
|
+
cmd.command("install").description(
|
|
26646
|
+
"Add olam to Claude Code as an MCP server (auto-detects whether `olam` is on PATH; shells to `claude mcp add`)"
|
|
26647
|
+
).option("--scope <scope>", "claude mcp scope: user | project | local", "user").action(async (rawOpts) => {
|
|
26648
|
+
const scope = normaliseScope(rawOpts.scope);
|
|
26649
|
+
if (scope === null) {
|
|
26650
|
+
printError(`--scope must be one of: user, project, local (got: ${rawOpts.scope})`);
|
|
26651
|
+
process.exitCode = 1;
|
|
26652
|
+
return;
|
|
26653
|
+
}
|
|
26654
|
+
const rc = await runInstall({ scope });
|
|
26655
|
+
if (rc !== 0) {
|
|
26656
|
+
process.exitCode = rc;
|
|
26657
|
+
}
|
|
26658
|
+
});
|
|
26659
|
+
}
|
|
26660
|
+
|
|
26661
|
+
// src/commands/mcp/uninstall.ts
|
|
26662
|
+
init_output();
|
|
26663
|
+
var NOT_INSTALLED_PATTERN = /no\s+(?:\S+\s+)*mcp\s+server\s+found/i;
|
|
26664
|
+
function looksLikeNotInstalled(text) {
|
|
26665
|
+
return NOT_INSTALLED_PATTERN.test(text);
|
|
26666
|
+
}
|
|
26667
|
+
function buildClaudeMcpRemoveArgs(scope) {
|
|
26668
|
+
return {
|
|
26669
|
+
command: "claude",
|
|
26670
|
+
args: ["mcp", "remove", "olam", "--scope", scope]
|
|
26671
|
+
};
|
|
26672
|
+
}
|
|
26673
|
+
async function runUninstall(opts, deps = DEFAULT_CLAUDE_SHELL_DEPS) {
|
|
26674
|
+
if (!isOnPath(deps, "claude")) {
|
|
26675
|
+
printError(REMEDY_CLAUDE_MISSING);
|
|
26676
|
+
return 1;
|
|
26677
|
+
}
|
|
26678
|
+
const { command, args } = buildClaudeMcpRemoveArgs(opts.scope);
|
|
26679
|
+
deps.log(`Unwiring: ${command} ${args.join(" ")}`);
|
|
26680
|
+
const result = deps.spawn(command, args, {
|
|
26681
|
+
encoding: "utf8",
|
|
26682
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
26683
|
+
});
|
|
26684
|
+
if (result.status === 0) {
|
|
26685
|
+
printSuccess(`olam MCP removed from claude (--scope ${opts.scope}).`);
|
|
26686
|
+
return 0;
|
|
26687
|
+
}
|
|
26688
|
+
const stderr = result.stderr?.trim() ?? "";
|
|
26689
|
+
const stdout = result.stdout?.trim() ?? "";
|
|
26690
|
+
const combined = `${stderr}
|
|
26691
|
+
${stdout}`.trim();
|
|
26692
|
+
if (looksLikeNotInstalled(combined)) {
|
|
26693
|
+
printWarning(
|
|
26694
|
+
`olam MCP not registered with claude (--scope ${opts.scope}); nothing to remove.`
|
|
26695
|
+
);
|
|
26696
|
+
return 0;
|
|
26697
|
+
}
|
|
26698
|
+
printError(
|
|
26699
|
+
`claude mcp remove failed (rc=${result.status ?? "unknown"}): ${combined || "(no output)"}`
|
|
26700
|
+
);
|
|
26701
|
+
return result.status ?? 1;
|
|
26702
|
+
}
|
|
26703
|
+
function registerMcpUninstall(cmd) {
|
|
26704
|
+
cmd.command("uninstall").description(
|
|
26705
|
+
"Remove olam from Claude Code (symmetric with `install`; idempotent \u2014 exits 0 when olam is not registered)"
|
|
26706
|
+
).option("--scope <scope>", "claude mcp scope: user | project | local", "user").action(async (rawOpts) => {
|
|
26707
|
+
const scope = normaliseScope(rawOpts.scope);
|
|
26708
|
+
if (scope === null) {
|
|
26709
|
+
printError(`--scope must be one of: user, project, local (got: ${rawOpts.scope})`);
|
|
26710
|
+
process.exitCode = 1;
|
|
26711
|
+
return;
|
|
26712
|
+
}
|
|
26713
|
+
const rc = await runUninstall({ scope });
|
|
26714
|
+
if (rc !== 0) {
|
|
26715
|
+
process.exitCode = rc;
|
|
26716
|
+
}
|
|
26717
|
+
});
|
|
26718
|
+
}
|
|
26719
|
+
|
|
26569
26720
|
// src/commands/mcp/login.ts
|
|
26570
26721
|
init_output();
|
|
26571
26722
|
|
|
@@ -26663,7 +26814,7 @@ function registerMcpLogin(cmd) {
|
|
|
26663
26814
|
init_output();
|
|
26664
26815
|
import * as readline2 from "node:readline";
|
|
26665
26816
|
async function readTokenSilent(prompt) {
|
|
26666
|
-
return new Promise((
|
|
26817
|
+
return new Promise((resolve12, reject) => {
|
|
26667
26818
|
const rl = readline2.createInterface({
|
|
26668
26819
|
input: process.stdin,
|
|
26669
26820
|
output: process.stdout,
|
|
@@ -26681,7 +26832,7 @@ async function readTokenSilent(prompt) {
|
|
|
26681
26832
|
process.stdin.removeListener("data", onData);
|
|
26682
26833
|
process.stdout.write("\n");
|
|
26683
26834
|
rl.close();
|
|
26684
|
-
|
|
26835
|
+
resolve12(token);
|
|
26685
26836
|
} else if (char === "") {
|
|
26686
26837
|
if (process.stdin.isTTY) process.stdin.setRawMode(false);
|
|
26687
26838
|
process.stdin.removeListener("data", onData);
|
|
@@ -26956,7 +27107,7 @@ async function discoverMcpSources(repoPaths) {
|
|
|
26956
27107
|
import { spawn as spawn7 } from "node:child_process";
|
|
26957
27108
|
var VALIDATION_TIMEOUT_MS = 5e3;
|
|
26958
27109
|
async function validateMcpEntry(entry) {
|
|
26959
|
-
return new Promise((
|
|
27110
|
+
return new Promise((resolve12) => {
|
|
26960
27111
|
let stdout = "";
|
|
26961
27112
|
let timedOut = false;
|
|
26962
27113
|
let child;
|
|
@@ -26966,7 +27117,7 @@ async function validateMcpEntry(entry) {
|
|
|
26966
27117
|
env: { ...process.env, ...entry.env ?? {} }
|
|
26967
27118
|
});
|
|
26968
27119
|
} catch (err) {
|
|
26969
|
-
|
|
27120
|
+
resolve12({
|
|
26970
27121
|
name: entry.name,
|
|
26971
27122
|
validated: false,
|
|
26972
27123
|
reason: err instanceof Error ? err.message : "spawn failed"
|
|
@@ -26983,11 +27134,11 @@ async function validateMcpEntry(entry) {
|
|
|
26983
27134
|
child.on("close", (code) => {
|
|
26984
27135
|
clearTimeout(timer);
|
|
26985
27136
|
if (timedOut) {
|
|
26986
|
-
|
|
27137
|
+
resolve12({ name: entry.name, validated: false, reason: "timeout (5s)" });
|
|
26987
27138
|
return;
|
|
26988
27139
|
}
|
|
26989
27140
|
const validated = code === 0 && stdout.trim().length > 0;
|
|
26990
|
-
|
|
27141
|
+
resolve12({
|
|
26991
27142
|
name: entry.name,
|
|
26992
27143
|
validated,
|
|
26993
27144
|
reason: validated ? "ok" : `exit code ${code ?? "null"}`
|
|
@@ -26995,7 +27146,7 @@ async function validateMcpEntry(entry) {
|
|
|
26995
27146
|
});
|
|
26996
27147
|
child.on("error", (err) => {
|
|
26997
27148
|
clearTimeout(timer);
|
|
26998
|
-
|
|
27149
|
+
resolve12({ name: entry.name, validated: false, reason: err.message });
|
|
26999
27150
|
});
|
|
27000
27151
|
});
|
|
27001
27152
|
}
|
|
@@ -27010,11 +27161,11 @@ async function multiSelectPicker(entries) {
|
|
|
27010
27161
|
);
|
|
27011
27162
|
});
|
|
27012
27163
|
console.log("\n" + pc29.dim('Enter numbers to import (e.g. 1,2,3 or "all" or Enter to skip):'));
|
|
27013
|
-
const answer = await new Promise((
|
|
27164
|
+
const answer = await new Promise((resolve12) => {
|
|
27014
27165
|
const rl = readline3.createInterface({ input: process.stdin, output: process.stdout });
|
|
27015
27166
|
rl.question("> ", (ans) => {
|
|
27016
27167
|
rl.close();
|
|
27017
|
-
|
|
27168
|
+
resolve12(ans.trim());
|
|
27018
27169
|
});
|
|
27019
27170
|
});
|
|
27020
27171
|
if (!answer || answer === "") return [];
|
|
@@ -27142,7 +27293,10 @@ function registerMcpRevoke(cmd) {
|
|
|
27142
27293
|
|
|
27143
27294
|
// src/commands/mcp/index.ts
|
|
27144
27295
|
function registerMcp(program2) {
|
|
27145
|
-
const mcp = program2.command("mcp").description("
|
|
27296
|
+
const mcp = program2.command("mcp").description("Run the olam MCP server, wire it into Claude Code, or manage MCP credentials (serve, install, uninstall, login, add, list, remove, import, revoke)");
|
|
27297
|
+
registerMcpServe(mcp);
|
|
27298
|
+
registerMcpInstall(mcp);
|
|
27299
|
+
registerMcpUninstall(mcp);
|
|
27146
27300
|
registerMcpLogin(mcp);
|
|
27147
27301
|
registerMcpAdd(mcp);
|
|
27148
27302
|
registerMcpList(mcp);
|
|
@@ -27153,13 +27307,13 @@ function registerMcp(program2) {
|
|
|
27153
27307
|
}
|
|
27154
27308
|
|
|
27155
27309
|
// src/commands/kg-build.ts
|
|
27156
|
-
import { spawnSync as
|
|
27310
|
+
import { spawnSync as spawnSync16 } from "node:child_process";
|
|
27157
27311
|
import fs48 from "node:fs";
|
|
27158
27312
|
import path53 from "node:path";
|
|
27159
27313
|
|
|
27160
27314
|
// ../core/dist/kg/storage-paths.js
|
|
27161
27315
|
import { homedir as homedir28 } from "node:os";
|
|
27162
|
-
import { join as join48, resolve as
|
|
27316
|
+
import { join as join48, resolve as resolve11 } from "node:path";
|
|
27163
27317
|
|
|
27164
27318
|
// ../core/dist/world/workspace-name.js
|
|
27165
27319
|
var InvalidWorkspaceNameError = class extends Error {
|
|
@@ -27196,7 +27350,7 @@ function assertWithinPrefix(path55, prefix, label) {
|
|
|
27196
27350
|
function kgPristinePath(workspace) {
|
|
27197
27351
|
validateWorkspaceName(workspace);
|
|
27198
27352
|
const root = kgRoot();
|
|
27199
|
-
const path55 =
|
|
27353
|
+
const path55 = resolve11(join48(root, workspace));
|
|
27200
27354
|
assertWithinPrefix(path55, root, "kgPristinePath");
|
|
27201
27355
|
return path55;
|
|
27202
27356
|
}
|
|
@@ -27567,16 +27721,16 @@ async function runKgWatch(workspaceArg, opts, deps = {}) {
|
|
|
27567
27721
|
process.on("SIGINT", () => forward("SIGINT"));
|
|
27568
27722
|
process.on("SIGTERM", () => forward("SIGTERM"));
|
|
27569
27723
|
}
|
|
27570
|
-
return new Promise((
|
|
27724
|
+
return new Promise((resolve12) => {
|
|
27571
27725
|
child.on("exit", (code, signal) => {
|
|
27572
27726
|
removePidFile(name);
|
|
27573
27727
|
const exitCode = typeof code === "number" ? code : signal === "SIGINT" || signal === "SIGTERM" ? 0 : 1;
|
|
27574
|
-
|
|
27728
|
+
resolve12({ exitCode, pidWritten: true });
|
|
27575
27729
|
});
|
|
27576
27730
|
child.on("error", (err) => {
|
|
27577
27731
|
removePidFile(name);
|
|
27578
27732
|
printError(`graphify subprocess error: ${err.message}`);
|
|
27579
|
-
|
|
27733
|
+
resolve12({ exitCode: 1, pidWritten: true });
|
|
27580
27734
|
});
|
|
27581
27735
|
});
|
|
27582
27736
|
}
|
|
@@ -27599,13 +27753,13 @@ function resolveWorkspace(arg) {
|
|
|
27599
27753
|
}
|
|
27600
27754
|
function copyWorkspaceToScratch(source, scratch) {
|
|
27601
27755
|
if (process.platform === "darwin") {
|
|
27602
|
-
const r2 =
|
|
27756
|
+
const r2 = spawnSync16("cp", ["-c", "-r", source + "/.", scratch], {
|
|
27603
27757
|
stdio: ["ignore", "ignore", "pipe"],
|
|
27604
27758
|
encoding: "utf-8"
|
|
27605
27759
|
});
|
|
27606
27760
|
if (r2.status === 0) return "cp-c-r-reflink";
|
|
27607
27761
|
}
|
|
27608
|
-
const r =
|
|
27762
|
+
const r = spawnSync16("cp", ["-r", source + "/.", scratch], {
|
|
27609
27763
|
stdio: ["ignore", "ignore", "pipe"],
|
|
27610
27764
|
encoding: "utf-8"
|
|
27611
27765
|
});
|
|
@@ -27626,7 +27780,7 @@ function parseNodeCount(graphifyOutDir) {
|
|
|
27626
27780
|
}
|
|
27627
27781
|
}
|
|
27628
27782
|
function readGraphifyVersion(image) {
|
|
27629
|
-
const r =
|
|
27783
|
+
const r = spawnSync16(
|
|
27630
27784
|
"docker",
|
|
27631
27785
|
[
|
|
27632
27786
|
"run",
|
|
@@ -27678,7 +27832,7 @@ async function runKgBuild(workspaceArg, options = {}) {
|
|
|
27678
27832
|
"update",
|
|
27679
27833
|
"."
|
|
27680
27834
|
];
|
|
27681
|
-
const r = human ?
|
|
27835
|
+
const r = human ? spawnSync16("docker", dockerArgs, { stdio: "inherit" }) : spawnSync16("docker", dockerArgs, { stdio: ["ignore", "ignore", "pipe"] });
|
|
27682
27836
|
if (r.status !== 0) {
|
|
27683
27837
|
printError(`graphify update failed (exit ${r.status})`);
|
|
27684
27838
|
return { exitCode: r.status ?? 1 };
|
|
@@ -27755,7 +27909,19 @@ function isPleriConfigured(configDir = process.env.OLAM_CONFIG_DIR ?? ".olam") {
|
|
|
27755
27909
|
|
|
27756
27910
|
// src/index.ts
|
|
27757
27911
|
var program = new Command();
|
|
27758
|
-
program.name("olam").description("Olam \u2014 isolated development worlds with thought graph capture").version(readCliVersion());
|
|
27912
|
+
program.name("olam").description("Olam \u2014 isolated development worlds with thought graph capture").option("--mcp", "Run the olam MCP server (stdio); alias for `olam mcp serve`").version(readCliVersion());
|
|
27913
|
+
var mcpFlagIndex = process.argv.indexOf("--mcp");
|
|
27914
|
+
if (mcpFlagIndex !== -1) {
|
|
27915
|
+
const afterFlag = process.argv.slice(mcpFlagIndex + 1).filter((a) => !a.startsWith("-"));
|
|
27916
|
+
if (afterFlag.length > 0) {
|
|
27917
|
+
process.stderr.write(
|
|
27918
|
+
`error: --mcp does not accept positional arguments (got ${JSON.stringify(afterFlag)}). Use 'olam mcp serve' directly if you need subcommand-level flags.
|
|
27919
|
+
`
|
|
27920
|
+
);
|
|
27921
|
+
process.exit(1);
|
|
27922
|
+
}
|
|
27923
|
+
process.argv.splice(mcpFlagIndex, 1, "mcp", "serve");
|
|
27924
|
+
}
|
|
27759
27925
|
registerInit(program);
|
|
27760
27926
|
registerInstall(program);
|
|
27761
27927
|
registerAuth(program);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAA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