@cline/core 0.0.46 → 0.0.47-nightly.1781493618
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.
- package/dist/ClineCore.d.ts +2 -0
- package/dist/cline-core/types.d.ts +6 -0
- package/dist/extensions/tools/executors/bash.d.ts +16 -2
- package/dist/extensions/tools/executors/output-limits.d.ts +25 -0
- package/dist/extensions/tools/helpers.d.ts +13 -0
- package/dist/hub/client/index.d.ts +2 -1
- package/dist/hub/daemon/entry.js +201 -192
- package/dist/hub/daemon/index.d.ts +6 -2
- package/dist/hub/daemon/start-shared-server.d.ts +4 -4
- package/dist/hub/discovery/index.d.ts +23 -1
- package/dist/hub/discovery/workspace.d.ts +1 -0
- package/dist/hub/index.js +200 -191
- package/dist/hub/server/hub-websocket-server.d.ts +1 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.js +200 -191
- package/dist/runtime/host/local-runtime-host.d.ts +1 -0
- package/dist/runtime/orchestration/runtime-oauth-token-manager.d.ts +0 -1
- package/dist/services/feature-flags/FeatureFlagsService.d.ts +49 -0
- package/dist/services/feature-flags/index.d.ts +2 -0
- package/dist/services/feature-flags/posthog.d.ts +24 -0
- package/dist/services/feature-flags/posthog.js +1 -0
- package/dist/services/feature-flags/providers.d.ts +7 -0
- package/dist/services/providers/local-provider-service.d.ts +4 -1
- package/dist/services/storage/provider-settings-manager.d.ts +7 -2
- package/dist/services/telemetry/core-events.d.ts +3 -0
- package/dist/services/telemetry/index.d.ts +1 -0
- package/dist/services/telemetry/index.js +1 -1
- package/dist/session/services/message-builder.d.ts +16 -2
- package/dist/types.d.ts +3 -1
- package/package.json +18 -5
package/dist/ClineCore.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ClineCoreAutomationApi, ClineCoreListHistoryOptions, ClineCoreOptions, ClineCoreSettingsApi, ClineCoreStartInput, RestoreInput, RestoreResult } from "./cline-core/types";
|
|
2
2
|
import type { PendingPromptsServiceApi, RuntimeHost, RuntimeHostSubscribeOptions, SessionModelRuntimeService, SessionUsageRuntimeService, StartSessionInput, StartSessionResult } from "./runtime/host/runtime-host";
|
|
3
|
+
import { FeatureFlagsService } from "./services/feature-flags";
|
|
3
4
|
import type { CoreSessionEvent } from "./types/events";
|
|
4
5
|
import type { SessionHistoryRecord } from "./types/sessions";
|
|
5
6
|
export type { ClineAutomationEventIngressResult, ClineAutomationEventLog, ClineAutomationEventSuppression, ClineAutomationListEventsOptions, ClineAutomationListRunsOptions, ClineAutomationListSpecsOptions, ClineAutomationRun, ClineAutomationRunStatus, ClineAutomationSpec, ClineCoreAutomationApi, ClineCoreAutomationOptions, ClineCoreListHistoryOptions, ClineCoreOptions, ClineCoreSettingsApi, ClineCoreStartInput, HubOptions, RemoteOptions, RestoreInput, RestoreOptions, RestoreResult, RuntimeHostMode, StartSessionBootstrap, } from "./cline-core/types";
|
|
@@ -19,6 +20,7 @@ export declare class ClineCore {
|
|
|
19
20
|
readonly runtimeAddress: string | undefined;
|
|
20
21
|
readonly automation: ClineCoreAutomationApi;
|
|
21
22
|
readonly settings: ClineCoreSettingsApi;
|
|
23
|
+
readonly featureFlags: FeatureFlagsService;
|
|
22
24
|
readonly pendingPrompts: PendingPromptsServiceApi;
|
|
23
25
|
private readonly host;
|
|
24
26
|
private readonly prepare;
|
|
@@ -7,6 +7,7 @@ import type { RuntimeCapabilities } from "../runtime/capabilities";
|
|
|
7
7
|
import type { SessionHistoryListOptions } from "../runtime/host/history";
|
|
8
8
|
import type { SessionBackend } from "../runtime/host/host";
|
|
9
9
|
import type { LocalRuntimeStartOptions, RuntimeHostMode, StartSessionInput, StartSessionResult } from "../runtime/host/runtime-host";
|
|
10
|
+
import type { FeatureFlagsService } from "../services/feature-flags";
|
|
10
11
|
import type { CoreSessionConfig } from "../types/config";
|
|
11
12
|
import type { SessionMessagesArtifactUploader } from "../types/session";
|
|
12
13
|
export type { RuntimeHostMode } from "../runtime/host/runtime-host";
|
|
@@ -160,6 +161,11 @@ export interface ClineCoreOptions {
|
|
|
160
161
|
* If omitted, telemetry is a no-op.
|
|
161
162
|
*/
|
|
162
163
|
telemetry?: ITelemetryService;
|
|
164
|
+
/**
|
|
165
|
+
* Feature flags service for this ClineCore instance.
|
|
166
|
+
* If omitted, Core uses a no-op provider with default flag values.
|
|
167
|
+
*/
|
|
168
|
+
featureFlags?: FeatureFlagsService;
|
|
163
169
|
/**
|
|
164
170
|
* Optional structured logger for core-side operational diagnostics such as
|
|
165
171
|
* runtime-host selection and fallback decisions.
|
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
* Built-in implementation for running shell commands using Node.js spawn.
|
|
5
5
|
*/
|
|
6
6
|
import type { BashExecutor } from "../types";
|
|
7
|
+
export declare class CommandExitError extends Error {
|
|
8
|
+
readonly exitCode: number;
|
|
9
|
+
readonly output: string;
|
|
10
|
+
constructor(exitCode: number, output: string);
|
|
11
|
+
}
|
|
7
12
|
/**
|
|
8
13
|
* Options for the bash executor
|
|
9
14
|
*/
|
|
@@ -19,8 +24,17 @@ export interface BashExecutorOptions {
|
|
|
19
24
|
*/
|
|
20
25
|
timeoutMs?: number;
|
|
21
26
|
/**
|
|
22
|
-
* Maximum output
|
|
23
|
-
*
|
|
27
|
+
* Maximum output kept, in characters. Output beyond this is
|
|
28
|
+
* middle-truncated: the head and tail are preserved and the middle is
|
|
29
|
+
* elided, since build and test failures usually live at the end of the
|
|
30
|
+
* output.
|
|
31
|
+
* @default 48_000 — see MAX_COMMAND_OUTPUT_CHARS in output-limits.ts
|
|
32
|
+
*/
|
|
33
|
+
maxOutputChars?: number;
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated Misnamed — the limit was always enforced in characters,
|
|
36
|
+
* not bytes. Use {@link maxOutputChars}; this alias is honored when
|
|
37
|
+
* maxOutputChars is not set.
|
|
24
38
|
*/
|
|
25
39
|
maxOutputBytes?: number;
|
|
26
40
|
/**
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared caps for how much tool output may enter the conversation. Every
|
|
3
|
+
* character returned by an executor is re-sent to the model on each
|
|
4
|
+
* subsequent request, so oversized outputs cost quadratically over the
|
|
5
|
+
* remaining run. Limits are measured in characters (UTF-16 code units),
|
|
6
|
+
* which tracks token cost more closely than bytes and is what JS strings
|
|
7
|
+
* measure exactly. Executors enforce these caps; tool descriptions
|
|
8
|
+
* reference them so the model pages or narrows instead of retrying.
|
|
9
|
+
*
|
|
10
|
+
* Truncation notices always live in the preserved head/tail of an entry,
|
|
11
|
+
* never in the elided middle. Provider-request building may re-truncate
|
|
12
|
+
* long strings with its own (possibly tighter) middle-cut backstop
|
|
13
|
+
* (session/services/message-builder.ts); keeping the notices at the edges
|
|
14
|
+
* means the recovery guidance survives that cut too.
|
|
15
|
+
*/
|
|
16
|
+
/** Max characters of command output kept; beyond this the middle is elided. */
|
|
17
|
+
export declare const MAX_COMMAND_OUTPUT_CHARS = 48000;
|
|
18
|
+
/** Max lines returned per file read when the range is larger or absent. */
|
|
19
|
+
export declare const MAX_READ_LINES = 2000;
|
|
20
|
+
/** Max characters kept per line in file reads (defangs minified files). */
|
|
21
|
+
export declare const MAX_LINE_CHARS = 2000;
|
|
22
|
+
/** Max characters returned per file read window. */
|
|
23
|
+
export declare const MAX_READ_OUTPUT_CHARS = 48000;
|
|
24
|
+
/** Max characters returned per search query; beyond this the middle is elided. */
|
|
25
|
+
export declare const MAX_SEARCH_OUTPUT_CHARS = 48000;
|
|
@@ -16,3 +16,16 @@ export declare function formatReadFileQuery(request: ReadFileRequest): string;
|
|
|
16
16
|
export declare function getReadFileRangeError(request: ReadFileRequest): string | null;
|
|
17
17
|
export declare function normalizeRunCommandsInput(input: unknown): Array<string | StructuredCommandInput>;
|
|
18
18
|
export declare function formatRunCommandQuery(command: string | StructuredCommandInput): string;
|
|
19
|
+
/**
|
|
20
|
+
* Max characters of the executed command echoed back in the tool result's
|
|
21
|
+
* `query` field. The full command already exists in the assistant tool-call
|
|
22
|
+
* input, so repeating it in the result only duplicates tokens in the
|
|
23
|
+
* provider request (expensive for large heredoc/file-generation commands).
|
|
24
|
+
*/
|
|
25
|
+
export declare const RUN_COMMAND_QUERY_PREVIEW_LIMIT = 200;
|
|
26
|
+
/**
|
|
27
|
+
* Bound the command echo placed in a provider-facing tool result.
|
|
28
|
+
* Short commands pass through unchanged; long commands keep a short
|
|
29
|
+
* prefix plus a truncation note so the result is still identifiable.
|
|
30
|
+
*/
|
|
31
|
+
export declare function formatRunCommandQueryPreview(command: string | StructuredCommandInput): string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type HubCommandEnvelope, type HubEventEnvelope, type HubReplyEnvelope } from "@cline/shared";
|
|
2
|
+
import { type HubOwnerContext } from "../discovery";
|
|
2
3
|
export interface HubClientOptions {
|
|
3
4
|
url: string;
|
|
4
5
|
clientId?: string;
|
|
@@ -80,7 +81,7 @@ export declare function verifyHubConnection(url: string, options?: Pick<HubClien
|
|
|
80
81
|
export declare function resolveCompatibleLocalHubUrl(options?: LocalHubResolutionOptions): Promise<string | undefined>;
|
|
81
82
|
export declare function ensureCompatibleLocalHubUrl(options?: LocalHubResolutionOptions): Promise<string | undefined>;
|
|
82
83
|
export declare function requestHubShutdown(url: string, authToken?: string): Promise<boolean>;
|
|
83
|
-
export declare function stopLocalHubServerGracefully(): Promise<boolean>;
|
|
84
|
+
export declare function stopLocalHubServerGracefully(owner?: HubOwnerContext): Promise<boolean>;
|
|
84
85
|
export declare function restartLocalHubIfIdleAfterStartupTimeout(options: {
|
|
85
86
|
url: string;
|
|
86
87
|
workspaceRoot?: string;
|