taskplane 0.29.2 → 0.30.0
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/bin/gitignore-patterns.mjs +11 -8
- package/bin/rpc-wrapper.mjs +410 -357
- package/bin/taskplane.mjs +533 -250
- package/extensions/reviewer-extension.ts +17 -11
- package/extensions/taskplane/abort.ts +50 -18
- package/extensions/taskplane/agent-bridge-extension.ts +232 -105
- package/extensions/taskplane/agent-host.ts +224 -97
- package/extensions/taskplane/cleanup.ts +71 -42
- package/extensions/taskplane/config-loader.ts +142 -58
- package/extensions/taskplane/config-schema.ts +6 -13
- package/extensions/taskplane/config.ts +10 -2
- package/extensions/taskplane/diagnostic-reports.ts +59 -47
- package/extensions/taskplane/diagnostics.ts +13 -13
- package/extensions/taskplane/discovery.ts +35 -61
- package/extensions/taskplane/engine-worker.ts +53 -46
- package/extensions/taskplane/engine.ts +1760 -602
- package/extensions/taskplane/execution.ts +426 -206
- package/extensions/taskplane/extension.ts +1073 -598
- package/extensions/taskplane/formatting.ts +136 -124
- package/extensions/taskplane/git.ts +0 -2
- package/extensions/taskplane/lane-runner.ts +542 -311
- package/extensions/taskplane/mailbox.ts +57 -49
- package/extensions/taskplane/merge.ts +662 -383
- package/extensions/taskplane/messages.ts +109 -51
- package/extensions/taskplane/migrations.ts +1 -1
- package/extensions/taskplane/path-resolver.ts +8 -9
- package/extensions/taskplane/persistence.ts +425 -262
- package/extensions/taskplane/process-registry.ts +36 -7
- package/extensions/taskplane/quality-gate.ts +107 -55
- package/extensions/taskplane/resume.ts +774 -267
- package/extensions/taskplane/sessions.ts +1 -1
- package/extensions/taskplane/settings-tui.ts +505 -164
- package/extensions/taskplane/sidecar-telemetry.ts +25 -10
- package/extensions/taskplane/supervisor.ts +477 -270
- package/extensions/taskplane/task-executor-core.ts +178 -53
- package/extensions/taskplane/types.ts +186 -108
- package/extensions/taskplane/verification.ts +27 -22
- package/extensions/taskplane/waves.ts +59 -43
- package/extensions/taskplane/workspace.ts +14 -12
- package/extensions/taskplane/worktree.ts +218 -196
- package/package.json +14 -2
|
@@ -107,12 +107,25 @@ export interface SidecarTelemetryDelta {
|
|
|
107
107
|
*
|
|
108
108
|
* The caller (poll loop) accumulates the returned deltas into TaskState.
|
|
109
109
|
*/
|
|
110
|
-
export function tailSidecarJsonl(
|
|
110
|
+
export function tailSidecarJsonl(
|
|
111
|
+
filePath: string,
|
|
112
|
+
tailState: SidecarTailState,
|
|
113
|
+
): SidecarTelemetryDelta {
|
|
111
114
|
const delta: SidecarTelemetryDelta = {
|
|
112
|
-
inputTokens: 0,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
115
|
+
inputTokens: 0,
|
|
116
|
+
outputTokens: 0,
|
|
117
|
+
cacheReadTokens: 0,
|
|
118
|
+
cacheWriteTokens: 0,
|
|
119
|
+
cost: 0,
|
|
120
|
+
latestTotalTokens: 0,
|
|
121
|
+
toolCalls: 0,
|
|
122
|
+
lastTool: "",
|
|
123
|
+
retryActive: tailState.retryActive,
|
|
124
|
+
retriesStarted: 0,
|
|
125
|
+
lastRetryError: "",
|
|
126
|
+
hadEvents: false,
|
|
127
|
+
contextUsage: null,
|
|
128
|
+
sawStatsResponseWithoutContextUsage: false,
|
|
116
129
|
};
|
|
117
130
|
|
|
118
131
|
// Gracefully handle missing file (wrapper hasn't written yet)
|
|
@@ -176,16 +189,18 @@ export function tailSidecarJsonl(filePath: string, tailState: SidecarTailState):
|
|
|
176
189
|
delta.cacheReadTokens += usage.cacheRead || 0;
|
|
177
190
|
delta.cacheWriteTokens += usage.cacheWrite || 0;
|
|
178
191
|
if (usage.cost) {
|
|
179
|
-
delta.cost +=
|
|
180
|
-
|
|
181
|
-
|
|
192
|
+
delta.cost +=
|
|
193
|
+
typeof usage.cost === "object"
|
|
194
|
+
? usage.cost.total || 0
|
|
195
|
+
: typeof usage.cost === "number"
|
|
196
|
+
? usage.cost
|
|
197
|
+
: 0;
|
|
182
198
|
}
|
|
183
199
|
// totalTokens is cumulative (grows each turn) — use latest value.
|
|
184
200
|
// Include cacheRead tokens: pi's totalTokens and the
|
|
185
201
|
// input+output fallback both exclude cache reads, but cached
|
|
186
202
|
// tokens still consume context window capacity.
|
|
187
|
-
const rawTotal = usage.totalTokens
|
|
188
|
-
|| ((usage.input || 0) + (usage.output || 0));
|
|
203
|
+
const rawTotal = usage.totalTokens || (usage.input || 0) + (usage.output || 0);
|
|
189
204
|
const totalTokens = rawTotal + (usage.cacheRead || 0);
|
|
190
205
|
if (totalTokens > delta.latestTotalTokens) {
|
|
191
206
|
delta.latestTotalTokens = totalTokens;
|