@cline/shared 0.0.95 → 0.2.0-nightly.1793312794

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.
@@ -377,6 +377,9 @@ export type ClineAccountActionRequest = {
377
377
  } | {
378
378
  action: "clineAccount";
379
379
  operation: "fetchFeaturebaseToken";
380
+ } | {
381
+ action: "clineAccount";
382
+ operation: "fetchCurrentUserPlan";
380
383
  };
381
384
  export type ProviderActionRequest = ProviderSettingsActionRequest | ClineAccountActionRequest;
382
385
  export interface ProviderOAuthLoginResponse {
@@ -15,3 +15,10 @@ export interface ResolveClineEnvironmentOptions {
15
15
  }
16
16
  export declare function resolveClineEnvironment(): ClineEnvironment;
17
17
  export declare function getClineEnvironmentConfig(env?: ClineEnvironment): ClineEnvironmentConfig;
18
+ /**
19
+ * Resolves a web app path, such as a server-provided
20
+ * `ClineAccountUser.dataPrivacyPath`, against the Cline web app. Returns
21
+ * undefined when either input is missing or the result would leave the app's
22
+ * origin, so a bad path never becomes a link to somewhere else.
23
+ */
24
+ export declare function resolveClineAppUrl(path: string | undefined, appBaseUrl: string | undefined): string | undefined;
@@ -6,6 +6,7 @@ export declare function createTool<TInput, TOutput>(config: {
6
6
  description: string;
7
7
  inputSchema: Record<string, unknown>;
8
8
  execute: (input: TInput, context: AgentToolContext) => Promise<TOutput>;
9
+ successContext?: string;
9
10
  lifecycle?: AgentTool<TInput, TOutput>["lifecycle"];
10
11
  executionMode?: AgentTool["executionMode"];
11
12
  timeoutMs?: number;
@@ -18,6 +19,7 @@ export declare function createTool<TSchema extends z.ZodTypeAny, TOutput>(config
18
19
  description: string;
19
20
  inputSchema: TSchema;
20
21
  execute: (input: z.infer<TSchema>, context: AgentToolContext) => Promise<TOutput>;
22
+ successContext?: string;
21
23
  lifecycle?: AgentTool<z.infer<TSchema>, TOutput>["lifecycle"];
22
24
  executionMode?: AgentTool["executionMode"];
23
25
  timeoutMs?: number;
@@ -0,0 +1 @@
1
+ var t=["401","403","unauthorized","forbidden","invalid token","expired token","authentication"];function r(n){let e=(n instanceof Error?n.message:String(n)).toLowerCase();return t.some((o)=>e.includes(o))}export{t as AUTH_ERROR_PATTERNS,r as isLikelyAuthError};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cline/shared",
3
- "version": "0.0.95",
3
+ "version": "0.2.0-nightly.1793312794",
4
4
  "description": "Shared utilities, types, and schemas for Cline packages",
5
5
  "repository": {
6
6
  "type": "git",