@a-company/paradigm 3.27.0 → 3.28.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/{conductor-CAIY5LJA.js → conductor-HLWYWUVH.js} +14 -0
- package/dist/index.js +1 -1
- package/dist/mcp.js +75 -35
- package/package.json +1 -1
|
@@ -67,6 +67,20 @@ function findConductorDir() {
|
|
|
67
67
|
if (fs.existsSync(path.join(cwdCandidate, "Package.swift"))) {
|
|
68
68
|
return cwdCandidate;
|
|
69
69
|
}
|
|
70
|
+
if (fs.existsSync(path.join(process.cwd(), "Package.swift"))) {
|
|
71
|
+
const basename2 = path.basename(process.cwd());
|
|
72
|
+
if (basename2 === "conductor") {
|
|
73
|
+
return process.cwd();
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
let cwdDir = process.cwd();
|
|
77
|
+
for (let i = 0; i < 5; i++) {
|
|
78
|
+
cwdDir = path.dirname(cwdDir);
|
|
79
|
+
const candidate = path.join(cwdDir, "packages", "conductor");
|
|
80
|
+
if (fs.existsSync(path.join(candidate, "Package.swift"))) {
|
|
81
|
+
return candidate;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
70
84
|
return null;
|
|
71
85
|
}
|
|
72
86
|
export {
|
package/dist/index.js
CHANGED
|
@@ -748,7 +748,7 @@ sentinelCmd.command("defend [path]", { isDefault: true }).description("Launch th
|
|
|
748
748
|
await sentinelCommand(path2, options);
|
|
749
749
|
});
|
|
750
750
|
program.command("conductor").description("Launch Paradigm Conductor \u2014 multimodal mission control for Claude Code sessions").option("--build", "Force rebuild the native binary").option("-v, --verbose", "Show build output").action(async (options) => {
|
|
751
|
-
const { conductorCommand } = await import("./conductor-
|
|
751
|
+
const { conductorCommand } = await import("./conductor-HLWYWUVH.js");
|
|
752
752
|
await conductorCommand(options);
|
|
753
753
|
});
|
|
754
754
|
program.command("university").description("Launch Paradigm University - interactive learning platform & PLSAT certification").option("-p, --port <port>", "Port to run on", "3839").option("--no-open", "Don't open browser automatically").action(async (options) => {
|
package/dist/mcp.js
CHANGED
|
@@ -13744,12 +13744,13 @@ async function handlePipelineTool(name, args, ctx) {
|
|
|
13744
13744
|
}
|
|
13745
13745
|
|
|
13746
13746
|
// ../paradigm-mcp/src/tools/conductor.ts
|
|
13747
|
-
import { execSync as
|
|
13747
|
+
import { execSync as execSync6 } from "child_process";
|
|
13748
13748
|
|
|
13749
13749
|
// ../paradigm-mcp/src/utils/conductor-loader.ts
|
|
13750
13750
|
import * as fs25 from "fs";
|
|
13751
13751
|
import * as path27 from "path";
|
|
13752
13752
|
import * as os3 from "os";
|
|
13753
|
+
import { execSync as execSync5 } from "child_process";
|
|
13753
13754
|
var CONDUCTOR_DIR = path27.join(os3.homedir(), ".conductor");
|
|
13754
13755
|
var SESSIONS_DIR = path27.join(CONDUCTOR_DIR, "sessions");
|
|
13755
13756
|
function ensureSessionsDir() {
|
|
@@ -13808,6 +13809,72 @@ function isProcessAlive(pid) {
|
|
|
13808
13809
|
return false;
|
|
13809
13810
|
}
|
|
13810
13811
|
}
|
|
13812
|
+
function detectTerminalBundleId() {
|
|
13813
|
+
try {
|
|
13814
|
+
const script = `
|
|
13815
|
+
tell application "System Events"
|
|
13816
|
+
set frontApp to first application process whose frontmost is true
|
|
13817
|
+
return bundle identifier of frontApp
|
|
13818
|
+
end tell
|
|
13819
|
+
`;
|
|
13820
|
+
const result = execSync5(`osascript -e '${script}'`, {
|
|
13821
|
+
encoding: "utf-8",
|
|
13822
|
+
timeout: 3e3
|
|
13823
|
+
}).trim();
|
|
13824
|
+
return result || void 0;
|
|
13825
|
+
} catch {
|
|
13826
|
+
return void 0;
|
|
13827
|
+
}
|
|
13828
|
+
}
|
|
13829
|
+
function detectGitBranch(cwd) {
|
|
13830
|
+
try {
|
|
13831
|
+
return execSync5("git rev-parse --abbrev-ref HEAD", {
|
|
13832
|
+
cwd,
|
|
13833
|
+
encoding: "utf-8",
|
|
13834
|
+
timeout: 3e3
|
|
13835
|
+
}).trim() || void 0;
|
|
13836
|
+
} catch {
|
|
13837
|
+
return void 0;
|
|
13838
|
+
}
|
|
13839
|
+
}
|
|
13840
|
+
function autoRegisterWithConductor(projectDir2) {
|
|
13841
|
+
try {
|
|
13842
|
+
const pid = process.pid;
|
|
13843
|
+
const terminal = detectTerminalBundleId();
|
|
13844
|
+
const branch = detectGitBranch(projectDir2);
|
|
13845
|
+
let parentPid;
|
|
13846
|
+
try {
|
|
13847
|
+
const ppid = execSync5(`ps -o ppid= -p ${pid}`, {
|
|
13848
|
+
encoding: "utf-8",
|
|
13849
|
+
timeout: 3e3
|
|
13850
|
+
}).trim();
|
|
13851
|
+
parentPid = parseInt(ppid, 10);
|
|
13852
|
+
if (isNaN(parentPid)) parentPid = void 0;
|
|
13853
|
+
} catch {
|
|
13854
|
+
}
|
|
13855
|
+
registerConductorSession({
|
|
13856
|
+
pid,
|
|
13857
|
+
parentPid,
|
|
13858
|
+
projectDir: projectDir2,
|
|
13859
|
+
terminal,
|
|
13860
|
+
branch
|
|
13861
|
+
});
|
|
13862
|
+
const cleanup = () => {
|
|
13863
|
+
try {
|
|
13864
|
+
unregisterConductorSession(pid);
|
|
13865
|
+
} catch {
|
|
13866
|
+
}
|
|
13867
|
+
};
|
|
13868
|
+
process.on("exit", cleanup);
|
|
13869
|
+
process.on("SIGTERM", () => {
|
|
13870
|
+
cleanup();
|
|
13871
|
+
process.exit(0);
|
|
13872
|
+
});
|
|
13873
|
+
console.error(`[paradigm-mcp] Auto-registered with Conductor (PID ${pid})`);
|
|
13874
|
+
} catch {
|
|
13875
|
+
console.error("[paradigm-mcp] Auto-registration with Conductor skipped (non-fatal)");
|
|
13876
|
+
}
|
|
13877
|
+
}
|
|
13811
13878
|
|
|
13812
13879
|
// ../paradigm-mcp/src/tools/conductor.ts
|
|
13813
13880
|
function getConductorToolsList() {
|
|
@@ -13880,23 +13947,12 @@ async function handleConductorTool(name, args, ctx) {
|
|
|
13880
13947
|
switch (name) {
|
|
13881
13948
|
case "paradigm_conductor_register": {
|
|
13882
13949
|
const pid = process.pid;
|
|
13883
|
-
const projectDir2 = ctx.
|
|
13884
|
-
|
|
13885
|
-
|
|
13886
|
-
terminal = detectTerminalBundleId();
|
|
13887
|
-
}
|
|
13888
|
-
let branch;
|
|
13889
|
-
try {
|
|
13890
|
-
branch = execSync5("git rev-parse --abbrev-ref HEAD", {
|
|
13891
|
-
cwd: projectDir2,
|
|
13892
|
-
encoding: "utf-8",
|
|
13893
|
-
timeout: 3e3
|
|
13894
|
-
}).trim();
|
|
13895
|
-
} catch {
|
|
13896
|
-
}
|
|
13950
|
+
const projectDir2 = ctx.rootDir;
|
|
13951
|
+
const terminal = args.terminal || detectTerminalBundleId();
|
|
13952
|
+
const branch = detectGitBranch(projectDir2);
|
|
13897
13953
|
let parentPid;
|
|
13898
13954
|
try {
|
|
13899
|
-
const ppid =
|
|
13955
|
+
const ppid = execSync6(`ps -o ppid= -p ${pid}`, {
|
|
13900
13956
|
encoding: "utf-8",
|
|
13901
13957
|
timeout: 3e3
|
|
13902
13958
|
}).trim();
|
|
@@ -13975,27 +14031,10 @@ This session is no longer visible in the Conductor overlay.`,
|
|
|
13975
14031
|
return { text: "", handled: false };
|
|
13976
14032
|
}
|
|
13977
14033
|
}
|
|
13978
|
-
function detectTerminalBundleId() {
|
|
13979
|
-
try {
|
|
13980
|
-
const script = `
|
|
13981
|
-
tell application "System Events"
|
|
13982
|
-
set frontApp to first application process whose frontmost is true
|
|
13983
|
-
return bundle identifier of frontApp
|
|
13984
|
-
end tell
|
|
13985
|
-
`;
|
|
13986
|
-
const result = execSync5(`osascript -e '${script}'`, {
|
|
13987
|
-
encoding: "utf-8",
|
|
13988
|
-
timeout: 3e3
|
|
13989
|
-
}).trim();
|
|
13990
|
-
return result || void 0;
|
|
13991
|
-
} catch {
|
|
13992
|
-
return void 0;
|
|
13993
|
-
}
|
|
13994
|
-
}
|
|
13995
14034
|
|
|
13996
14035
|
// ../paradigm-mcp/src/tools/fallback-grep.ts
|
|
13997
14036
|
import * as path28 from "path";
|
|
13998
|
-
import { execSync as
|
|
14037
|
+
import { execSync as execSync7 } from "child_process";
|
|
13999
14038
|
function grepForReferences(rootDir, symbol, options = {}) {
|
|
14000
14039
|
const { maxResults = 20 } = options;
|
|
14001
14040
|
const results = [];
|
|
@@ -14009,7 +14048,7 @@ function grepForReferences(rootDir, symbol, options = {}) {
|
|
|
14009
14048
|
let output = "";
|
|
14010
14049
|
for (const cmd of grepCommands) {
|
|
14011
14050
|
try {
|
|
14012
|
-
output =
|
|
14051
|
+
output = execSync7(cmd, { encoding: "utf8", maxBuffer: 1024 * 1024 });
|
|
14013
14052
|
if (output.trim()) break;
|
|
14014
14053
|
} catch {
|
|
14015
14054
|
continue;
|
|
@@ -15202,6 +15241,7 @@ async function main() {
|
|
|
15202
15241
|
console.error(`[paradigm-mcp] Error loading project:`, error);
|
|
15203
15242
|
process.exit(1);
|
|
15204
15243
|
}
|
|
15244
|
+
autoRegisterWithConductor(projectDir);
|
|
15205
15245
|
const server = new Server(
|
|
15206
15246
|
{
|
|
15207
15247
|
name: "paradigm",
|