poe-code 10.0.0 → 10.0.2
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/harness.js +13 -1
- package/dist/cli/commands/harness.js.map +1 -1
- package/dist/index.js +53 -15
- package/dist/index.js.map +3 -3
- package/dist/metafile.json +1 -1
- package/package.json +1 -1
- package/packages/agent-harness/dist/loader/run.d.ts +2 -0
- package/packages/agent-harness/dist/loader/run.js +1 -0
- package/packages/safejs/dist/chunks/{chunk-SDKCGJW4.js → chunk-EUCMIR4E.js} +4 -4
- package/packages/safejs/dist/chunks/{chunk-SDKCGJW4.js.map → chunk-EUCMIR4E.js.map} +2 -2
- package/packages/safejs/dist/chunks/{chunk-E6LJNTDX.js → chunk-RSK47E4C.js} +34 -14
- package/packages/safejs/dist/chunks/{chunk-E6LJNTDX.js.map → chunk-RSK47E4C.js.map} +2 -2
- package/packages/safejs/dist/cli.js +21 -5
- package/packages/safejs/dist/cli.js.map +2 -2
- package/packages/safejs/dist/core.js +1 -1
- package/packages/safejs/dist/dump.d.ts +1 -1
- package/packages/safejs/dist/index.d.ts +1 -1
- package/packages/safejs/dist/index.js +4 -2
- package/packages/safejs/dist/index.js.map +2 -2
- package/packages/safejs/dist/interp/promise-replay.d.ts +1 -1
- package/packages/safejs/dist/interp/promise-replay.js +15 -1
- package/packages/safejs/dist/modules/env.js +2 -2
- package/packages/safejs/dist/run.js +19 -5
- package/packages/safejs/dist/runner/run-harness.d.ts +2 -1
- package/packages/safejs/dist/runner/run-harness.js +2 -0
- package/packages/safejs/dist/snapshot/dump.d.ts +5 -2
- package/packages/safejs/dist/snapshot/dump.js +7 -6
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { lint, run, type Diagnostic, type OtelSink, type SnapshotBackend, type SpawnUsageTotal } from "../../../safejs/dist/index.js";
|
|
2
|
+
type RunOptions = NonNullable<Parameters<typeof run>[1]>;
|
|
2
3
|
type LintOptions = NonNullable<Parameters<typeof lint>[1]>;
|
|
3
4
|
export type RunResult = Awaited<ReturnType<typeof run>> & {
|
|
4
5
|
usage: SpawnUsageTotal;
|
|
@@ -18,6 +19,7 @@ export type HarnessImportMeta = {
|
|
|
18
19
|
};
|
|
19
20
|
export type RunHarnessPairOptions = {
|
|
20
21
|
allowedGlobals?: LintOptions["allowedGlobals"];
|
|
22
|
+
budget?: RunOptions["budget"];
|
|
21
23
|
clock?: {
|
|
22
24
|
now: () => number;
|
|
23
25
|
};
|
|
@@ -118,6 +118,7 @@ export async function runHarnessPair(mdPath, options) {
|
|
|
118
118
|
let result;
|
|
119
119
|
try {
|
|
120
120
|
result = await runWithSpawnUsageAccumulator(usageAccumulator, () => run(executableSource, {
|
|
121
|
+
budget: options.budget,
|
|
121
122
|
clock: runtimeClock,
|
|
122
123
|
importMeta: meta,
|
|
123
124
|
entryPointArgs: [validated],
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
safeEndSpan,
|
|
15
15
|
safeRecordException,
|
|
16
16
|
safeStartSpan
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-RSK47E4C.js";
|
|
18
18
|
|
|
19
19
|
// packages/safejs/src/error/format.ts
|
|
20
20
|
var DEFAULT_MAX_MESSAGE_LENGTH = 1e4;
|
|
@@ -2622,12 +2622,12 @@ var EnvAccessError = class extends Error {
|
|
|
2622
2622
|
function makeEnvModule(input) {
|
|
2623
2623
|
const options = normalizeEnvOptions(Array.isArray(input) ? { allow: input } : input);
|
|
2624
2624
|
const allowedNames = new Set(options.allow);
|
|
2625
|
-
const values = options.values
|
|
2625
|
+
const values = options.values;
|
|
2626
2626
|
return {
|
|
2627
2627
|
get(name) {
|
|
2628
2628
|
const variable = readEnvName(name, "Environment variable name");
|
|
2629
2629
|
if (!allowedNames.has(variable)) throw new EnvAccessError(variable);
|
|
2630
|
-
return readEnvValue(values, variable);
|
|
2630
|
+
return readEnvValue(values ?? process.env, variable);
|
|
2631
2631
|
}
|
|
2632
2632
|
};
|
|
2633
2633
|
}
|
|
@@ -7886,4 +7886,4 @@ export {
|
|
|
7886
7886
|
parseMcpConfig,
|
|
7887
7887
|
makeMcpModule
|
|
7888
7888
|
};
|
|
7889
|
-
//# sourceMappingURL=chunk-
|
|
7889
|
+
//# sourceMappingURL=chunk-EUCMIR4E.js.map
|