@henryqw/pi-subagent 27.15.1 → 27.16.1
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/CONTEXT.md +9 -0
- package/README.md +8 -0
- package/dist/herdr-runtime.d.ts +10 -1
- package/dist/herdr-runtime.js +51 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -0
- package/dist/process.d.ts +1 -0
- package/dist/process.js +1 -1
- package/dist/runner.d.ts +21 -0
- package/dist/runner.js +7 -3
- package/dist/schema.d.ts +4 -4
- package/dist/schema.js +4 -4
- package/dist/store.d.ts +1 -1
- package/dist/workspace-schema.d.ts +462 -0
- package/dist/workspace-schema.js +111 -0
- package/dist/workspace-scope.d.ts +16 -0
- package/dist/workspace-scope.js +60 -0
- package/dist/workspace.d.ts +98 -0
- package/dist/workspace.js +623 -0
- package/docs/orchestration.md +4 -0
- package/docs/workspace.md +85 -0
- package/extensions/result-transport.ts +1 -0
- package/extensions/subagent.ts +29 -8
- package/extensions/workflow.ts +14 -4
- package/extensions/workspace.ts +83 -0
- package/package.json +2 -2
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { CheckedGitRuntime } from "./git-runtime.ts";
|
|
2
|
+
import { IntegrationGit } from "./integration-git.ts";
|
|
3
|
+
import { runProcess } from "./process.ts";
|
|
4
|
+
import { type ExecutionPolicySnapshot } from "./schema.ts";
|
|
5
|
+
import { type CoordinatorRuntime, type HostRuntime, type OperationContext } from "./runner.ts";
|
|
6
|
+
import { type WorkspaceState } from "./workspace-schema.ts";
|
|
7
|
+
import { type WorkspaceScope } from "./workspace-scope.ts";
|
|
8
|
+
export interface WorkspaceRuntimeOptions {
|
|
9
|
+
coordinator: CoordinatorRuntime;
|
|
10
|
+
host(policy: WorkspaceState["policy"]): HostRuntime;
|
|
11
|
+
preflightHost(root: string, operation: OperationContext): Promise<void>;
|
|
12
|
+
policy(): ExecutionPolicySnapshot;
|
|
13
|
+
agentDir?: string;
|
|
14
|
+
git?: CheckedGitRuntime;
|
|
15
|
+
integration?: IntegrationGit;
|
|
16
|
+
execute?: typeof runProcess;
|
|
17
|
+
}
|
|
18
|
+
/** Include workspace ownership in the existing prune gate, including unchanged secondary worktrees. */
|
|
19
|
+
export declare function workspacePruneOwners(checkouts: readonly string[], agentDir?: string): Promise<Array<{
|
|
20
|
+
label: string;
|
|
21
|
+
text?: string;
|
|
22
|
+
}>>;
|
|
23
|
+
/** A whole repository set is the validation unit. Git mutations remain serial, never atomic. */
|
|
24
|
+
export declare class WorkspaceRunner {
|
|
25
|
+
private readonly git;
|
|
26
|
+
private readonly integration;
|
|
27
|
+
private readonly store;
|
|
28
|
+
private readonly active;
|
|
29
|
+
private readonly options;
|
|
30
|
+
constructor(options: WorkspaceRuntimeOptions);
|
|
31
|
+
private directory;
|
|
32
|
+
private save;
|
|
33
|
+
status(cwd: string, id: string): Promise<WorkspaceState>;
|
|
34
|
+
private locked;
|
|
35
|
+
plan(value: unknown, cwd: string, signal?: AbortSignal): Promise<{
|
|
36
|
+
request: {
|
|
37
|
+
mode: "isolated";
|
|
38
|
+
id: string;
|
|
39
|
+
goal: string;
|
|
40
|
+
finalJudgment?: {
|
|
41
|
+
role: string;
|
|
42
|
+
modelClass: "balanced" | "fast" | "fav" | "frontier";
|
|
43
|
+
criterion: string;
|
|
44
|
+
} | undefined;
|
|
45
|
+
repositories: Record<string, string>;
|
|
46
|
+
tasks: {
|
|
47
|
+
role: string;
|
|
48
|
+
modelClass: "balanced" | "fast" | "fav" | "frontier";
|
|
49
|
+
requirements: string;
|
|
50
|
+
deliverable: string;
|
|
51
|
+
dependsOn: string[];
|
|
52
|
+
contextFrom: string[];
|
|
53
|
+
id: string;
|
|
54
|
+
kind: "changeset";
|
|
55
|
+
judgment?: {
|
|
56
|
+
role: string;
|
|
57
|
+
modelClass: "balanced" | "fast" | "fav" | "frontier";
|
|
58
|
+
criterion: string;
|
|
59
|
+
} | undefined;
|
|
60
|
+
checks: {
|
|
61
|
+
command: string;
|
|
62
|
+
args: string[];
|
|
63
|
+
repository: string;
|
|
64
|
+
}[];
|
|
65
|
+
inputs?: Record<string, string> | undefined;
|
|
66
|
+
}[];
|
|
67
|
+
finalChecks: {
|
|
68
|
+
command: string;
|
|
69
|
+
args: string[];
|
|
70
|
+
repository: string;
|
|
71
|
+
}[];
|
|
72
|
+
};
|
|
73
|
+
scope: WorkspaceScope;
|
|
74
|
+
bases: Record<string, {
|
|
75
|
+
branch: string;
|
|
76
|
+
head: string;
|
|
77
|
+
index: string;
|
|
78
|
+
tree: string;
|
|
79
|
+
}>;
|
|
80
|
+
scripts: Record<string, string>;
|
|
81
|
+
routes: readonly import("./runner.ts").ResolvedRoute[] | undefined;
|
|
82
|
+
}>;
|
|
83
|
+
execute(value: unknown, cwd: string, signal?: AbortSignal, accepted?: (state: WorkspaceState) => void): Promise<WorkspaceState>;
|
|
84
|
+
private verifyScope;
|
|
85
|
+
private allocate;
|
|
86
|
+
private paths;
|
|
87
|
+
private work;
|
|
88
|
+
private inspectWorkers;
|
|
89
|
+
private stop;
|
|
90
|
+
private inspectTips;
|
|
91
|
+
private checks;
|
|
92
|
+
action(value: unknown, cwd: string, signal?: AbortSignal): Promise<WorkspaceState>;
|
|
93
|
+
private stage;
|
|
94
|
+
private preflightMain;
|
|
95
|
+
private promote;
|
|
96
|
+
private reconcile;
|
|
97
|
+
private cleanup;
|
|
98
|
+
}
|