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
18 "@executor-js/plugin-openapi",18 "@executor-js/plugin-openapi",
19 "@executor-js/plugin-example",19 "@executor-js/plugin-example",
20 "@executor-js/plugin-desktop-settings",20 "@executor-js/plugin-desktop-settings",
21 "@executor-js/desktop"21 "@executor-js/desktop",
22 "@executor-js/local"
22 ]23 ]
23 ],24 ],
24 "linked": [],25 "linked": [],
@@ -29,7 +30,6 @@ · 4 unmodified lines
29 "onlyUpdatePeerDependentsWhenOutOfRange": true30 "onlyUpdatePeerDependentsWhenOutOfRange": true
30 },31 },
31 "ignore": [32 "ignore": [
32 "@executor-js/local",
33 "@executor-js/host-mcp",33 "@executor-js/host-mcp",
34 "@executor-js/ir",34 "@executor-js/ir",
35 "@executor-js/runtime-deno-subprocess",35 "@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
6Report 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
15 return "stable";15 return "stable";
16};16};
17 17
18// The desktop main process sets `EXECUTOR_CLIENT=desktop` when it spawns the18// The surface is cli|desktop — never a "local" catch-all: the desktop main
19// sidecar so PostHog can slice desktop installs from headless apps/local19// process marks its sidecar via EXECUTOR_CLIENT=desktop; everything else
20// (CLI `executor web`, `daemon run --foreground`, etc.).20// hosting apps/local (`executor web`, `daemon run --foreground`, stdio MCP)
21// is the CLI. Mirrors resolveSurface in ./analytics.ts.
21const resolveClient = (): SurfaceClient =>22const resolveClient = (): SurfaceClient =>
22 process.env.EXECUTOR_CLIENT === "desktop" ? "desktop" : "local";23 process.env.EXECUTOR_CLIENT === "desktop" ? "desktop" : "cli";
23 24
24export const CHANNEL: InstallationChannel = resolveChannel(LOCAL_VERSION);25export const CHANNEL: InstallationChannel = resolveChannel(LOCAL_VERSION);
25export const VERSION: string = LOCAL_VERSION;26export const VERSION: string = LOCAL_VERSION;
packages/core/integrations-registry/src/registry.test.ts+2−2
@@ -49,8 +49,8 @@ describe("buildUserAgent", () => { · 48 unmodified lines
49 expect(buildUserAgent({ channel: "stable", version: "1.2.3", client: "cli" })).toBe(49 expect(buildUserAgent({ channel: "stable", version: "1.2.3", client: "cli" })).toBe(
50 "executor/stable/1.2.3/cli",50 "executor/stable/1.2.3/cli",
51 );51 );
52 expect(buildUserAgent({ channel: "beta", version: "1.2.3-beta.0", client: "local" })).toBe(52 expect(buildUserAgent({ channel: "beta", version: "1.2.3-beta.0", client: "desktop" })).toBe(
53 "executor/beta/1.2.3-beta.0/local",53 "executor/beta/1.2.3-beta.0/desktop",
54 );54 );
55 });55 });
56 56
packages/core/integrations-registry/src/registry.ts+1−1
@@ -11,7 +11,7 @@ import { NodeFileSystem } from "@effect/platform-node"; · 10 unmodified lines
11// ---------------------------------------------------------------------------11// ---------------------------------------------------------------------------
12 12
13export type InstallationChannel = "stable" | "beta" | "dev";13export type InstallationChannel = "stable" | "beta" | "dev";
14export type SurfaceClient = "cli" | "local" | "desktop";14export type SurfaceClient = "cli" | "desktop";
15 15
16export const DEFAULT_INTEGRATIONS_URL = "https://integrations.sh/api.json";16export const DEFAULT_INTEGRATIONS_URL = "https://integrations.sh/api.json";
17 17

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