@cline/shared 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/agent.d.ts +38 -13
- package/dist/agents/types.d.ts +63 -6
- package/dist/db/index.js +11 -11
- package/dist/extensions/contribution-registry.d.ts +5 -0
- package/dist/hub.d.ts +73 -3
- package/dist/index.browser.d.ts +5 -4
- package/dist/index.browser.js +20 -20
- package/dist/index.d.ts +7 -6
- package/dist/index.js +62 -62
- package/dist/llms/ai-sdk-format.d.ts +5 -2
- package/dist/llms/gateway.d.ts +33 -0
- package/dist/llms/media.d.ts +59 -0
- package/dist/llms/messages.d.ts +7 -1
- package/dist/llms/model-info.d.ts +145 -3
- package/dist/llms/model-tools.d.ts +9 -3
- package/dist/llms/reasoning-options.d.ts +1 -1
- package/dist/remote-config/index.js +10 -10
- package/dist/remote-config/runtime.d.ts +6 -1
- package/dist/rpc/runtime.d.ts +26 -0
- package/dist/session/runtime-config.d.ts +3 -3
- package/dist/storage/index.d.ts +1 -1
- package/dist/storage/index.js +1 -1
- package/dist/storage/paths.d.ts +15 -0
- package/dist/tasks.d.ts +156 -0
- package/dist/team/schema.d.ts +12 -12
- package/package.json +1 -1
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import type { AgentExtension } from "../agents/types";
|
|
2
|
-
import type { PreparedRemoteConfigRuntime, PrepareRemoteConfigRuntimeOptions, RemoteConfigBundle, RemoteConfigProjectContext, RemoteConfigSyncResult, RemoteConfigSyncServiceOptions } from "./bundle";
|
|
2
|
+
import type { PreparedRemoteConfigRuntime, PrepareRemoteConfigRuntimeOptions, RemoteConfigBundle, RemoteConfigManagedArtifactStore, RemoteConfigProjectContext, RemoteConfigSyncResult, RemoteConfigSyncServiceOptions } from "./bundle";
|
|
3
|
+
export declare function clearMaterializedRemoteConfigRuntime(options: {
|
|
4
|
+
workspacePath: string;
|
|
5
|
+
pluginName?: string;
|
|
6
|
+
artifactStore?: RemoteConfigManagedArtifactStore;
|
|
7
|
+
}): Promise<void>;
|
|
3
8
|
export declare function withRemoteConfigBundlePaths<T extends RemoteConfigBundle>(bundle: T, paths: RemoteConfigSyncResult["materialized"]["paths"]): T;
|
|
4
9
|
export declare class RemoteConfigSyncService {
|
|
5
10
|
private readonly options;
|
package/dist/rpc/runtime.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import z from "zod";
|
|
2
2
|
import type { HubToolExecutorName } from "../hub";
|
|
3
|
+
import type { ModelModality, ModelOperation, ModelOperationMode } from "../llms/model-info";
|
|
3
4
|
import type { ReasoningLevel } from "../llms/reasoning-options";
|
|
4
5
|
import type { RuntimeConfigExtensionKind, SessionExecutionConfig, SessionPromptConfig } from "../session/runtime-config";
|
|
5
6
|
export interface ChatRuntimeConfig extends SessionPromptConfig {
|
|
@@ -120,13 +121,33 @@ export interface EnterpriseStatusRequest {
|
|
|
120
121
|
rootPath?: string;
|
|
121
122
|
}
|
|
122
123
|
export type EnterpriseStatusResponse = EnterpriseSyncResponse;
|
|
124
|
+
/** Which tier of the Cline recommended-models feed featured a model. */
|
|
125
|
+
export type ProviderModelFeaturedTier = "recommended" | "free" | "subscribed";
|
|
126
|
+
export interface ProviderModelFeatured {
|
|
127
|
+
tier: ProviderModelFeaturedTier;
|
|
128
|
+
/** Position within the tier, preserving the feed's intentional order. */
|
|
129
|
+
rank: number;
|
|
130
|
+
/** Feed marketing tags, e.g. "NEW" or "BEST". */
|
|
131
|
+
tags: string[];
|
|
132
|
+
}
|
|
123
133
|
export interface ProviderModel {
|
|
124
134
|
id: string;
|
|
125
135
|
name: string;
|
|
136
|
+
description?: string;
|
|
137
|
+
/**
|
|
138
|
+
* Present when the Cline recommended-models feed features this model
|
|
139
|
+
* (cline / cline-pass providers only), so pickers can lead with the
|
|
140
|
+
* feed's tiers without fetching and joining the feed themselves.
|
|
141
|
+
*/
|
|
142
|
+
featured?: ProviderModelFeatured;
|
|
143
|
+
operation?: ModelOperation;
|
|
126
144
|
contextWindow?: number;
|
|
127
145
|
supportsAttachments?: boolean;
|
|
128
146
|
supportsVision?: boolean;
|
|
129
147
|
supportsReasoning?: boolean;
|
|
148
|
+
operationModes?: ModelOperationMode[];
|
|
149
|
+
inputModalities?: ModelModality[];
|
|
150
|
+
outputModalities?: ModelModality[];
|
|
130
151
|
}
|
|
131
152
|
export type ProviderConfigFieldType = "text" | "password" | "url" | "number" | "select" | "boolean";
|
|
132
153
|
export type ProviderConfigFieldPrimitive = string | number | boolean | null;
|
|
@@ -166,9 +187,14 @@ export interface ProviderListItem {
|
|
|
166
187
|
modelList?: ProviderModel[];
|
|
167
188
|
family?: string;
|
|
168
189
|
}
|
|
190
|
+
export interface VoiceInputSelection {
|
|
191
|
+
providerId: string;
|
|
192
|
+
modelId: string;
|
|
193
|
+
}
|
|
169
194
|
export interface ProviderCatalogResponse {
|
|
170
195
|
providers: ProviderListItem[];
|
|
171
196
|
settingsPath: string;
|
|
197
|
+
voiceInput?: VoiceInputSelection;
|
|
172
198
|
}
|
|
173
199
|
export interface ProviderModelsResponse {
|
|
174
200
|
providerId: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ToolPolicy } from "../llms/tools";
|
|
2
2
|
export type AgentMode = "act" | "plan" | "yolo" | "zen";
|
|
3
|
-
export type RuntimeConfigExtensionKind = "rules" | "skills" | "workflows" | "plugins";
|
|
4
|
-
export declare const RUNTIME_CONFIG_EXTENSION_KINDS: readonly ["rules", "skills", "workflows", "plugins"];
|
|
5
|
-
export declare const DEFAULT_RUNTIME_CONFIG_EXTENSIONS: readonly ["rules", "skills", "workflows", "plugins"];
|
|
3
|
+
export type RuntimeConfigExtensionKind = "rules" | "skills" | "workflows" | "plugins" | "hooks";
|
|
4
|
+
export declare const RUNTIME_CONFIG_EXTENSION_KINDS: readonly ["rules", "skills", "workflows", "plugins", "hooks"];
|
|
5
|
+
export declare const DEFAULT_RUNTIME_CONFIG_EXTENSIONS: readonly ["rules", "skills", "workflows", "plugins", "hooks"];
|
|
6
6
|
export declare function isRuntimeConfigExtensionKind(value: unknown): value is RuntimeConfigExtensionKind;
|
|
7
7
|
export declare function parseRuntimeConfigExtensions(value: unknown): RuntimeConfigExtensionKind[] | undefined;
|
|
8
8
|
export declare function hasRuntimeConfigExtension(extensions: ReadonlyArray<RuntimeConfigExtensionKind> | undefined, kind: RuntimeConfigExtensionKind): boolean;
|
package/dist/storage/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { resolveExistingFilePath } from "./path-resolution";
|
|
2
|
-
export { AGENT_CONFIG_DIRECTORY_NAME, AGENTS_RULES_FILE_NAME, CLINE_CHAT_WORKSPACE_DIRECTORY_NAME, CLINE_CONNECTOR_SETTINGS_FILE_NAME, CLINE_MCP_SETTINGS_FILE_NAME, CLINE_WORKSPACES_DIRECTORY_NAME, type CronSpecsScope, discoverPluginModulePaths, ensureFileExists, ensureHookLogDir, ensureParentDir, getPluginDisplayName, HOOKS_CONFIG_DIRECTORY_NAME, isChatWorkspacePath, isPluginModulePath, type ResolveCronSpecsDirOptions, RULES_CONFIG_DIRECTORY_NAME, resolveAgentConfigSearchPaths, resolveAgentsConfigDirPath, resolveChatWorkspacePath, resolveClineDataDir, resolveClineDir, resolveConfiguredPluginModulePaths, resolveConnectorDataDir, resolveConnectorLogPath, resolveConnectorSettingsPath, resolveConnectorsDbPath, resolveCronDbPath, resolveCronEventsDir, resolveCronReportsDir, resolveCronSpecsDir, resolveDbDataDir, resolveDocumentsClineDirectoryPath, resolveDocumentsExtensionPath, resolveGlobalAgentsRulesPath, resolveGlobalCronSpecsDir, resolveGlobalSettingsPath, resolveHooksConfigSearchPaths, resolveMcpSettingsPath, resolvePluginConfigSearchPaths, resolvePluginModuleEntries, resolveProviderSettingsPath, resolveRulesConfigSearchPaths, resolveSessionDataDir, resolveSkillsConfigSearchPaths, resolveTeamDataDir, resolveWorkflowsConfigSearchPaths, resolveWorkspaceCronSpecsDir, SKILLS_CONFIG_DIRECTORY_NAME, setClineDir, setClineDirIfUnset, setHomeDir, setHomeDirIfUnset, WORKFLOWS_CONFIG_DIRECTORY_NAME, } from "./paths";
|
|
2
|
+
export { AGENT_CONFIG_DIRECTORY_NAME, AGENTS_RULES_FILE_NAME, CLINE_CHAT_WORKSPACE_DIRECTORY_NAME, CLINE_CONNECTOR_SETTINGS_FILE_NAME, CLINE_MCP_SETTINGS_FILE_NAME, CLINE_WORKSPACES_DIRECTORY_NAME, type CronSpecsScope, discoverPluginModulePaths, ensureFileExists, ensureHookLogDir, ensureParentDir, getPluginDisplayName, HOOKS_CONFIG_DIRECTORY_NAME, isChatWorkspacePath, isPluginModulePath, type ResolveCronSpecsDirOptions, type ResolveTaskSpecsDirOptions, RULES_CONFIG_DIRECTORY_NAME, resolveAgentConfigSearchPaths, resolveAgentsConfigDirPath, resolveChatWorkspacePath, resolveClineDataDir, resolveClineDir, resolveConfiguredPluginModulePaths, resolveConnectorDataDir, resolveConnectorLogPath, resolveConnectorSettingsPath, resolveConnectorsDbPath, resolveCronDbPath, resolveCronEventsDir, resolveCronReportsDir, resolveCronSpecsDir, resolveDbDataDir, resolveDocumentsClineDirectoryPath, resolveDocumentsExtensionPath, resolveGlobalAgentsRulesPath, resolveGlobalCronSpecsDir, resolveGlobalSettingsPath, resolveGlobalTaskSpecsDir, resolveHooksConfigSearchPaths, resolveMcpSettingsPath, resolvePluginConfigSearchPaths, resolvePluginModuleEntries, resolveProviderSettingsPath, resolveRulesConfigSearchPaths, resolveSessionDataDir, resolveSkillsConfigSearchPaths, resolveTaskSpecsDir, resolveTasksDbPath, resolveTeamDataDir, resolveWorkflowsConfigSearchPaths, resolveWorkspaceCronSpecsDir, resolveWorkspaceTaskSpecsDir, SKILLS_CONFIG_DIRECTORY_NAME, setClineDir, setClineDirIfUnset, setHomeDir, setHomeDirIfUnset, type TaskSpecsScope, WORKFLOWS_CONFIG_DIRECTORY_NAME, } from "./paths";
|
package/dist/storage/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var MC=Object.defineProperty;var
|
|
1
|
+
var MC=Object.defineProperty;var FC=(C)=>C;function WC(C,S){this[C]=FC.bind(null,S)}var DS=(C,S)=>{for(var T in S)MC(C,T,{get:S[T],enumerable:!0,configurable:!0,set:WC.bind(S,T)})};import{existsSync as K,readdirSync as YC}from"node:fs";import{basename as s,dirname as o,join as p}from"node:path";var KC=/[\u00A0\u2000-\u200A\u202F\u205F\u3000]/g,qC=" ";function l(C){return C.normalize("NFC").replace(KC," ")}function QC(C){let S=s(C),T=S.replace(/ (AM|PM)\./gi,`${qC}$1.`);return T===S?C:p(o(C),T)}function ZC(C){return C.normalize("NFD")}function d(C){return C.replace(/'/g,"’")}function $C(C){let S=o(C),T=l(s(C));try{for(let G of YC(S))if(l(G)===T)return p(S,G)}catch{}return}function AC(C){if(K(C))return C;let S=QC(C);if(S!==C&&K(S))return S;let T=ZC(C);if(T!==C&&K(T))return T;let G=d(C);if(G!==C&&K(G))return G;let _=d(T);if(_!==T&&_!==G&&K(_))return _;return $C(C)}import{appendFileSync as RC,existsSync as I,mkdirSync as V,readdirSync as BC,readFileSync as h,statSync as q}from"node:fs";import{homedir as XC}from"node:os";import{basename as jC,dirname as U,extname as UC,isAbsolute as HC,join as E,relative as zC,resolve as M}from"node:path";var $="workspaces",A="chat";function P(C){let S=C.trim(),T=/^[A-Za-z]:[\\/]/.test(S)||S.startsWith("\\\\"),G=S.startsWith("/");if(!T&&!G)return!1;let _=S.split(T?/[\\/]+/:/\/+/).filter(Boolean),O=_.at(-1)??"",v=_.at(-2)??"",L=_.at(-3)??"";return(_.at(-4)??"")===".cline"&&L==="data"&&v==="workspaces"&&O==="chat"}var x=".clinerules",H=".cline",u=".agents",y="agents",R="hooks",X="skills",b="rules",B="workflows",c="plugins",w="AGENTS.md";function gC(){return E(D(),$,A)}var n="cline_mcp_settings.json",r="settings.json";function bC(){let C=process?.env?.HOME?.trim();if(C&&C!=="~")return C;let S=process?.env?.USERPROFILE?.trim();if(S)return S;let T=process?.env?.HOMEDRIVE?.trim(),G=process?.env?.HOMEPATH?.trim();if(T&&G)return`${T}${G}`;let _=XC().trim();if(_&&_!=="~")return _;return"~"}var F=bC(),i=!1;function JC(C){let S=C.trim();if(!S)return;F=S,i=!0}function VC(C){if(i)return;let S=C.trim();if(!S)return;F=S}var j,e=!1;function xC(C){let S=C.trim();if(!S)return;j=S,e=!0}function uC(C){if(e)return;let S=C.trim();if(!S)return;j=S}function N(){if(j)return j;let C=process.env.CLINE_DIR?.trim();if(C)return C;return E(F,".cline")}function t(){return E(F,"Documents","Cline")}function Z(C){return E(t(),C)}function D(){let C=process.env.CLINE_DATA_DIR?.trim();if(C)return C;return E(N(),"data")}function yC(){let C=process.env.CLINE_SESSION_DATA_DIR?.trim();if(C)return C;return E(D(),"sessions")}function wC(){let C=process.env.CLINE_TEAM_DATA_DIR?.trim();if(C)return C;return E(D(),"teams")}function a(){let C=process.env.CLINE_CONNECTOR_DATA_DIR?.trim();if(C)return C;return E(D(),"connectors")}function kC(C,S){let T=C.replace(/[^a-zA-Z0-9._-]+/g,"_"),G=S.replace(/[^a-zA-Z0-9._-]+/g,"_");return E(D(),"logs","connectors",T,`${G}.log`)}function mC(){let C=process.env.CLINE_CONNECTOR_SETTINGS_PATH?.trim();if(C)return C;return E(a(),r)}function z(){let C=process.env.CLINE_DB_DATA_DIR?.trim();if(C)return C;return E(D(),"db")}function fC(){let C=process.env.CLINE_CONNECTORS_DB_PATH?.trim();if(C)return C;return E(z(),"connectors.db")}function lC(){let C=process.env.CLINE_CRON_DB_PATH?.trim();if(C)return C;return E(z(),"cron.db")}function dC(){let C=process.env.CLINE_TASKS_DB_PATH?.trim();if(C)return C;return E(z(),"tasks.db")}function CC(){return E(N(),"tasks")}function SC(C){let S=C.trim();if(!S)throw Error("workspaceRoot is required for workspace task scope");return E(S,".cline","tasks")}function sC(C){let S=C.taskSpecsDir?.trim();if(S)return S;if(C.scope==="workspace")return SC(C.workspaceRoot??"");return CC()}function TC(){return E(N(),"cron")}function J(C){return E(C,".cline","cron")}function k(C){if(typeof C==="string")return J(C);if(C?.cronSpecsDir?.trim())return C.cronSpecsDir.trim();if(C?.scope==="workspace"){let S=C.workspaceRoot?.trim();if(!S)throw Error("workspaceRoot is required for workspace cron scope");return J(S)}return TC()}function oC(C){return E(k(C),"reports")}function pC(C){return E(k(C),"events")}function PC(){let C=process.env.CLINE_PROVIDER_SETTINGS_PATH?.trim();if(C)return C;return E(D(),"settings","providers.json")}function cC(){let C=process.env.CLINE_GLOBAL_SETTINGS_PATH?.trim();if(C)return C;return E(D(),"settings","global-settings.json")}function hC(){let C=process.env.CLINE_MCP_SETTINGS_PATH?.trim();if(C)return C;return E(D(),"settings",n)}function W(C){let S=new Set,T=[];for(let G of C){if(!G||S.has(G))continue;S.add(G),T.push(G)}return T}function nC(C){if(!C)return[];return[x,H,u].map((S)=>E(C,S,X))}function EC(){return E(N(),y)}function rC(C){return W([C?E(C,H,y):"",EC()])}function iC(C){let S=[Z("Hooks"),E(N(),R)];if(C)S.push(E(C,x,R),E(C,H,R));return W(S)}function eC(C){return W([...nC(C),E(N(),X),E(F,u,X)])}function _C(){return E(F,u,w)}function tC(C){let S=C?[E(C,x),E(C,H,b)]:[],T=C?[E(C,w)]:[];return W([...T,...S,_C(),E(N(),b),Z("Rules")])}function aC(C){return W([C?E(C,".clinerules",B):"",Z("Workflows"),E(N(),B),C?E(C,".cline",B):""])}function CS(C){return W([C?E(C,".cline",c):"",E(N(),c),Z("Plugins")])}var GC=new Set([".js",".ts"]),m="package.json",SS=["index.ts","index.js"];function Q(C){let S=C.lastIndexOf(".");if(S===-1)return!1;return GC.has(C.slice(S))}function OC(C){try{let S=JSON.parse(h(C,"utf8"));if(!S.cline||typeof S.cline!=="object")return null;return S.cline}catch{return null}}function IC(C){let S=C?.plugins;if(!Array.isArray(S))return[];return S.flatMap((T)=>T.paths??[])}function DC(C){let S=M(C);if(!I(S)||!q(S).isDirectory())return null;let T=E(S,m);if(I(T)){let G=OC(T),_=IC(G).map((O)=>M(S,O)).filter((O)=>I(O)&&q(O).isFile()&&Q(O));if(_.length>0)return _}for(let G of SS){let _=E(S,G);if(I(_)&&q(_).isFile())return[_]}return null}function TS(C){try{let S=JSON.parse(h(C,"utf8"));return typeof S.name==="string"&&S.name.trim()?S.name.trim():void 0}catch{return}}function ES(C,S){let T=zC(M(C),M(S));return T===""||!T.startsWith("..")&&!HC(T)}function _S(C,S){let T=U(C),G=M(S);while(ES(G,T)){let _=E(T,m);if(I(_)){let v=TS(_);if(v)return v;break}let O=M(T,"..");if(O===T)break;T=O}return jC(C,UC(C))}function vC(C){let S=M(C);if(!I(S))return[];let T=[],G=[S];while(G.length>0){let _=G.pop();if(!_)continue;let O;try{O=BC(_,{withFileTypes:!0})}catch{continue}for(let v of O){let L=E(_,v.name);if(v.isDirectory()){let g=E(L,m);if(I(g)){let NC=OC(g),f=IC(NC).map((Y)=>M(L,Y)).filter((Y)=>I(Y)&&q(Y).isFile()&&Q(Y));if(f.length>0){T.push(...f);continue}}G.push(L);continue}if(v.name.startsWith("."))continue;if(v.isFile()&&Q(L))T.push(L)}}return T.sort((_,O)=>_.localeCompare(O))}function GS(C,S){let T=[];for(let G of C){let _=G.trim();if(!_)continue;let O=M(S,_);if(!I(O))throw Error(`Plugin path does not exist: ${O}`);if(q(O).isDirectory()){let L=DC(O);if(L){T.push(...L);continue}T.push(...vC(O));continue}if(!Q(O))throw Error(`Plugin file must use a supported extension (${[...GC].join(", ")}): ${O}`);T.push(O)}return T}function LC(C){let S=U(C);if(!I(S))V(S,{recursive:!0})}function OS(C){V(U(C),{recursive:!0}),RC(C,"")}function IS(C){if(C?.trim())return LC(C),U(C);let S=E(D(),"logs");if(!I(S))V(S,{recursive:!0});return S}export{VC as setHomeDirIfUnset,JC as setHomeDir,uC as setClineDirIfUnset,xC as setClineDir,SC as resolveWorkspaceTaskSpecsDir,J as resolveWorkspaceCronSpecsDir,aC as resolveWorkflowsConfigSearchPaths,wC as resolveTeamDataDir,dC as resolveTasksDbPath,sC as resolveTaskSpecsDir,eC as resolveSkillsConfigSearchPaths,yC as resolveSessionDataDir,tC as resolveRulesConfigSearchPaths,PC as resolveProviderSettingsPath,DC as resolvePluginModuleEntries,CS as resolvePluginConfigSearchPaths,hC as resolveMcpSettingsPath,iC as resolveHooksConfigSearchPaths,CC as resolveGlobalTaskSpecsDir,cC as resolveGlobalSettingsPath,TC as resolveGlobalCronSpecsDir,_C as resolveGlobalAgentsRulesPath,AC as resolveExistingFilePath,Z as resolveDocumentsExtensionPath,t as resolveDocumentsClineDirectoryPath,z as resolveDbDataDir,k as resolveCronSpecsDir,oC as resolveCronReportsDir,pC as resolveCronEventsDir,lC as resolveCronDbPath,fC as resolveConnectorsDbPath,mC as resolveConnectorSettingsPath,kC as resolveConnectorLogPath,a as resolveConnectorDataDir,GS as resolveConfiguredPluginModulePaths,N as resolveClineDir,D as resolveClineDataDir,gC as resolveChatWorkspacePath,EC as resolveAgentsConfigDirPath,rC as resolveAgentConfigSearchPaths,Q as isPluginModulePath,P as isChatWorkspacePath,_S as getPluginDisplayName,LC as ensureParentDir,IS as ensureHookLogDir,OS as ensureFileExists,vC as discoverPluginModulePaths,B as WORKFLOWS_CONFIG_DIRECTORY_NAME,X as SKILLS_CONFIG_DIRECTORY_NAME,b as RULES_CONFIG_DIRECTORY_NAME,R as HOOKS_CONFIG_DIRECTORY_NAME,$ as CLINE_WORKSPACES_DIRECTORY_NAME,n as CLINE_MCP_SETTINGS_FILE_NAME,r as CLINE_CONNECTOR_SETTINGS_FILE_NAME,A as CLINE_CHAT_WORKSPACE_DIRECTORY_NAME,y as AGENT_CONFIG_DIRECTORY_NAME,w as AGENTS_RULES_FILE_NAME};
|
package/dist/storage/paths.d.ts
CHANGED
|
@@ -48,6 +48,21 @@ export declare function resolveConnectorsDbPath(): string;
|
|
|
48
48
|
* retention, and query patterns stay decoupled from session storage.
|
|
49
49
|
*/
|
|
50
50
|
export declare function resolveCronDbPath(): string;
|
|
51
|
+
/** Path to the dedicated agenda task queue database. */
|
|
52
|
+
export declare function resolveTasksDbPath(): string;
|
|
53
|
+
export type TaskSpecsScope = "global" | "workspace";
|
|
54
|
+
export interface ResolveTaskSpecsDirOptions {
|
|
55
|
+
/** Explicit directory, primarily for tests and embedded hosts. */
|
|
56
|
+
taskSpecsDir?: string;
|
|
57
|
+
scope: TaskSpecsScope;
|
|
58
|
+
/** Required for workspace-scoped task specs. */
|
|
59
|
+
workspaceRoot?: string;
|
|
60
|
+
}
|
|
61
|
+
/** Global file-backed agenda tasks: `~/.cline/tasks/`. */
|
|
62
|
+
export declare function resolveGlobalTaskSpecsDir(): string;
|
|
63
|
+
/** Workspace file-backed agenda tasks: `<workspace>/.cline/tasks/`. */
|
|
64
|
+
export declare function resolveWorkspaceTaskSpecsDir(workspaceRoot: string): string;
|
|
65
|
+
export declare function resolveTaskSpecsDir(options: ResolveTaskSpecsDirOptions): string;
|
|
51
66
|
export type CronSpecsScope = "global" | "workspace";
|
|
52
67
|
export interface ResolveCronSpecsDirOptions {
|
|
53
68
|
/**
|
package/dist/tasks.d.ts
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import type { GatewayModelSelection } from "./llms/gateway";
|
|
2
|
+
/** Semantic labels used to group work on a user's agenda. */
|
|
3
|
+
export type AgendaTaskType = "suggestion" | "follow-up" | "todo" | "handoff" | "idea" | "reminder";
|
|
4
|
+
export type AgendaTaskStatus = "pending_approval" | "approved" | "in_progress" | "completed" | "failed" | "cancelled" | "expired";
|
|
5
|
+
/** Lower numbers are more urgent. P3 is the default priority. */
|
|
6
|
+
export type AgendaTaskPriority = 0 | 1 | 2 | 3 | 4 | 5;
|
|
7
|
+
export type AgendaTaskScope = "workspace" | "global";
|
|
8
|
+
export interface AgendaTaskActor {
|
|
9
|
+
kind: "user" | "agent" | "system" | "automation_policy";
|
|
10
|
+
id?: string;
|
|
11
|
+
displayName?: string;
|
|
12
|
+
clientId?: string;
|
|
13
|
+
sessionId?: string;
|
|
14
|
+
agentId?: string;
|
|
15
|
+
}
|
|
16
|
+
export type AgendaTaskRunStatus = "starting" | "running" | "completed" | "failed" | "cancelled" | "interrupted";
|
|
17
|
+
export interface AgendaTaskRecord {
|
|
18
|
+
taskId: string;
|
|
19
|
+
type: AgendaTaskType;
|
|
20
|
+
status: AgendaTaskStatus;
|
|
21
|
+
title: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
instructions: string;
|
|
24
|
+
scope: AgendaTaskScope;
|
|
25
|
+
workspaceRoot?: string;
|
|
26
|
+
cwd?: string;
|
|
27
|
+
resourcePaths: string[];
|
|
28
|
+
priority: AgendaTaskPriority;
|
|
29
|
+
assignee?: string;
|
|
30
|
+
modelSelection?: GatewayModelSelection;
|
|
31
|
+
mode?: "act" | "plan" | "yolo";
|
|
32
|
+
systemPrompt?: string;
|
|
33
|
+
maxIterations?: number;
|
|
34
|
+
timeoutSeconds?: number;
|
|
35
|
+
/** Task cannot be started before this ISO-8601 timestamp. */
|
|
36
|
+
availableAt: string;
|
|
37
|
+
/** Required latest-start timestamp. */
|
|
38
|
+
expiresAt: string;
|
|
39
|
+
automationEligible: boolean;
|
|
40
|
+
revision: number;
|
|
41
|
+
approvedRevision?: number;
|
|
42
|
+
createdBy: AgendaTaskActor;
|
|
43
|
+
updatedBy: AgendaTaskActor;
|
|
44
|
+
originSessionId?: string;
|
|
45
|
+
originTaskId?: string;
|
|
46
|
+
currentRunId?: string;
|
|
47
|
+
lastRunId?: string;
|
|
48
|
+
lastSessionId?: string;
|
|
49
|
+
/** Canonical Markdown source file backing this task. */
|
|
50
|
+
specPath?: string;
|
|
51
|
+
error?: string;
|
|
52
|
+
createdAt: string;
|
|
53
|
+
updatedAt: string;
|
|
54
|
+
completedAt?: string;
|
|
55
|
+
archivedAt?: string;
|
|
56
|
+
}
|
|
57
|
+
export interface AgendaTaskRunRecord {
|
|
58
|
+
runId: string;
|
|
59
|
+
taskId: string;
|
|
60
|
+
taskRevision: number;
|
|
61
|
+
attempt: number;
|
|
62
|
+
status: AgendaTaskRunStatus;
|
|
63
|
+
claimToken?: string;
|
|
64
|
+
claimUntilAt?: string;
|
|
65
|
+
requestedByClientId?: string;
|
|
66
|
+
sessionId?: string;
|
|
67
|
+
claimedAt: string;
|
|
68
|
+
startedAt?: string;
|
|
69
|
+
completedAt?: string;
|
|
70
|
+
resultSummary?: string;
|
|
71
|
+
error?: string;
|
|
72
|
+
createdAt: string;
|
|
73
|
+
updatedAt: string;
|
|
74
|
+
}
|
|
75
|
+
export interface AgendaTaskCreateInput {
|
|
76
|
+
taskId?: string;
|
|
77
|
+
type: AgendaTaskType;
|
|
78
|
+
title: string;
|
|
79
|
+
description?: string;
|
|
80
|
+
instructions: string;
|
|
81
|
+
scope: AgendaTaskScope;
|
|
82
|
+
workspaceRoot?: string;
|
|
83
|
+
cwd?: string;
|
|
84
|
+
resourcePaths?: string[];
|
|
85
|
+
priority?: AgendaTaskPriority;
|
|
86
|
+
assignee?: string;
|
|
87
|
+
modelSelection?: GatewayModelSelection;
|
|
88
|
+
mode?: "act" | "plan" | "yolo";
|
|
89
|
+
systemPrompt?: string;
|
|
90
|
+
maxIterations?: number;
|
|
91
|
+
timeoutSeconds?: number;
|
|
92
|
+
availableAt?: string;
|
|
93
|
+
expiresAt: string;
|
|
94
|
+
automationEligible?: boolean;
|
|
95
|
+
/** False only when a trusted interactive user directly authored the item. */
|
|
96
|
+
requiresApproval?: boolean;
|
|
97
|
+
createdBy: AgendaTaskActor;
|
|
98
|
+
originSessionId?: string;
|
|
99
|
+
originTaskId?: string;
|
|
100
|
+
/** Optional explicit source path; managers normally derive this. */
|
|
101
|
+
specPath?: string;
|
|
102
|
+
}
|
|
103
|
+
/** Editable task fields. Lifecycle transitions are owned by the task manager. */
|
|
104
|
+
export interface AgendaTaskUpdateInput {
|
|
105
|
+
taskId: string;
|
|
106
|
+
expectedRevision: number;
|
|
107
|
+
type?: AgendaTaskType;
|
|
108
|
+
title?: string;
|
|
109
|
+
description?: string | null;
|
|
110
|
+
instructions?: string;
|
|
111
|
+
scope?: AgendaTaskScope;
|
|
112
|
+
workspaceRoot?: string | null;
|
|
113
|
+
cwd?: string | null;
|
|
114
|
+
resourcePaths?: string[];
|
|
115
|
+
priority?: AgendaTaskPriority;
|
|
116
|
+
assignee?: string | null;
|
|
117
|
+
modelSelection?: GatewayModelSelection | null;
|
|
118
|
+
mode?: "act" | "plan" | "yolo" | null;
|
|
119
|
+
systemPrompt?: string | null;
|
|
120
|
+
maxIterations?: number | null;
|
|
121
|
+
timeoutSeconds?: number | null;
|
|
122
|
+
availableAt?: string;
|
|
123
|
+
expiresAt?: string;
|
|
124
|
+
automationEligible?: boolean;
|
|
125
|
+
updatedBy: AgendaTaskActor;
|
|
126
|
+
}
|
|
127
|
+
export interface AgendaTaskListInput {
|
|
128
|
+
statuses?: AgendaTaskStatus[];
|
|
129
|
+
types?: AgendaTaskType[];
|
|
130
|
+
/** Explicit scope filtering. Omit to include global tasks with a workspace view. */
|
|
131
|
+
scope?: AgendaTaskScope;
|
|
132
|
+
/**
|
|
133
|
+
* Selected workspace. With no explicit scope, results contain global tasks plus
|
|
134
|
+
* tasks for this workspace. `scope: "workspace"` is workspace-only, while
|
|
135
|
+
* `scope: "global"` ignores this value and remains global-only.
|
|
136
|
+
*/
|
|
137
|
+
workspaceRoot?: string;
|
|
138
|
+
priorities?: AgendaTaskPriority[];
|
|
139
|
+
automationEligible?: boolean;
|
|
140
|
+
availableBefore?: string;
|
|
141
|
+
includeArchived?: boolean;
|
|
142
|
+
limit?: number;
|
|
143
|
+
}
|
|
144
|
+
export type AgendaAutomationMode = "manual" | "auto_start" | "unattended";
|
|
145
|
+
export interface AgendaAutomationPolicy {
|
|
146
|
+
/** `global` in v1; allows workspace/type-specific policies later. */
|
|
147
|
+
scopeKey: string;
|
|
148
|
+
mode: AgendaAutomationMode;
|
|
149
|
+
applyToAgentCreated: boolean;
|
|
150
|
+
maxConcurrentRuns: number;
|
|
151
|
+
maxChainDepth: number;
|
|
152
|
+
maxStartsPerHour: number;
|
|
153
|
+
enabledBy?: AgendaTaskActor;
|
|
154
|
+
enabledAt?: string;
|
|
155
|
+
updatedAt: string;
|
|
156
|
+
}
|
package/dist/team/schema.d.ts
CHANGED
|
@@ -39,8 +39,8 @@ export declare const TeamTaskInputSchema: z.ZodObject<{
|
|
|
39
39
|
assignee: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
|
|
40
40
|
status: z.ZodPreprocess<z.ZodOptional<z.ZodEnum<{
|
|
41
41
|
completed: "completed";
|
|
42
|
-
pending: "pending";
|
|
43
42
|
in_progress: "in_progress";
|
|
43
|
+
pending: "pending";
|
|
44
44
|
blocked: "blocked";
|
|
45
45
|
}>>>;
|
|
46
46
|
taskId: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
|
|
@@ -63,8 +63,8 @@ export declare const TeamListRunsInputSchema: z.ZodObject<{
|
|
|
63
63
|
completed: "completed";
|
|
64
64
|
failed: "failed";
|
|
65
65
|
cancelled: "cancelled";
|
|
66
|
-
queued: "queued";
|
|
67
66
|
interrupted: "interrupted";
|
|
67
|
+
queued: "queued";
|
|
68
68
|
}>>>;
|
|
69
69
|
agentId: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
|
|
70
70
|
includeCompleted: z.ZodPreprocess<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -93,10 +93,10 @@ export declare const TeamReadMailboxInputSchema: z.ZodObject<{
|
|
|
93
93
|
export declare const TeamMissionLogInputSchema: z.ZodObject<{
|
|
94
94
|
kind: z.ZodEnum<{
|
|
95
95
|
error: "error";
|
|
96
|
+
handoff: "handoff";
|
|
96
97
|
done: "done";
|
|
97
98
|
blocked: "blocked";
|
|
98
99
|
progress: "progress";
|
|
99
|
-
handoff: "handoff";
|
|
100
100
|
decision: "decision";
|
|
101
101
|
}>;
|
|
102
102
|
summary: z.ZodString;
|
|
@@ -160,8 +160,8 @@ export declare const TeamStatusToolResultSchema: z.ZodObject<{
|
|
|
160
160
|
}, z.core.$strip>>;
|
|
161
161
|
taskCounts: z.ZodRecord<z.ZodEnum<{
|
|
162
162
|
completed: "completed";
|
|
163
|
-
pending: "pending";
|
|
164
163
|
in_progress: "in_progress";
|
|
164
|
+
pending: "pending";
|
|
165
165
|
blocked: "blocked";
|
|
166
166
|
}>, z.ZodNumber>;
|
|
167
167
|
unreadMessages: z.ZodNumber;
|
|
@@ -180,8 +180,8 @@ export declare const TeamTaskListItemToolResultSchema: z.ZodObject<{
|
|
|
180
180
|
description: z.ZodString;
|
|
181
181
|
status: z.ZodEnum<{
|
|
182
182
|
completed: "completed";
|
|
183
|
-
pending: "pending";
|
|
184
183
|
in_progress: "in_progress";
|
|
184
|
+
pending: "pending";
|
|
185
185
|
blocked: "blocked";
|
|
186
186
|
}>;
|
|
187
187
|
createdAt: z.ZodPreprocess<z.ZodString>;
|
|
@@ -198,8 +198,8 @@ export declare const TeamTaskToolResultSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
198
198
|
taskId: z.ZodString;
|
|
199
199
|
status: z.ZodEnum<{
|
|
200
200
|
completed: "completed";
|
|
201
|
-
pending: "pending";
|
|
202
201
|
in_progress: "in_progress";
|
|
202
|
+
pending: "pending";
|
|
203
203
|
blocked: "blocked";
|
|
204
204
|
}>;
|
|
205
205
|
ignoredFields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -212,8 +212,8 @@ export declare const TeamTaskToolResultSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
212
212
|
description: z.ZodString;
|
|
213
213
|
status: z.ZodEnum<{
|
|
214
214
|
completed: "completed";
|
|
215
|
-
pending: "pending";
|
|
216
215
|
in_progress: "in_progress";
|
|
216
|
+
pending: "pending";
|
|
217
217
|
blocked: "blocked";
|
|
218
218
|
}>;
|
|
219
219
|
createdAt: z.ZodPreprocess<z.ZodString>;
|
|
@@ -230,8 +230,8 @@ export declare const TeamTaskToolResultSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
230
230
|
taskId: z.ZodString;
|
|
231
231
|
status: z.ZodEnum<{
|
|
232
232
|
completed: "completed";
|
|
233
|
-
pending: "pending";
|
|
234
233
|
in_progress: "in_progress";
|
|
234
|
+
pending: "pending";
|
|
235
235
|
blocked: "blocked";
|
|
236
236
|
}>;
|
|
237
237
|
nextStep: z.ZodString;
|
|
@@ -240,8 +240,8 @@ export declare const TeamTaskToolResultSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
240
240
|
taskId: z.ZodString;
|
|
241
241
|
status: z.ZodEnum<{
|
|
242
242
|
completed: "completed";
|
|
243
|
-
pending: "pending";
|
|
244
243
|
in_progress: "in_progress";
|
|
244
|
+
pending: "pending";
|
|
245
245
|
blocked: "blocked";
|
|
246
246
|
}>;
|
|
247
247
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -249,8 +249,8 @@ export declare const TeamTaskToolResultSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
249
249
|
taskId: z.ZodString;
|
|
250
250
|
status: z.ZodEnum<{
|
|
251
251
|
completed: "completed";
|
|
252
|
-
pending: "pending";
|
|
253
252
|
in_progress: "in_progress";
|
|
253
|
+
pending: "pending";
|
|
254
254
|
blocked: "blocked";
|
|
255
255
|
}>;
|
|
256
256
|
}, z.core.$strip>], "action">;
|
|
@@ -295,8 +295,8 @@ export declare const TeamRunToolSummarySchema: z.ZodObject<{
|
|
|
295
295
|
completed: "completed";
|
|
296
296
|
failed: "failed";
|
|
297
297
|
cancelled: "cancelled";
|
|
298
|
-
queued: "queued";
|
|
299
298
|
interrupted: "interrupted";
|
|
299
|
+
queued: "queued";
|
|
300
300
|
}>;
|
|
301
301
|
messagePreview: z.ZodString;
|
|
302
302
|
priority: z.ZodNumber;
|
|
@@ -371,8 +371,8 @@ export declare const TeamCancelRunToolResultSchema: z.ZodObject<{
|
|
|
371
371
|
completed: "completed";
|
|
372
372
|
failed: "failed";
|
|
373
373
|
cancelled: "cancelled";
|
|
374
|
-
queued: "queued";
|
|
375
374
|
interrupted: "interrupted";
|
|
375
|
+
queued: "queued";
|
|
376
376
|
}>;
|
|
377
377
|
}, z.core.$strip>;
|
|
378
378
|
export declare const TeamSendMessageToolResultSchema: z.ZodObject<{
|