@lightupai/polaris 0.0.81 → 0.0.82
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/README.md +12 -2
- package/package.json +1 -1
- package/src/cli/cli.ts +31 -0
package/README.md
CHANGED
|
@@ -77,7 +77,7 @@ npm install -g @lightupai/polaris
|
|
|
77
77
|
polaris
|
|
78
78
|
|
|
79
79
|
# Or run steps independently:
|
|
80
|
-
polaris install # Install MCP server, hooks, skill, status line
|
|
80
|
+
polaris install # Install MCP server, hooks, skill, status line + restart daemon
|
|
81
81
|
polaris login # Authenticate against production
|
|
82
82
|
polaris login --local # Authenticate against localhost (for local dev)
|
|
83
83
|
|
|
@@ -87,12 +87,22 @@ polaris use local # Switch to local dev
|
|
|
87
87
|
polaris use prod # Switch to production
|
|
88
88
|
|
|
89
89
|
# Other commands
|
|
90
|
-
polaris daemon # Start the local daemon
|
|
90
|
+
polaris daemon # Start the local daemon (kills any existing daemon first)
|
|
91
91
|
polaris status # Show active profile, daemon state, sessions
|
|
92
92
|
polaris logout # Remove active profile credentials
|
|
93
93
|
polaris logout --all # Remove all credentials
|
|
94
94
|
```
|
|
95
95
|
|
|
96
|
+
### Upgrading
|
|
97
|
+
|
|
98
|
+
Because `polaris` is a **global install**, use `npm install -g` to upgrade — not `npx`:
|
|
99
|
+
|
|
100
|
+
```sh
|
|
101
|
+
npm install -g @lightupai/polaris@latest
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
`npx @lightupai/polaris@latest` will work for first-time installs but won't override a global binary already in `PATH`. The CLI warns you at startup if a newer version is available.
|
|
105
|
+
|
|
96
106
|
## Configuration
|
|
97
107
|
|
|
98
108
|
Copy `.env.example` to `.env` and fill in your credentials. All settings are loaded by the Makefile and passed to services.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lightupai/polaris",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.82",
|
|
4
4
|
"description": "Record and stream Claude Code sessions to Slack. Like Gong for AI coding — capture every prompt, response, and tool call. Multiplayer collaboration across AI coding agents.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|
package/src/cli/cli.ts
CHANGED
|
@@ -778,6 +778,23 @@ async function logout(all = false) {
|
|
|
778
778
|
console.log("MCP config and hooks are still installed — run `polaris install` to reset them.");
|
|
779
779
|
}
|
|
780
780
|
|
|
781
|
+
// --- Update check ---
|
|
782
|
+
// Warn if a newer version is available on npm. Best-effort: never blocks startup.
|
|
783
|
+
|
|
784
|
+
async function checkForUpdate(): Promise<void> {
|
|
785
|
+
try {
|
|
786
|
+
const pkgPath = join(import.meta.dir, "..", "..", "package.json");
|
|
787
|
+
const { version: current } = JSON.parse(await readFile(pkgPath, "utf-8")) as { version: string };
|
|
788
|
+
const res = await fetch("https://registry.npmjs.org/@lightupai/polaris/latest", { signal: AbortSignal.timeout(3000) });
|
|
789
|
+
if (!res.ok) return;
|
|
790
|
+
const { version: latest } = await res.json() as { version: string };
|
|
791
|
+
if (latest !== current) {
|
|
792
|
+
console.error(`\n⚠ A newer version of Polaris is available: ${latest} (you have ${current})`);
|
|
793
|
+
console.error(" Run: npm install -g @lightupai/polaris@latest\n");
|
|
794
|
+
}
|
|
795
|
+
} catch { /* best-effort — network may be unavailable */ }
|
|
796
|
+
}
|
|
797
|
+
|
|
781
798
|
// --- Main ---
|
|
782
799
|
|
|
783
800
|
const args = process.argv.slice(2);
|
|
@@ -793,10 +810,23 @@ function hasFlag(name: string): boolean {
|
|
|
793
810
|
return args.includes(`--${name}`);
|
|
794
811
|
}
|
|
795
812
|
|
|
813
|
+
void checkForUpdate();
|
|
814
|
+
|
|
796
815
|
switch (command) {
|
|
797
816
|
case "install":
|
|
798
817
|
console.log("Polaris — installing local components\n");
|
|
799
818
|
await install();
|
|
819
|
+
// Restart daemon so it picks up any updates in the new package
|
|
820
|
+
await killExistingDaemon();
|
|
821
|
+
{
|
|
822
|
+
const daemonPath = join(import.meta.dir, "..", "daemon", "daemon.ts");
|
|
823
|
+
Bun.spawn(["bun", "run", daemonPath], {
|
|
824
|
+
stdout: "ignore",
|
|
825
|
+
stderr: "ignore",
|
|
826
|
+
env: { ...process.env },
|
|
827
|
+
}).unref?.();
|
|
828
|
+
}
|
|
829
|
+
console.log(" ✓ Daemon restarted");
|
|
800
830
|
console.log("\nInstall complete.");
|
|
801
831
|
break;
|
|
802
832
|
|
|
@@ -833,6 +863,7 @@ switch (command) {
|
|
|
833
863
|
break;
|
|
834
864
|
|
|
835
865
|
case "daemon":
|
|
866
|
+
await killExistingDaemon();
|
|
836
867
|
await daemon();
|
|
837
868
|
break;
|
|
838
869
|
|