History

Report real surface and version in registry user-agent

Rhys Sullivan committed 3 months ago

Commit f3822461 parent a479d235 files · +16 −9Browse files

Unified · Split

5 files
  1. .changeset/config.json +2 −2
  2. .changeset/tidy-donkeys-repeat.md +6 −0
  3. apps/local/src/installation.ts +5 −4
  4. packages/core/integrations-registry/src/registry.test.ts +2 −2
  5. packages/core/integrations-registry/src/registry.ts +1 −1
.changeset/config.json+2−2
@@ -18,7 +18,8 @@ · 17 unmodified lines
1818 "@executor-js/plugin-openapi",
1919 "@executor-js/plugin-example",
2020 "@executor-js/plugin-desktop-settings",
21− "@executor-js/desktop"
21+ "@executor-js/desktop",
22+ "@executor-js/local"
2223 ]
2324 ],
2425 "linked": [],
@@ -29,7 +30,6 @@ · 4 unmodified lines
2930 "onlyUpdatePeerDependentsWhenOutOfRange": true
3031 },
3132 "ignore": [
32− "@executor-js/local",
3333 "@executor-js/host-mcp",
3434 "@executor-js/ir",
3535 "@executor-js/runtime-deno-subprocess",
.changeset/tidy-donkeys-repeat.md+6−0
@@ -0,0 +1,6 @@
1+---
2+"executor": patch
3+"@executor-js/local": patch
4+---
5+
6+Report the real product surface and version in the integrations.sh registry user-agent. The daemon previously sent `local` with a version frozen at 1.4.4; it now reports `cli` or `desktop` (matching analytics surfaces) and `@executor-js/local` is versioned with the release train.
apps/local/src/installation.ts+5−4
@@ -15,11 +15,12 @@ const resolveChannel = (version: string): InstallationChannel => { · 14 unmodified lines
1515 return "stable";
1616 };
1717
18−// The desktop main process sets `EXECUTOR_CLIENT=desktop` when it spawns the
19−// sidecar so PostHog can slice desktop installs from headless apps/local
20−// (CLI `executor web`, `daemon run --foreground`, etc.).
18+// The surface is cli|desktop — never a "local" catch-all: the desktop main
19+// process marks its sidecar via EXECUTOR_CLIENT=desktop; everything else
20+// hosting apps/local (`executor web`, `daemon run --foreground`, stdio MCP)
21+// is the CLI. Mirrors resolveSurface in ./analytics.ts.
2122 const resolveClient = (): SurfaceClient =>
22− process.env.EXECUTOR_CLIENT === "desktop" ? "desktop" : "local";
23+ process.env.EXECUTOR_CLIENT === "desktop" ? "desktop" : "cli";
2324
2425 export const CHANNEL: InstallationChannel = resolveChannel(LOCAL_VERSION);
2526 export const VERSION: string = LOCAL_VERSION;
packages/core/integrations-registry/src/registry.test.ts+2−2
@@ -49,8 +49,8 @@ describe("buildUserAgent", () => { · 48 unmodified lines
4949 expect(buildUserAgent({ channel: "stable", version: "1.2.3", client: "cli" })).toBe(
5050 "executor/stable/1.2.3/cli",
5151 );
52− expect(buildUserAgent({ channel: "beta", version: "1.2.3-beta.0", client: "local" })).toBe(
53− "executor/beta/1.2.3-beta.0/local",
52+ expect(buildUserAgent({ channel: "beta", version: "1.2.3-beta.0", client: "desktop" })).toBe(
53+ "executor/beta/1.2.3-beta.0/desktop",
5454 );
5555 });
5656
packages/core/integrations-registry/src/registry.ts+1−1
@@ -11,7 +11,7 @@ import { NodeFileSystem } from "@effect/platform-node"; · 10 unmodified lines
1111 // ---------------------------------------------------------------------------
1212
1313 export type InstallationChannel = "stable" | "beta" | "dev";
14−export type SurfaceClient = "cli" | "local" | "desktop";
14+export type SurfaceClient = "cli" | "desktop";
1515
1616 export const DEFAULT_INTEGRATIONS_URL = "https://integrations.sh/api.json";
1717

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t