poe-code 4.0.40 → 4.0.41
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/cli/commands/gaslight.js +21 -3
- package/dist/cli/commands/gaslight.js.map +1 -1
- package/dist/index.js +22 -5
- package/dist/index.js.map +3 -3
- package/dist/metafile.json +1 -1
- package/package.json +1 -1
- package/packages/agent-gaslight/dist/run.js +4 -1
- package/packages/agent-gaslight/dist/types.d.ts +2 -0
package/package.json
CHANGED
|
@@ -111,6 +111,7 @@ function resolvePlanPaths(options, cwd, homeDir) {
|
|
|
111
111
|
return planPaths;
|
|
112
112
|
}
|
|
113
113
|
export async function runGaslight(options) {
|
|
114
|
+
const startedAt = Date.now();
|
|
114
115
|
const cwd = options.cwd ?? process.cwd();
|
|
115
116
|
const homeDir = options.homeDir ?? os.homedir();
|
|
116
117
|
const fs = options.fs ?? nodeFs;
|
|
@@ -138,6 +139,7 @@ export async function runGaslight(options) {
|
|
|
138
139
|
const plans = [];
|
|
139
140
|
let usage;
|
|
140
141
|
for (const [planIndex, planPath] of planPaths.entries()) {
|
|
142
|
+
const planStartedAt = Date.now();
|
|
141
143
|
const prompts = [
|
|
142
144
|
...(config.setup ? [config.setup] : []),
|
|
143
145
|
`${config.prompt} ${planPath}`,
|
|
@@ -216,8 +218,9 @@ export async function runGaslight(options) {
|
|
|
216
218
|
planPath,
|
|
217
219
|
...(archivedPath ? { archivedPath } : {}),
|
|
218
220
|
rounds: planRounds,
|
|
221
|
+
durationMs: Date.now() - planStartedAt,
|
|
219
222
|
...(planUsage ? { usage: planUsage } : {})
|
|
220
223
|
});
|
|
221
224
|
}
|
|
222
|
-
return { rounds, plans, ...(usage ? { usage } : {}) };
|
|
225
|
+
return { rounds, plans, durationMs: Date.now() - startedAt, ...(usage ? { usage } : {}) };
|
|
223
226
|
}
|
|
@@ -34,12 +34,14 @@ export interface GaslightRound {
|
|
|
34
34
|
export interface GaslightResult {
|
|
35
35
|
rounds: GaslightRound[];
|
|
36
36
|
plans: GaslightPlanResult[];
|
|
37
|
+
durationMs: number;
|
|
37
38
|
usage?: SpawnUsage;
|
|
38
39
|
}
|
|
39
40
|
export interface GaslightPlanResult {
|
|
40
41
|
planPath: string;
|
|
41
42
|
archivedPath?: string;
|
|
42
43
|
rounds: GaslightRound[];
|
|
44
|
+
durationMs: number;
|
|
43
45
|
usage?: SpawnUsage;
|
|
44
46
|
}
|
|
45
47
|
export interface GaslightOptions {
|