@clinebot/core 0.0.20 → 0.0.21
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/account/cline-account-service.d.ts +3 -2
- package/dist/account/cline-account-service.d.ts.map +1 -0
- package/dist/account/index.d.ts +1 -0
- package/dist/account/index.d.ts.map +1 -0
- package/dist/account/rpc.d.ts +1 -0
- package/dist/account/rpc.d.ts.map +1 -0
- package/dist/account/types.d.ts +1 -0
- package/dist/account/types.d.ts.map +1 -0
- package/dist/agents/agent-config-loader.d.ts +1 -0
- package/dist/agents/agent-config-loader.d.ts.map +1 -0
- package/dist/agents/agent-config-parser.d.ts +1 -0
- package/dist/agents/agent-config-parser.d.ts.map +1 -0
- package/dist/agents/hooks-config-loader.d.ts +1 -0
- package/dist/agents/hooks-config-loader.d.ts.map +1 -0
- package/dist/agents/index.d.ts +1 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/plugin-config-loader.d.ts +1 -0
- package/dist/agents/plugin-config-loader.d.ts.map +1 -0
- package/dist/agents/plugin-loader.d.ts +1 -0
- package/dist/agents/plugin-loader.d.ts.map +1 -0
- package/dist/agents/plugin-sandbox.d.ts +1 -0
- package/dist/agents/plugin-sandbox.d.ts.map +1 -0
- package/dist/agents/unified-config-file-watcher.d.ts +1 -0
- package/dist/agents/unified-config-file-watcher.d.ts.map +1 -0
- package/dist/agents/user-instruction-config-loader.d.ts +1 -0
- package/dist/agents/user-instruction-config-loader.d.ts.map +1 -0
- package/dist/auth/client.d.ts +1 -0
- package/dist/auth/client.d.ts.map +1 -0
- package/dist/auth/cline.d.ts +1 -0
- package/dist/auth/cline.d.ts.map +1 -0
- package/dist/auth/codex.d.ts +1 -0
- package/dist/auth/codex.d.ts.map +1 -0
- package/dist/auth/oca.d.ts +1 -0
- package/dist/auth/oca.d.ts.map +1 -0
- package/dist/auth/server.d.ts +1 -0
- package/dist/auth/server.d.ts.map +1 -0
- package/dist/auth/types.d.ts +1 -0
- package/dist/auth/types.d.ts.map +1 -0
- package/dist/auth/utils.d.ts +1 -0
- package/dist/auth/utils.d.ts.map +1 -0
- package/dist/chat/chat-schema.d.ts +13 -12
- package/dist/chat/chat-schema.d.ts.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -0
- package/dist/index.node.d.ts +2 -0
- package/dist/index.node.d.ts.map +1 -0
- package/dist/index.node.js +303 -302
- package/dist/input/file-indexer.d.ts +1 -0
- package/dist/input/file-indexer.d.ts.map +1 -0
- package/dist/input/index.d.ts +1 -0
- package/dist/input/index.d.ts.map +1 -0
- package/dist/input/mention-enricher.d.ts +1 -0
- package/dist/input/mention-enricher.d.ts.map +1 -0
- package/dist/mcp/config-loader.d.ts +1 -0
- package/dist/mcp/config-loader.d.ts.map +1 -0
- package/dist/mcp/index.d.ts +1 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/manager.d.ts +1 -0
- package/dist/mcp/manager.d.ts.map +1 -0
- package/dist/mcp/types.d.ts +1 -0
- package/dist/mcp/types.d.ts.map +1 -0
- package/dist/providers/local-provider-registry.d.ts +36 -0
- package/dist/providers/local-provider-registry.d.ts.map +1 -0
- package/dist/providers/local-provider-service.d.ts +2 -1
- package/dist/providers/local-provider-service.d.ts.map +1 -0
- package/dist/runtime/commands.d.ts +1 -0
- package/dist/runtime/commands.d.ts.map +1 -0
- package/dist/runtime/hook-file-hooks.d.ts +1 -0
- package/dist/runtime/hook-file-hooks.d.ts.map +1 -0
- package/dist/runtime/rules.d.ts +1 -0
- package/dist/runtime/rules.d.ts.map +1 -0
- package/dist/runtime/runtime-builder.d.ts +1 -0
- package/dist/runtime/runtime-builder.d.ts.map +1 -0
- package/dist/runtime/sandbox/subprocess-sandbox.d.ts +1 -0
- package/dist/runtime/sandbox/subprocess-sandbox.d.ts.map +1 -0
- package/dist/runtime/session-runtime.d.ts +2 -0
- package/dist/runtime/session-runtime.d.ts.map +1 -0
- package/dist/runtime/skills.d.ts +1 -0
- package/dist/runtime/skills.d.ts.map +1 -0
- package/dist/runtime/tool-approval.d.ts +1 -0
- package/dist/runtime/tool-approval.d.ts.map +1 -0
- package/dist/runtime/workflows.d.ts +1 -0
- package/dist/runtime/workflows.d.ts.map +1 -0
- package/dist/session/default-session-manager.d.ts +4 -0
- package/dist/session/default-session-manager.d.ts.map +1 -0
- package/dist/session/file-session-service.d.ts +1 -0
- package/dist/session/file-session-service.d.ts.map +1 -0
- package/dist/session/rpc-session-service.d.ts +1 -0
- package/dist/session/rpc-session-service.d.ts.map +1 -0
- package/dist/session/rpc-spawn-lease.d.ts +1 -0
- package/dist/session/rpc-spawn-lease.d.ts.map +1 -0
- package/dist/session/runtime-oauth-token-manager.d.ts +1 -0
- package/dist/session/runtime-oauth-token-manager.d.ts.map +1 -0
- package/dist/session/session-agent-events.d.ts +20 -1
- package/dist/session/session-agent-events.d.ts.map +1 -0
- package/dist/session/session-artifacts.d.ts +1 -0
- package/dist/session/session-artifacts.d.ts.map +1 -0
- package/dist/session/session-config-builder.d.ts +1 -0
- package/dist/session/session-config-builder.d.ts.map +1 -0
- package/dist/session/session-graph.d.ts +1 -0
- package/dist/session/session-graph.d.ts.map +1 -0
- package/dist/session/session-host.d.ts +1 -0
- package/dist/session/session-host.d.ts.map +1 -0
- package/dist/session/session-manager.d.ts +1 -0
- package/dist/session/session-manager.d.ts.map +1 -0
- package/dist/session/session-manifest.d.ts +2 -1
- package/dist/session/session-manifest.d.ts.map +1 -0
- package/dist/session/session-service.d.ts +1 -0
- package/dist/session/session-service.d.ts.map +1 -0
- package/dist/session/session-team-coordination.d.ts +1 -0
- package/dist/session/session-team-coordination.d.ts.map +1 -0
- package/dist/session/session-telemetry.d.ts +3 -1
- package/dist/session/session-telemetry.d.ts.map +1 -0
- package/dist/session/sqlite-rpc-session-backend.d.ts +1 -0
- package/dist/session/sqlite-rpc-session-backend.d.ts.map +1 -0
- package/dist/session/unified-session-persistence-service.d.ts +1 -0
- package/dist/session/unified-session-persistence-service.d.ts.map +1 -0
- package/dist/session/utils/helpers.d.ts +1 -0
- package/dist/session/utils/helpers.d.ts.map +1 -0
- package/dist/session/utils/types.d.ts +1 -0
- package/dist/session/utils/types.d.ts.map +1 -0
- package/dist/session/utils/usage.d.ts +1 -0
- package/dist/session/utils/usage.d.ts.map +1 -0
- package/dist/session/workspace-manager.d.ts +1 -0
- package/dist/session/workspace-manager.d.ts.map +1 -0
- package/dist/session/workspace-manifest.d.ts +1 -0
- package/dist/session/workspace-manifest.d.ts.map +1 -0
- package/dist/storage/file-team-store.d.ts +1 -0
- package/dist/storage/file-team-store.d.ts.map +1 -0
- package/dist/storage/provider-settings-legacy-migration.d.ts +1 -0
- package/dist/storage/provider-settings-legacy-migration.d.ts.map +1 -0
- package/dist/storage/provider-settings-manager.d.ts +1 -0
- package/dist/storage/provider-settings-manager.d.ts.map +1 -0
- package/dist/storage/sqlite-session-store.d.ts +1 -0
- package/dist/storage/sqlite-session-store.d.ts.map +1 -0
- package/dist/storage/sqlite-team-store.d.ts +1 -0
- package/dist/storage/sqlite-team-store.d.ts.map +1 -0
- package/dist/storage/team-store.d.ts +1 -0
- package/dist/storage/team-store.d.ts.map +1 -0
- package/dist/team/index.d.ts +1 -0
- package/dist/team/index.d.ts.map +1 -0
- package/dist/team/projections.d.ts +1 -0
- package/dist/team/projections.d.ts.map +1 -0
- package/dist/telemetry/ITelemetryAdapter.d.ts +1 -0
- package/dist/telemetry/ITelemetryAdapter.d.ts.map +1 -0
- package/dist/telemetry/LoggerTelemetryAdapter.d.ts +1 -0
- package/dist/telemetry/LoggerTelemetryAdapter.d.ts.map +1 -0
- package/dist/telemetry/OpenTelemetryAdapter.d.ts +1 -0
- package/dist/telemetry/OpenTelemetryAdapter.d.ts.map +1 -0
- package/dist/telemetry/OpenTelemetryProvider.d.ts +1 -0
- package/dist/telemetry/OpenTelemetryProvider.d.ts.map +1 -0
- package/dist/telemetry/TelemetryService.d.ts +1 -0
- package/dist/telemetry/TelemetryService.d.ts.map +1 -0
- package/dist/telemetry/core-events.d.ts +55 -22
- package/dist/telemetry/core-events.d.ts.map +1 -0
- package/dist/telemetry/opentelemetry.d.ts +1 -0
- package/dist/telemetry/opentelemetry.d.ts.map +1 -0
- package/dist/tools/constants.d.ts +1 -0
- package/dist/tools/constants.d.ts.map +1 -0
- package/dist/tools/definitions.d.ts +8 -1
- package/dist/tools/definitions.d.ts.map +1 -0
- package/dist/tools/executors/apply-patch-parser.d.ts +1 -0
- package/dist/tools/executors/apply-patch-parser.d.ts.map +1 -0
- package/dist/tools/executors/apply-patch.d.ts +1 -0
- package/dist/tools/executors/apply-patch.d.ts.map +1 -0
- package/dist/tools/executors/bash.d.ts +2 -1
- package/dist/tools/executors/bash.d.ts.map +1 -0
- package/dist/tools/executors/editor.d.ts +1 -0
- package/dist/tools/executors/editor.d.ts.map +1 -0
- package/dist/tools/executors/file-read.d.ts +1 -0
- package/dist/tools/executors/file-read.d.ts.map +1 -0
- package/dist/tools/executors/index.d.ts +14 -7
- package/dist/tools/executors/index.d.ts.map +1 -0
- package/dist/tools/executors/search.d.ts +1 -0
- package/dist/tools/executors/search.d.ts.map +1 -0
- package/dist/tools/executors/web-fetch.d.ts +1 -0
- package/dist/tools/executors/web-fetch.d.ts.map +1 -0
- package/dist/tools/helpers.d.ts +15 -0
- package/dist/tools/helpers.d.ts.map +1 -0
- package/dist/tools/index.d.ts +2 -1
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/model-tool-routing.d.ts +1 -0
- package/dist/tools/model-tool-routing.d.ts.map +1 -0
- package/dist/tools/presets.d.ts +1 -0
- package/dist/tools/presets.d.ts.map +1 -0
- package/dist/tools/schemas.d.ts +41 -0
- package/dist/tools/schemas.d.ts.map +1 -0
- package/dist/tools/types.d.ts +3 -2
- package/dist/tools/types.d.ts.map +1 -0
- package/dist/types/common.d.ts +1 -0
- package/dist/types/common.d.ts.map +1 -0
- package/dist/types/config.d.ts +1 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/events.d.ts +1 -0
- package/dist/types/events.d.ts.map +1 -0
- package/dist/types/provider-settings.d.ts +1 -0
- package/dist/types/provider-settings.d.ts.map +1 -0
- package/dist/types/sessions.d.ts +1 -0
- package/dist/types/sessions.d.ts.map +1 -0
- package/dist/types/storage.d.ts +1 -0
- package/dist/types/storage.d.ts.map +1 -0
- package/dist/types/workspace.d.ts +1 -0
- package/dist/types/workspace.d.ts.map +1 -0
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +6 -4
- package/src/account/cline-account-service.test.ts +0 -101
- package/src/account/cline-account-service.ts +0 -287
- package/src/account/index.ts +0 -22
- package/src/account/rpc.test.ts +0 -62
- package/src/account/rpc.ts +0 -172
- package/src/account/types.ts +0 -98
- package/src/agents/agent-config-loader.test.ts +0 -236
- package/src/agents/agent-config-loader.ts +0 -108
- package/src/agents/agent-config-parser.ts +0 -198
- package/src/agents/hooks-config-loader.test.ts +0 -20
- package/src/agents/hooks-config-loader.ts +0 -118
- package/src/agents/index.ts +0 -85
- package/src/agents/plugin-config-loader.test.ts +0 -140
- package/src/agents/plugin-config-loader.ts +0 -97
- package/src/agents/plugin-loader.test.ts +0 -228
- package/src/agents/plugin-loader.ts +0 -172
- package/src/agents/plugin-sandbox-bootstrap.ts +0 -445
- package/src/agents/plugin-sandbox.test.ts +0 -317
- package/src/agents/plugin-sandbox.ts +0 -341
- package/src/agents/unified-config-file-watcher.test.ts +0 -196
- package/src/agents/unified-config-file-watcher.ts +0 -483
- package/src/agents/user-instruction-config-loader.test.ts +0 -158
- package/src/agents/user-instruction-config-loader.ts +0 -438
- package/src/auth/client.test.ts +0 -40
- package/src/auth/client.ts +0 -25
- package/src/auth/cline.test.ts +0 -130
- package/src/auth/cline.ts +0 -420
- package/src/auth/codex.test.ts +0 -170
- package/src/auth/codex.ts +0 -491
- package/src/auth/oca.test.ts +0 -215
- package/src/auth/oca.ts +0 -573
- package/src/auth/server.ts +0 -216
- package/src/auth/types.ts +0 -81
- package/src/auth/utils.test.ts +0 -128
- package/src/auth/utils.ts +0 -247
- package/src/chat/chat-schema.ts +0 -82
- package/src/index.node.ts +0 -285
- package/src/index.ts +0 -211
- package/src/input/file-indexer.d.ts +0 -11
- package/src/input/file-indexer.test.ts +0 -127
- package/src/input/file-indexer.ts +0 -327
- package/src/input/index.ts +0 -7
- package/src/input/mention-enricher.test.ts +0 -85
- package/src/input/mention-enricher.ts +0 -122
- package/src/mcp/config-loader.test.ts +0 -238
- package/src/mcp/config-loader.ts +0 -219
- package/src/mcp/index.ts +0 -26
- package/src/mcp/manager.test.ts +0 -106
- package/src/mcp/manager.ts +0 -262
- package/src/mcp/types.ts +0 -88
- package/src/providers/local-provider-service.ts +0 -608
- package/src/runtime/commands.test.ts +0 -98
- package/src/runtime/commands.ts +0 -83
- package/src/runtime/hook-file-hooks.test.ts +0 -237
- package/src/runtime/hook-file-hooks.ts +0 -859
- package/src/runtime/index.ts +0 -37
- package/src/runtime/rules.ts +0 -34
- package/src/runtime/runtime-builder.team-persistence.test.ts +0 -202
- package/src/runtime/runtime-builder.test.ts +0 -371
- package/src/runtime/runtime-builder.ts +0 -589
- package/src/runtime/runtime-parity.test.ts +0 -143
- package/src/runtime/sandbox/subprocess-sandbox.ts +0 -231
- package/src/runtime/session-runtime.ts +0 -46
- package/src/runtime/skills.ts +0 -44
- package/src/runtime/tool-approval.ts +0 -104
- package/src/runtime/workflows.test.ts +0 -119
- package/src/runtime/workflows.ts +0 -45
- package/src/session/default-session-manager.e2e.test.ts +0 -384
- package/src/session/default-session-manager.test.ts +0 -1741
- package/src/session/default-session-manager.ts +0 -1233
- package/src/session/file-session-service.ts +0 -280
- package/src/session/index.ts +0 -42
- package/src/session/rpc-session-service.ts +0 -107
- package/src/session/rpc-spawn-lease.test.ts +0 -49
- package/src/session/rpc-spawn-lease.ts +0 -122
- package/src/session/runtime-oauth-token-manager.test.ts +0 -137
- package/src/session/runtime-oauth-token-manager.ts +0 -272
- package/src/session/session-agent-events.ts +0 -159
- package/src/session/session-artifacts.ts +0 -106
- package/src/session/session-config-builder.ts +0 -113
- package/src/session/session-graph.ts +0 -92
- package/src/session/session-host.test.ts +0 -29
- package/src/session/session-host.ts +0 -242
- package/src/session/session-manager.ts +0 -69
- package/src/session/session-manifest.ts +0 -29
- package/src/session/session-service.team-persistence.test.ts +0 -48
- package/src/session/session-service.ts +0 -673
- package/src/session/session-team-coordination.ts +0 -229
- package/src/session/session-telemetry.ts +0 -95
- package/src/session/sqlite-rpc-session-backend.ts +0 -303
- package/src/session/unified-session-persistence-service.test.ts +0 -85
- package/src/session/unified-session-persistence-service.ts +0 -996
- package/src/session/utils/helpers.ts +0 -139
- package/src/session/utils/types.ts +0 -57
- package/src/session/utils/usage.ts +0 -32
- package/src/session/workspace-manager.ts +0 -98
- package/src/session/workspace-manifest.ts +0 -100
- package/src/storage/artifact-store.ts +0 -1
- package/src/storage/file-team-store.ts +0 -257
- package/src/storage/index.ts +0 -11
- package/src/storage/provider-settings-legacy-migration.test.ts +0 -307
- package/src/storage/provider-settings-legacy-migration.ts +0 -689
- package/src/storage/provider-settings-manager.test.ts +0 -145
- package/src/storage/provider-settings-manager.ts +0 -150
- package/src/storage/session-store.ts +0 -1
- package/src/storage/sqlite-session-store.ts +0 -275
- package/src/storage/sqlite-team-store.ts +0 -454
- package/src/storage/team-store.ts +0 -40
- package/src/team/index.ts +0 -4
- package/src/team/projections.ts +0 -285
- package/src/telemetry/ITelemetryAdapter.ts +0 -94
- package/src/telemetry/LoggerTelemetryAdapter.test.ts +0 -42
- package/src/telemetry/LoggerTelemetryAdapter.ts +0 -114
- package/src/telemetry/OpenTelemetryAdapter.test.ts +0 -157
- package/src/telemetry/OpenTelemetryAdapter.ts +0 -348
- package/src/telemetry/OpenTelemetryProvider.test.ts +0 -113
- package/src/telemetry/OpenTelemetryProvider.ts +0 -322
- package/src/telemetry/TelemetryService.test.ts +0 -134
- package/src/telemetry/TelemetryService.ts +0 -141
- package/src/telemetry/core-events.ts +0 -344
- package/src/telemetry/opentelemetry.ts +0 -20
- package/src/tools/constants.ts +0 -35
- package/src/tools/definitions.test.ts +0 -658
- package/src/tools/definitions.ts +0 -726
- package/src/tools/executors/apply-patch-parser.ts +0 -520
- package/src/tools/executors/apply-patch.ts +0 -359
- package/src/tools/executors/bash.ts +0 -205
- package/src/tools/executors/editor.test.ts +0 -35
- package/src/tools/executors/editor.ts +0 -219
- package/src/tools/executors/file-read.test.ts +0 -49
- package/src/tools/executors/file-read.ts +0 -110
- package/src/tools/executors/index.ts +0 -75
- package/src/tools/executors/search.ts +0 -278
- package/src/tools/executors/web-fetch.ts +0 -259
- package/src/tools/index.ts +0 -168
- package/src/tools/model-tool-routing.test.ts +0 -86
- package/src/tools/model-tool-routing.ts +0 -132
- package/src/tools/presets.test.ts +0 -62
- package/src/tools/presets.ts +0 -168
- package/src/tools/schemas.ts +0 -284
- package/src/tools/types.ts +0 -328
- package/src/types/common.ts +0 -14
- package/src/types/config.ts +0 -84
- package/src/types/events.ts +0 -74
- package/src/types/index.ts +0 -24
- package/src/types/provider-settings.ts +0 -43
- package/src/types/sessions.ts +0 -16
- package/src/types/storage.ts +0 -64
- package/src/types/workspace.ts +0 -7
- package/src/types.ts +0 -128
package/src/types/events.ts
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
export interface SessionChunkEvent {
|
|
2
|
-
sessionId: string;
|
|
3
|
-
stream: "stdout" | "stderr" | "agent";
|
|
4
|
-
chunk: string;
|
|
5
|
-
ts: number;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface SessionEndedEvent {
|
|
9
|
-
sessionId: string;
|
|
10
|
-
reason: string;
|
|
11
|
-
ts: number;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface SessionToolEvent {
|
|
15
|
-
sessionId: string;
|
|
16
|
-
hookEventName:
|
|
17
|
-
| "tool_call"
|
|
18
|
-
| "tool_result"
|
|
19
|
-
| "agent_end"
|
|
20
|
-
| "agent_error"
|
|
21
|
-
| "session_shutdown";
|
|
22
|
-
agentId?: string;
|
|
23
|
-
conversationId?: string;
|
|
24
|
-
parentAgentId?: string;
|
|
25
|
-
iteration?: number;
|
|
26
|
-
toolName?: string;
|
|
27
|
-
inputTokens?: number;
|
|
28
|
-
outputTokens?: number;
|
|
29
|
-
ts?: string;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export interface SessionTeamProgressEvent {
|
|
33
|
-
sessionId: string;
|
|
34
|
-
teamName: string;
|
|
35
|
-
lifecycle: import("@clinebot/shared").TeamProgressLifecycleEvent;
|
|
36
|
-
summary: import("@clinebot/shared").TeamProgressSummary;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export interface SessionPendingPromptsEvent {
|
|
40
|
-
sessionId: string;
|
|
41
|
-
prompts: Array<{
|
|
42
|
-
id: string;
|
|
43
|
-
prompt: string;
|
|
44
|
-
delivery: "queue" | "steer";
|
|
45
|
-
attachmentCount: number;
|
|
46
|
-
}>;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export interface SessionPendingPromptSubmittedEvent {
|
|
50
|
-
sessionId: string;
|
|
51
|
-
id: string;
|
|
52
|
-
prompt: string;
|
|
53
|
-
delivery: "queue" | "steer";
|
|
54
|
-
attachmentCount: number;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export type CoreSessionEvent =
|
|
58
|
-
| { type: "chunk"; payload: SessionChunkEvent }
|
|
59
|
-
| {
|
|
60
|
-
type: "agent_event";
|
|
61
|
-
payload: {
|
|
62
|
-
sessionId: string;
|
|
63
|
-
event: import("@clinebot/agents").AgentEvent;
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
| { type: "team_progress"; payload: SessionTeamProgressEvent }
|
|
67
|
-
| { type: "pending_prompts"; payload: SessionPendingPromptsEvent }
|
|
68
|
-
| {
|
|
69
|
-
type: "pending_prompt_submitted";
|
|
70
|
-
payload: SessionPendingPromptSubmittedEvent;
|
|
71
|
-
}
|
|
72
|
-
| { type: "ended"; payload: SessionEndedEvent }
|
|
73
|
-
| { type: "hook"; payload: SessionToolEvent }
|
|
74
|
-
| { type: "status"; payload: { sessionId: string; status: string } };
|
package/src/types/index.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export type { SessionSource, SessionStatus } from "./common";
|
|
2
|
-
export type {
|
|
3
|
-
CoreAgentMode,
|
|
4
|
-
CoreModelConfig,
|
|
5
|
-
CoreRuntimeFeatures,
|
|
6
|
-
CoreSessionConfig,
|
|
7
|
-
} from "./config";
|
|
8
|
-
export type {
|
|
9
|
-
CoreSessionEvent,
|
|
10
|
-
SessionChunkEvent,
|
|
11
|
-
SessionEndedEvent,
|
|
12
|
-
SessionTeamProgressEvent,
|
|
13
|
-
SessionToolEvent,
|
|
14
|
-
} from "./events";
|
|
15
|
-
export type {
|
|
16
|
-
ProviderConfig,
|
|
17
|
-
ProviderSettings,
|
|
18
|
-
ProviderTokenSource,
|
|
19
|
-
StoredProviderSettings,
|
|
20
|
-
StoredProviderSettingsEntry,
|
|
21
|
-
} from "./provider-settings";
|
|
22
|
-
export type { SessionRecord, SessionRef } from "./sessions";
|
|
23
|
-
export type { ArtifactStore, SessionStore, TeamStore } from "./storage";
|
|
24
|
-
export type { WorkspaceInfo } from "./workspace";
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { LlmsProviders } from "@clinebot/llms";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
|
|
4
|
-
export type ProviderConfig = LlmsProviders.ProviderConfig;
|
|
5
|
-
export type ProviderSettings = LlmsProviders.ProviderSettings;
|
|
6
|
-
export const ProviderSettingsSchema: z.ZodType<ProviderSettings> =
|
|
7
|
-
LlmsProviders.ProviderSettingsSchema;
|
|
8
|
-
export const toProviderConfig = LlmsProviders.toProviderConfig;
|
|
9
|
-
|
|
10
|
-
export type ProviderTokenSource = "manual" | "oauth" | "migration";
|
|
11
|
-
|
|
12
|
-
export interface StoredProviderSettingsEntry {
|
|
13
|
-
settings: ProviderSettings;
|
|
14
|
-
updatedAt: string;
|
|
15
|
-
tokenSource: ProviderTokenSource;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface StoredProviderSettings {
|
|
19
|
-
version: 1;
|
|
20
|
-
lastUsedProvider?: string;
|
|
21
|
-
providers: Record<string, StoredProviderSettingsEntry>;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export const StoredProviderSettingsEntrySchema: z.ZodType<StoredProviderSettingsEntry> =
|
|
25
|
-
z.object({
|
|
26
|
-
settings: LlmsProviders.ProviderSettingsSchema,
|
|
27
|
-
updatedAt: z.string().datetime(),
|
|
28
|
-
tokenSource: z.enum(["manual", "oauth", "migration"]).default("manual"),
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
export const StoredProviderSettingsSchema: z.ZodType<StoredProviderSettings> =
|
|
32
|
-
z.object({
|
|
33
|
-
version: z.literal(1),
|
|
34
|
-
lastUsedProvider: z.string().min(1).optional(),
|
|
35
|
-
providers: z.record(z.string(), StoredProviderSettingsEntrySchema),
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
export function emptyStoredProviderSettings(): StoredProviderSettings {
|
|
39
|
-
return {
|
|
40
|
-
version: 1,
|
|
41
|
-
providers: {},
|
|
42
|
-
};
|
|
43
|
-
}
|
package/src/types/sessions.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
SessionLineage,
|
|
3
|
-
SessionRuntimeRecordShape,
|
|
4
|
-
} from "@clinebot/shared";
|
|
5
|
-
import type { SessionSource, SessionStatus } from "./common";
|
|
6
|
-
|
|
7
|
-
export interface SessionRef extends SessionLineage {
|
|
8
|
-
sessionId: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface SessionRecord
|
|
12
|
-
extends SessionRef,
|
|
13
|
-
Omit<SessionRuntimeRecordShape, "source" | "status"> {
|
|
14
|
-
source: SessionSource;
|
|
15
|
-
status: SessionStatus;
|
|
16
|
-
}
|
package/src/types/storage.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
TeamEvent,
|
|
3
|
-
TeamRuntimeState,
|
|
4
|
-
TeamTeammateSpec,
|
|
5
|
-
} from "@clinebot/agents";
|
|
6
|
-
import type { SessionStatus } from "./common";
|
|
7
|
-
import type { SessionRecord } from "./sessions";
|
|
8
|
-
|
|
9
|
-
export interface SessionStore {
|
|
10
|
-
init(): Promise<void> | void;
|
|
11
|
-
create(record: SessionRecord): Promise<void> | void;
|
|
12
|
-
updateStatus(
|
|
13
|
-
sessionId: string,
|
|
14
|
-
status: SessionStatus,
|
|
15
|
-
exitCode?: number | null,
|
|
16
|
-
): Promise<void> | void;
|
|
17
|
-
update(
|
|
18
|
-
record: Partial<SessionRecord> & { sessionId: string },
|
|
19
|
-
): Promise<void> | void;
|
|
20
|
-
get(
|
|
21
|
-
sessionId: string,
|
|
22
|
-
): Promise<SessionRecord | undefined> | SessionRecord | undefined;
|
|
23
|
-
list(limit?: number): Promise<SessionRecord[]> | SessionRecord[];
|
|
24
|
-
delete(sessionId: string, cascade?: boolean): Promise<boolean> | boolean;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface TeamStore {
|
|
28
|
-
listTeamNames(): Promise<string[]> | string[];
|
|
29
|
-
readState(
|
|
30
|
-
teamName: string,
|
|
31
|
-
): Promise<TeamRuntimeState | undefined> | TeamRuntimeState | undefined;
|
|
32
|
-
readHistory(teamName: string, limit?: number): Promise<unknown[]> | unknown[];
|
|
33
|
-
loadRuntime(teamName: string):
|
|
34
|
-
| Promise<{
|
|
35
|
-
state?: TeamRuntimeState;
|
|
36
|
-
teammates: TeamTeammateSpec[];
|
|
37
|
-
interruptedRunIds: string[];
|
|
38
|
-
}>
|
|
39
|
-
| {
|
|
40
|
-
state?: TeamRuntimeState;
|
|
41
|
-
teammates: TeamTeammateSpec[];
|
|
42
|
-
interruptedRunIds: string[];
|
|
43
|
-
};
|
|
44
|
-
handleTeamEvent(teamName: string, event: TeamEvent): Promise<void> | void;
|
|
45
|
-
persistRuntime(
|
|
46
|
-
teamName: string,
|
|
47
|
-
state: TeamRuntimeState,
|
|
48
|
-
teammates: TeamTeammateSpec[],
|
|
49
|
-
): Promise<void> | void;
|
|
50
|
-
markInProgressRunsInterrupted(
|
|
51
|
-
teamName: string,
|
|
52
|
-
reason: string,
|
|
53
|
-
): Promise<string[]> | string[];
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export interface ArtifactStore {
|
|
57
|
-
appendTranscript(sessionId: string, text: string): Promise<void> | void;
|
|
58
|
-
appendHook(sessionId: string, payload: unknown): Promise<void> | void;
|
|
59
|
-
writeMessages(sessionId: string, messages: unknown[]): Promise<void> | void;
|
|
60
|
-
readTranscript(
|
|
61
|
-
sessionId: string,
|
|
62
|
-
maxChars?: number,
|
|
63
|
-
): Promise<string> | string;
|
|
64
|
-
}
|
package/src/types/workspace.ts
DELETED
package/src/types.ts
DELETED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import type { LlmsProviders } from "@clinebot/llms";
|
|
2
|
-
import type { CoreSessionEvent } from "./types/events";
|
|
3
|
-
|
|
4
|
-
export type {
|
|
5
|
-
AgentConfigWatcher,
|
|
6
|
-
AgentConfigWatcherEvent,
|
|
7
|
-
AgentYamlConfig,
|
|
8
|
-
BuildAgentConfigOverridesOptions,
|
|
9
|
-
CreateAgentConfigWatcherOptions,
|
|
10
|
-
CreateInstructionWatcherOptions,
|
|
11
|
-
CreateRulesConfigDefinitionOptions,
|
|
12
|
-
CreateSkillsConfigDefinitionOptions,
|
|
13
|
-
CreateUserInstructionConfigWatcherOptions,
|
|
14
|
-
CreateWorkflowsConfigDefinitionOptions,
|
|
15
|
-
LoadAgentPluginFromPathOptions,
|
|
16
|
-
ParseMarkdownFrontmatterResult,
|
|
17
|
-
ParseYamlFrontmatterResult,
|
|
18
|
-
ResolveAgentPluginPathsOptions,
|
|
19
|
-
RuleConfig,
|
|
20
|
-
SkillConfig,
|
|
21
|
-
UnifiedConfigDefinition,
|
|
22
|
-
UnifiedConfigFileCandidate,
|
|
23
|
-
UnifiedConfigFileContext,
|
|
24
|
-
UnifiedConfigRecord,
|
|
25
|
-
UnifiedConfigWatcherEvent,
|
|
26
|
-
UnifiedConfigWatcherOptions,
|
|
27
|
-
UserInstructionConfig,
|
|
28
|
-
UserInstructionConfigType,
|
|
29
|
-
UserInstructionConfigWatcher,
|
|
30
|
-
UserInstructionConfigWatcherEvent,
|
|
31
|
-
WorkflowConfig,
|
|
32
|
-
} from "./agents";
|
|
33
|
-
export {
|
|
34
|
-
createAgentConfigDefinition,
|
|
35
|
-
createAgentConfigWatcher,
|
|
36
|
-
createRulesConfigDefinition,
|
|
37
|
-
createSkillsConfigDefinition,
|
|
38
|
-
createUserInstructionConfigWatcher,
|
|
39
|
-
createWorkflowsConfigDefinition,
|
|
40
|
-
discoverPluginModulePaths,
|
|
41
|
-
loadAgentPluginFromPath,
|
|
42
|
-
loadAgentPluginsFromPaths,
|
|
43
|
-
parseAgentConfigFromYaml,
|
|
44
|
-
parsePartialAgentConfigFromYaml,
|
|
45
|
-
parseRuleConfigFromMarkdown,
|
|
46
|
-
parseSkillConfigFromMarkdown,
|
|
47
|
-
parseWorkflowConfigFromMarkdown,
|
|
48
|
-
RULES_CONFIG_DIRECTORY_NAME,
|
|
49
|
-
resolveAgentPluginPaths,
|
|
50
|
-
resolveAgentTools,
|
|
51
|
-
resolveAndLoadAgentPlugins,
|
|
52
|
-
resolveDocumentsRulesDirectoryPath,
|
|
53
|
-
resolveDocumentsWorkflowsDirectoryPath,
|
|
54
|
-
resolvePluginConfigSearchPaths,
|
|
55
|
-
resolveRulesConfigSearchPaths,
|
|
56
|
-
resolveSkillsConfigSearchPaths,
|
|
57
|
-
resolveWorkflowsConfigSearchPaths,
|
|
58
|
-
SKILLS_CONFIG_DIRECTORY_NAME,
|
|
59
|
-
toPartialAgentConfig,
|
|
60
|
-
UnifiedConfigFileWatcher,
|
|
61
|
-
WORKFLOWS_CONFIG_DIRECTORY_NAME,
|
|
62
|
-
} from "./agents";
|
|
63
|
-
export type {
|
|
64
|
-
ChatMessage,
|
|
65
|
-
ChatSessionConfig,
|
|
66
|
-
ChatSessionStatus,
|
|
67
|
-
ChatSummary,
|
|
68
|
-
ChatViewState,
|
|
69
|
-
} from "./chat/chat-schema";
|
|
70
|
-
export type {
|
|
71
|
-
SandboxCallOptions,
|
|
72
|
-
SubprocessSandboxOptions,
|
|
73
|
-
} from "./runtime/sandbox/subprocess-sandbox";
|
|
74
|
-
export { SubprocessSandbox } from "./runtime/sandbox/subprocess-sandbox";
|
|
75
|
-
export type {
|
|
76
|
-
BuiltRuntime as RuntimeEnvironment,
|
|
77
|
-
RuntimeBuilder,
|
|
78
|
-
RuntimeBuilderInput,
|
|
79
|
-
SessionRuntime,
|
|
80
|
-
} from "./runtime/session-runtime";
|
|
81
|
-
export type {
|
|
82
|
-
CreateSessionHostOptions,
|
|
83
|
-
SessionHost,
|
|
84
|
-
} from "./session/session-host";
|
|
85
|
-
export type {
|
|
86
|
-
SendSessionInput,
|
|
87
|
-
SessionAccumulatedUsage,
|
|
88
|
-
SessionManager,
|
|
89
|
-
StartSessionInput,
|
|
90
|
-
StartSessionResult,
|
|
91
|
-
} from "./session/session-manager";
|
|
92
|
-
export type { SessionManifest } from "./session/session-manifest";
|
|
93
|
-
export type {
|
|
94
|
-
CreateRootSessionWithArtifactsInput,
|
|
95
|
-
RootSessionArtifacts,
|
|
96
|
-
} from "./session/session-service";
|
|
97
|
-
export type {
|
|
98
|
-
WorkspaceManager,
|
|
99
|
-
WorkspaceManagerEvent,
|
|
100
|
-
} from "./session/workspace-manager";
|
|
101
|
-
export type { WorkspaceManifest } from "./session/workspace-manifest";
|
|
102
|
-
export type { SessionSource, SessionStatus } from "./types/common";
|
|
103
|
-
export type {
|
|
104
|
-
CoreAgentMode,
|
|
105
|
-
CoreModelConfig,
|
|
106
|
-
CoreRuntimeFeatures,
|
|
107
|
-
CoreSessionConfig,
|
|
108
|
-
} from "./types/config";
|
|
109
|
-
export type {
|
|
110
|
-
CoreSessionEvent,
|
|
111
|
-
SessionChunkEvent,
|
|
112
|
-
SessionEndedEvent,
|
|
113
|
-
SessionTeamProgressEvent,
|
|
114
|
-
SessionToolEvent,
|
|
115
|
-
} from "./types/events";
|
|
116
|
-
export type { SessionRecord, SessionRef } from "./types/sessions";
|
|
117
|
-
export type { ArtifactStore, SessionStore, TeamStore } from "./types/storage";
|
|
118
|
-
export type { WorkspaceInfo } from "./types/workspace";
|
|
119
|
-
|
|
120
|
-
// Backward-compat alias used by CLI persistence.
|
|
121
|
-
export interface StoredMessages {
|
|
122
|
-
version: 1;
|
|
123
|
-
updatedAt: string;
|
|
124
|
-
messages: LlmsProviders.MessageWithMetadata[];
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
// Backward-compat alias with previous event naming.
|
|
128
|
-
export type SessionEvent = CoreSessionEvent;
|