@compivia/plugin-sdk 0.0.1302 → 0.0.1318
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/harness.d.ts +4 -1
- package/dist/testing.js +1 -0
- package/package.json +1 -1
package/dist/harness.d.ts
CHANGED
|
@@ -33,6 +33,9 @@ export type AgentLaunch = {
|
|
|
33
33
|
prepare?: () => Promise<void>;
|
|
34
34
|
transcriptPath: string | null;
|
|
35
35
|
};
|
|
36
|
+
/** Результат `launch` плагина: без `prepare` — функция не пересекает границу
|
|
37
|
+
* процесса-хоста (#1030), подготовку плагин выполняет внутри `launch`. */
|
|
38
|
+
export type PluginAgentLaunch = Omit<AgentLaunch, "prepare">;
|
|
36
39
|
/** События вызова shell-инструмента (из runner-core/src/harness/types.ts). */
|
|
37
40
|
export type ShellCallEvent = {
|
|
38
41
|
kind: "start";
|
|
@@ -135,7 +138,7 @@ export type DetectResult = {
|
|
|
135
138
|
export type HarnessDefinition = {
|
|
136
139
|
id: string;
|
|
137
140
|
detect(ctx: HarnessContext): Promise<DetectResult>;
|
|
138
|
-
launch(input: AgentLaunchInput):
|
|
141
|
+
launch(input: AgentLaunchInput): PluginAgentLaunch | Promise<PluginAgentLaunch>;
|
|
139
142
|
classifyLine(line: string): HarnessLine;
|
|
140
143
|
locateSession(sessionId: string): Promise<SessionLocation | null>;
|
|
141
144
|
finalOf(location: SessionLocation, turn?: TurnCursor): Promise<FinalOutcome>;
|
package/dist/testing.js
CHANGED
|
@@ -124,6 +124,7 @@ function checkLaunch(create) {
|
|
|
124
124
|
expect(typeof result.command === "string" && result.command.length > 0).toBe(true);
|
|
125
125
|
expect(Array.isArray(result.args)).toBe(true);
|
|
126
126
|
expect(result.env).toBeInstanceOf(Object);
|
|
127
|
+
expect("prepare" in result).toBe(false);
|
|
127
128
|
expect(result.transcriptPath === null || typeof result.transcriptPath === "string").toBe(true);
|
|
128
129
|
});
|
|
129
130
|
});
|