@cline/shared 0.0.66 → 0.0.67-nightly.1785554076

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.
@@ -16,6 +16,8 @@ import type { AgentExtensionApi, AgentExtensionHooks, AgentExtensionRegistry as
16
16
  import type { HookControl } from "../hooks/contracts";
17
17
  import type { Message, MessageWithMetadata } from "../llms/messages";
18
18
  import type { ModelInfo } from "../llms/model-info";
19
+ import { type ReasoningEffort } from "../llms/reasoning-options";
20
+ export { REASONING_LEVELS, type ReasoningEffort, ReasoningEffortSchema, type ReasoningLevel, ReasoningLevelSchema, } from "../llms/reasoning-options";
19
21
  import type { ToolApprovalRequest, ToolApprovalResult, ToolCallRecord, ToolPolicy } from "../llms/tools";
20
22
  import type { BasicLogger } from "../logging/logger";
21
23
  import type { ITelemetryService } from "../services/telemetry";
@@ -545,6 +547,7 @@ export declare const AgentResultSchema: z.ZodObject<{
545
547
  maxInputTokens: z.ZodOptional<z.ZodNumber>;
546
548
  capabilities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
547
549
  images: "images";
550
+ video: "video";
548
551
  tools: "tools";
549
552
  streaming: "streaming";
550
553
  "prompt-cache": "prompt-cache";
@@ -556,6 +559,25 @@ export declare const AgentResultSchema: z.ZodObject<{
556
559
  temperature: "temperature";
557
560
  files: "files";
558
561
  }>>>;
562
+ reasoningOptions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
563
+ type: z.ZodLiteral<"toggle">;
564
+ }, z.core.$strict>, z.ZodObject<{
565
+ type: z.ZodLiteral<"effort">;
566
+ values: z.ZodArray<z.ZodNullable<z.ZodEnum<{
567
+ none: "none";
568
+ minimal: "minimal";
569
+ low: "low";
570
+ medium: "medium";
571
+ high: "high";
572
+ xhigh: "xhigh";
573
+ max: "max";
574
+ default: "default";
575
+ }>>>;
576
+ }, z.core.$strict>, z.ZodObject<{
577
+ type: z.ZodLiteral<"budget_tokens">;
578
+ min: z.ZodOptional<z.ZodNumber>;
579
+ max: z.ZodOptional<z.ZodNumber>;
580
+ }, z.core.$strict>], "type">>>;
559
581
  apiFormat: z.ZodOptional<z.ZodEnum<{
560
582
  default: "default";
561
583
  "openai-responses": "openai-responses";
@@ -600,16 +622,6 @@ export declare const AgentResultSchema: z.ZodObject<{
600
622
  endedAt: z.ZodDate;
601
623
  durationMs: z.ZodNumber;
602
624
  }, z.core.$strip>;
603
- /**
604
- * Reasoning effort level for capable models
605
- */
606
- export type ReasoningEffort = "low" | "medium" | "high" | "xhigh";
607
- export declare const ReasoningEffortSchema: z.ZodEnum<{
608
- low: "low";
609
- high: "high";
610
- medium: "medium";
611
- xhigh: "xhigh";
612
- }>;
613
625
  /**
614
626
  * Configuration for creating an Agent
615
627
  */
@@ -808,6 +820,7 @@ export declare const AgentConfigSchema: z.ZodObject<{
808
820
  maxInputTokens: z.ZodOptional<z.ZodNumber>;
809
821
  capabilities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
810
822
  images: "images";
823
+ video: "video";
811
824
  tools: "tools";
812
825
  streaming: "streaming";
813
826
  "prompt-cache": "prompt-cache";
@@ -819,6 +832,25 @@ export declare const AgentConfigSchema: z.ZodObject<{
819
832
  temperature: "temperature";
820
833
  files: "files";
821
834
  }>>>;
835
+ reasoningOptions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
836
+ type: z.ZodLiteral<"toggle">;
837
+ }, z.core.$strict>, z.ZodObject<{
838
+ type: z.ZodLiteral<"effort">;
839
+ values: z.ZodArray<z.ZodNullable<z.ZodEnum<{
840
+ none: "none";
841
+ minimal: "minimal";
842
+ low: "low";
843
+ medium: "medium";
844
+ high: "high";
845
+ xhigh: "xhigh";
846
+ max: "max";
847
+ default: "default";
848
+ }>>>;
849
+ }, z.core.$strict>, z.ZodObject<{
850
+ type: z.ZodLiteral<"budget_tokens">;
851
+ min: z.ZodOptional<z.ZodNumber>;
852
+ max: z.ZodOptional<z.ZodNumber>;
853
+ }, z.core.$strict>], "type">>>;
822
854
  apiFormat: z.ZodOptional<z.ZodEnum<{
823
855
  default: "default";
824
856
  "openai-responses": "openai-responses";
@@ -879,10 +911,12 @@ export declare const AgentConfigSchema: z.ZodObject<{
879
911
  }, z.core.$strip>]>>;
