@cline/core 0.0.75 → 0.0.76
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/service/schedule-command-service.d.ts +6 -1
- package/dist/cron/service/schedule-service.d.ts +1 -0
- package/dist/cron/service/schedule-tool.d.ts +81 -0
- package/dist/cron/store/sqlite-cron-store.d.ts +1 -0
- package/dist/extensions/config/index.d.ts +1 -1
- package/dist/extensions/config/runtime-commands.d.ts +12 -1
- package/dist/extensions/config/user-instruction-service.d.ts +2 -2
- package/dist/extensions/tools/executors/bash.d.ts +32 -0
- package/dist/extensions/tools/executors/index.d.ts +1 -0
- package/dist/extensions/tools/executors/run-command-execution-controller.d.ts +16 -0
- package/dist/extensions/tools/index.d.ts +2 -2
- package/dist/extensions/tools/runtime.d.ts +9 -0
- package/dist/hooks/subprocess.d.ts +6 -0
- package/dist/hub/client/index.d.ts +4 -1
- package/dist/hub/client/session-client.d.ts +14 -1
- package/dist/hub/daemon/entry.js +368 -202
- package/dist/hub/index.d.ts +2 -0
- package/dist/hub/index.js +363 -197
- package/dist/hub/runtime-host/hub-runtime-host.d.ts +1 -0
- package/dist/hub/server/browser-websocket.d.ts +5 -2
- package/dist/hub/server/command-transport.d.ts +9 -2
- package/dist/hub/server/handlers/context.d.ts +7 -3
- package/dist/hub/server/handlers/run-handlers.d.ts +1 -0
- package/dist/hub/server/handlers/session-handlers.d.ts +4 -0
- package/dist/hub/server/hub-server-options.d.ts +7 -2
- package/dist/hub/server/hub-server-transport.d.ts +8 -1
- package/dist/hub/server/native-transport.d.ts +3 -3
- package/dist/hub/server/task-command-service.d.ts +11 -0
- package/dist/index.d.ts +10 -8
- package/dist/index.js +361 -195
- package/dist/runtime/config/agent-runtime-config-builder.d.ts +5 -0
- package/dist/runtime/host/local-runtime-host.d.ts +2 -0
- package/dist/runtime/host/runtime-host.d.ts +3 -0
- package/dist/runtime/orchestration/runtime-event-adapter.d.ts +2 -0
- package/dist/runtime/orchestration/session-runtime.d.ts +2 -1
- package/dist/runtime/process-start-token.d.ts +23 -0
- package/dist/services/global-settings.d.ts +3 -3
- package/dist/services/llms/cline-recommended-models.d.ts +33 -0
- package/dist/services/llms/provider-defaults.d.ts +8 -0
- package/dist/services/providers/local-provider-registry.d.ts +85 -4
- package/dist/services/providers/local-provider-service.d.ts +27 -1
- package/dist/services/storage/provider-settings-manager.d.ts +3 -1
- package/dist/services/telemetry/index.js +1 -1
- package/dist/tasks/agenda-task-api.d.ts +20 -0
- package/dist/tasks/agenda-task-manager.d.ts +102 -0
- package/dist/tasks/agenda-task-tool.d.ts +94 -0
- package/dist/tasks/index.d.ts +9 -0
- package/dist/tasks/specs/task-spec-file-store.d.ts +38 -0
- package/dist/tasks/specs/task-spec-parser.d.ts +65 -0
- package/dist/tasks/store/sqlite-task-store.d.ts +73 -0
- package/dist/tasks/store/task-schema.d.ts +2 -0
- package/dist/tasks/task-location.d.ts +14 -0
- package/dist/tasks/task-tool.d.ts +134 -0
- package/dist/types/provider-settings.d.ts +10 -0
- package/package.json +4 -4
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { AgentTool, GatewayModelSelection, ITelemetryService } from "@cline/shared";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import type { AgendaTaskManagerApi } from "./agenda-task-api";
|
|
4
|
+
export declare const TodoTaskInputSchema: z.ZodObject<{
|
|
5
|
+
operation: z.ZodEnum<{
|
|
6
|
+
update: "update";
|
|
7
|
+
create: "create";
|
|
8
|
+
list: "list";
|
|
9
|
+
get: "get";
|
|
10
|
+
}>;
|
|
11
|
+
task_id: z.ZodOptional<z.ZodString>;
|
|
12
|
+
expected_revision: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
14
|
+
handoff: "handoff";
|
|
15
|
+
suggestion: "suggestion";
|
|
16
|
+
"follow-up": "follow-up";
|
|
17
|
+
todo: "todo";
|
|
18
|
+
idea: "idea";
|
|
19
|
+
reminder: "reminder";
|
|
20
|
+
}>>;
|
|
21
|
+
title: z.ZodOptional<z.ZodString>;
|
|
22
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
23
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
24
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
25
|
+
workspace: "workspace";
|
|
26
|
+
global: "global";
|
|
27
|
+
}>>;
|
|
28
|
+
workspace_root: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
29
|
+
cwd: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
30
|
+
resource_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
31
|
+
priority: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>]>>;
|
|
32
|
+
assignee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
33
|
+
model_selection: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
34
|
+
provider_id: z.ZodString;
|
|
35
|
+
model_id: z.ZodOptional<z.ZodString>;
|
|
36
|
+
}, z.core.$strip>>>;
|
|
37
|
+
mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
38
|
+
plan: "plan";
|
|
39
|
+
act: "act";
|
|
40
|
+
yolo: "yolo";
|
|
41
|
+
}>>>;
|
|
42
|
+
system_prompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
43
|
+
max_iterations: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
44
|
+
timeout_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
45
|
+
available_at: z.ZodOptional<z.ZodString>;
|
|
46
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
47
|
+
automation_eligible: z.ZodOptional<z.ZodBoolean>;
|
|
48
|
+
statuses: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
49
|
+
failed: "failed";
|
|
50
|
+
completed: "completed";
|
|
51
|
+
in_progress: "in_progress";
|
|
52
|
+
cancelled: "cancelled";
|
|
53
|
+
approved: "approved";
|
|
54
|
+
pending_approval: "pending_approval";
|
|
55
|
+
expired: "expired";
|
|
56
|
+
}>>>;
|
|
57
|
+
types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
58
|
+
handoff: "handoff";
|
|
59
|
+
suggestion: "suggestion";
|
|
60
|
+
"follow-up": "follow-up";
|
|
61
|
+
todo: "todo";
|
|
62
|
+
idea: "idea";
|
|
63
|
+
reminder: "reminder";
|
|
64
|
+
}>>>;
|
|
65
|
+
priorities: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>]>>>;
|
|
66
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
67
|
+
}, z.core.$strip>;
|
|
68
|
+
export type TodoTaskInput = z.infer<typeof TodoTaskInputSchema>;
|
|
69
|
+
export interface AgendaTaskSessionDefaults {
|
|
70
|
+
workspaceRoot?: string;
|
|
71
|
+
cwd?: string;
|
|
72
|
+
modelSelection?: GatewayModelSelection;
|
|
73
|
+
originTaskId?: string;
|
|
74
|
+
}
|
|
75
|
+
export interface TodoTaskOperationOptions {
|
|
76
|
+
manager: AgendaTaskManagerApi;
|
|
77
|
+
telemetry?: ITelemetryService;
|
|
78
|
+
resolveSessionDefaults: (sessionId: string) => Promise<AgendaTaskSessionDefaults | undefined>;
|
|
79
|
+
}
|
|
80
|
+
export type TodoTaskResult = {
|
|
81
|
+
ok: true;
|
|
82
|
+
operation: TodoTaskInput["operation"];
|
|
83
|
+
task?: Awaited<ReturnType<AgendaTaskManagerApi["getTask"]>>;
|
|
84
|
+
tasks?: Awaited<ReturnType<AgendaTaskManagerApi["listTasks"]>>;
|
|
85
|
+
} | {
|
|
86
|
+
ok: false;
|
|
87
|
+
operation?: TodoTaskInput["operation"];
|
|
88
|
+
error: {
|
|
89
|
+
code: string;
|
|
90
|
+
message: string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
/** Execute a Todo operation while preserving Agenda scope and authority rules. */
|
|
94
|
+
export declare function executeTodoTaskOperation(options: TodoTaskOperationOptions, rawInput: unknown, context: Parameters<AgentTool<TodoTaskInput, TodoTaskResult>["execute"]>[1]): Promise<TodoTaskResult>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./agenda-task-api";
|
|
2
|
+
export * from "./agenda-task-manager";
|
|
3
|
+
export * from "./agenda-task-tool";
|
|
4
|
+
export * from "./specs/task-spec-file-store";
|
|
5
|
+
export * from "./specs/task-spec-parser";
|
|
6
|
+
export * from "./store/sqlite-task-store";
|
|
7
|
+
export * from "./store/task-schema";
|
|
8
|
+
export * from "./task-location";
|
|
9
|
+
export * from "./task-tool";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { AgendaTaskScope } from "@cline/shared";
|
|
2
|
+
import { type AgendaTaskSpec, type AgendaTaskSpecParseResult, type AgendaTaskSpecWriteInput } from "./task-spec-parser";
|
|
3
|
+
export interface AgendaTaskSpecFileStoreOptions {
|
|
4
|
+
scope: AgendaTaskScope;
|
|
5
|
+
workspaceRoot?: string;
|
|
6
|
+
taskSpecsDir?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface WriteAgendaTaskSpecOptions {
|
|
9
|
+
/** Existing path or a filename under this store's directory. */
|
|
10
|
+
specPath?: string;
|
|
11
|
+
/** Refuse to replace a file whose parsed content changed since it was read. */
|
|
12
|
+
expectedContentHash?: string;
|
|
13
|
+
/** Atomically fail instead of replacing an existing target. */
|
|
14
|
+
createOnly?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export type WrittenAgendaTaskSpec = AgendaTaskSpec & {
|
|
17
|
+
taskId: string;
|
|
18
|
+
};
|
|
19
|
+
export declare class AgendaTaskSpecFileStore {
|
|
20
|
+
readonly specsDir: string;
|
|
21
|
+
readonly scope: AgendaTaskScope;
|
|
22
|
+
readonly workspaceRoot?: string;
|
|
23
|
+
constructor(options: AgendaTaskSpecFileStoreOptions);
|
|
24
|
+
listSpecPaths(): string[];
|
|
25
|
+
listSpecs(): AgendaTaskSpecParseResult[];
|
|
26
|
+
readSpec(specPath: string): AgendaTaskSpecParseResult;
|
|
27
|
+
writeSpec(input: AgendaTaskSpecWriteInput, options?: WriteAgendaTaskSpecOptions): WrittenAgendaTaskSpec;
|
|
28
|
+
/** Resolve the canonical target before a manager reserves it in SQLite. */
|
|
29
|
+
resolveWritePath(taskId: string, specPath?: string): string;
|
|
30
|
+
/** Validate the root both before and after creating missing directories. */
|
|
31
|
+
ensureSpecsDir(): void;
|
|
32
|
+
deleteSpec(specPath: string, options?: {
|
|
33
|
+
expectedContentHash?: string;
|
|
34
|
+
}): boolean;
|
|
35
|
+
private assertExpectedContent;
|
|
36
|
+
private assertSpecsDirSafe;
|
|
37
|
+
private resolveSpecPath;
|
|
38
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { AgendaTaskActor, AgendaTaskCreateInput, AgendaTaskPriority, AgendaTaskScope, AgendaTaskType, GatewayModelSelection } from "@cline/shared";
|
|
2
|
+
export interface AgendaTaskSpec {
|
|
3
|
+
taskId?: string;
|
|
4
|
+
type: AgendaTaskType;
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
instructions: string;
|
|
8
|
+
scope: AgendaTaskScope;
|
|
9
|
+
workspaceRoot?: string;
|
|
10
|
+
cwd?: string;
|
|
11
|
+
resourcePaths: string[];
|
|
12
|
+
priority: AgendaTaskPriority;
|
|
13
|
+
assignee?: string;
|
|
14
|
+
modelSelection?: GatewayModelSelection;
|
|
15
|
+
mode?: "act" | "plan" | "yolo";
|
|
16
|
+
systemPrompt?: string;
|
|
17
|
+
maxIterations?: number;
|
|
18
|
+
timeoutSeconds?: number;
|
|
19
|
+
availableAt?: string;
|
|
20
|
+
expiresAt: string;
|
|
21
|
+
automationEligible: boolean;
|
|
22
|
+
specPath: string;
|
|
23
|
+
contentHash: string;
|
|
24
|
+
}
|
|
25
|
+
export interface ParseAgendaTaskSpecInput {
|
|
26
|
+
specPath: string;
|
|
27
|
+
raw: string;
|
|
28
|
+
scope: AgendaTaskScope;
|
|
29
|
+
workspaceRoot?: string;
|
|
30
|
+
}
|
|
31
|
+
export type AgendaTaskSpecParseResult = {
|
|
32
|
+
ok: true;
|
|
33
|
+
specPath: string;
|
|
34
|
+
contentHash: string;
|
|
35
|
+
spec: AgendaTaskSpec;
|
|
36
|
+
} | {
|
|
37
|
+
ok: false;
|
|
38
|
+
specPath: string;
|
|
39
|
+
contentHash: string;
|
|
40
|
+
error: string;
|
|
41
|
+
};
|
|
42
|
+
export interface AgendaTaskSpecWriteInput {
|
|
43
|
+
taskId: string;
|
|
44
|
+
type: AgendaTaskType;
|
|
45
|
+
title: string;
|
|
46
|
+
description?: string;
|
|
47
|
+
instructions: string;
|
|
48
|
+
cwd?: string;
|
|
49
|
+
resourcePaths?: string[];
|
|
50
|
+
priority?: AgendaTaskPriority;
|
|
51
|
+
assignee?: string;
|
|
52
|
+
modelSelection?: GatewayModelSelection;
|
|
53
|
+
mode?: "act" | "plan" | "yolo";
|
|
54
|
+
systemPrompt?: string;
|
|
55
|
+
maxIterations?: number;
|
|
56
|
+
timeoutSeconds?: number;
|
|
57
|
+
availableAt?: string;
|
|
58
|
+
expiresAt: string;
|
|
59
|
+
automationEligible?: boolean;
|
|
60
|
+
}
|
|
61
|
+
/** Parse one task Markdown file without throwing for invalid user content. */
|
|
62
|
+
export declare function parseAgendaTaskSpec(input: ParseAgendaTaskSpecInput): AgendaTaskSpecParseResult;
|
|
63
|
+
/** Render the canonical, user-editable task spec representation. */
|
|
64
|
+
export declare function serializeAgendaTaskSpec(input: AgendaTaskSpecWriteInput): string;
|
|
65
|
+
export declare function agendaTaskSpecToCreateInput(spec: AgendaTaskSpec, createdBy: AgendaTaskActor): AgendaTaskCreateInput;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { AgendaAutomationPolicy, AgendaTaskActor, AgendaTaskCreateInput, AgendaTaskListInput, AgendaTaskRecord, AgendaTaskRunRecord, AgendaTaskRunStatus, AgendaTaskStatus, AgendaTaskUpdateInput } from "@cline/shared";
|
|
2
|
+
export interface SqliteAgendaTaskStoreOptions {
|
|
3
|
+
dbPath?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare class AgendaTaskRevisionConflictError extends Error {
|
|
6
|
+
readonly current: AgendaTaskRecord;
|
|
7
|
+
constructor(current: AgendaTaskRecord);
|
|
8
|
+
}
|
|
9
|
+
export interface AgendaTaskStatePatch {
|
|
10
|
+
status?: AgendaTaskStatus;
|
|
11
|
+
approvedRevision?: number | null;
|
|
12
|
+
currentRunId?: string | null;
|
|
13
|
+
lastRunId?: string | null;
|
|
14
|
+
lastSessionId?: string | null;
|
|
15
|
+
specPath?: string | null;
|
|
16
|
+
error?: string | null;
|
|
17
|
+
completedAt?: string | null;
|
|
18
|
+
archivedAt?: string | null;
|
|
19
|
+
updatedBy?: AgendaTaskActor;
|
|
20
|
+
}
|
|
21
|
+
export interface CreateAgendaTaskRunInput {
|
|
22
|
+
taskId: string;
|
|
23
|
+
taskRevision: number;
|
|
24
|
+
status?: AgendaTaskRunStatus;
|
|
25
|
+
claimToken?: string;
|
|
26
|
+
claimUntilAt?: string;
|
|
27
|
+
requestedByClientId?: string;
|
|
28
|
+
sessionId?: string;
|
|
29
|
+
claimedAt?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface UpdateAgendaTaskRunInput {
|
|
32
|
+
status?: AgendaTaskRunStatus;
|
|
33
|
+
claimToken?: string | null;
|
|
34
|
+
claimUntilAt?: string | null;
|
|
35
|
+
requestedByClientId?: string | null;
|
|
36
|
+
sessionId?: string | null;
|
|
37
|
+
startedAt?: string | null;
|
|
38
|
+
completedAt?: string | null;
|
|
39
|
+
resultSummary?: string | null;
|
|
40
|
+
error?: string | null;
|
|
41
|
+
}
|
|
42
|
+
export interface ListAgendaTaskRunsInput {
|
|
43
|
+
taskId?: string;
|
|
44
|
+
status?: AgendaTaskRunStatus | AgendaTaskRunStatus[];
|
|
45
|
+
sessionId?: string;
|
|
46
|
+
limit?: number;
|
|
47
|
+
}
|
|
48
|
+
export declare class SqliteAgendaTaskStore {
|
|
49
|
+
private readonly db;
|
|
50
|
+
constructor(options?: SqliteAgendaTaskStoreOptions);
|
|
51
|
+
close(): void;
|
|
52
|
+
createTask(input: AgendaTaskCreateInput): AgendaTaskRecord;
|
|
53
|
+
getTask(taskId: string): AgendaTaskRecord | undefined;
|
|
54
|
+
getTaskBySpecPath(specPath: string): AgendaTaskRecord | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Return every workspace that has ever owned a task. Archived rows are
|
|
57
|
+
* intentionally included so the Hub can restore file watchers after a restart.
|
|
58
|
+
*/
|
|
59
|
+
listWorkspaceRoots(): string[];
|
|
60
|
+
listTasks(input?: AgendaTaskListInput): AgendaTaskRecord[];
|
|
61
|
+
/** Apply user-editable fields, increment revision, and revoke old approval. */
|
|
62
|
+
updateTask(input: AgendaTaskUpdateInput): AgendaTaskRecord | undefined;
|
|
63
|
+
/** Mutate manager-owned lifecycle fields without changing the task revision. */
|
|
64
|
+
updateTaskState(taskId: string, patch: AgendaTaskStatePatch, expectedRevision?: number): AgendaTaskRecord | undefined;
|
|
65
|
+
deleteTask(taskId: string): boolean;
|
|
66
|
+
createRun(input: CreateAgendaTaskRunInput): AgendaTaskRunRecord;
|
|
67
|
+
getRun(runId: string): AgendaTaskRunRecord | undefined;
|
|
68
|
+
updateRun(runId: string, input: UpdateAgendaTaskRunInput): AgendaTaskRunRecord | undefined;
|
|
69
|
+
listRuns(input?: ListAgendaTaskRunsInput): AgendaTaskRunRecord[];
|
|
70
|
+
getAutomationPolicy(scopeKey?: string): AgendaAutomationPolicy;
|
|
71
|
+
listAutomationPolicies(): AgendaAutomationPolicy[];
|
|
72
|
+
setAutomationPolicy(input: Omit<AgendaAutomationPolicy, "updatedAt">): AgendaAutomationPolicy;
|
|
73
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { AgendaTaskScope } from "@cline/shared";
|
|
2
|
+
export interface AgendaTaskLocationInput {
|
|
3
|
+
scope: AgendaTaskScope;
|
|
4
|
+
workspaceRoot?: string;
|
|
5
|
+
cwd?: string;
|
|
6
|
+
resourcePaths?: readonly string[];
|
|
7
|
+
}
|
|
8
|
+
export interface NormalizedAgendaTaskLocation {
|
|
9
|
+
workspaceRoot?: string;
|
|
10
|
+
cwd?: string;
|
|
11
|
+
resourcePaths: string[];
|
|
12
|
+
}
|
|
13
|
+
/** Enforce the queue's global/chat and workspace filesystem boundaries. */
|
|
14
|
+
export declare function normalizeAgendaTaskLocation(input: AgendaTaskLocationInput): NormalizedAgendaTaskLocation;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import type { AgentExtension, AgentTool } from "@cline/shared";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { type ScheduledTaskResult, type ScheduleTaskOperationOptions } from "../cron/service/schedule-tool";
|
|
4
|
+
import { type TodoTaskOperationOptions, type TodoTaskResult } from "./agenda-task-tool";
|
|
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.";
|
|
7
|
+
export declare const TasksToolInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
8
|
+
operation: z.ZodEnum<{
|
|
9
|
+
update: "update";
|
|
10
|
+
create: "create";
|
|
11
|
+
list: "list";
|
|
12
|
+
get: "get";
|
|
13
|
+
}>;
|
|
14
|
+
task_id: z.ZodOptional<z.ZodString>;
|
|
15
|
+
expected_revision: z.ZodOptional<z.ZodNumber>;
|
|
16
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
17
|
+
handoff: "handoff";
|
|
18
|
+
suggestion: "suggestion";
|
|
19
|
+
"follow-up": "follow-up";
|
|
20
|
+
todo: "todo";
|
|
21
|
+
idea: "idea";
|
|
22
|
+
reminder: "reminder";
|
|
23
|
+
}>>;
|
|
24
|
+
title: z.ZodOptional<z.ZodString>;
|
|
25
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
26
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
27
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
28
|
+
workspace: "workspace";
|
|
29
|
+
global: "global";
|
|
30
|
+
}>>;
|
|
31
|
+
workspace_root: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
32
|
+
cwd: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
33
|
+
resource_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
34
|
+
priority: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>]>>;
|
|
35
|
+
assignee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
36
|
+
model_selection: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
37
|
+
provider_id: z.ZodString;
|
|
38
|
+
model_id: z.ZodOptional<z.ZodString>;
|
|
39
|
+
}, z.core.$strip>>>;
|
|
40
|
+
mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
41
|
+
plan: "plan";
|
|
42
|
+
act: "act";
|
|
43
|
+
yolo: "yolo";
|
|
44
|
+
}>>>;
|
|
45
|
+
system_prompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
46
|
+
max_iterations: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
47
|
+
timeout_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
48
|
+
available_at: z.ZodOptional<z.ZodString>;
|
|
49
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
50
|
+
automation_eligible: z.ZodOptional<z.ZodBoolean>;
|
|
51
|
+
statuses: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
52
|
+
failed: "failed";
|
|
53
|
+
completed: "completed";
|
|
54
|
+
in_progress: "in_progress";
|
|
55
|
+
cancelled: "cancelled";
|
|
56
|
+
approved: "approved";
|
|
57
|
+
pending_approval: "pending_approval";
|
|
58
|
+
expired: "expired";
|
|
59
|
+
}>>>;
|
|
60
|
+
types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
61
|
+
handoff: "handoff";
|
|
62
|
+
suggestion: "suggestion";
|
|
63
|
+
"follow-up": "follow-up";
|
|
64
|
+
todo: "todo";
|
|
65
|
+
idea: "idea";
|
|
66
|
+
reminder: "reminder";
|
|
67
|
+
}>>>;
|
|
68
|
+
priorities: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>]>>>;
|
|
69
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
70
|
+
kind: z.ZodLiteral<"todo">;
|
|
71
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
72
|
+
operation: z.ZodEnum<{
|
|
73
|
+
update: "update";
|
|
74
|
+
create: "create";
|
|
75
|
+
list: "list";
|
|
76
|
+
pause: "pause";
|
|
77
|
+
resume: "resume";
|
|
78
|
+
get: "get";
|
|
79
|
+
delete: "delete";
|
|
80
|
+
run_now: "run_now";
|
|
81
|
+
}>;
|
|
82
|
+
schedule_id: z.ZodOptional<z.ZodString>;
|
|
83
|
+
schedule_type: z.ZodOptional<z.ZodEnum<{
|
|
84
|
+
once: "once";
|
|
85
|
+
recurring: "recurring";
|
|
86
|
+
}>>;
|
|
87
|
+
name: z.ZodOptional<z.ZodString>;
|
|
88
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
89
|
+
run_at: z.ZodOptional<z.ZodString>;
|
|
90
|
+
cron_pattern: z.ZodOptional<z.ZodString>;
|
|
91
|
+
timezone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
92
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
93
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
94
|
+
plan: "plan";
|
|
95
|
+
act: "act";
|
|
96
|
+
yolo: "yolo";
|
|
97
|
+
}>>;
|
|
98
|
+
system_prompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
99
|
+
max_iterations: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
100
|
+
timeout_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
101
|
+
max_parallel: z.ZodOptional<z.ZodNumber>;
|
|
102
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
103
|
+
model_selection: z.ZodOptional<z.ZodObject<{
|
|
104
|
+
provider_id: z.ZodString;
|
|
105
|
+
model_id: z.ZodOptional<z.ZodString>;
|
|
106
|
+
}, z.core.$strip>>;
|
|
107
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
108
|
+
kind: z.ZodLiteral<"scheduled">;
|
|
109
|
+
}, z.core.$strict>], "kind">;
|
|
110
|
+
export type TasksToolInput = z.infer<typeof TasksToolInputSchema>;
|
|
111
|
+
export type TasksToolResult = ({
|
|
112
|
+
kind: "todo";
|
|
113
|
+
} & TodoTaskResult) | ({
|
|
114
|
+
kind: "scheduled";
|
|
115
|
+
} & ScheduledTaskResult) | {
|
|
116
|
+
ok: false;
|
|
117
|
+
kind?: TasksToolInput["kind"];
|
|
118
|
+
error: {
|
|
119
|
+
code: "invalid_tasks_input";
|
|
120
|
+
message: string;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
export interface CreateTasksToolOptions {
|
|
124
|
+
todo: TodoTaskOperationOptions;
|
|
125
|
+
scheduled: ScheduleTaskOperationOptions;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* One agent-facing task tool backed by distinct Todo and schedule domains.
|
|
129
|
+
* The discriminator selects the domain; each handler retains its own storage,
|
|
130
|
+
* authorization, scope, and execution lifecycle.
|
|
131
|
+
*/
|
|
132
|
+
export declare function createTasksTool(options: CreateTasksToolOptions): AgentTool<TasksToolInput, TasksToolResult>;
|
|
133
|
+
/** Adds selection and safety guidance only when the unified tool is enabled. */
|
|
134
|
+
export declare function createTasksPromptExtension(): AgentExtension;
|
|
@@ -4,6 +4,14 @@ export type { ProviderClient, ProviderConfig, ProviderProtocol, ProviderSettings
|
|
|
4
4
|
export declare const ProviderSettingsSchemaTyped: z.ZodType<ProviderSettings>;
|
|
5
5
|
export { toProviderConfig };
|
|
6
6
|
export type ProviderTokenSource = "manual" | "oauth" | "migration";
|
|
7
|
+
export declare const VoiceInputSettingsSchema: z.ZodObject<{
|
|
8
|
+
providerId: z.ZodString;
|
|
9
|
+
modelId: z.ZodString;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export type VoiceInputSettings = z.infer<typeof VoiceInputSettingsSchema>;
|
|
12
|
+
export interface StoredProviderModes {
|
|
13
|
+
voiceInput?: VoiceInputSettings;
|
|
14
|
+
}
|
|
7
15
|
export interface StoredProviderSettingsEntry {
|
|
8
16
|
settings: ProviderSettings;
|
|
9
17
|
updatedAt: string;
|
|
@@ -12,8 +20,10 @@ export interface StoredProviderSettingsEntry {
|
|
|
12
20
|
export interface StoredProviderSettings {
|
|
13
21
|
version: 1;
|
|
14
22
|
lastUsedProvider?: string;
|
|
23
|
+
modes: StoredProviderModes;
|
|
15
24
|
providers: Record<string, StoredProviderSettingsEntry>;
|
|
16
25
|
}
|
|
26
|
+
export declare const StoredProviderModesSchema: z.ZodType<StoredProviderModes>;
|
|
17
27
|
export declare const StoredProviderSettingsEntrySchema: z.ZodType<StoredProviderSettingsEntry>;
|
|
18
28
|
export declare const StoredProviderSettingsSchema: z.ZodType<StoredProviderSettings>;
|
|
19
29
|
export declare function emptyStoredProviderSettings(): StoredProviderSettings;
|
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.76",
|
|
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.76",
|
|
53
|
+
"@cline/shared": "0.0.76",
|
|
54
|
+
"@cline/llms": "0.0.76",
|
|
55
55
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
56
56
|
"@opentelemetry/api": "^1.9.0",
|
|
57
57
|
"@opentelemetry/api-logs": "^0.214.0",
|