@zenera/gym 1.1.40 → 1.1.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/README.md +169 -104
- package/dist/agents.d.ts +25 -0
- package/dist/agents.js +52 -0
- package/dist/bindings.d.ts +25 -0
- package/dist/bindings.js +81 -0
- package/dist/box.d.ts +39 -36
- package/dist/box.js +183 -217
- package/dist/cache.d.ts +24 -14
- package/dist/cache.js +102 -66
- package/dist/catalog.d.ts +83 -0
- package/dist/catalog.js +293 -0
- package/dist/command.d.ts +1 -0
- package/dist/command.js +235 -68
- package/dist/fake.d.ts +4 -0
- package/dist/fake.js +142 -0
- package/dist/generate.d.ts +28 -24
- package/dist/generate.js +417 -120
- package/dist/inputs.d.ts +12 -0
- package/dist/inputs.js +132 -0
- package/dist/knowledge.d.ts +50 -0
- package/dist/knowledge.js +199 -0
- package/dist/logger.d.ts +10 -8
- package/dist/logger.js +4 -3
- package/dist/paging.d.ts +2 -2
- package/dist/paging.js +2 -2
- package/dist/probe.d.ts +5 -5
- package/dist/probe.js +15 -15
- package/dist/prompt.d.ts +31 -18
- package/dist/prompt.js +160 -146
- package/dist/quiet.d.ts +2 -0
- package/dist/quiet.js +7 -0
- package/dist/router.js +5 -1
- package/dist/runtime.d.ts +160 -0
- package/dist/runtime.js +229 -0
- package/dist/schema.js +1 -2
- package/dist/server.js +98 -57
- package/dist/setup.d.ts +47 -6
- package/dist/setup.js +157 -21
- package/dist/spec.d.ts +4 -3
- package/dist/spec.js +73 -22
- package/dist/store.d.ts +78 -0
- package/dist/store.js +253 -0
- package/dist/synth.d.ts +42 -0
- package/dist/synth.js +589 -0
- package/dist/worker.d.ts +41 -0
- package/dist/worker.js +99 -0
- package/package.json +5 -3
- package/dist/envelope.d.ts +0 -13
- package/dist/envelope.js +0 -9
- package/dist/image.d.ts +0 -25
- package/dist/image.js +0 -81
package/dist/generate.d.ts
CHANGED
|
@@ -1,41 +1,46 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Model } from '@zenera/neo';
|
|
2
|
+
import type { Bindings } from './bindings.ts';
|
|
2
3
|
import type { Box } from './box.ts';
|
|
3
|
-
import type {
|
|
4
|
-
import { type
|
|
4
|
+
import type { Catalog } from './catalog.ts';
|
|
5
|
+
import { type Binding } from './runtime.ts';
|
|
6
|
+
import { type Repair } from './prompt.ts';
|
|
5
7
|
import { type Operation } from './spec.ts';
|
|
8
|
+
import type { World } from './synth.ts';
|
|
6
9
|
import { type Checks } from './validate.ts';
|
|
10
|
+
/** Failed tests per build before giving up. */
|
|
11
|
+
export declare const DEFAULT_ATTEMPTS = 5;
|
|
7
12
|
export interface BuildOptions {
|
|
8
13
|
model: Model;
|
|
9
14
|
box: Box;
|
|
10
15
|
checks: Checks;
|
|
11
|
-
|
|
16
|
+
catalog: Catalog;
|
|
17
|
+
world: World;
|
|
18
|
+
/** where each type lives; a passing handler adds the ones it was first to use */
|
|
19
|
+
bindings: Bindings;
|
|
20
|
+
/** every operation being served, for siblings and list_operations */
|
|
21
|
+
operations: readonly Operation[];
|
|
22
|
+
/** the cached handler of another operation, if one has been written */
|
|
23
|
+
sourceOf: (operation: Operation) => Promise<string | undefined>;
|
|
12
24
|
attempts?: number;
|
|
25
|
+
/** where HTML reports of agent runs go */
|
|
26
|
+
reportDir?: string;
|
|
13
27
|
onAttempt?: (attempt: number, diagnostics: readonly string[], source: string, limit: number) => void | Promise<void>;
|
|
14
28
|
signal?: AbortSignal;
|
|
15
29
|
}
|
|
16
30
|
export interface Built {
|
|
17
31
|
source: string;
|
|
18
32
|
attempts: number;
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
|
|
22
|
-
* with it, so the later attempts are the informed ones — a model that has seen
|
|
23
|
-
* its own traceback usually needs two or three goes at a fiddly schema, and the
|
|
24
|
-
* whole loop costs nothing once the file is cached.
|
|
25
|
-
*/
|
|
26
|
-
export declare const DEFAULT_ATTEMPTS = 5;
|
|
27
|
-
export interface RegenerateOptions extends BuildOptions {
|
|
28
|
-
currentSource: string;
|
|
29
|
-
failingInput: GeneratorInput;
|
|
30
|
-
fault: string;
|
|
31
|
-
stderr?: string;
|
|
32
|
-
examples?: readonly ExampleRequest[];
|
|
33
|
+
report?: string;
|
|
34
|
+
/** where the handler stores each type it uses: part of its identity */
|
|
35
|
+
bindings: Record<string, Binding>;
|
|
33
36
|
}
|
|
34
37
|
export declare class BuildFailed extends Error {
|
|
35
38
|
readonly operation: Operation;
|
|
36
39
|
readonly diagnostics: readonly string[];
|
|
37
40
|
/** the build report on disk, filled in by whoever was writing one */
|
|
38
41
|
dump?: string;
|
|
42
|
+
/** the agent's HTML run report */
|
|
43
|
+
report?: string;
|
|
39
44
|
constructor(operation: Operation, diagnostics: readonly string[]);
|
|
40
45
|
}
|
|
41
46
|
/**
|
|
@@ -43,15 +48,14 @@ export declare class BuildFailed extends Error {
|
|
|
43
48
|
*
|
|
44
49
|
* `fetch failed` is undici's word for a dozen different problems — a DNS
|
|
45
50
|
* miss, a refused connection, a TLS error, a timeout — and which one it was is
|
|
46
|
-
* only ever in `cause`.
|
|
47
|
-
* network fault into the same useless sentence.
|
|
51
|
+
* only ever in `cause`.
|
|
48
52
|
*/
|
|
49
53
|
export declare function reason(err: unknown): string;
|
|
50
|
-
|
|
51
|
-
export declare function
|
|
54
|
+
/** Writes the handler for an operation, or repairs the one it has. */
|
|
55
|
+
export declare function build(operation: Operation, opts: BuildOptions, repair?: Repair): Promise<Built>;
|
|
52
56
|
/**
|
|
53
|
-
* Models fence code even when told not to, and a stray ```
|
|
54
|
-
*
|
|
57
|
+
* Models fence code even when told not to, and a stray ```ts line is a syntax
|
|
58
|
+
* error rather than a bad answer — not worth a round trip.
|
|
55
59
|
*/
|
|
56
60
|
export declare function unfence(text: string): string;
|
|
57
61
|
//# sourceMappingURL=generate.d.ts.map
|