@cline/core 0.0.80 → 0.0.81-nightly.1787893007
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/cron/specs/cron-reconciler.d.ts +1 -1
- package/dist/cron/store/sqlite-cron-store.d.ts +9 -0
- package/dist/extensions/mcp/client.d.ts +1 -0
- package/dist/extensions/tools/executors/line-endings.d.ts +14 -2
- package/dist/extensions/tools/team/multi-agent.d.ts +7 -0
- package/dist/hub/client/session-client.d.ts +6 -1
- package/dist/hub/client/ui-client.d.ts +6 -1
- package/dist/hub/daemon/entry.js +269 -215
- package/dist/hub/index.js +254 -200
- package/dist/hub/server/command-transport.d.ts +6 -0
- package/dist/hub/server/handlers/context.d.ts +11 -0
- package/dist/hub/server/handlers/session-handlers.d.ts +1 -0
- package/dist/hub/server/hub-server-options.d.ts +3 -0
- package/dist/hub/server/hub-server-transport.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +258 -204
- package/dist/services/providers/local-provider-service.d.ts +1 -1
- package/dist/services/providers/provider-readiness.d.ts +10 -0
- package/dist/services/workspace/agent-schedules-workspace.d.ts +8 -0
- package/dist/services/workspace/index.d.ts +1 -0
- package/dist/session/models/session-manifest.d.ts +1 -1
- package/dist/session/search/index.d.ts +1 -0
- package/dist/session/search/session-history-search.d.ts +51 -0
- package/dist/tasks/agenda-task-tool.d.ts +1 -1
- package/dist/tasks/task-tool.d.ts +3 -3
- package/dist/types/chat-schema.d.ts +2 -2
- package/package.json +4 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as LlmsModels from "@cline/llms";
|
|
2
2
|
import type { AddProviderActionRequest, ITelemetryService, ProviderCapability, ProviderListItem, ProviderModel, SaveProviderSettingsActionRequest, VoiceInputSelection } from "@cline/shared";
|
|
3
3
|
import { type ProviderOAuthCredentials } from "../../auth/provider-auth-registry";
|
|
4
|
-
import type
|
|
4
|
+
import { type ProviderClient, type ProviderConfig, type ProviderProtocol, type ProviderSettings } from "../../services/llms/provider-settings";
|
|
5
5
|
import type { ProviderTokenSource } from "../../types/provider-settings";
|
|
6
6
|
import type { ProviderSettingsManager } from "../storage/provider-settings-manager";
|
|
7
7
|
export { ensureCustomProvidersLoaded } from "./local-provider-registry";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ProviderConfig, ProviderSettings } from "../llms/provider-settings";
|
|
2
|
+
/**
|
|
3
|
+
* Whether persisted provider settings hold enough real credentials or
|
|
4
|
+
* endpoint configuration for a turn to plausibly succeed. Unlike the mere
|
|
5
|
+
* existence of a settings entry (which migrations and empty "connect" saves
|
|
6
|
+
* can create), this requires provider-appropriate evidence: an API key or
|
|
7
|
+
* OAuth token, cloud credentials (AWS/GCP/Azure/SAP), a local-auth CLI, or a
|
|
8
|
+
* resolvable endpoint + model for keyless local providers.
|
|
9
|
+
*/
|
|
10
|
+
export declare function isProviderSettingsUsable(providerId: string, settings: ProviderSettings | undefined, config?: Pick<ProviderConfig, "baseUrl" | "modelId">): boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ensure the home workspace for agent-created schedules exists and return its
|
|
3
|
+
* path. Agent-created schedules are user-level routines: they anchor (and
|
|
4
|
+
* their unattended sessions run) in `~/.cline/schedules/` instead of
|
|
5
|
+
* inheriting whichever chat workspace happened to create them, so they
|
|
6
|
+
* survive chat cleanup and stay in one predictable scope.
|
|
7
|
+
*/
|
|
8
|
+
export declare function ensureAgentSchedulesWorkspace(): Promise<string>;
|
|
@@ -12,8 +12,8 @@ export declare const SessionManifestSchema: z.ZodObject<{
|
|
|
12
12
|
completed: "completed";
|
|
13
13
|
idle: "idle";
|
|
14
14
|
running: "running";
|
|
15
|
-
pending: "pending";
|
|
16
15
|
cancelled: "cancelled";
|
|
16
|
+
pending: "pending";
|
|
17
17
|
}>;
|
|
18
18
|
interactive: z.ZodBoolean;
|
|
19
19
|
provider: z.ZodString;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./session-history-search";
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { RuntimeHost } from "../../runtime/host/runtime-host";
|
|
2
|
+
export interface SessionSearchInput {
|
|
3
|
+
query: string;
|
|
4
|
+
limit?: number;
|
|
5
|
+
workspaceRoot?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface SessionSearchHit {
|
|
8
|
+
sessionId: string;
|
|
9
|
+
documentId: string;
|
|
10
|
+
ordinal: number;
|
|
11
|
+
role: string;
|
|
12
|
+
startedAt: string;
|
|
13
|
+
workspaceRoot: string;
|
|
14
|
+
title: string;
|
|
15
|
+
snippet: string;
|
|
16
|
+
score: number;
|
|
17
|
+
}
|
|
18
|
+
export interface SessionHistorySearchOptions {
|
|
19
|
+
dbPath?: string;
|
|
20
|
+
reconcileIntervalMs?: number;
|
|
21
|
+
}
|
|
22
|
+
export declare class SessionHistorySearchService {
|
|
23
|
+
private readonly host;
|
|
24
|
+
private readonly db;
|
|
25
|
+
private readonly initializationError;
|
|
26
|
+
private readonly intervalMs;
|
|
27
|
+
private readonly removedDuringRefresh;
|
|
28
|
+
private readonly failedEvictionSessionIds;
|
|
29
|
+
private timer;
|
|
30
|
+
private refreshPromise;
|
|
31
|
+
private readyPromise;
|
|
32
|
+
constructor(host: Pick<RuntimeHost, "listSessions" | "readSessionMessages">, options?: SessionHistorySearchOptions);
|
|
33
|
+
start(): void;
|
|
34
|
+
dispose(): Promise<void>;
|
|
35
|
+
refreshNow(): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Removes one session from the derived index without scanning canonical
|
|
38
|
+
* history. The temporary tombstone prevents an in-flight reconciliation
|
|
39
|
+
* that captured the session before deletion from writing it back.
|
|
40
|
+
*/
|
|
41
|
+
removeSession(sessionId: string): void;
|
|
42
|
+
waitUntilReady(): Promise<void>;
|
|
43
|
+
isAvailable(): boolean;
|
|
44
|
+
getInitializationError(): unknown | undefined;
|
|
45
|
+
search(input: SessionSearchInput): SessionSearchHit[];
|
|
46
|
+
private isSessionSuppressed;
|
|
47
|
+
private reconcile;
|
|
48
|
+
private sourceRevision;
|
|
49
|
+
private indexSession;
|
|
50
|
+
private deleteIndexedSession;
|
|
51
|
+
}
|
|
@@ -48,8 +48,8 @@ export declare const TodoTaskInputSchema: z.ZodObject<{
|
|
|
48
48
|
statuses: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
49
49
|
failed: "failed";
|
|
50
50
|
completed: "completed";
|
|
51
|
-
in_progress: "in_progress";
|
|
52
51
|
cancelled: "cancelled";
|
|
52
|
+
in_progress: "in_progress";
|
|
53
53
|
approved: "approved";
|
|
54
54
|
pending_approval: "pending_approval";
|
|
55
55
|
expired: "expired";
|
|
@@ -3,9 +3,9 @@ import { z } from "zod";
|
|
|
3
3
|
import { type ScheduledTaskResult, type ScheduleTaskOperationOptions } from "../cron/service/schedule-tool";
|
|
4
4
|
import { type TodoTaskOperationOptions, type TodoTaskResult } from "./agenda-task-tool";
|
|
5
5
|
export declare const TASKS_TOOL_NAME = "tasks";
|
|
6
|
-
export declare const TASKS_SYSTEM_PROMPT_RULE = "# Tasks\n\nUse the `tasks` tool to manage durable Todo items and explicitly requested scheduled agent work.\n\n- Use `kind: \"todo\"` for meaningful follow-ups, handoffs, ideas, reminders, and other work that should remain visible after this session. This includes useful work you identify and suggest proactively. Agent-created Todos require user approval; Todos created directly by the user are approved immediately. Todo `available_at` controls availability in the list; it never schedules execution.\n- Use `kind: \"scheduled\"` only when the user explicitly asks Cline to execute work once at a future time or on a recurrence. One-time schedules require an exact future ISO 8601 `run_at` with an offset or Z. Recurring schedules require a five-field `cron_pattern` and may include an IANA `timezone`.\n- \"Remind me\" is ambiguous: ask whether the user wants a reviewed Todo note or an agent to execute work at that time when intent is unclear.\n- Never create both kinds for the same request unless the user explicitly requests both. Check existing items before creating a likely duplicate.\n- Todo instructions and scheduled prompts must be self-contained. Include the goal, constraints, relevant project context, and expected output.\n- Never approve or start a Todo yourself. Only mutate schedules from an interactive user session, and only update, pause, resume, delete, or run one immediately when the user asks.";
|
|
6
|
+
export declare const TASKS_SYSTEM_PROMPT_RULE = "# Tasks\n\nUse the `tasks` tool to manage durable Todo items and explicitly requested scheduled agent work.\n\n- Use `kind: \"todo\"` for meaningful follow-ups, handoffs, ideas, reminders, and other work that should remain visible after this session. This includes useful work you identify and suggest proactively. Agent-created Todos require user approval; Todos created directly by the user are approved immediately. Todo `available_at` controls availability in the list; it never schedules execution.\n- Use `kind: \"scheduled\"` only when the user explicitly asks Cline to execute work once at a future time or on a recurrence. One-time schedules require an exact future ISO 8601 `run_at` with an offset or Z. Recurring schedules require a five-field `cron_pattern` and may include an IANA `timezone`.\n- \"Remind me\" is ambiguous: ask whether the user wants a reviewed Todo note or an agent to execute work at that time when intent is unclear.\n- Never create both kinds for the same request unless the user explicitly requests both. Check existing items before creating a likely duplicate.\n- Todo instructions and scheduled prompts must be self-contained. Include the goal, constraints, relevant project context, and expected output.\n- Scheduled sessions run in the user's schedules home workspace, not this conversation's folder. Include absolute paths in the scheduled `prompt` for any project files or repositories the work must touch.\n- Never approve or start a Todo yourself. Only mutate schedules from an interactive user session, and only update, pause, resume, delete, or run one immediately when the user asks.";
|
|
7
7
|
/** Guidance used while the Todo kind is disabled and only schedules remain. */
|
|
8
|
-
export declare const SCHEDULED_TASKS_SYSTEM_PROMPT_RULE = "# Tasks\n\nUse the `tasks` tool only when the user explicitly asks Cline to execute work once at a future time or on a recurrence. Always pass `kind: \"scheduled\"`.\n\n- One-time schedules require an exact future ISO 8601 `run_at` with an offset or Z. Recurring schedules require a five-field `cron_pattern` and may include an IANA `timezone`.\n- Never create a schedule proactively. Check existing schedules before creating a likely duplicate.\n- Make the scheduled `prompt` self-contained because it runs in a new unattended session. Include the goal, constraints,
|
|
8
|
+
export declare const SCHEDULED_TASKS_SYSTEM_PROMPT_RULE = "# Tasks\n\nUse the `tasks` tool only when the user explicitly asks Cline to execute work once at a future time or on a recurrence. Always pass `kind: \"scheduled\"`.\n\n- One-time schedules require an exact future ISO 8601 `run_at` with an offset or Z. Recurring schedules require a five-field `cron_pattern` and may include an IANA `timezone`.\n- Never create a schedule proactively. Check existing schedules before creating a likely duplicate.\n- Make the scheduled `prompt` self-contained because it runs in a new unattended session in the user's schedules home workspace, not this conversation's folder. Include the goal, constraints, expected output, and absolute paths for any project files or repositories the work must touch.\n- Only update, pause, resume, delete, or run a schedule immediately when the user asks for that action.";
|
|
9
9
|
export declare const TasksToolInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
10
10
|
operation: z.ZodEnum<{
|
|
11
11
|
update: "update";
|
|
@@ -53,8 +53,8 @@ export declare const TasksToolInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
53
53
|
statuses: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
54
54
|
failed: "failed";
|
|
55
55
|
completed: "completed";
|
|
56
|
-
in_progress: "in_progress";
|
|
57
56
|
cancelled: "cancelled";
|
|
57
|
+
in_progress: "in_progress";
|
|
58
58
|
approved: "approved";
|
|
59
59
|
pending_approval: "pending_approval";
|
|
60
60
|
expired: "expired";
|
|
@@ -25,8 +25,8 @@ export declare const ChatSessionStatusSchema: z.ZodEnum<{
|
|
|
25
25
|
completed: "completed";
|
|
26
26
|
idle: "idle";
|
|
27
27
|
running: "running";
|
|
28
|
-
pending: "pending";
|
|
29
28
|
cancelled: "cancelled";
|
|
29
|
+
pending: "pending";
|
|
30
30
|
starting: "starting";
|
|
31
31
|
stopping: "stopping";
|
|
32
32
|
}>;
|
|
@@ -107,8 +107,8 @@ export declare const ChatViewStateSchema: z.ZodObject<{
|
|
|
107
107
|
completed: "completed";
|
|
108
108
|
idle: "idle";
|
|
109
109
|
running: "running";
|
|
110
|
-
pending: "pending";
|
|
111
110
|
cancelled: "cancelled";
|
|
111
|
+
pending: "pending";
|
|
112
112
|
starting: "starting";
|
|
113
113
|
stopping: "stopping";
|
|
114
114
|
}>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cline/core",
|
|
3
3
|
"description": "Cline Core SDK for Node Runtime",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.81-nightly.1787893007",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/cline/cline",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"test:watch": "vitest --config vitest.config.ts"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@cline/agents": "0.0.
|
|
53
|
-
"@cline/shared": "0.0.
|
|
54
|
-
"@cline/llms": "0.0.
|
|
52
|
+
"@cline/agents": "0.0.81-nightly.1787893007",
|
|
53
|
+
"@cline/shared": "0.0.81-nightly.1787893007",
|
|
54
|
+
"@cline/llms": "0.0.81-nightly.1787893007",
|
|
55
55
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
56
56
|
"@opentelemetry/api": "^1.9.0",
|
|
57
57
|
"@opentelemetry/api-logs": "^0.214.0",
|