@cline/shared 0.0.93 → 0.0.94-nightly.1792204233

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.
@@ -2,6 +2,43 @@ export declare const CLINE_RUN_AS_HUB_DAEMON_ENV = "CLINE_RUN_AS_HUB_DAEMON";
2
2
  export declare const CLINE_CONNECTOR_CLI_LAUNCH_ENV = "CLINE_CONNECTOR_CLI_LAUNCH";
3
3
  export declare const CLINE_CONNECTOR_STARTING_INSTANCE_ENV = "CLINE_CONNECTOR_STARTING_INSTANCE";
4
4
  export declare const CLINE_CONNECTOR_SUPERVISED_ENV = "CLINE_CONNECTOR_SUPERVISED";
5
+ export declare const CLINE_HUB_LAUNCHER_CLIENT_ENV = "CLINE_HUB_LAUNCHER_CLIENT";
6
+ export declare const CLINE_HUB_LAUNCHER_VERSION_ENV = "CLINE_HUB_LAUNCHER_VERSION";
7
+ export declare const CLINE_HUB_LAUNCHER_TRANSPORT_ENV = "CLINE_HUB_LAUNCHER_TRANSPORT";
8
+ /**
9
+ * Which Cline client started a Hub daemon. The daemon is one shared process
10
+ * per machine and any client attaches to it, so a session's own client
11
+ * identity (desktop, CLI, extension) says nothing about whose build is
12
+ * hosting it. The spawner stamps this into the daemon's environment and the
13
+ * daemon publishes it as OTel resource attributes, so a trace from a desktop
14
+ * session can be read as "served by the hub the CLI started" (or vice versa).
15
+ */
16
+ export interface HubLauncherIdentity {
17
+ /** Client name of the spawner, e.g. `cline-desktop`, `cline-cli`. */
18
+ client: string;
19
+ version?: string;
20
+ /** `local` for a daemon on the client's own machine, `ssh` for a remote one. */
21
+ transport?: "local" | "ssh";
22
+ }
23
+ /**
24
+ * Stamp the launcher identity onto a daemon environment. A launcher already
25
+ * in `env` is kept as a whole: an embedding host (the desktop app running
26
+ * `cline-cli hub ensure`) stamps itself before handing the spawn to the CLI,
27
+ * and filling in fields it left unset from the CLI's identity would pair the
28
+ * host's name with another build's version.
29
+ */
30
+ export declare function withHubLauncherIdentity<T extends Record<string, string | undefined>>(env: T, identity: HubLauncherIdentity | undefined): T;
31
+ /**
32
+ * Take the launcher stamp out of a daemon's environment, returning it.
33
+ *
34
+ * Same hazard as {@link claimHubDaemonProcess}: everything a hub-hosted
35
+ * session spawns inherits the daemon's environment. A shell command that
36
+ * starts its own hub (`cline hub ensure --discovery-path ...`) would
37
+ * otherwise keep the outer hub's stamp, and a local CLI hub started inside
38
+ * an SSH-hosted session would report the desktop launcher and `ssh`.
39
+ */
40
+ export declare function claimHubLauncherIdentity(env?: Record<string, string | undefined>): HubLauncherIdentity | undefined;
41
+ export declare function readHubLauncherIdentity(env?: Record<string, string | undefined>): HubLauncherIdentity | undefined;
5
42
  export interface ConnectorCliLaunchSpec {
6
43
  launcher: string;
7
44
  connectArgsPrefix: string[];
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Builds the `--telemetry-selfcheck` report (see index.ts). CI runs the
3
+ * packaged CLI and desktop backend with that flag and fails the publish unless the report
4
+ * shows telemetry enabled with a usable OTLP endpoint, so the checks here
5
+ * define what a release-grade build must prove.
6
+ */
7
+ export type TelemetrySelfcheckConfig = {
8
+ enabled?: boolean;
9
+ otlpEndpoint?: string;
10
+ logsExporter?: string;
11
+ metricsExporter?: string;
12
+ tracesExporter?: string;
13
+ };
14
+ export type TelemetrySelfcheckReport = {
15
+ telemetry_selfcheck: true;
16
+ enabled: boolean;
17
+ /**
18
+ * The OTLP endpoint host when the endpoint is a usable http(s) URL,
19
+ * `""` when no endpoint was inlined, or `"invalid-endpoint-url"` when
20
+ * the endpoint cannot work at runtime (unparseable, hostless, or a
21
+ * non-http scheme the OTLP http/json exporters cannot speak).
22
+ */
23
+ otlp_endpoint_host: string;
24
+ logs_exporter: string;
25
+ metrics_exporter: string;
26
+ /**
27
+ * `""` when no traces exporter was inlined. Without one the host never
28
+ * registers a tracer provider, so cline-provider spans (the Langfuse
29
+ * relay) are silently never emitted; release gates require `"otlp"`.
30
+ */
31
+ traces_exporter: string;
32
+ };
33
+ export declare function buildTelemetrySelfcheckReport(config: TelemetrySelfcheckConfig): TelemetrySelfcheckReport;
@@ -41,6 +41,8 @@ export declare const TASK_CANCELLED_EVENT = "task.cancelled";
41
41
  export declare const TASK_MAX_TOKENS_RECOVERY_EVENT = "task.max_tokens_recovery";
42
42
  export interface CaptureTaskLifecycleEventInput {
43
43
  event: string;
44
+ /** One issued model request; AI SDK transport retries share this identity. */
45
+ modelRequestId?: string;
44
46
  sessionId?: string;
45
47
  ulid?: string;
46
48
  agentId?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cline/shared",
3
- "version": "0.0.93",
3
+ "version": "0.0.94-nightly.1792204233",
4
4
  "description": "Shared utilities, types, and schemas for Cline packages",
5
5
  "repository": {
6
6
  "type": "git",