@cline/shared 0.0.95 → 0.2.0-nightly.1793312794
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 +22 -1
- package/dist/feature-flags.d.ts +2 -0
- package/dist/hub.d.ts +3 -2
- package/dist/index.browser.d.ts +1 -1
- package/dist/index.browser.js +9 -9
- package/dist/index.d.ts +1 -1
- package/dist/index.js +25 -25
- package/dist/rpc/runtime.d.ts +3 -0
- package/dist/runtime/cline-environment.d.ts +7 -0
- package/dist/tools/create.d.ts +2 -0
- package/dist/types/index.js +1 -0
- package/package.json +1 -1
package/dist/agent.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import type { GeneratedMedia } from "./llms/media";
|
|
|
8
8
|
import type { ModelInfo } from "./llms/model-info";
|
|
9
9
|
import type { ToolApprovalRequest, ToolApprovalResult, ToolPolicy } from "./llms/tools";
|
|
10
10
|
import type { BasicLogger } from "./logging/logger";
|
|
11
|
-
import type { ITelemetryService } from "./services/telemetry";
|
|
11
|
+
import type { ITelemetryService, TelemetryProperties } from "./services/telemetry";
|
|
12
12
|
export interface AgentTextPart {
|
|
13
13
|
type: "text";
|
|
14
14
|
text: string;
|
|
@@ -148,6 +148,12 @@ export interface AgentToolContext {
|
|
|
148
148
|
emitEvent?: (name: string, payload?: unknown) => void;
|
|
149
149
|
}
|
|
150
150
|
export interface AgentTool<TInput = unknown, TOutput = unknown> extends AgentToolDefinition {
|
|
151
|
+
/**
|
|
152
|
+
* Model-only context appended after successful tool results and after-tool
|
|
153
|
+
* hooks. Hidden from client transcripts via displayRole: "system".
|
|
154
|
+
* Omitted for errors, skipped calls, and hooks that stop the run.
|
|
155
|
+
*/
|
|
156
|
+
successContext?: string;
|
|
151
157
|
/** Override the runtime execution mode. Adjacent parallel calls may overlap; sequential calls form ordering boundaries. */
|
|
152
158
|
executionMode?: "sequential" | "parallel";
|
|
153
159
|
timeoutMs?: number;
|
|
@@ -433,6 +439,12 @@ export interface AgentRuntimeConfig {
|
|
|
433
439
|
plugins?: readonly AgentRuntimePlugin[];
|
|
434
440
|
logger?: BasicLogger;
|
|
435
441
|
telemetry?: ITelemetryService;
|
|
442
|
+
/**
|
|
443
|
+
* Extra properties for the `agent.run-finished` / `agent.run-failed`
|
|
444
|
+
* telemetry mirror, read once when the run ends. Lets the host attach
|
|
445
|
+
* diagnostics it derives from runtime events without the loop owning them.
|
|
446
|
+
*/
|
|
447
|
+
runEndTelemetryProperties?: () => TelemetryProperties;
|
|
436
448
|
initialMessages?: readonly AgentMessage[];
|
|
437
449
|
maxIterations?: number;
|
|
438
450
|
completionPolicy?: {
|
|
@@ -489,6 +501,15 @@ export type AgentRuntimeEvent = {
|
|
|
489
501
|
iteration: number;
|
|
490
502
|
message: AgentMessage;
|
|
491
503
|
finishReason: AgentModelFinishReason;
|
|
504
|
+
} | {
|
|
505
|
+
/**
|
|
506
|
+
* Progress while the model streams a tool call's arguments. Carries
|
|
507
|
+
* no arguments: consumers use it only to tell a slow stream from a
|
|
508
|
+
* silent one.
|
|
509
|
+
*/
|
|
510
|
+
type: "tool-call-delta";
|
|
511
|
+
snapshot: AgentRuntimeStateSnapshot;
|
|
512
|
+
iteration: number;
|
|
492
513
|
} | {
|
|
493
514
|
type: "tool-started";
|
|
494
515
|
snapshot: AgentRuntimeStateSnapshot;
|
package/dist/feature-flags.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export declare const FeatureFlag: {
|
|
|
7
7
|
readonly CODE_ONBOARDING_GITHUB: "code-onboarding-github";
|
|
8
8
|
/** Enables Composio connectors for the signed-in Cline account. */
|
|
9
9
|
readonly CLINE_COMPOSIO_BETA: "CLINE_COMPOSIO_BETA";
|
|
10
|
+
/** Tells new cloud session agents to verify visual changes with computer use. */
|
|
11
|
+
readonly CLOUD_COMPUTER_USE: "cloud-computer-use";
|
|
10
12
|
};
|
|
11
13
|
export type KnownFeatureFlag = (typeof FeatureFlag)[keyof typeof FeatureFlag];
|
|
12
14
|
export type FeatureFlag = KnownFeatureFlag | (string & {});
|
package/dist/hub.d.ts
CHANGED
|
@@ -431,7 +431,7 @@ export interface HubCommandOutputMap {
|
|
|
431
431
|
export type HubTypedCommandName = keyof HubCommandInputMap & HubCommandName;
|
|
432
432
|
export type HubCommandInput<TCommand extends HubTypedCommandName> = HubCommandInputMap[TCommand];
|
|
433
433
|
export type HubCommandOutput<TCommand extends HubTypedCommandName> = HubCommandOutputMap[TCommand];
|
|
434
|
-
export type HubCommandName = "client.register" | "client.update" | "client.unregister" | "client.list" | "cline.account.get_current" | "prompt_commands.list" | "prompt_commands.execute" | "mention_files.search" | "catalog.list" | "session.list" | "session.search" | "session.create" | "session.attach" | "session.detach" | "session.get" | "session.messages" | "session.restore" | "session.delete" | "session.update" | "session.update_connection" | "session.compaction.get" | "session.compaction.update" | "session.pending_prompts" | "session.steer_first_pending_prompt" | "session.update_pending_prompt" | "session.remove_pending_prompt" | "session.fork" | "session.hook" | "run.start" | "session.send_input" | "run.enqueue" | "run.list" | "run.abort" | "run.proceed_while_running" | "hub.drain" | "hub.status" | "plugins.list" | "plugins.status" | "plugins.reload" | "approval.request" | "approval.respond" | "capability.request" | "capability.progress" | "capability.respond" | "peer.register" | "peer.list_sessions" | "peer.attach_session" | "peer.detach_session" | "peer.proxy_command" | "schedule.create" | "schedule.list" | "schedule.get" | "schedule.update" | "schedule.delete" | "schedule.enable" | "schedule.disable" | "schedule.trigger" | "schedule.list_executions" | "schedule.stats" | "schedule.active" | "schedule.upcoming" | "task.create" | "task.list" | "task.get" | "task.update" | "task.approve" | "task.cancel" | "task.run" | "task.automation.get" | "task.automation.set" | "settings.list" | "settings.get" | "settings.patch" | "settings.toggle" | "connector.channels" | "connector.configure" | "connector.delete_config" | "connector.start" | "connector.stop" | "connector.supervised" | "cron.event.ingest" | "cron.event.list" | "cron.event.get" | "ui.notify" | "ui.show_window";
|
|
434
|
+
export type HubCommandName = "cloud.command" | "cloud.watch" | "client.register" | "client.update" | "client.unregister" | "client.list" | "cline.account.get_current" | "prompt_commands.list" | "prompt_commands.execute" | "mention_files.search" | "catalog.list" | "session.list" | "session.search" | "session.create" | "session.resume" | "session.attach" | "session.detach" | "session.get" | "session.messages" | "session.restore" | "session.delete" | "session.update" | "session.update_connection" | "session.mcp_apps.resolve_tool" | "session.mcp_apps.read_resource" | "session.mcp_apps.call_tool" | "session.compaction.get" | "session.compaction.update" | "session.pending_prompts" | "session.steer_first_pending_prompt" | "session.update_pending_prompt" | "session.remove_pending_prompt" | "session.fork" | "session.hook" | "run.start" | "session.send_input" | "run.enqueue" | "run.list" | "run.abort" | "run.proceed_while_running" | "hub.drain" | "hub.status" | "plugins.list" | "plugins.status" | "plugins.reload" | "approval.request" | "approval.respond" | "capability.request" | "capability.progress" | "capability.respond" | "peer.register" | "peer.list_sessions" | "peer.attach_session" | "peer.detach_session" | "peer.proxy_command" | "schedule.create" | "schedule.list" | "schedule.get" | "schedule.update" | "schedule.delete" | "schedule.enable" | "schedule.disable" | "schedule.trigger" | "schedule.list_executions" | "schedule.stats" | "schedule.active" | "schedule.upcoming" | "task.create" | "task.list" | "task.get" | "task.update" | "task.approve" | "task.cancel" | "task.run" | "task.automation.get" | "task.automation.set" | "plugins.commands.list" | "plugins.commands.run" | "settings.list" | "settings.get" | "settings.patch" | "settings.toggle" | "connector.channels" | "connector.configure" | "connector.delete_config" | "connector.start" | "connector.stop" | "connector.supervised" | "cron.event.ingest" | "cron.event.list" | "cron.event.get" | "ui.notify" | "ui.show_window";
|
|
435
435
|
export declare const HUB_DEFAULT_COMMAND_TIMEOUT_MS = 30000;
|
|
436
436
|
export declare const HUB_COMMAND_SLOW_LOG_MS = 5000;
|
|
437
437
|
export declare function getDefaultHubCommandTimeoutMs(command: HubCommandName): number | null;
|
|
@@ -456,7 +456,7 @@ export interface HubReplyEnvelope {
|
|
|
456
456
|
details?: Record<string, unknown>;
|
|
457
457
|
};
|
|
458
458
|
}
|
|
459
|
-
export type HubEventName = "hub.client.registered" | "hub.client.disconnected" | "session.created" | "session.updated" | "session.attached" | "session.detached" | "session.forked" | "session.pending_prompts" | "session.pending_prompt_submitted" | "run.started" | "run.heartbeat" | "run.aborted" | "run.completed" | "run.failed" | "run.enqueued" | "run.interrupted" | "hub.drain_changed" | "iteration.started" | "iteration.finished" | "assistant.delta" | "assistant.media" | "assistant.finished" | "session.notice" | "reasoning.delta" | "reasoning.finished" | "agent.done" | "usage.updated" | "tool.started" | "tool.updated" | "tool.finished" | "approval.requested" | "approval.resolved" | "capability.requested" | "capability.resolved" | "team.progress" | "artifact.created" | "diff.created" | "spoke.started" | "spoke.failed" | "spoke.stopped" | "peer.registered" | "peer.session_attached" | "peer.session_detached" | "schedule.created" | "schedule.updated" | "schedule.deleted" | "schedule.triggered" | "schedule.execution_completed" | "schedule.execution_failed" | "task.created" | "task.updated" | "task.deleted" | "task.run.started" | "task.run.completed" | "task.run.failed" | "task.automation.updated" | "settings.changed" | "plugin.status_changed" | "ui.notify" | "ui.show_window" | "hub.client.updated";
|
|
459
|
+
export type HubEventName = "cloud.event" | "hub.client.registered" | "hub.client.disconnected" | "session.created" | "session.updated" | "session.attached" | "session.detached" | "session.forked" | "session.pending_prompts" | "session.pending_prompt_submitted" | "run.started" | "run.heartbeat" | "run.aborted" | "run.completed" | "run.failed" | "run.enqueued" | "run.interrupted" | "hub.drain_changed" | "iteration.started" | "iteration.finished" | "assistant.delta" | "assistant.media" | "assistant.finished" | "session.notice" | "reasoning.delta" | "reasoning.finished" | "agent.done" | "usage.updated" | "tool.started" | "tool.updated" | "tool.finished" | "approval.requested" | "approval.resolved" | "capability.requested" | "capability.resolved" | "team.progress" | "artifact.created" | "diff.created" | "spoke.started" | "spoke.failed" | "spoke.stopped" | "peer.registered" | "peer.session_attached" | "peer.session_detached" | "schedule.created" | "schedule.updated" | "schedule.deleted" | "schedule.triggered" | "schedule.execution_completed" | "schedule.execution_failed" | "task.created" | "task.updated" | "task.deleted" | "task.run.started" | "task.run.completed" | "task.run.failed" | "task.automation.updated" | "settings.changed" | "plugin.status_changed" | "ui.notify" | "ui.show_window" | "hub.client.updated";
|
|
460
460
|
export interface HubEventEnvelope {
|
|
461
461
|
version: HubProtocolVersion;
|
|
462
462
|
event: HubEventName;
|
|
@@ -510,6 +510,7 @@ export interface HubClientToolExecutorContribution extends HubClientContribution
|
|
|
510
510
|
executor: HubToolExecutorName;
|
|
511
511
|
}
|
|
512
512
|
export interface HubClientToolContribution extends HubClientContributionBase {
|
|
513
|
+
successContext?: string;
|
|
513
514
|
kind: "tool";
|
|
514
515
|
name: string;
|
|
515
516
|
description: string;
|
package/dist/index.browser.d.ts
CHANGED
|
@@ -58,7 +58,7 @@ export { TEAM_LIFECYCLE_EVENT_TYPE, TEAM_PROGRESS_EVENT_TYPE, } from "./rpc/team
|
|
|
58
58
|
export type { ClineClientIdentity } from "./runtime/cline-client-identity";
|
|
59
59
|
export { getClineClientIdentity, setClineClientIdentity, } from "./runtime/cline-client-identity";
|
|
60
60
|
export type { ClineEnvironment, ClineEnvironmentConfig, ResolveClineEnvironmentOptions, } from "./runtime/cline-environment";
|
|
61
|
-
export { CLINE_ENVIRONMENT_ENV, CLINE_ENVIRONMENT_OVERRIDE_ENV, CLINE_ENVIRONMENTS, DEFAULT_CLINE_ENVIRONMENT, getClineEnvironmentConfig, resolveClineEnvironment, } from "./runtime/cline-environment";
|
|
61
|
+
export { CLINE_ENVIRONMENT_ENV, CLINE_ENVIRONMENT_OVERRIDE_ENV, CLINE_ENVIRONMENTS, DEFAULT_CLINE_ENVIRONMENT, getClineEnvironmentConfig, resolveClineAppUrl, resolveClineEnvironment, } from "./runtime/cline-environment";
|
|
62
62
|
export type { CaptureAgentUnexpectedReasoningTokensInput, CaptureSdkErrorInput, CaptureTaskLifecycleEventInput, ITelemetryService, OpenTelemetryClientConfig, SdkTelemetryErrorComponent, SdkTelemetryErrorSeverity, TelemetryArray, TelemetryMetadata, TelemetryObject, TelemetryPrimitive, TelemetryProperties, TelemetryValue, } from "./services/telemetry";
|
|
63
63
|
export { AGENT_UNEXPECTED_REASONING_TOKENS_EVENT, buildSdkErrorProperties, captureAgentUnexpectedReasoningTokens, captureSdkError, captureTaskLifecycleEvent, normalizeSdkError, resetSdkErrorRateLimiterForTests, SDK_ERROR_TELEMETRY_EVENT, TASK_CANCELLED_EVENT, TASK_FIRST_CHUNK_RECEIVED_EVENT, TASK_MAX_TOKENS_RECOVERY_EVENT, TASK_PROVIDER_REQUEST_STARTED_EVENT, TASK_PROVIDER_STREAM_FAILED_EVENT, TASK_PROVIDER_STREAM_STARTED_EVENT, } from "./services/telemetry";
|
|
64
64
|
export type { ClineTelemetryServiceConfig } from "./services/telemetry-config";
|