@henryqw/pi-subagent 27.10.2 → 27.10.3
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/direct-herdr.d.ts +0 -5
- package/dist/direct-herdr.js +0 -15
- package/dist/git-runtime.d.ts +2 -2
- package/dist/runner.d.ts +6 -8
- package/package.json +1 -1
package/dist/direct-herdr.d.ts
CHANGED
|
@@ -39,11 +39,6 @@ export interface DirectToolActivity {
|
|
|
39
39
|
durationMs?: number;
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
export declare function directSessionUsage(jsonl: string, prompt: string): DirectUsage & {
|
|
43
|
-
activity?: DirectToolActivity;
|
|
44
|
-
};
|
|
45
|
-
/** The last `maxChars` of assistant text in the exact prompt's turn; ignores a partial trailing entry. */
|
|
46
|
-
export declare function directPartialText(jsonl: string, prompt: string, maxChars: number): string | undefined;
|
|
47
42
|
/** One reader per handle; only complete, valid lines advance the byte offset. */
|
|
48
43
|
export declare function createDirectSessionReader(sessionFile: string, prompt: string): Pick<DirectHandle, "usage" | "partialText" | "activity">;
|
|
49
44
|
/** `turn` is the prompt's random turn identity; it proves which session turn a record owns.
|
package/dist/direct-herdr.js
CHANGED
|
@@ -216,21 +216,6 @@ class DirectSessionState {
|
|
|
216
216
|
return chars.length <= maxChars ? chars.join("") : `…${chars.slice(-maxChars).join("")}`;
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
|
-
function parseDirectSession(jsonl, prompt) {
|
|
220
|
-
const state = new DirectSessionState(prompt);
|
|
221
|
-
for (const line of jsonl.split("\n"))
|
|
222
|
-
if (!state.consume(line))
|
|
223
|
-
break;
|
|
224
|
-
return state;
|
|
225
|
-
}
|
|
226
|
-
// Ignore a partial trailing JSONL entry while the child is writing it.
|
|
227
|
-
export function directSessionUsage(jsonl, prompt) {
|
|
228
|
-
return parseDirectSession(jsonl, prompt).usage();
|
|
229
|
-
}
|
|
230
|
-
/** The last `maxChars` of assistant text in the exact prompt's turn; ignores a partial trailing entry. */
|
|
231
|
-
export function directPartialText(jsonl, prompt, maxChars) {
|
|
232
|
-
return parseDirectSession(jsonl, prompt).partialText(maxChars);
|
|
233
|
-
}
|
|
234
219
|
/** One reader per handle; only complete, valid lines advance the byte offset. */
|
|
235
220
|
export function createDirectSessionReader(sessionFile, prompt) {
|
|
236
221
|
let offset = 0;
|
package/dist/git-runtime.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CheckCommand, type ReviewEvidence, type TaskAttempt, type TaskRequest, type WorktreeAllocationIntent, type WorktreeAllocationPlan, type WorkspaceIdentity } from "./schema.ts";
|
|
2
|
-
import { type AllocationReconciliation, type CheckRunResult, type GitRuntime, type InFlightTaskCandidateInspection, type InFlightTaskCandidateInspector, type
|
|
2
|
+
import { type AllocationReconciliation, type CheckRunResult, type GitRuntime, type InFlightTaskCandidateInspection, type InFlightTaskCandidateInspector, type OperationContext, type ReviewResult, type TransientLaunchHandle, type WorktreeAllocationResult, type VerifiedLaunch } from "./runner.ts";
|
|
3
3
|
type ProcessResult = {
|
|
4
4
|
code: number;
|
|
5
5
|
killed: boolean;
|
|
@@ -33,7 +33,7 @@ export interface CheckedGitRuntimeOptions {
|
|
|
33
33
|
runProcess?: DirectProcessRunner;
|
|
34
34
|
executeReview?: ExactReviewExecutor;
|
|
35
35
|
}
|
|
36
|
-
export declare class CheckedGitRuntime implements GitRuntime,
|
|
36
|
+
export declare class CheckedGitRuntime implements GitRuntime, InFlightTaskCandidateInspector {
|
|
37
37
|
private readonly execute;
|
|
38
38
|
private readonly executeReview?;
|
|
39
39
|
private readonly mainOperationTails;
|
package/dist/runner.d.ts
CHANGED
|
@@ -199,13 +199,6 @@ export interface HostRuntime {
|
|
|
199
199
|
failure: string;
|
|
200
200
|
}>;
|
|
201
201
|
}
|
|
202
|
-
export interface TaskCandidateInspector {
|
|
203
|
-
inspectTaskCandidate(input: {
|
|
204
|
-
root: string;
|
|
205
|
-
task: TaskRequest;
|
|
206
|
-
attempt: TaskAttempt;
|
|
207
|
-
}, context: OperationContext): Promise<WorkspaceIdentity>;
|
|
208
|
-
}
|
|
209
202
|
export interface InFlightTaskCandidateInspection {
|
|
210
203
|
candidate: WorkspaceIdentity;
|
|
211
204
|
clean: boolean;
|
|
@@ -219,6 +212,11 @@ export interface InFlightTaskCandidateInspector {
|
|
|
219
212
|
}, context: OperationContext): Promise<InFlightTaskCandidateInspection>;
|
|
220
213
|
}
|
|
221
214
|
export interface GitRuntime {
|
|
215
|
+
inspectTaskCandidate(input: {
|
|
216
|
+
root: string;
|
|
217
|
+
task: TaskRequest;
|
|
218
|
+
attempt: TaskAttempt;
|
|
219
|
+
}, context: OperationContext): Promise<WorkspaceIdentity>;
|
|
222
220
|
inspectMain(input: {
|
|
223
221
|
root: string;
|
|
224
222
|
}, context: OperationContext): Promise<WorkspaceIdentity>;
|
|
@@ -315,7 +313,7 @@ export declare class IsolatedRunner {
|
|
|
315
313
|
private readonly currentPolicy;
|
|
316
314
|
private readonly productiveLifecycles;
|
|
317
315
|
private readonly followupControls;
|
|
318
|
-
constructor(coordinatorRuntime: CoordinatorRuntime, hostRuntime: HostRuntime, gitRuntime: GitRuntime
|
|
316
|
+
constructor(coordinatorRuntime: CoordinatorRuntime, hostRuntime: HostRuntime, gitRuntime: GitRuntime, store: FileRunStore | undefined, textExecutor: EphemeralSubagentExecutor, policy?: ExecutionPolicySnapshot, currentPolicy?: () => ExecutionPolicySnapshot, integrationGit?: IntegrationGit);
|
|
319
317
|
listRequests(root: string): Promise<{
|
|
320
318
|
requests: Array<{
|
|
321
319
|
id: string;
|