@cerebriline/core 4.100.246 → 4.100.248
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/capped-thinking.d.ts +14 -0
- package/dist/extensions/context/compaction-shared.d.ts +122 -1
- package/dist/extensions/context/compaction.d.ts +75 -3
- package/dist/extensions/context/continuation-compaction.d.ts +18 -0
- 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 +42 -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 -636
- package/dist/hub/daemon/index.d.ts +17 -8
- package/dist/hub/discovery/index.d.ts +1 -0
- package/dist/hub/index.js +680 -628
- 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 +1071 -999
- 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/config.d.ts +7 -0
- 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
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { TeamRuntimeState, TeamTeammateSpec } from "@cerebriline/shared";
|
|
2
|
+
import type { TeamEvent, TeamRuntimeStateDelta } from "../../extensions/tools/team";
|
|
3
|
+
import type { TeamPersistenceBatch } from "../../types/storage";
|
|
4
|
+
/** Default batch window for coalescing durable team writes. */
|
|
5
|
+
export declare const TEAM_PERSIST_BATCH_MS = 300;
|
|
6
|
+
/**
|
|
7
|
+
* Telemetry (heartbeats/progress) updates run liveness fields in memory. Those
|
|
8
|
+
* are flushed at most this often so recovery sees a reasonably fresh
|
|
9
|
+
* `heartbeatAt` without writing on every 2s heartbeat or streamed chunk.
|
|
10
|
+
*/
|
|
11
|
+
export declare const TEAM_TELEMETRY_FLUSH_MS = 60000;
|
|
12
|
+
/**
|
|
13
|
+
* Cap on events held for retry after failed writes, so a store that stays
|
|
14
|
+
* broken cannot grow memory without bound. Oldest events are dropped first.
|
|
15
|
+
*/
|
|
16
|
+
export declare const TEAM_PERSIST_MAX_PENDING_EVENTS = 5000;
|
|
17
|
+
export interface TeamPersistenceSource {
|
|
18
|
+
hasPendingStateDelta(): boolean;
|
|
19
|
+
drainStateDelta(): TeamRuntimeStateDelta;
|
|
20
|
+
requeueStateDelta(delta: TeamRuntimeStateDelta): void;
|
|
21
|
+
exportState(): TeamRuntimeState;
|
|
22
|
+
}
|
|
23
|
+
export interface TeamPersistenceSink {
|
|
24
|
+
persistBatch(teamName: string, batch: TeamPersistenceBatch): unknown;
|
|
25
|
+
}
|
|
26
|
+
export interface TeamPersistenceWriterOptions {
|
|
27
|
+
teamKey: string;
|
|
28
|
+
store: TeamPersistenceSink;
|
|
29
|
+
source: () => TeamPersistenceSource | undefined;
|
|
30
|
+
teammates: () => TeamTeammateSpec[];
|
|
31
|
+
batchMs?: number;
|
|
32
|
+
telemetryFlushMs?: number;
|
|
33
|
+
onError?: (error: unknown) => void;
|
|
34
|
+
now?: () => number;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Coalesces durable team writes off the event hot path.
|
|
38
|
+
*
|
|
39
|
+
* - Telemetry events (`agent_event`, `run_progress`) never trigger a write.
|
|
40
|
+
* - Durable events are queued and flushed together after `batchMs`.
|
|
41
|
+
* - Terminal run states and membership changes flush immediately.
|
|
42
|
+
* - `flush()` is synchronous so shutdown paths can force a final write.
|
|
43
|
+
* - A failed write keeps its batch and retries on the next flush.
|
|
44
|
+
*/
|
|
45
|
+
export declare class TeamPersistenceWriter {
|
|
46
|
+
private readonly opts;
|
|
47
|
+
private pendingEvents;
|
|
48
|
+
private teammatesDirty;
|
|
49
|
+
private timer;
|
|
50
|
+
private lastFlushAt;
|
|
51
|
+
private disposed;
|
|
52
|
+
constructor(options: TeamPersistenceWriterOptions);
|
|
53
|
+
/** Called for every team event. Cheap for telemetry. */
|
|
54
|
+
onEvent(event: TeamEvent): void;
|
|
55
|
+
/** Teammate specs changed (spawn/shutdown); include them in next flush. */
|
|
56
|
+
markTeammatesDirty(): void;
|
|
57
|
+
/** State changed without a team event (read receipts, cleanup). */
|
|
58
|
+
markStateDirty(): void;
|
|
59
|
+
/** Write everything pending now. Safe to call repeatedly. */
|
|
60
|
+
flush(): void;
|
|
61
|
+
/** Final flush and stop accepting events. */
|
|
62
|
+
dispose(): void;
|
|
63
|
+
private schedule;
|
|
64
|
+
private clearTimer;
|
|
65
|
+
}
|
|
@@ -2,5 +2,16 @@ import type { RuleConfig, UserInstructionConfigWatcher } from "../../extensions/
|
|
|
2
2
|
export declare function isRuleEnabled(rule: RuleConfig): boolean;
|
|
3
3
|
export declare function formatRulesForSystemPrompt(rules: ReadonlyArray<RuleConfig>): string;
|
|
4
4
|
export declare function mergeRulesForSystemPrompt(primaryRules?: string, additionalRules?: string): string | undefined;
|
|
5
|
+
/**
|
|
6
|
+
* The rules a session's system prompt includes, from any source that can list
|
|
7
|
+
* rule records: enabled rules only, in a stable name order. Every renderer of
|
|
8
|
+
* the rules section goes through this one selection so they cannot drift.
|
|
9
|
+
*/
|
|
10
|
+
export declare function listEnabledRulesFromRecords(records: ReadonlyArray<{
|
|
11
|
+
item: RuleConfig;
|
|
12
|
+
}>): RuleConfig[];
|
|
13
|
+
export declare function loadRulesForSystemPromptFromRecords(records: ReadonlyArray<{
|
|
14
|
+
item: RuleConfig;
|
|
15
|
+
}>): string;
|
|
5
16
|
export declare function listEnabledRulesFromWatcher(watcher: UserInstructionConfigWatcher): RuleConfig[];
|
|
6
17
|
export declare function loadRulesForSystemPromptFromWatcher(watcher: UserInstructionConfigWatcher): string;
|
|
@@ -83,6 +83,7 @@ export declare class PendingPromptsController {
|
|
|
83
83
|
private readonly service;
|
|
84
84
|
constructor(deps: PendingPromptsControllerDeps);
|
|
85
85
|
list(sessionId: string): SessionPendingPrompt[];
|
|
86
|
+
steerFirst(sessionId: string): PendingPromptMutationResult;
|
|
86
87
|
update(input: PendingPromptsUpdateInput): PendingPromptMutationResult;
|
|
87
88
|
delete(input: PendingPromptsDeleteInput): PendingPromptMutationResult;
|
|
88
89
|
enqueue(sessionId: string, entry: {
|
|
@@ -55,5 +55,6 @@ export declare function legacyTokenUsageFromUsageEvent(event: Extract<AgentEvent
|
|
|
55
55
|
cacheWriteTokens: number;
|
|
56
56
|
cacheReadTokens: number;
|
|
57
57
|
totalCost?: number;
|
|
58
|
+
reasoningTokenCount?: number;
|
|
58
59
|
};
|
|
59
60
|
export declare function handleAgentEvent(ctx: AgentEventContext, event: AgentEvent, overrides?: AgentTelemetryContextOverrides): void;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type GitCommand } from "../workspace/workspace-manifest";
|
|
2
|
+
export type { GitCommand } from "../workspace/workspace-manifest";
|
|
3
|
+
export type CloudHandoffGitContext = {
|
|
4
|
+
repoUrl: string;
|
|
5
|
+
branch: string;
|
|
6
|
+
headSha: string;
|
|
7
|
+
workspaceRelativePath?: string;
|
|
8
|
+
};
|
|
9
|
+
export type CloudHandoffGitPreflightErrorCode = "not_git_repository" | "dirty_worktree" | "detached_head" | "missing_upstream" | "unsupported_remote" | "remote_branch_missing" | "unpushed_commits" | "git_command_failed";
|
|
10
|
+
export declare class CloudHandoffGitPreflightError extends Error {
|
|
11
|
+
readonly code: CloudHandoffGitPreflightErrorCode;
|
|
12
|
+
constructor(code: CloudHandoffGitPreflightErrorCode, message: string, options?: ErrorOptions);
|
|
13
|
+
}
|
|
14
|
+
/** Converts supported GitHub clone URLs to the URL expected by cloud sessions. */
|
|
15
|
+
export declare function normalizeGitHubRemoteUrl(remoteUrl: string): string | null;
|
|
16
|
+
/**
|
|
17
|
+
* Refuses handoff unless a fresh GitHub clone of the upstream branch will be
|
|
18
|
+
* byte-for-byte anchored at the current local commit.
|
|
19
|
+
*/
|
|
20
|
+
export declare function preflightCloudHandoffGit(input: {
|
|
21
|
+
cwd: string;
|
|
22
|
+
git?: GitCommand;
|
|
23
|
+
signal?: AbortSignal;
|
|
24
|
+
}): Promise<CloudHandoffGitContext>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CloudHandoffFingerprint, CloudHandoffMetadata } from "./types";
|
|
2
|
+
export declare function createCloudHandoffFingerprint(input: CloudHandoffFingerprint): CloudHandoffFingerprint;
|
|
3
|
+
export declare function cloudHandoffFingerprintsEqual(left: CloudHandoffFingerprint | undefined, right: CloudHandoffFingerprint | undefined): boolean;
|
|
4
|
+
export declare function readCloudHandoffMetadata(metadata: unknown): CloudHandoffMetadata | undefined;
|
|
5
|
+
export declare function mergeCloudHandoffMetadata(metadata: Record<string, unknown> | null | undefined, handoff: CloudHandoffMetadata): Record<string, unknown>;
|
|
6
|
+
export declare function clearCloudHandoffMetadata(metadata: Record<string, unknown> | null | undefined): Record<string, unknown>;
|
|
7
|
+
export declare function buildCloudHandoffDashboardUrl(appBaseUrl: string, outerSessionId: string): string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Compares the durable JSON wire shape, including image content and order. */
|
|
2
|
+
export declare function cloudHandoffTranscriptsEqual(localMessages: readonly unknown[], cloudMessages: readonly unknown[]): boolean;
|
|
3
|
+
export declare class CloudHandoffTranscriptMismatchError extends Error {
|
|
4
|
+
constructor(localCount: number, cloudCount: number);
|
|
5
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export type CloudHandoffFingerprint = {
|
|
2
|
+
repoUrl: string;
|
|
3
|
+
branch: string;
|
|
4
|
+
headSha: string;
|
|
5
|
+
modelId: string;
|
|
6
|
+
organizationId?: string;
|
|
7
|
+
/** Repository-relative source cwd; omitted when the session is at repo root. */
|
|
8
|
+
workspaceRelativePath?: string;
|
|
9
|
+
/** Source interaction mode; omitted for the default Act mode. */
|
|
10
|
+
mode?: "plan" | "yolo" | "zen";
|
|
11
|
+
};
|
|
12
|
+
export type CloudHandoffMetadata = {
|
|
13
|
+
toCloudSessionId: string;
|
|
14
|
+
handedOffAt: string;
|
|
15
|
+
status: "pending" | "complete";
|
|
16
|
+
innerSessionId?: string;
|
|
17
|
+
dashboardUrl?: string;
|
|
18
|
+
fingerprint?: CloudHandoffFingerprint;
|
|
19
|
+
};
|
|
20
|
+
export type CloudHandoffDestination = "in_app" | "external";
|
|
21
|
+
export type CloudHandoffProgressPhase = "checking" | "creating" | "provisioning" | "connecting" | "seeding" | "verifying" | "starting" | "complete";
|
|
22
|
+
export type CloudHandoffProgress = {
|
|
23
|
+
phase: CloudHandoffProgressPhase;
|
|
24
|
+
message: string;
|
|
25
|
+
sessionId?: string;
|
|
26
|
+
dashboardUrl?: string;
|
|
27
|
+
};
|
|
28
|
+
export type CloudHandoffResult = {
|
|
29
|
+
outerSessionId: string;
|
|
30
|
+
innerSessionId: string;
|
|
31
|
+
dashboardUrl: string;
|
|
32
|
+
destination: CloudHandoffDestination;
|
|
33
|
+
warning?: string;
|
|
34
|
+
warningKind?: "unqueued" | "unconfirmed";
|
|
35
|
+
};
|
|
@@ -25,11 +25,13 @@ export declare class FeatureFlagsService {
|
|
|
25
25
|
private context;
|
|
26
26
|
private cache;
|
|
27
27
|
private cacheInfo;
|
|
28
|
+
private pendingPoll?;
|
|
28
29
|
constructor(options: FeatureFlagsServiceOptions);
|
|
29
30
|
setContext(context: FeatureFlagsContext): void;
|
|
30
31
|
hydrateCache(snapshot: FeatureFlagsCacheSnapshot): void;
|
|
31
32
|
getCacheSnapshot(): FeatureFlagsCacheSnapshot;
|
|
32
33
|
poll(userId?: string | null): Promise<void>;
|
|
34
|
+
private pollFlags;
|
|
33
35
|
private hydrateFromPersistentCache;
|
|
34
36
|
private isFeatureFlagPayload;
|
|
35
37
|
private readPayloadRecord;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { FeatureFlag } from "@cerebriline/shared";
|
|
2
|
+
/** Evaluate a boolean rollout flag for the persisted Cline account in any host.
|
|
3
|
+
* Grants are cached for one minute; only an explicit boolean flag enables access.
|
|
4
|
+
*/
|
|
5
|
+
export declare function isClineAccountFeatureEnabled(flag: FeatureFlag): Promise<boolean>;
|
|
@@ -46,6 +46,7 @@ export declare function getCachedClineRecommendedModels(options?: FetchClineReco
|
|
|
46
46
|
*/
|
|
47
47
|
export declare function peekClineRecommendedModels(): ClineRecommendedModelsData;
|
|
48
48
|
export declare function resetClineRecommendedModelsCacheForTests(): void;
|
|
49
|
+
export declare function idSlug(modelId: string): string;
|
|
49
50
|
/**
|
|
50
51
|
* Stamps recommended-feed tiers onto a provider's model list so clients can
|
|
51
52
|
* render Recommended/Free/Subscribed sections straight off `ProviderModel`
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import type { AgentConfig, AgentModel, BasicLogger, ITelemetryService, ModelInfo } from "@cerebriline/shared";
|
|
2
|
+
import type { ProviderConfig } from "./provider-settings";
|
|
2
3
|
export declare function resolveKnownModelsFromConfig(config: AgentConfig): Record<string, ModelInfo> | undefined;
|
|
4
|
+
export type ConnectionConfig = Pick<AgentConfig, "providerId" | "modelId" | "apiKey" | "baseUrl" | "headers" | "providerConfig">;
|
|
5
|
+
/**
|
|
6
|
+
* Resolve the provider connection for a request from the live session config.
|
|
7
|
+
* Top-level fields win over the nested `providerConfig` snapshot, and the
|
|
8
|
+
* snapshot only contributes when it describes the same provider, so a token
|
|
9
|
+
* refresh or connection change written to the top level (see
|
|
10
|
+
* `syncOAuthCredentials` / `updateConnection`) applies to every request built
|
|
11
|
+
* afterwards. Every request builder (main agent, compaction summarizer) must
|
|
12
|
+
* go through this so they never disagree on credentials.
|
|
13
|
+
*/
|
|
14
|
+
export declare function resolveConnectionProviderConfig(config: ConnectionConfig): ProviderConfig;
|
|
3
15
|
export interface CreateAgentModelOptions {
|
|
4
16
|
/**
|
|
5
17
|
* Set by the caller that is running the conversation itself.
|
|
@@ -28,7 +28,7 @@ export declare const DEFAULT_MODELS_CATALOG_URL = "https://models.dev/api.json";
|
|
|
28
28
|
*/
|
|
29
29
|
export declare function isPrivateModelCatalogProvider(providerId: string): boolean;
|
|
30
30
|
export declare function clearPublicModelsCatalogCache(): void;
|
|
31
|
-
export declare function getLiveModelsCatalog(options?: Pick<ModelCatalogConfig, "url" | "cacheTtlMs">): Promise<Record<string, Record<string, ModelInfo>>>;
|
|
31
|
+
export declare function getLiveModelsCatalog(options?: Pick<ModelCatalogConfig, "url" | "cacheTtlMs" | "includeClineCloudModels">): Promise<Record<string, Record<string, ModelInfo>>>;
|
|
32
32
|
export declare function clearLiveModelsCatalogCache(url?: string): void;
|
|
33
33
|
export declare function clearPrivateModelsCatalogCache(): void;
|
|
34
34
|
export declare const OPENAI_COMPATIBLE_PROVIDERS: Record<string, ProviderDefaults>;
|
|
@@ -17,23 +17,23 @@ export declare const ProviderIdSchema: z.ZodString;
|
|
|
17
17
|
export declare const ProviderProtocolSchema: z.ZodEnum<{
|
|
18
18
|
anthropic: "anthropic";
|
|
19
19
|
gemini: "gemini";
|
|
20
|
-
"openai-chat": "openai-chat";
|
|
21
|
-
"openai-responses": "openai-responses";
|
|
22
20
|
"openai-r1": "openai-r1";
|
|
23
21
|
"ai-sdk": "ai-sdk";
|
|
22
|
+
"openai-responses": "openai-responses";
|
|
23
|
+
"openai-chat": "openai-chat";
|
|
24
24
|
}>;
|
|
25
25
|
export declare const ProviderClientSchema: z.ZodEnum<{
|
|
26
26
|
custom: "custom";
|
|
27
27
|
fetch: "fetch";
|
|
28
28
|
anthropic: "anthropic";
|
|
29
|
+
bedrock: "bedrock";
|
|
29
30
|
gemini: "gemini";
|
|
31
|
+
vertex: "vertex";
|
|
32
|
+
"openai-compatible": "openai-compatible";
|
|
33
|
+
openai: "openai";
|
|
30
34
|
"openai-r1": "openai-r1";
|
|
31
35
|
"ai-sdk": "ai-sdk";
|
|
32
36
|
"ai-sdk-community": "ai-sdk-community";
|
|
33
|
-
openai: "openai";
|
|
34
|
-
"openai-compatible": "openai-compatible";
|
|
35
|
-
bedrock: "bedrock";
|
|
36
|
-
vertex: "vertex";
|
|
37
37
|
}>;
|
|
38
38
|
export declare const AuthSettingsSchema: z.ZodObject<{
|
|
39
39
|
apiKey: z.ZodOptional<z.ZodString>;
|
|
@@ -162,10 +162,10 @@ export declare const AwsSettingsSchema: z.ZodObject<{
|
|
|
162
162
|
region: z.ZodOptional<z.ZodString>;
|
|
163
163
|
profile: z.ZodOptional<z.ZodString>;
|
|
164
164
|
authentication: z.ZodOptional<z.ZodEnum<{
|
|
165
|
-
profile: "profile";
|
|
166
165
|
iam: "iam";
|
|
167
166
|
"api-key": "api-key";
|
|
168
167
|
apikey: "apikey";
|
|
168
|
+
profile: "profile";
|
|
169
169
|
}>>;
|
|
170
170
|
usePromptCache: z.ZodOptional<z.ZodBoolean>;
|
|
171
171
|
useCrossRegionInference: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -200,14 +200,15 @@ export declare const SapSettingsSchema: z.ZodObject<{
|
|
|
200
200
|
export type SapSettings = z.infer<typeof SapSettingsSchema>;
|
|
201
201
|
export declare const OcaSettingsSchema: z.ZodObject<{
|
|
202
202
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
203
|
-
internal: "internal";
|
|
204
203
|
external: "external";
|
|
204
|
+
internal: "internal";
|
|
205
205
|
}>>;
|
|
206
206
|
usePromptCache: z.ZodOptional<z.ZodBoolean>;
|
|
207
207
|
}, z.core.$strip>;
|
|
208
208
|
export type OcaSettings = z.infer<typeof OcaSettingsSchema>;
|
|
209
209
|
export declare const ModelCatalogSettingsSchema: z.ZodObject<{
|
|
210
210
|
loadLatestOnInit: z.ZodOptional<z.ZodBoolean>;
|
|
211
|
+
includeClineCloudModels: z.ZodOptional<z.ZodBoolean>;
|
|
211
212
|
loadPrivateOnAuth: z.ZodOptional<z.ZodBoolean>;
|
|
212
213
|
url: z.ZodOptional<z.ZodString>;
|
|
213
214
|
cacheTtlMs: z.ZodOptional<z.ZodNumber>;
|
|
@@ -233,23 +234,23 @@ export declare const ProviderSettingsSchema: z.ZodObject<{
|
|
|
233
234
|
protocol: z.ZodOptional<z.ZodEnum<{
|
|
234
235
|
anthropic: "anthropic";
|
|
235
236
|
gemini: "gemini";
|
|
236
|
-
"openai-chat": "openai-chat";
|
|
237
|
-
"openai-responses": "openai-responses";
|
|
238
237
|
"openai-r1": "openai-r1";
|
|
239
238
|
"ai-sdk": "ai-sdk";
|
|
239
|
+
"openai-responses": "openai-responses";
|
|
240
|
+
"openai-chat": "openai-chat";
|
|
240
241
|
}>>;
|
|
241
242
|
client: z.ZodOptional<z.ZodEnum<{
|
|
242
243
|
custom: "custom";
|
|
243
244
|
fetch: "fetch";
|
|
244
245
|
anthropic: "anthropic";
|
|
246
|
+
bedrock: "bedrock";
|
|
245
247
|
gemini: "gemini";
|
|
248
|
+
vertex: "vertex";
|
|
249
|
+
"openai-compatible": "openai-compatible";
|
|
250
|
+
openai: "openai";
|
|
246
251
|
"openai-r1": "openai-r1";
|
|
247
252
|
"ai-sdk": "ai-sdk";
|
|
248
253
|
"ai-sdk-community": "ai-sdk-community";
|
|
249
|
-
openai: "openai";
|
|
250
|
-
"openai-compatible": "openai-compatible";
|
|
251
|
-
bedrock: "bedrock";
|
|
252
|
-
vertex: "vertex";
|
|
253
254
|
}>>;
|
|
254
255
|
routingProviderId: z.ZodOptional<z.ZodString>;
|
|
255
256
|
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
@@ -341,10 +342,10 @@ export declare const ProviderSettingsSchema: z.ZodObject<{
|
|
|
341
342
|
region: z.ZodOptional<z.ZodString>;
|
|
342
343
|
profile: z.ZodOptional<z.ZodString>;
|
|
343
344
|
authentication: z.ZodOptional<z.ZodEnum<{
|
|
344
|
-
profile: "profile";
|
|
345
345
|
iam: "iam";
|
|
346
346
|
"api-key": "api-key";
|
|
347
347
|
apikey: "apikey";
|
|
348
|
+
profile: "profile";
|
|
348
349
|
}>>;
|
|
349
350
|
usePromptCache: z.ZodOptional<z.ZodBoolean>;
|
|
350
351
|
useCrossRegionInference: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -375,8 +376,8 @@ export declare const ProviderSettingsSchema: z.ZodObject<{
|
|
|
375
376
|
}, z.core.$strip>>;
|
|
376
377
|
oca: z.ZodOptional<z.ZodObject<{
|
|
377
378
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
378
|
-
internal: "internal";
|
|
379
379
|
external: "external";
|
|
380
|
+
internal: "internal";
|
|
380
381
|
}>>;
|
|
381
382
|
usePromptCache: z.ZodOptional<z.ZodBoolean>;
|
|
382
383
|
}, z.core.$strip>>;
|
|
@@ -389,14 +390,15 @@ export declare const ProviderSettingsSchema: z.ZodObject<{
|
|
|
389
390
|
vision: "vision";
|
|
390
391
|
reasoning: "reasoning";
|
|
391
392
|
tools: "tools";
|
|
392
|
-
"prompt-cache": "prompt-cache";
|
|
393
393
|
streaming: "streaming";
|
|
394
|
+
"prompt-cache": "prompt-cache";
|
|
394
395
|
"computer-use": "computer-use";
|
|
395
396
|
oauth: "oauth";
|
|
396
397
|
popular: "popular";
|
|
397
398
|
}>>>;
|
|
398
399
|
modelCatalog: z.ZodOptional<z.ZodObject<{
|
|
399
400
|
loadLatestOnInit: z.ZodOptional<z.ZodBoolean>;
|
|
401
|
+
includeClineCloudModels: z.ZodOptional<z.ZodBoolean>;
|
|
400
402
|
loadPrivateOnAuth: z.ZodOptional<z.ZodBoolean>;
|
|
401
403
|
url: z.ZodOptional<z.ZodString>;
|
|
402
404
|
cacheTtlMs: z.ZodOptional<z.ZodNumber>;
|
|
@@ -5,6 +5,7 @@ import type { SpawnToolOptions } from "../extensions/tools/team/spawn-agent-tool
|
|
|
5
5
|
import type { RuntimeCapabilities } from "../runtime/capabilities";
|
|
6
6
|
import type { LocalRuntimeStartOptions, ResolvedStartSessionInput } from "../runtime/host/runtime-host";
|
|
7
7
|
import type { RuntimeBuilderInput } from "../runtime/orchestration/session-runtime";
|
|
8
|
+
import type { SessionHistoryOriginMetadata } from "../session/history-origin";
|
|
8
9
|
import type { CoreSessionConfig } from "../types/config";
|
|
9
10
|
import { type ProviderConfig } from "../types/provider-settings";
|
|
10
11
|
import type { ProviderSettingsManager } from "./storage/provider-settings-manager";
|
|
@@ -13,6 +14,12 @@ export interface PrepareLocalRuntimeBootstrapOptions {
|
|
|
13
14
|
input: ResolvedStartSessionInput;
|
|
14
15
|
localRuntime?: LocalRuntimeStartOptions;
|
|
15
16
|
sessionId: string;
|
|
17
|
+
/**
|
|
18
|
+
* How the session was initiated (user, automation, import, ...). Stamped
|
|
19
|
+
* on every telemetry event the session emits so errors can be filtered by
|
|
20
|
+
* provenance, e.g. transcripts imported from another agent.
|
|
21
|
+
*/
|
|
22
|
+
sessionOrigin?: SessionHistoryOriginMetadata;
|
|
16
23
|
providerSettingsManager: ProviderSettingsManager;
|
|
17
24
|
defaultTelemetry?: ITelemetryService;
|
|
18
25
|
defaultLogger?: BasicLogger;
|
|
@@ -12,6 +12,15 @@ export interface McpInstallResult {
|
|
|
12
12
|
transport: McpServerTransportConfig;
|
|
13
13
|
warnings: string[];
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Parse `Header-Name: value` strings, one header per string, as
|
|
17
|
+
* `cline mcp add --header` does. Throws on a malformed header and warns about
|
|
18
|
+
* values that look like unfilled placeholders such as `<token>`.
|
|
19
|
+
*/
|
|
20
|
+
export declare function parseMcpHeaders(values: string[]): {
|
|
21
|
+
headers?: Record<string, string>;
|
|
22
|
+
warnings: string[];
|
|
23
|
+
};
|
|
15
24
|
export declare function buildMcpInstallTransport(options: {
|
|
16
25
|
headers?: string[];
|
|
17
26
|
name: string;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type BasicLogger } from "@cerebriline/shared";
|
|
2
|
+
export interface PluginSlashCommand {
|
|
3
|
+
/** Normalized token: lowercase, no leading slash. */
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface PluginCommandResult {
|
|
8
|
+
reply?: string;
|
|
9
|
+
submitPrompt?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Executes plugin-registered slash commands (`api.registerCommand`) for one
|
|
13
|
+
* workspace. Plugins are loaded on first use and kept alive so repeated
|
|
14
|
+
* commands answer instantly; the loaded set is refreshed when plugin module
|
|
15
|
+
* paths or mtimes change (installs, updates, toggles).
|
|
16
|
+
*/
|
|
17
|
+
export interface PluginCommandService {
|
|
18
|
+
listCommands(): Promise<PluginSlashCommand[]>;
|
|
19
|
+
/** Runs `/name input`. Resolves undefined when no plugin declares `name`. */
|
|
20
|
+
run(name: string, input: string): Promise<PluginCommandResult | undefined>;
|
|
21
|
+
shutdown(): Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
export declare function normalizePluginCommandName(name: string): string;
|
|
24
|
+
export declare function createPluginCommandService(options: {
|
|
25
|
+
cwd: string;
|
|
26
|
+
workspacePath?: string;
|
|
27
|
+
logger?: BasicLogger;
|
|
28
|
+
}): PluginCommandService;
|
|
@@ -31,6 +31,7 @@ export declare const StoredModelEntrySchema: z.ZodObject<{
|
|
|
31
31
|
"speech-generation": "speech-generation";
|
|
32
32
|
"video-generation": "video-generation";
|
|
33
33
|
transcription: "transcription";
|
|
34
|
+
realtime: "realtime";
|
|
34
35
|
}>>;
|
|
35
36
|
operationModes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
36
37
|
streaming: "streaming";
|
|
@@ -70,9 +71,9 @@ export declare const StoredProviderMetadataSchema: z.ZodObject<{
|
|
|
70
71
|
defaultModelId: z.ZodOptional<z.ZodString>;
|
|
71
72
|
protocol: z.ZodOptional<z.ZodEnum<{
|
|
72
73
|
"openai-responses": "openai-responses";
|
|
74
|
+
"openai-chat": "openai-chat";
|
|
73
75
|
anthropic: "anthropic";
|
|
74
76
|
gemini: "gemini";
|
|
75
|
-
"openai-chat": "openai-chat";
|
|
76
77
|
"openai-r1": "openai-r1";
|
|
77
78
|
"ai-sdk": "ai-sdk";
|
|
78
79
|
}>>;
|
|
@@ -112,9 +113,9 @@ export declare const StoredProviderEntrySchema: z.ZodObject<{
|
|
|
112
113
|
defaultModelId: z.ZodOptional<z.ZodString>;
|
|
113
114
|
protocol: z.ZodOptional<z.ZodEnum<{
|
|
114
115
|
"openai-responses": "openai-responses";
|
|
116
|
+
"openai-chat": "openai-chat";
|
|
115
117
|
anthropic: "anthropic";
|
|
116
118
|
gemini: "gemini";
|
|
117
|
-
"openai-chat": "openai-chat";
|
|
118
119
|
"openai-r1": "openai-r1";
|
|
119
120
|
"ai-sdk": "ai-sdk";
|
|
120
121
|
}>>;
|
|
@@ -176,6 +177,7 @@ export declare const StoredProviderEntrySchema: z.ZodObject<{
|
|
|
176
177
|
"speech-generation": "speech-generation";
|
|
177
178
|
"video-generation": "video-generation";
|
|
178
179
|
transcription: "transcription";
|
|
180
|
+
realtime: "realtime";
|
|
179
181
|
}>>;
|
|
180
182
|
operationModes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
181
183
|
streaming: "streaming";
|
|
@@ -208,6 +210,7 @@ export declare const StoredProviderEntrySchema: z.ZodObject<{
|
|
|
208
210
|
r1: "r1";
|
|
209
211
|
}>>;
|
|
210
212
|
}, z.core.$loose>>>;
|
|
213
|
+
discoveredModelIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
211
214
|
}, z.core.$loose>;
|
|
212
215
|
export type StoredProviderEntry = z.infer<typeof StoredProviderEntrySchema>;
|
|
213
216
|
export declare const StoredModelsFileSchema: z.ZodObject<{
|
|
@@ -219,9 +222,9 @@ export declare const StoredModelsFileSchema: z.ZodObject<{
|
|
|
219
222
|
defaultModelId: z.ZodOptional<z.ZodString>;
|
|
220
223
|
protocol: z.ZodOptional<z.ZodEnum<{
|
|
221
224
|
"openai-responses": "openai-responses";
|
|
225
|
+
"openai-chat": "openai-chat";
|
|
222
226
|
anthropic: "anthropic";
|
|
223
227
|
gemini: "gemini";
|
|
224
|
-
"openai-chat": "openai-chat";
|
|
225
228
|
"openai-r1": "openai-r1";
|
|
226
229
|
"ai-sdk": "ai-sdk";
|
|
227
230
|
}>>;
|
|
@@ -283,6 +286,7 @@ export declare const StoredModelsFileSchema: z.ZodObject<{
|
|
|
283
286
|
"speech-generation": "speech-generation";
|
|
284
287
|
"video-generation": "video-generation";
|
|
285
288
|
transcription: "transcription";
|
|
289
|
+
realtime: "realtime";
|
|
286
290
|
}>>;
|
|
287
291
|
operationModes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
288
292
|
streaming: "streaming";
|
|
@@ -315,6 +319,7 @@ export declare const StoredModelsFileSchema: z.ZodObject<{
|
|
|
315
319
|
r1: "r1";
|
|
316
320
|
}>>;
|
|
317
321
|
}, z.core.$loose>>>;
|
|
322
|
+
discoveredModelIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
318
323
|
}, z.core.$loose>>;
|
|
319
324
|
}, z.core.$strip>;
|
|
320
325
|
export type StoredModelsFile = z.infer<typeof StoredModelsFileSchema>;
|
|
@@ -29,32 +29,33 @@ export interface TranscribeLocalAudioRequest {
|
|
|
29
29
|
providerId: string;
|
|
30
30
|
modelId: string;
|
|
31
31
|
audio: Uint8Array;
|
|
32
|
-
mediaType?: string;
|
|
33
32
|
abortSignal?: AbortSignal;
|
|
34
33
|
}
|
|
35
34
|
export interface TranscribeConfiguredVoiceInputRequest {
|
|
36
35
|
audio: Uint8Array;
|
|
37
|
-
mediaType?: string;
|
|
38
36
|
abortSignal?: AbortSignal;
|
|
39
37
|
}
|
|
40
38
|
export interface CreateConfiguredStreamingTranscriptionSessionRequest {
|
|
41
39
|
expiresAfterSeconds?: number;
|
|
42
40
|
abortSignal?: AbortSignal;
|
|
43
41
|
}
|
|
44
|
-
export declare function isDedicatedTranscriptionModel(model: Pick<ProviderModel, "operation">): boolean;
|
|
45
|
-
export declare function addLocalProvider(manager: ProviderSettingsManager, request: Omit<AddProviderActionRequest, "action">):
|
|
42
|
+
export declare function isDedicatedTranscriptionModel(model: Pick<ProviderModel, "operation" | "inputModalities" | "outputModalities">): boolean;
|
|
43
|
+
export declare function addLocalProvider(manager: ProviderSettingsManager, request: Omit<AddProviderActionRequest, "action">): ReturnType<typeof addLocalProviderUnlocked>;
|
|
44
|
+
declare function addLocalProviderUnlocked(manager: ProviderSettingsManager, request: Omit<AddProviderActionRequest, "action">): Promise<{
|
|
46
45
|
providerId: string;
|
|
47
46
|
settingsPath: string;
|
|
48
47
|
modelsPath: string;
|
|
49
48
|
modelsCount: number;
|
|
50
49
|
}>;
|
|
51
|
-
export declare function updateLocalProvider(manager: ProviderSettingsManager, request: UpdateLocalProviderRequest):
|
|
50
|
+
export declare function updateLocalProvider(manager: ProviderSettingsManager, request: UpdateLocalProviderRequest): ReturnType<typeof updateLocalProviderUnlocked>;
|
|
51
|
+
declare function updateLocalProviderUnlocked(manager: ProviderSettingsManager, request: UpdateLocalProviderRequest): Promise<{
|
|
52
52
|
providerId: string;
|
|
53
53
|
settingsPath: string;
|
|
54
54
|
modelsPath: string;
|
|
55
55
|
modelsCount: number;
|
|
56
56
|
}>;
|
|
57
|
-
export declare function deleteLocalProvider(manager: ProviderSettingsManager, request: DeleteLocalProviderRequest):
|
|
57
|
+
export declare function deleteLocalProvider(manager: ProviderSettingsManager, request: DeleteLocalProviderRequest): ReturnType<typeof deleteLocalProviderUnlocked>;
|
|
58
|
+
declare function deleteLocalProviderUnlocked(manager: ProviderSettingsManager, request: DeleteLocalProviderRequest): Promise<{
|
|
58
59
|
providerId: string;
|
|
59
60
|
settingsPath: string;
|
|
60
61
|
modelsPath: string;
|
|
@@ -71,7 +72,14 @@ export declare function listLocalProviders(manager: ProviderSettingsManager, opt
|
|
|
71
72
|
settingsPath: string;
|
|
72
73
|
voiceInput?: VoiceInputSelection;
|
|
73
74
|
}>;
|
|
74
|
-
export declare function getLocalProviderModels(providerId: string, config?: ProviderConfig
|
|
75
|
+
export declare function getLocalProviderModels(providerId: string, config?: ProviderConfig, options?: {
|
|
76
|
+
loadLatest?: boolean;
|
|
77
|
+
}): Promise<{
|
|
78
|
+
providerId: string;
|
|
79
|
+
models: ProviderModel[];
|
|
80
|
+
}>;
|
|
81
|
+
/** The same executable voice catalog is used by pickers, saves, and requests. */
|
|
82
|
+
export declare function getLocalTranscriptionModels(providerId: string, config?: ProviderConfig): Promise<{
|
|
75
83
|
providerId: string;
|
|
76
84
|
models: ProviderModel[];
|
|
77
85
|
}>;
|
|
@@ -82,12 +90,14 @@ export declare function saveVoiceInputSettings(manager: ProviderSettingsManager,
|
|
|
82
90
|
}>;
|
|
83
91
|
export declare function transcribeConfiguredVoiceInput(manager: ProviderSettingsManager, request: TranscribeConfiguredVoiceInputRequest): Promise<LlmsModels.AudioTranscriptionResult>;
|
|
84
92
|
export declare function createConfiguredStreamingTranscriptionSession(manager: ProviderSettingsManager, request?: CreateConfiguredStreamingTranscriptionSessionRequest): Promise<LlmsModels.StreamingAudioTranscriptionSession>;
|
|
85
|
-
export declare function saveLocalProviderSettings(manager: ProviderSettingsManager, request: Omit<SaveProviderSettingsActionRequest, "action">):
|
|
93
|
+
export declare function saveLocalProviderSettings(manager: ProviderSettingsManager, request: Omit<SaveProviderSettingsActionRequest, "action">): ReturnType<typeof saveLocalProviderSettingsUnlocked>;
|
|
94
|
+
declare function saveLocalProviderSettingsUnlocked(manager: ProviderSettingsManager, request: Omit<SaveProviderSettingsActionRequest, "action">): Promise<{
|
|
86
95
|
providerId: string;
|
|
87
96
|
enabled: boolean;
|
|
88
97
|
settingsPath: string;
|
|
89
|
-
}
|
|
90
|
-
export declare function refreshProviderModelsFromSource(manager: ProviderSettingsManager, providerId: string):
|
|
98
|
+
}>;
|
|
99
|
+
export declare function refreshProviderModelsFromSource(manager: ProviderSettingsManager, providerId: string): ReturnType<typeof refreshProviderModelsFromSourceUnlocked>;
|
|
100
|
+
declare function refreshProviderModelsFromSourceUnlocked(manager: ProviderSettingsManager, providerId: string): Promise<{
|
|
91
101
|
providerId: string;
|
|
92
102
|
refreshed: boolean;
|
|
93
103
|
modelsCount?: number;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
export declare function extractModelIdsFromPayload(payload: unknown, providerId: string): string[];
|
|
2
|
-
export
|
|
2
|
+
export interface ModelSourceAuth {
|
|
3
|
+
baseUrl?: string;
|
|
4
|
+
apiKey?: string;
|
|
5
|
+
headers?: Record<string, string>;
|
|
6
|
+
}
|
|
7
|
+
export declare function fetchModelIdsFromSource(url: string, providerId: string, auth?: ModelSourceAuth): Promise<string[]>;
|
|
3
8
|
export declare function resolveModelsSourceUrl(baseUrl: string | undefined, defaultBaseUrl: string | undefined, modelsSourceUrl: string | undefined): string | undefined;
|
|
@@ -34,4 +34,15 @@ export interface ProviderConfigFields {
|
|
|
34
34
|
* input, no default base URL) so callers can render a reasonable configure
|
|
35
35
|
* dialog without per-id branches.
|
|
36
36
|
*/
|
|
37
|
+
/**
|
|
38
|
+
* Whether a provider authenticates through credentials already stored on the
|
|
39
|
+
* machine by a local CLI (Codex CLI, Claude Code, ...) instead of an API key
|
|
40
|
+
* or an OAuth flow.
|
|
41
|
+
*
|
|
42
|
+
* Read from the provider registry's `local-auth` capability rather than a
|
|
43
|
+
* hardcoded id list, so tagging a provider in `@cerebriline/llms` is all it takes
|
|
44
|
+
* for configure UIs to route it to their local-readiness flow. Mirrors
|
|
45
|
+
* `isOAuthProvider` for the OAuth side.
|
|
46
|
+
*/
|
|
47
|
+
export declare function isLocalAuthProvider(providerId: string): boolean;
|
|
37
48
|
export declare function getProviderConfigFields(providerId: string): ProviderConfigFields;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ConvertedImportedSession, type ImportableSessionSummary, type SessionImportAdapter } from "./types";
|
|
2
2
|
export interface ClaudeCodeAdapterOptions {
|
|
3
|
-
/** Defaults to ~/.claude/projects */
|
|
3
|
+
/** Defaults to $CLAUDE_CONFIG_DIR/projects or ~/.claude/projects */
|
|
4
4
|
projectsDir?: string;
|
|
5
5
|
}
|
|
6
6
|
export declare class ClaudeCodeImportAdapter implements SessionImportAdapter {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface SessionImportPathEnvironment {
|
|
2
|
+
platform: NodeJS.Platform;
|
|
3
|
+
homeDir: string;
|
|
4
|
+
env: Readonly<Record<string, string | undefined>>;
|
|
5
|
+
joinPath: (...paths: string[]) => string;
|
|
6
|
+
}
|
|
7
|
+
export declare function claudeCodeProjectsDir(environment?: SessionImportPathEnvironment): string;
|
|
8
|
+
export declare function codexHomeDir(environment?: SessionImportPathEnvironment): string;
|
|
9
|
+
export declare function opencodeDataDir(environment?: SessionImportPathEnvironment): string;
|