@cerebriline/core 4.100.246 → 4.100.247
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/assets/prompt-templates/claude.md +2 -0
- package/assets/prompt-templates/deepseek.md +1 -0
- package/assets/prompt-templates/default.md +2 -1
- package/assets/prompt-templates/kimi-k3.md +1 -0
- package/assets/prompt-templates/kimi.md +1 -0
- package/assets/prompt-templates/minimax.md +2 -0
- package/assets/prompt-templates/nemotron.md +1 -0
- package/assets/skills/browser-automation/SKILL.md +113 -0
- package/dist/ClineCore.d.ts +9 -0
- package/dist/account/index.d.ts +1 -0
- package/dist/account/telemetry.d.ts +22 -0
- package/dist/cloud/api.d.ts +122 -0
- package/dist/cloud/controller.d.ts +172 -0
- package/dist/cloud/index.d.ts +9 -0
- package/dist/cloud/index.js +21 -0
- package/dist/cloud/models.d.ts +9 -0
- package/dist/cloud/repositories.d.ts +21 -0
- package/dist/cloud/snapshots.d.ts +22 -0
- package/dist/cloud/state.d.ts +13 -0
- package/dist/cloud/types.d.ts +84 -0
- package/dist/cron/events/cron-event-ingress.d.ts +4 -2
- package/dist/cron/runner/cron-runner.d.ts +5 -2
- package/dist/cron/service/cron-service.d.ts +2 -1
- package/dist/cron/service/schedule-service.d.ts +2 -1
- package/dist/cron/store/sqlite-cron-store.d.ts +7 -1
- package/dist/extensions/composio/composio-meta-tools.d.ts +39 -0
- package/dist/extensions/composio/composio-tools-extension.d.ts +13 -0
- package/dist/extensions/context/agentic-compaction.d.ts +1 -1
- package/dist/extensions/context/cap-thoughts.d.ts +39 -0
- package/dist/extensions/context/compaction-shared.d.ts +76 -1
- package/dist/extensions/context/compaction.d.ts +75 -3
- package/dist/extensions/mcp/client.d.ts +1 -1
- package/dist/extensions/tools/definitions.d.ts +5 -5
- package/dist/extensions/tools/executors/bash.d.ts +26 -0
- package/dist/extensions/tools/executors/index.d.ts +1 -1
- package/dist/extensions/tools/index.d.ts +1 -1
- package/dist/extensions/tools/task-progress.d.ts +37 -0
- package/dist/extensions/tools/team/index.d.ts +1 -0
- package/dist/extensions/tools/team/multi-agent.d.ts +48 -0
- package/dist/extensions/tools/team/persistence-policy.d.ts +56 -0
- package/dist/extensions/tools/team/runtime.d.ts +1 -1
- package/dist/extensions/tools/team/sanitize-team-name.d.ts +5 -0
- package/dist/extensions/tools/team/team-tools.d.ts +1 -1
- package/dist/hooks/checkpoint-hooks.d.ts +23 -1
- package/dist/hooks/hook-file-hooks.d.ts +27 -0
- package/dist/hooks/subprocess-runner.d.ts +23 -0
- package/dist/hooks/subprocess.d.ts +10 -0
- package/dist/hub/client/index.d.ts +29 -3
- package/dist/hub/client/session-client.d.ts +0 -3
- package/dist/hub/daemon/bind-diagnostics.d.ts +16 -0
- package/dist/hub/daemon/entry.js +689 -640
- package/dist/hub/daemon/index.d.ts +17 -8
- package/dist/hub/discovery/index.d.ts +1 -0
- package/dist/hub/index.js +675 -627
- package/dist/hub/runtime-host/hub-runtime-host.d.ts +4 -2
- package/dist/hub/server/handlers/session-handlers.d.ts +6 -1
- package/dist/index.d.ts +21 -11
- package/dist/index.js +1032 -964
- package/dist/remote/remote-environments.d.ts +155 -0
- package/dist/remote/remote-helper-entry.d.ts +1 -0
- package/dist/remote/remote-helper-entry.js +5 -0
- package/dist/remote/remote-helper.d.ts +29 -0
- package/dist/remote/remote-helper.js +4 -0
- package/dist/remote/shell-path.d.ts +88 -0
- package/dist/runtime/host/local-runtime-host.d.ts +2 -2
- package/dist/runtime/host/runtime-host.d.ts +13 -1
- package/dist/runtime/orchestration/oauth-refresh-lock.d.ts +6 -0
- package/dist/runtime/orchestration/session-runtime-orchestrator.d.ts +7 -0
- package/dist/runtime/orchestration/team-persistence-writer.d.ts +65 -0
- package/dist/runtime/safety/rules.d.ts +11 -0
- package/dist/runtime/turn-queue/pending-prompt-service.d.ts +1 -0
- package/dist/services/agent-events.d.ts +1 -0
- package/dist/services/cloud-handoff/git-preflight.d.ts +24 -0
- package/dist/services/cloud-handoff/index.d.ts +4 -0
- package/dist/services/cloud-handoff/metadata.d.ts +7 -0
- package/dist/services/cloud-handoff/transcript.d.ts +5 -0
- package/dist/services/cloud-handoff/types.d.ts +35 -0
- package/dist/services/feature-flags/FeatureFlagsService.d.ts +2 -0
- package/dist/services/feature-flags/cline-account-feature-flags.d.ts +5 -0
- package/dist/services/llms/cline-recommended-models.d.ts +1 -0
- package/dist/services/llms/handler-factory.d.ts +12 -0
- package/dist/services/llms/provider-defaults.d.ts +1 -1
- package/dist/services/llms/provider-settings.d.ts +19 -17
- package/dist/services/local-runtime-bootstrap.d.ts +7 -0
- package/dist/services/mcp-install.d.ts +9 -0
- package/dist/services/plugin-commands.d.ts +28 -0
- package/dist/services/providers/local-provider-registry.d.ts +8 -3
- package/dist/services/providers/local-provider-service.d.ts +20 -10
- package/dist/services/providers/model-source.d.ts +6 -1
- package/dist/services/providers/provider-config-fields.d.ts +11 -0
- package/dist/services/session-import/claude-code.d.ts +1 -1
- package/dist/services/session-import/paths.d.ts +9 -0
- package/dist/services/storage/file-team-store.d.ts +10 -4
- package/dist/services/storage/sqlite-team-store.d.ts +48 -5
- package/dist/services/storage/team-store.d.ts +1 -0
- package/dist/services/telemetry/core-events.d.ts +97 -5
- package/dist/services/telemetry/index.d.ts +1 -0
- package/dist/services/telemetry/index.js +1 -1
- package/dist/services/telemetry/scoped-telemetry.d.ts +31 -0
- package/dist/services/workspace/workspace-manifest.d.ts +34 -0
- package/dist/services/workspace/workspace-telemetry.d.ts +5 -0
- package/dist/session/fork-metadata.d.ts +7 -0
- package/dist/session/models/session-compaction.d.ts +8 -1
- package/dist/session/services/message-builder.d.ts +8 -1
- package/dist/session/services/persistence-service.d.ts +4 -1
- package/dist/session/services/tool-result-cache.d.ts +30 -0
- package/dist/session/session-versioning-service.d.ts +8 -0
- package/dist/session/stores/session-manifest-store.d.ts +2 -4
- package/dist/session/team/team-session-coordinator.d.ts +3 -1
- package/dist/tasks/task-tool.d.ts +2 -2
- package/dist/types/provider-settings.d.ts +11 -0
- package/dist/types/session.d.ts +2 -0
- package/dist/types/storage.d.ts +22 -1
- package/package.json +16 -4
- package/dist/cron/runner/resource-limiter.d.ts +0 -8
- package/dist/services/storage/team-events-retention.d.ts +0 -25
|
@@ -4,7 +4,9 @@ import type { CoreSessionEvent } from "../../types/events";
|
|
|
4
4
|
import type { ActiveSession, TeamRunUpdate } from "../../types/session";
|
|
5
5
|
export declare function trackTeamRunState(session: ActiveSession, event: TeamEvent): void;
|
|
6
6
|
export declare function dispatchTeamEventToBackend(rootSessionId: string, event: TeamEvent, invokeOptional: (method: string, ...args: unknown[]) => Promise<void>): Promise<void>;
|
|
7
|
-
|
|
7
|
+
/** Minimum gap between `team_progress` emits driven by telemetry events. */
|
|
8
|
+
export declare const TEAM_PROGRESS_TELEMETRY_THROTTLE_MS = 1000;
|
|
9
|
+
export declare function emitTeamProgress(session: ActiveSession, rootSessionId: string, event: TeamEvent, emit: (event: CoreSessionEvent) => void, now?: () => number): void;
|
|
8
10
|
export declare function hasPendingTeamRunWork(session: ActiveSession): boolean;
|
|
9
11
|
export declare function shouldAutoContinueTeamRuns(session: ActiveSession, finishReason: AgentResult["finishReason"]): boolean;
|
|
10
12
|
export declare function notifyTeamRunWaiters(session: ActiveSession): void;
|
|
@@ -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
|
|
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 default to the local timezone. Omit `timezone` unless the user explicitly requests a different timezone; never guess EST, UTC, or another zone. When a timezone is requested, use its IANA name (for example, America/New_York) so daylight-saving changes are handled.\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
|
|
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 default to the local timezone. Omit `timezone` unless the user explicitly requests a different timezone; never guess EST, UTC, or another zone. When a timezone is requested, use its IANA name (for example, America/New_York) so daylight-saving changes are handled.\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
|
list: "list";
|
|
@@ -17,13 +17,24 @@ export interface StoredProviderSettingsEntry {
|
|
|
17
17
|
updatedAt: string;
|
|
18
18
|
tokenSource: ProviderTokenSource;
|
|
19
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* One-shot repairs the legacy migration has already applied to this file.
|
|
22
|
+
* A repair reads legacy state that stays on disk forever, so without a marker
|
|
23
|
+
* it would re-apply on every launch and fight a user who undoes it.
|
|
24
|
+
*/
|
|
25
|
+
export interface StoredProviderRepairs {
|
|
26
|
+
/** Restored a bare legacy `awsProfile` onto an already-migrated entry. */
|
|
27
|
+
bedrockProfile?: boolean;
|
|
28
|
+
}
|
|
20
29
|
export interface StoredProviderSettings {
|
|
21
30
|
version: 1;
|
|
22
31
|
lastUsedProvider?: string;
|
|
23
32
|
modes: StoredProviderModes;
|
|
33
|
+
repairs?: StoredProviderRepairs;
|
|
24
34
|
providers: Record<string, StoredProviderSettingsEntry>;
|
|
25
35
|
}
|
|
26
36
|
export declare const StoredProviderModesSchema: z.ZodType<StoredProviderModes>;
|
|
37
|
+
export declare const StoredProviderRepairsSchema: z.ZodType<StoredProviderRepairs>;
|
|
27
38
|
export declare const StoredProviderSettingsEntrySchema: z.ZodType<StoredProviderSettingsEntry>;
|
|
28
39
|
export declare const StoredProviderSettingsSchema: z.ZodType<StoredProviderSettings>;
|
|
29
40
|
export declare function emptyStoredProviderSettings(): StoredProviderSettings;
|
package/dist/types/session.d.ts
CHANGED
|
@@ -165,6 +165,8 @@ export interface SessionPersistenceAdapter {
|
|
|
165
165
|
limit: number;
|
|
166
166
|
parentSessionId?: string;
|
|
167
167
|
status?: string;
|
|
168
|
+
/** Only root sessions: excludes subagent and team-task child rows. */
|
|
169
|
+
rootOnly?: boolean;
|
|
168
170
|
}): Promise<SessionRow[]>;
|
|
169
171
|
updateSession(input: PersistedSessionUpdateInput): Promise<{
|
|
170
172
|
updated: boolean;
|
package/dist/types/storage.d.ts
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
import type { TeamRuntimeState, TeamTeammateSpec } from "@cerebriline/shared";
|
|
2
|
-
import type { TeamEvent } from "../extensions/tools/team";
|
|
2
|
+
import type { TeamEvent, TeamRuntimeStateDelta } from "../extensions/tools/team";
|
|
3
|
+
/**
|
|
4
|
+
* One batched durable write: events to append to the history log plus the
|
|
5
|
+
* entities that changed since the previous batch. Applied atomically.
|
|
6
|
+
*/
|
|
7
|
+
export interface TeamPersistenceBatch {
|
|
8
|
+
/** Already-compacted durable events (see `toPersistableTeamEvent`). */
|
|
9
|
+
events: Array<{
|
|
10
|
+
type: string;
|
|
11
|
+
payload: unknown;
|
|
12
|
+
}>;
|
|
13
|
+
delta: TeamRuntimeStateDelta;
|
|
14
|
+
teammates: TeamTeammateSpec[];
|
|
15
|
+
/**
|
|
16
|
+
* Full state accessor for stores that cannot apply deltas (file fallback).
|
|
17
|
+
* Row-based stores must not call it.
|
|
18
|
+
*/
|
|
19
|
+
getFullState: () => TeamRuntimeState;
|
|
20
|
+
}
|
|
3
21
|
import type { SessionStatus } from "./common";
|
|
4
22
|
import type { SessionRecord } from "./sessions";
|
|
5
23
|
export interface SessionStore {
|
|
@@ -27,6 +45,9 @@ export interface TeamStore {
|
|
|
27
45
|
interruptedRunIds: string[];
|
|
28
46
|
};
|
|
29
47
|
handleTeamEvent(teamName: string, event: TeamEvent): Promise<void> | void;
|
|
48
|
+
/** Preferred write path: incremental, batched, single transaction. */
|
|
49
|
+
persistBatch(teamName: string, batch: TeamPersistenceBatch): Promise<void> | void;
|
|
50
|
+
/** Full rewrite of a team's state. Kept for callers outside the runtime. */
|
|
30
51
|
persistRuntime(teamName: string, state: TeamRuntimeState, teammates: TeamTeammateSpec[]): Promise<void> | void;
|
|
31
52
|
markInProgressRunsInterrupted(teamName: string, reason: string): Promise<string[]> | string[];
|
|
32
53
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cerebriline/core",
|
|
3
3
|
"description": "Cerebriline Core SDK for Node Runtime",
|
|
4
|
-
"version": "4.100.
|
|
4
|
+
"version": "4.100.247",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/mann1x/cline.git",
|
|
@@ -34,6 +34,18 @@
|
|
|
34
34
|
"./services/feature-flags/posthog": {
|
|
35
35
|
"types": "./dist/services/feature-flags/posthog.d.ts",
|
|
36
36
|
"import": "./dist/services/feature-flags/posthog.js"
|
|
37
|
+
},
|
|
38
|
+
"./remote/helper-entry": {
|
|
39
|
+
"types": "./dist/remote/remote-helper-entry.d.ts",
|
|
40
|
+
"import": "./dist/remote/remote-helper-entry.js"
|
|
41
|
+
},
|
|
42
|
+
"./cloud": {
|
|
43
|
+
"types": "./dist/cloud/index.d.ts",
|
|
44
|
+
"import": "./dist/cloud/index.js"
|
|
45
|
+
},
|
|
46
|
+
"./remote/helper": {
|
|
47
|
+
"types": "./dist/remote/remote-helper.d.ts",
|
|
48
|
+
"import": "./dist/remote/remote-helper.js"
|
|
37
49
|
}
|
|
38
50
|
},
|
|
39
51
|
"dependencies": {
|
|
@@ -69,9 +81,9 @@
|
|
|
69
81
|
"ws": "^8.20.0",
|
|
70
82
|
"yaml": "^2.8.2",
|
|
71
83
|
"zod": "^4.3.6",
|
|
72
|
-
"@cerebriline/agents": "4.100.
|
|
73
|
-
"@cerebriline/llms": "4.100.
|
|
74
|
-
"@cerebriline/shared": "4.100.
|
|
84
|
+
"@cerebriline/agents": "4.100.247",
|
|
85
|
+
"@cerebriline/llms": "4.100.247",
|
|
86
|
+
"@cerebriline/shared": "4.100.247"
|
|
75
87
|
},
|
|
76
88
|
"peerDependencies": {
|
|
77
89
|
"posthog-node": "^5.8.0"
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare class ResourceLimiter {
|
|
2
|
-
private readonly globalMaxConcurrency;
|
|
3
|
-
private readonly activeExecutions;
|
|
4
|
-
constructor(globalMaxConcurrency: number);
|
|
5
|
-
acquire(scheduleId: string, executionId: string, maxParallel: number): boolean;
|
|
6
|
-
release(scheduleId: string, executionId: string): void;
|
|
7
|
-
getGlobalActiveCount(): number;
|
|
8
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* How much of a team's event log its store keeps.
|
|
3
|
-
*
|
|
4
|
-
* Every team event was appended -- a row in `team_events`, a line in
|
|
5
|
-
* `task-history.jsonl` -- for as long as the team lived, and none was ever
|
|
6
|
-
* deleted. What reads the log (`readHistory`) reads the newest 200. So each
|
|
7
|
-
* team keeps its newest {@link TEAM_EVENTS_KEPT}, cut back once every
|
|
8
|
-
* {@link TEAM_EVENTS_PRUNE_EVERY} appends rather than on each one.
|
|
9
|
-
*/
|
|
10
|
-
export declare const TEAM_EVENTS_KEPT = 1000;
|
|
11
|
-
export declare const TEAM_EVENTS_PRUNE_EVERY = 100;
|
|
12
|
-
/** A store's retention, as its options may set it (tests keep it small). */
|
|
13
|
-
export interface TeamEventsRetention {
|
|
14
|
-
eventsKept?: number;
|
|
15
|
-
eventsPruneEvery?: number;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Counts a store's appends per team, and says when one is due a prune: on
|
|
19
|
-
* its first append since the store opened (a log left long by an older
|
|
20
|
-
* build is cut then), and every `eventsPruneEvery` after.
|
|
21
|
-
*/
|
|
22
|
-
export declare function createPruneSchedule(retention?: TeamEventsRetention): {
|
|
23
|
-
kept: number;
|
|
24
|
-
due(teamName: string): boolean;
|
|
25
|
-
};
|