@clinebot/core 0.0.2 → 0.0.4
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/README.md +7 -7
- package/dist/default-tools/definitions.d.ts +1 -1
- package/dist/default-tools/executors/index.d.ts +1 -1
- package/dist/default-tools/index.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.node.d.ts +35 -0
- package/dist/index.node.js +469 -47
- package/dist/providers/local-provider-service.d.ts +37 -0
- package/package.json +5 -26
- package/src/default-tools/definitions.ts +1 -1
- package/src/default-tools/executors/index.ts +1 -1
- package/src/default-tools/index.ts +1 -1
- package/src/index.node.ts +223 -0
- package/src/index.ts +9 -0
- package/src/providers/local-provider-service.ts +591 -0
- package/dist/index.browser.d.ts +0 -1
- package/dist/index.browser.js +0 -220
- package/dist/server/index.d.ts +0 -49
- package/dist/server/index.js +0 -693
- package/src/index.browser.ts +0 -1
- package/src/server/index.ts +0 -321
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ session lifecycle into a host-ready runtime.
|
|
|
10
10
|
- provider settings and account services
|
|
11
11
|
- default runtime tools and MCP integration
|
|
12
12
|
- storage-backed session and team state helpers
|
|
13
|
-
- host-facing Node helpers through `@clinebot/core
|
|
13
|
+
- host-facing Node helpers through `@clinebot/core`
|
|
14
14
|
|
|
15
15
|
## Installation
|
|
16
16
|
|
|
@@ -20,15 +20,15 @@ npm install @clinebot/core
|
|
|
20
20
|
|
|
21
21
|
## Entry Points
|
|
22
22
|
|
|
23
|
-
- `@clinebot/core`: core contracts, shared utilities, and
|
|
24
|
-
- `@clinebot/core/
|
|
23
|
+
- `@clinebot/core`: core contracts, shared utilities, and Node/server helpers for building hosts and runtimes
|
|
24
|
+
- `@clinebot/core/node`: optional alias for the same Node/server runtime surface
|
|
25
25
|
|
|
26
26
|
## Typical Usage
|
|
27
27
|
|
|
28
|
-
Most host apps should start with `@clinebot/core
|
|
28
|
+
Most host apps should start with `@clinebot/core`.
|
|
29
29
|
|
|
30
30
|
```ts
|
|
31
|
-
import { createSessionHost } from "@clinebot/core
|
|
31
|
+
import { createSessionHost } from "@clinebot/core";
|
|
32
32
|
|
|
33
33
|
const host = await createSessionHost({});
|
|
34
34
|
|
|
@@ -53,7 +53,7 @@ await host.dispose();
|
|
|
53
53
|
|
|
54
54
|
### Runtime and Sessions
|
|
55
55
|
|
|
56
|
-
Use `@clinebot/core
|
|
56
|
+
Use `@clinebot/core` for host-facing runtime assembly:
|
|
57
57
|
|
|
58
58
|
- `createSessionHost(...)`
|
|
59
59
|
- `DefaultSessionManager`
|
|
@@ -73,7 +73,7 @@ The package also exports storage and settings helpers such as:
|
|
|
73
73
|
|
|
74
74
|
- `ProviderSettingsManager`
|
|
75
75
|
- `SqliteTeamStore`
|
|
76
|
-
- SQLite RPC session backend helpers from `@clinebot/core
|
|
76
|
+
- SQLite RPC session backend helpers from `@clinebot/core`
|
|
77
77
|
|
|
78
78
|
## Related Packages
|
|
79
79
|
|
|
@@ -64,7 +64,7 @@ export declare function createAskQuestionTool(executor: AskQuestionExecutor, con
|
|
|
64
64
|
* @example
|
|
65
65
|
* ```typescript
|
|
66
66
|
* import { Agent } from "@clinebot/agents"
|
|
67
|
-
* import { createDefaultTools } from "@clinebot/core/
|
|
67
|
+
* import { createDefaultTools } from "@clinebot/core/node"
|
|
68
68
|
* import * as fs from "fs/promises"
|
|
69
69
|
* import { exec } from "child_process"
|
|
70
70
|
*
|
|
@@ -28,7 +28,7 @@ export interface DefaultExecutorsOptions {
|
|
|
28
28
|
*
|
|
29
29
|
* @example
|
|
30
30
|
* ```typescript
|
|
31
|
-
* import { createDefaultTools, createDefaultExecutors } from "@clinebot/core/
|
|
31
|
+
* import { createDefaultTools, createDefaultExecutors } from "@clinebot/core/node"
|
|
32
32
|
*
|
|
33
33
|
* const executors = createDefaultExecutors({
|
|
34
34
|
* bash: { timeoutMs: 60000 },
|
|
@@ -36,7 +36,7 @@ export interface CreateBuiltinToolsOptions extends Omit<CreateDefaultToolsOption
|
|
|
36
36
|
* @example
|
|
37
37
|
* ```typescript
|
|
38
38
|
* import { Agent } from "@clinebot/agents"
|
|
39
|
-
* import { createBuiltinTools } from "@clinebot/core/
|
|
39
|
+
* import { createBuiltinTools } from "@clinebot/core/node"
|
|
40
40
|
*
|
|
41
41
|
* const tools = createBuiltinTools({
|
|
42
42
|
* cwd: "/path/to/project",
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Runtime-agnostic core contracts and shared state utilities.
|
|
5
5
|
*/
|
|
6
|
+
export { type AgentConfig, createTool, getClineDefaultSystemPrompt, type Tool, type ToolApprovalRequest, type ToolApprovalResult, type ToolContext, } from "@clinebot/agents";
|
|
6
7
|
export type { AgentMode, BasicLogger, ConnectorHookEvent, HookSessionContext, RpcAddProviderActionRequest, RpcChatMessage, RpcChatRunTurnRequest, RpcChatRuntimeConfigBase, RpcChatRuntimeLoggerConfig, RpcChatStartSessionArtifacts, RpcChatStartSessionRequest, RpcChatTurnResult, RpcClineAccountActionRequest, RpcOAuthProviderId, RpcProviderActionRequest, RpcProviderCapability, RpcProviderCatalogResponse, RpcProviderListItem, RpcProviderModel, RpcProviderOAuthLoginResponse, RpcSaveProviderSettingsActionRequest, SessionLineage, TeamProgressProjectionEvent, ToolPolicy, } from "@clinebot/shared";
|
|
7
8
|
export { normalizeUserInput, RPC_TEAM_LIFECYCLE_EVENT_TYPE, RPC_TEAM_PROGRESS_EVENT_TYPE, resolveHookLogPath, } from "@clinebot/shared";
|
|
8
9
|
export { ensureHookLogDir, ensureParentDir, resolveClineDataDir, resolveSessionDataDir, setHomeDir, setHomeDirIfUnset, } from "@clinebot/shared/storage";
|
package/dist/index.node.d.ts
CHANGED
|
@@ -1 +1,36 @@
|
|
|
1
|
+
export type { AgentConfigWatcher, AgentConfigWatcherEvent, AgentYamlConfig, BuildAgentConfigOverridesOptions, CreateAgentConfigWatcherOptions, CreateInstructionWatcherOptions, CreateRulesConfigDefinitionOptions, CreateSkillsConfigDefinitionOptions, CreateUserInstructionConfigWatcherOptions, CreateWorkflowsConfigDefinitionOptions, HookConfigFileEntry, LoadAgentPluginFromPathOptions, ParseMarkdownFrontmatterResult, ParseYamlFrontmatterResult, ResolveAgentPluginPathsOptions, RuleConfig, SkillConfig, UnifiedConfigDefinition, UnifiedConfigFileCandidate, UnifiedConfigFileContext, UnifiedConfigRecord, UnifiedConfigWatcherEvent, UnifiedConfigWatcherOptions, UserInstructionConfig, UserInstructionConfigType, UserInstructionConfigWatcher, UserInstructionConfigWatcherEvent, WorkflowConfig, } from "./agents";
|
|
2
|
+
export { createAgentConfigDefinition, createAgentConfigWatcher, createRulesConfigDefinition, createSkillsConfigDefinition, createUserInstructionConfigWatcher, createWorkflowsConfigDefinition, discoverPluginModulePaths, HOOK_CONFIG_FILE_EVENT_MAP, HOOKS_CONFIG_DIRECTORY_NAME, HookConfigFileName, listHookConfigFiles, loadAgentPluginFromPath, loadAgentPluginsFromPaths, parseAgentConfigFromYaml, parsePartialAgentConfigFromYaml, parseRuleConfigFromMarkdown, parseSkillConfigFromMarkdown, parseWorkflowConfigFromMarkdown, RULES_CONFIG_DIRECTORY_NAME, resolveAgentPluginPaths, resolveAgentTools, resolveAndLoadAgentPlugins, resolveDocumentsHooksDirectoryPath, resolveDocumentsRulesDirectoryPath, resolveDocumentsWorkflowsDirectoryPath, resolveHooksConfigSearchPaths, resolvePluginConfigSearchPaths, resolveRulesConfigSearchPaths, resolveSkillsConfigSearchPaths, resolveWorkflowsConfigSearchPaths, SKILLS_CONFIG_DIRECTORY_NAME, toHookConfigFileName, toPartialAgentConfig, UnifiedConfigFileWatcher, WORKFLOWS_CONFIG_DIRECTORY_NAME, } from "./agents";
|
|
3
|
+
export { createOAuthClientCallbacks, type OAuthClientCallbacksOptions, } from "./auth/client";
|
|
4
|
+
export { createClineOAuthProvider, getValidClineCredentials, loginClineOAuth, refreshClineToken, } from "./auth/cline";
|
|
5
|
+
export { getValidOpenAICodexCredentials, isOpenAICodexTokenExpired, loginOpenAICodex, normalizeOpenAICodexCredentials, openaiCodexOAuthProvider, refreshOpenAICodexToken, } from "./auth/codex";
|
|
6
|
+
export { createOcaOAuthProvider, createOcaRequestHeaders, DEFAULT_EXTERNAL_IDCS_CLIENT_ID, DEFAULT_EXTERNAL_IDCS_SCOPES, DEFAULT_EXTERNAL_IDCS_URL, DEFAULT_EXTERNAL_OCA_BASE_URL, DEFAULT_INTERNAL_IDCS_CLIENT_ID, DEFAULT_INTERNAL_IDCS_SCOPES, DEFAULT_INTERNAL_IDCS_URL, DEFAULT_INTERNAL_OCA_BASE_URL, generateOcaOpcRequestId, getValidOcaCredentials, loginOcaOAuth, OCI_HEADER_OPC_REQUEST_ID, refreshOcaToken, } from "./auth/oca";
|
|
7
|
+
export { startLocalOAuthServer } from "./auth/server";
|
|
8
|
+
export type { OAuthCredentials, OAuthLoginCallbacks, OAuthPrompt, OAuthProviderInterface, OcaClientMetadata, OcaMode, OcaOAuthConfig, OcaOAuthEnvironmentConfig, OcaOAuthProviderOptions, OcaTokenResolution, } from "./auth/types";
|
|
1
9
|
export * from "./index";
|
|
10
|
+
export type { FastFileIndexOptions, MentionEnricherOptions, MentionEnrichmentResult, } from "./input";
|
|
11
|
+
export { enrichPromptWithMentions, getFileIndex, prewarmFileIndex, } from "./input";
|
|
12
|
+
export { addLocalProvider, ensureCustomProvidersLoaded, getLocalProviderModels, listLocalProviders, loginLocalProvider, normalizeOAuthProvider, resolveLocalClineAuthToken, saveLocalProviderOAuthCredentials, saveLocalProviderSettings, } from "./providers/local-provider-service";
|
|
13
|
+
export { formatRulesForSystemPrompt, isRuleEnabled, listEnabledRulesFromWatcher, loadRulesForSystemPromptFromWatcher, } from "./runtime/rules";
|
|
14
|
+
export { createTeamName, DefaultRuntimeBuilder, } from "./runtime/runtime-builder";
|
|
15
|
+
export { type SandboxCallOptions, SubprocessSandbox, type SubprocessSandboxOptions, } from "./runtime/sandbox/subprocess-sandbox";
|
|
16
|
+
export type { BuiltRuntime, RuntimeBuilder, RuntimeBuilderInput, SessionRuntime, } from "./runtime/session-runtime";
|
|
17
|
+
export { type DesktopToolApprovalOptions, requestDesktopToolApproval, } from "./runtime/tool-approval";
|
|
18
|
+
export type { AvailableWorkflow } from "./runtime/workflows";
|
|
19
|
+
export { listAvailableWorkflowsFromWatcher, resolveWorkflowSlashCommandFromWatcher, } from "./runtime/workflows";
|
|
20
|
+
export { DefaultSessionManager } from "./session/default-session-manager";
|
|
21
|
+
export { RpcCoreSessionService } from "./session/rpc-session-service";
|
|
22
|
+
export { deriveSubsessionStatus, makeSubSessionId, makeTeamTaskSubSessionId, sanitizeSessionToken, } from "./session/session-graph";
|
|
23
|
+
export type { CreateSessionHostOptions, SessionBackend, SessionHost, } from "./session/session-host";
|
|
24
|
+
export { createSessionHost, resolveSessionBackend, } from "./session/session-host";
|
|
25
|
+
export type { SendSessionInput, SessionAccumulatedUsage, SessionManager, StartSessionInput, StartSessionResult, } from "./session/session-manager";
|
|
26
|
+
export type { SessionManifest } from "./session/session-manifest";
|
|
27
|
+
export type { CreateRootSessionWithArtifactsInput, RootSessionArtifacts, } from "./session/session-service";
|
|
28
|
+
export { CoreSessionService } from "./session/session-service";
|
|
29
|
+
export { createSqliteRpcSessionBackend, SqliteRpcSessionBackend, type SqliteRpcSessionBackendOptions, } from "./session/sqlite-rpc-session-backend";
|
|
30
|
+
export type { WorkspaceManager, WorkspaceManagerEvent, } from "./session/workspace-manager";
|
|
31
|
+
export { InMemoryWorkspaceManager } from "./session/workspace-manager";
|
|
32
|
+
export type { WorkspaceManifest } from "./session/workspace-manifest";
|
|
33
|
+
export { buildWorkspaceMetadata, emptyWorkspaceManifest, generateWorkspaceInfo, normalizeWorkspacePath, upsertWorkspaceInfo, WorkspaceInfoSchema, WorkspaceManifestSchema, } from "./session/workspace-manifest";
|
|
34
|
+
export { type MigrateLegacyProviderSettingsOptions, type MigrateLegacyProviderSettingsResult, migrateLegacyProviderSettings, } from "./storage/provider-settings-legacy-migration";
|
|
35
|
+
export { ProviderSettingsManager } from "./storage/provider-settings-manager";
|
|
36
|
+
export { SqliteSessionStore } from "./storage/sqlite-session-store";
|