@cline/core 0.0.77 → 0.0.79
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/extensions/tools/team/delegated-agent.d.ts +10 -0
- package/dist/hub/client/index.d.ts +20 -0
- package/dist/hub/daemon/entry.js +291 -241
- package/dist/hub/daemon/index.d.ts +21 -0
- package/dist/hub/discovery/instance-lock.d.ts +51 -0
- package/dist/hub/index.d.ts +3 -0
- package/dist/hub/index.js +283 -234
- package/dist/hub/server/command-transport.d.ts +9 -0
- package/dist/hub/server/handlers/approval-handlers.d.ts +8 -1
- package/dist/hub/server/handlers/context.d.ts +13 -0
- package/dist/hub/server/handlers/run-queue-handlers.d.ts +33 -0
- package/dist/hub/server/hub-event-log.d.ts +57 -0
- package/dist/hub/server/hub-run-queue.d.ts +82 -0
- package/dist/hub/server/hub-server-options.d.ts +10 -0
- package/dist/hub/server/hub-server-transport.d.ts +25 -0
- package/dist/hub/server/native-transport.d.ts +9 -0
- package/dist/index.js +283 -234
- package/dist/runtime/host/local-runtime-host.d.ts +32 -4
- package/dist/runtime/orchestration/session-runtime.d.ts +5 -0
- package/dist/types/session.d.ts +10 -3
- package/package.json +4 -4
|
@@ -42,6 +42,7 @@ export declare class LocalRuntimeHost implements RuntimeHost {
|
|
|
42
42
|
private readonly providerSettingsManager;
|
|
43
43
|
private readonly oauthTokenManager;
|
|
44
44
|
private readonly defaultTelemetry?;
|
|
45
|
+
private readonly distinctId;
|
|
45
46
|
private readonly defaultLogger?;
|
|
46
47
|
private readonly defaultFetch?;
|
|
47
48
|
private readonly events;
|
|
@@ -116,13 +117,40 @@ export declare class LocalRuntimeHost implements RuntimeHost {
|
|
|
116
117
|
* `attempt_completion`-driven emission and works for both interactive
|
|
117
118
|
* and non-interactive sessions.
|
|
118
119
|
*
|
|
119
|
-
* `
|
|
120
|
-
* sessions that finish without an explicit completion-tool
|
|
121
|
-
* (e.g., non-interactive runs not using the yolo preset
|
|
122
|
-
*
|
|
120
|
+
* `emitTaskCompletedOnTeardown(...)` retains a fallback emission for
|
|
121
|
+
* completed sessions that finish without an explicit completion-tool
|
|
122
|
+
* observation (e.g., non-interactive runs not using the yolo preset,
|
|
123
|
+
* or hosts that disable `submit_and_exit` entirely). This helper sets
|
|
124
|
+
* `taskCompletedEmitted` so the teardown fallback can suppress a
|
|
123
125
|
* duplicate emission for the same logical completion.
|
|
124
126
|
*/
|
|
125
127
|
private observeTaskCompletionTool;
|
|
128
|
+
/**
|
|
129
|
+
* Single choke point for the fallback `task.completed` emission on
|
|
130
|
+
* session teardown. Every path a session can end through funnels into
|
|
131
|
+
* `shutdownSession(...)` or `releaseSessionRuntime(...)`, and BOTH must
|
|
132
|
+
* call this helper — the emission must never depend on which teardown
|
|
133
|
+
* branch a stop happens to route through. (The 4.1.11 regression:
|
|
134
|
+
* truthful session-status reporting re-routed many interactive stops
|
|
135
|
+
* onto the release branch, and the fallback that lived only inside
|
|
136
|
+
* `shutdownSession` silently stopped firing for them.)
|
|
137
|
+
*
|
|
138
|
+
* Emits at most once per session (`taskCompletedEmitted`), and never
|
|
139
|
+
* after the `submit_and_exit` observer already reported the completion.
|
|
140
|
+
* The completion criterion deliberately does not read `session.status`
|
|
141
|
+
* (whose lifecycle is what changed in 4.1.11):
|
|
142
|
+
*
|
|
143
|
+
* - Interactive sessions use the recorded final-turn outcome,
|
|
144
|
+
* `lastInteractiveTurnFinishReason === "completed"`. The extra guards
|
|
145
|
+
* suppress emission when teardown arrives mid-run (the in-flight turn
|
|
146
|
+
* being aborted is the real final turn, and it did not complete).
|
|
147
|
+
* - Non-interactive sessions use the terminal status their run result
|
|
148
|
+
* resolved to (`finalStatus`, from `finalizeSingleRun`), preserving
|
|
149
|
+
* the pre-existing `input.status === "completed"` semantics.
|
|
150
|
+
*
|
|
151
|
+
* Sessions whose final turn errored or aborted emit nothing.
|
|
152
|
+
*/
|
|
153
|
+
private emitTaskCompletedOnTeardown;
|
|
126
154
|
private prepareTurnInput;
|
|
127
155
|
private ensureSessionPersisted;
|
|
128
156
|
private markTurnRunning;
|
|
@@ -32,6 +32,11 @@ export interface BuiltRuntime {
|
|
|
32
32
|
}
|
|
33
33
|
export interface RuntimeBuilderInput {
|
|
34
34
|
config: CoreSessionConfig;
|
|
35
|
+
/**
|
|
36
|
+
* Host-resolved stable end-user identity, forwarded so delegated agents
|
|
37
|
+
* (sub-agents / teammates) emit the same telemetry `userId` as the lead.
|
|
38
|
+
*/
|
|
39
|
+
distinctId?: string;
|
|
35
40
|
hooks?: AgentHooks;
|
|
36
41
|
extensions?: AgentConfig["extensions"];
|
|
37
42
|
onTeamEvent?: (event: TeamEvent) => void;
|
package/dist/types/session.d.ts
CHANGED
|
@@ -47,14 +47,21 @@ export type ActiveSession = {
|
|
|
47
47
|
* declares completion (parity with original Cline's
|
|
48
48
|
* `attempt_completion`).
|
|
49
49
|
* 2. Suppress the fallback `task.completed` emission from
|
|
50
|
-
* `
|
|
51
|
-
* reported twice.
|
|
50
|
+
* `emitTaskCompletedOnTeardown(...)` so the same logical completion
|
|
51
|
+
* is not reported twice.
|
|
52
52
|
*
|
|
53
53
|
* Non-interactive sessions that finish without ever calling the
|
|
54
|
-
* completion tool still receive a `task.completed` from the
|
|
54
|
+
* completion tool still receive a `task.completed` from the teardown
|
|
55
55
|
* fallback.
|
|
56
56
|
*/
|
|
57
57
|
submitAndExitObserved: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Set to `true` the moment `task.completed` is emitted for this session,
|
|
60
|
+
* whether by the `submit_and_exit` observer or by the teardown fallback
|
|
61
|
+
* (`emitTaskCompletedOnTeardown`). Enforces the invariant of exactly one
|
|
62
|
+
* `task.completed` per session regardless of which teardown path runs.
|
|
63
|
+
*/
|
|
64
|
+
taskCompletedEmitted: boolean;
|
|
58
65
|
};
|
|
59
66
|
export type PendingPrompt = {
|
|
60
67
|
id: string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cline/core",
|
|
3
3
|
"description": "Cline Core SDK for Node Runtime",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.79",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/cline/cline",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"test:watch": "vitest --config vitest.config.ts"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@cline/agents": "0.0.
|
|
53
|
-
"@cline/shared": "0.0.
|
|
54
|
-
"@cline/llms": "0.0.
|
|
52
|
+
"@cline/agents": "0.0.79",
|
|
53
|
+
"@cline/shared": "0.0.79",
|
|
54
|
+
"@cline/llms": "0.0.79",
|
|
55
55
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
56
56
|
"@opentelemetry/api": "^1.9.0",
|
|
57
57
|
"@opentelemetry/api-logs": "^0.214.0",
|