@minhpnq1807/contextos 0.5.27 → 0.5.29
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/CHANGELOG.md +9 -0
- package/bin/ctx.js +44 -13
- package/package.json +1 -1
- package/plugins/ctx/lib/skillshare-sync.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.29
|
|
4
|
+
|
|
5
|
+
- **Fix Windows skillshare install `iex` not recognized:** The PowerShell pipe `irm ... | iex` was being intercepted by `cmd.exe` (the outer shell via `shell: true`) instead of PowerShell. Switched to `execSync` with properly double-quoted `-Command` argument so the pipe stays inside PowerShell's scope.
|
|
6
|
+
|
|
7
|
+
## 0.5.28
|
|
8
|
+
|
|
9
|
+
- **Consistent `◇`/`│` UI formatting for all install and setup output:** All progress bars, detail lines, and status messages from `ctx install` and `ctx setup` are now captured and re-emitted with `◇` step headers and `│`-indented detail lines. Added `captureSetupOutput` helper that intercepts both `console.log` and `process.stderr.write` to ensure nothing leaks unprefixed.
|
|
10
|
+
- **Fix broken `syncSkills` call in setup:** Restored the missing `syncSkills()` invocation that was accidentally dropped during a previous edit.
|
|
11
|
+
|
|
3
12
|
## 0.5.27
|
|
4
13
|
|
|
5
14
|
- **Fix Windows `spawnSync`/`execFileSync` ENOENT across all modules:** Added `shell: true` to every remaining child-process invocation in `ruler-sync.js`, `skillshare-sync.js`, `passthrough.js`, and `measure.js`. Without this, Windows cannot resolve `.cmd`/`.ps1` shims (e.g. `npm.cmd`, `ruler.cmd`, `skillshare.cmd`) via PATH, causing `ctx setup` to crash during the Ruler/Skillshare installation step.
|
package/bin/ctx.js
CHANGED
|
@@ -98,6 +98,29 @@ function normalizeInstallAgent(agent) {
|
|
|
98
98
|
return normalized;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
+
/**
|
|
102
|
+
* Capture all console.log and process.stderr.write output from an async fn.
|
|
103
|
+
* Returns an array of clean text lines (no \r, no trailing whitespace).
|
|
104
|
+
*/
|
|
105
|
+
async function captureSetupOutput(fn) {
|
|
106
|
+
const lines = [];
|
|
107
|
+
const origLog = console.log;
|
|
108
|
+
const origStderrWrite = process.stderr.write;
|
|
109
|
+
console.log = (...args) => lines.push(args.map(String).join(" "));
|
|
110
|
+
process.stderr.write = (chunk) => {
|
|
111
|
+
const text = String(chunk).replace(/\r/g, "").trim();
|
|
112
|
+
if (text) lines.push(text);
|
|
113
|
+
return true;
|
|
114
|
+
};
|
|
115
|
+
try {
|
|
116
|
+
await fn();
|
|
117
|
+
} finally {
|
|
118
|
+
console.log = origLog;
|
|
119
|
+
process.stderr.write = origStderrWrite;
|
|
120
|
+
}
|
|
121
|
+
return lines;
|
|
122
|
+
}
|
|
123
|
+
|
|
101
124
|
function createInstallProgress({ quiet = false } = {}) {
|
|
102
125
|
const enabled = !quiet && process.stderr.isTTY;
|
|
103
126
|
const frames = ["-", "\\", "|", "/"];
|
|
@@ -537,24 +560,26 @@ async function setup({ args = [], cwd = process.cwd() } = {}) {
|
|
|
537
560
|
if (!options.agents.length) throw new Error("No agents selected. Use --agents codex,claude,agy.");
|
|
538
561
|
|
|
539
562
|
for (const agent of options.agents) {
|
|
540
|
-
console.log(
|
|
541
|
-
await install({ agent, copy: false });
|
|
563
|
+
console.log(`◇ Setting up ${agent}...`);
|
|
564
|
+
const lines = await captureSetupOutput(() => install({ agent, copy: false }));
|
|
565
|
+
for (const line of lines) console.log(`│ ${line}`);
|
|
542
566
|
}
|
|
543
567
|
|
|
544
568
|
if (options.syncRules) {
|
|
545
|
-
console.log("
|
|
569
|
+
console.log("◇ Syncing project rules and MCP servers...");
|
|
546
570
|
const syncAgents = options.agents.map((agent) => agent === "agy" ? "antigravity" : agent).join(",");
|
|
547
571
|
const syncArgs = ["--rules", "--agents", syncAgents];
|
|
548
572
|
if (options.yes) syncArgs.push("--yes");
|
|
549
|
-
await syncRules({ cwd, rootDir, args: syncArgs });
|
|
573
|
+
const lines = await captureSetupOutput(() => syncRules({ cwd, rootDir, args: syncArgs }));
|
|
574
|
+
for (const line of lines) console.log(`│ ${line}`);
|
|
550
575
|
}
|
|
551
576
|
|
|
552
577
|
if (options.syncSkills) {
|
|
553
|
-
console.log("
|
|
578
|
+
console.log("◇ Syncing skills...");
|
|
554
579
|
const skillAgents = options.agents.map((agent) => agent === "agy" ? "antigravity" : agent).join(",");
|
|
555
580
|
const syncArgs = ["--skills", "--agents", skillAgents];
|
|
556
581
|
if (options.yes) syncArgs.push("--yes");
|
|
557
|
-
await syncSkills({
|
|
582
|
+
const lines = await captureSetupOutput(() => syncSkills({
|
|
558
583
|
cwd,
|
|
559
584
|
args: syncArgs,
|
|
560
585
|
rebuildSkillEmbeddings: async ({ cwd: skillCwd, sourceDir }) => warmSkillEmbeddings({
|
|
@@ -563,14 +588,15 @@ async function setup({ args = [], cwd = process.cwd() } = {}) {
|
|
|
563
588
|
allowRemote: !isModelCacheReady(contextOSDataDir()),
|
|
564
589
|
skills: scanSkills({ cwd: skillCwd, roots: [sourceDir] })
|
|
565
590
|
})
|
|
566
|
-
});
|
|
591
|
+
}));
|
|
592
|
+
for (const line of lines) console.log(`│ ${line}`);
|
|
567
593
|
}
|
|
568
594
|
|
|
569
595
|
console.log("");
|
|
570
|
-
console.log("
|
|
571
|
-
console.log("│
|
|
572
|
-
console.log("│
|
|
573
|
-
console.log("
|
|
596
|
+
console.log("◇ ContextOS is ready");
|
|
597
|
+
console.log("│ Next: restart/open your agent from this project directory.");
|
|
598
|
+
console.log("│ Try: ctx debug -- \"Recheck authen flow\"");
|
|
599
|
+
console.log("");
|
|
574
600
|
}
|
|
575
601
|
|
|
576
602
|
const args = process.argv.slice(2);
|
|
@@ -593,7 +619,10 @@ try {
|
|
|
593
619
|
|
|
594
620
|
if (explicitAgent) {
|
|
595
621
|
// Direct mode: ctx install --agent <name>
|
|
596
|
-
|
|
622
|
+
console.log(`◇ Installing ${explicitAgent}...`);
|
|
623
|
+
const lines = await captureSetupOutput(() => install({ copy, agent: explicitAgent }));
|
|
624
|
+
for (const line of lines) console.log(`│ ${line}`);
|
|
625
|
+
console.log("");
|
|
597
626
|
} else {
|
|
598
627
|
// Interactive mode: ctx install
|
|
599
628
|
const selected = await multiSelect({
|
|
@@ -604,7 +633,9 @@ try {
|
|
|
604
633
|
console.log("No agents selected. Nothing to install.");
|
|
605
634
|
} else {
|
|
606
635
|
for (const agent of selected) {
|
|
607
|
-
|
|
636
|
+
console.log(`◇ Installing ${agent}...`);
|
|
637
|
+
const lines = await captureSetupOutput(() => install({ copy, agent }));
|
|
638
|
+
for (const line of lines) console.log(`│ ${line}`);
|
|
608
639
|
console.log("");
|
|
609
640
|
}
|
|
610
641
|
}
|
package/package.json
CHANGED
|
@@ -120,7 +120,7 @@ export async function installSkillshare({
|
|
|
120
120
|
|
|
121
121
|
const osName = detectOS(platform);
|
|
122
122
|
if (osName === "windows") {
|
|
123
|
-
|
|
123
|
+
runShellCommand(`powershell -NoProfile -ExecutionPolicy Bypass -Command "irm ${INSTALL_PS_URL} | iex"`, { stdio: "inherit", dryRun });
|
|
124
124
|
} else {
|
|
125
125
|
runShellCommand(`curl -fsSL ${INSTALL_SH_URL} | sh`, { stdio: "inherit", dryRun });
|
|
126
126
|
}
|