880
912
  }, z.core.$strip>>;
881
913
  reasoningEffort: z.ZodOptional<z.ZodEnum<{
914
+ minimal: "minimal";
882
915
  low: "low";
883
- high: "high";
884
916
  medium: "medium";
917
+ high: "high";
885
918
  xhigh: "xhigh";
919
+ max: "max";
886
920
  }>>;
887
921
  thinkingBudgetTokens: z.ZodOptional<z.ZodNumber>;
888
922
  thinking: z.ZodOptional<z.ZodBoolean>;
@@ -142,11 +142,19 @@ export interface PluginSetupContext {
142
142
  /** Host-provided logger scoped to this session/plugin setup. */
143
143
  logger?: BasicLogger;
144
144
  /**
145
- * Host-provided telemetry service when available in the current process.
145
+ * Host-provided telemetry service. Feature-detect it
146
+ * (`ctx.telemetry?.capture(...)`): it is undefined when the host has no
147
+ * telemetry service.
146
148
  *
147
- * This service is intentionally not serialized across plugin sandbox process
148
- * boundaries; sandboxed plugins should feature-detect this property and expect
149
- * it to be undefined unless a future host adds an explicit telemetry bridge.
149
+ * In-process plugins receive the host service directly. Sandboxed plugins
150
+ * receive a bridge the live service cannot cross the JSON IPC boundary —
151
+ * that forwards `capture`/`captureRequired`/`recordCounter`/
152
+ * `recordHistogram`/`recordGauge` to the host, which namespaces every
153
+ * event and metric under `plugin.`, stamps `plugin_name`, and drops them
154
+ * when the user has opted out of telemetry. Bridge caveats: properties
155
+ * must be JSON-serializable; `isEnabled()` always reports `true` (the
156
+ * host is the arbiter, so do not gate expensive property computation on
157
+ * it); identity and common-property setters are no-ops.
150
158
  */
151
159
  telemetry?: ITelemetryService;
152
160
  }
package/dist/hub.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { AgentMessage } from "./agent";
2
- import type { ReasoningEffort } from "./agents/types";
3
2
  import type { GatewayModelSelection, JsonValue } from "./llms/gateway";
3
+ import type { ReasoningEffort } from "./llms/reasoning-options";
4
4
  import type { RuntimeConfigExtensionKind } from "./session/runtime-config";
5
5
  export type HubProtocolVersion = "v1";
6
6
  export declare const CURRENT_HUB_PROTOCOL_VERSION: HubProtocolVersion;
@@ -23,11 +23,14 @@ export type { ContentBlock, FileContent, ImageContent, Message, MessageRole, Mes
23
23
  export { ApiFormat, ApiFormatSchema, type ModelCapability, ModelCapabilitySchema, type ModelInfo, ModelInfoSchema, type ModelMetadata, ModelMetadataSchema, type ModelPricing, ModelPricingSchema, type ModelStatus, ModelStatusSchema, type ThinkingConfig, ThinkingConfigSchema, } from "./llms/model-info";
24
24
  export { mergeModelOptions } from "./llms/model-options";
25
25
  export { DEFAULT_REASONING_EFFORT, REASONING_EFFORT_RATIOS, resolveEffectiveReasoningEffort, resolveReasoningBudgetFromRatio, resolveReasoningEffortRatio, } from "./llms/reasoning-effort";
26
+ export { type ModelReasoningOption, ModelReasoningOptionSchema, REASONING_LEVELS, type ReasoningEffort, ReasoningEffortSchema, type ReasoningLevel, ReasoningLevelSchema, } from "./llms/reasoning-options";
26
27
  export { serializeAbortReason } from "./llms/requests";
27
28
  export { CHARS_PER_TOKEN, estimateRequestInputTokens, estimateTokens, type TokenEstimatedRequest, } from "./llms/tokens";
28
29
  export type { ToolApprovalRequest, ToolApprovalResult, ToolCallRecord, ToolPolicy, } from "./llms/tools";
29
30
  export { ToolCallRecordSchema } from "./llms/tools";
30
31
  export { type BasicLogger, type BasicLogMetadata, noopBasicLogger, } from "./logging/logger";
32
+ export * from "./mcp";
33
+ export { getErrorCode, getErrorMessage } from "./parse/error";
31
34
  export { normalizeJsonLikeStringsForSchema, parseJsonStream, safeJsonParse, safeJsonStringify, } from "./parse/json";
32
35
  export { decodeJwtPayload } from "./parse/jwt";
33
36
  export { type OmitUndefinedValues, omitUndefinedValues } from "./parse/object";