diff --git a/AGENTS.md b/AGENTS.md index 299afb5..f58dc47 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -142,7 +142,7 @@ Each part has one job. ## Setup -You need Node 24, from 24.9 (`.nvmrc` names the major version), git, and pnpm through Corepack (`package.json` pins the version). Node 25 and later don't include Corepack, and Node 26 can't run the eval lab yet. +You need Node 24, from 24.9 (`.nvmrc` names the major version), git, and pnpm through Corepack (`package.json` pins the version). Node 25 and later don't include Corepack. ```sh corepack enable diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 77e6524..271400e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,7 +15,7 @@ The rules live in [AGENTS.md](AGENTS.md). Read its non-negotiables before your f ## Set up -You need Node 24, from 24.9 (`.nvmrc` names the major version), git, and pnpm through Corepack (`package.json` pins the version). Node 25 and later don't include Corepack, and Node 26 can't run the eval lab yet. +You need Node 24, from 24.9 (`.nvmrc` names the major version), git, and pnpm through Corepack (`package.json` pins the version). Node 25 and later don't include Corepack. ```sh git clone https://github.com/DojoCodingLabs/hermit.git diff --git a/README.md b/README.md index 91f17d3..3720d00 100644 --- a/README.md +++ b/README.md @@ -257,7 +257,7 @@ Hermit is **pre-alpha.** It works, it has rough edges, and it has been tuned on ## Build it yourself -**You need:** Node.js 24, from 24.9 (`.nvmrc` picks it), and pnpm through Corepack. Node 25 and later don't include Corepack, and Node 26 can't run the eval lab yet. That's enough for the packages, the tests and the eval lab. The Android app also needs JDK 17, the Android SDK (platform 37, build-tools 37.0.0, CMake 3.22.1), NDK 29.0.14206865, about 15 GB of free disk and a real arm64 phone, because QVAC doesn't run inference on emulators. +**You need:** Node.js 24, from 24.9 (`.nvmrc` picks it), and pnpm through Corepack. Node 25 and later don't include Corepack. That's enough for the packages, the tests and the eval lab. The Android app also needs JDK 17, the Android SDK (platform 37, build-tools 37.0.0, CMake 3.22.1), NDK 29.0.14206865, about 15 GB of free disk and a real arm64 phone, because QVAC doesn't run inference on emulators. ```sh git clone https://github.com/DojoCodingLabs/hermit.git @@ -289,7 +289,7 @@ On first run the app downloads the model once (about 530 MB, on Wi-Fi) and check llama-server -m botpsy-0.8b-q4_k_m-imat.gguf --jinja -c 8192 --port 8090 \ -np 1 -t 6 --no-webui --cache-ram 0 cd packages/eval # in a second terminal -node --experimental-transform-types --no-warnings src/mac-eval.ts \ +node --no-warnings src/mac-eval.ts \ botpsy-q4-native-think256 --set va ``` diff --git a/docs/build/multi-bot-w1-eval/README.md b/docs/build/multi-bot-w1-eval/README.md index cde0d02..2ed17cd 100644 --- a/docs/build/multi-bot-w1-eval/README.md +++ b/docs/build/multi-bot-w1-eval/README.md @@ -5,7 +5,7 @@ What the lab measures for bots, with the phone's GGUF (BotPsy-0.8B Q4_K_M, sha 4 | Eval | Command (from `packages/eval`) | Model | Bar | | :---- | :---- | :---- | :---- | | Every permission mode over the tier table | `pnpm eval:modes` (`-- --write` rewrites the table below) | no | zero mismatches | -| Role following and grant refusals, three bots | `~/conductor/.scripts/heavy.sh nice -n 10 node --experimental-transform-types --no-warnings src/bot-eval.ts botpsy-q4-native-think256 --out /tmp/hermit-eval/bots.jsonl` | yes, llama-server on :8090 | refusals 24/24, no skill outside a bot's grants ever runs, role at least 85% (21/24, PDR-003) | +| Role following and grant refusals, three bots | `~/conductor/.scripts/heavy.sh nice -n 10 node --no-warnings src/bot-eval.ts botpsy-q4-native-think256 --out /tmp/hermit-eval/bots.jsonl` | yes, llama-server on :8090 | refusals 24/24, no skill outside a bot's grants ever runs, role at least 85% (21/24, PDR-003) | | Routing of "make me a bot" | the same command with `--routing-only` (it also runs first in the full run) | no | requests reach `create_bot`; near misses do not; compound messages reported | Cases: `packages/eval/src/bot-cases.ts` (24 role-following and 24 grant-refusal cases, eight per bot per family, half Spanish, synthetic names only; 12 "make me a bot" requests, 12 near misses and 6 compound messages). Test: `packages/eval/test/bot-cases.test.ts`, `mode-table.test.ts`. diff --git a/docs/evals.md b/docs/evals.md index 3846eef..3572448 100644 --- a/docs/evals.md +++ b/docs/evals.md @@ -104,7 +104,7 @@ llama-server -m botpsy-0.8b-q4_k_m-imat.gguf --jinja -c 8192 --port 8090 \ ```sh cd packages/eval -node --experimental-transform-types --no-warnings src/mac-eval.ts botpsy-q4-native-think256 +node --no-warnings src/mac-eval.ts botpsy-q4-native-think256 ``` That runs the core 40 with the shipped profile. The last line prints the score, the Spanish and English split, the median time per case and the score by family. @@ -124,7 +124,7 @@ Profiles you can pass as the first argument include `botpsy-q4-native-think256` **5. Run the trajectories.** ```sh -HERMIT_SEED=1 node --experimental-transform-types --no-warnings src/trajectory-eval.ts botpsy-q4-native-think256 +HERMIT_SEED=1 node --no-warnings src/trajectory-eval.ts botpsy-q4-native-think256 ``` Repeat with other seeds (`HERMIT_SEED=2`, `3`, `4`) and add the results. `--only ` runs one scenario, and `--out file.jsonl` keeps the transcripts. diff --git a/docs/research/connector-draft-spike.md b/docs/research/connector-draft-spike.md index 3ca6232..2413a05 100644 --- a/docs/research/connector-draft-spike.md +++ b/docs/research/connector-draft-spike.md @@ -29,7 +29,7 @@ Date: 2026-11-14. Model: BotPsy-0.8B Q4_K_M, the phone's exact GGUF, on the Mac - Validator errors by kind. - **Tests first** (`packages/eval/test/connector-draft.test.ts`, 33 tests). Every gold draft assembles into a spec the validator accepts, or is refused. The gold floors are right. Path joining, sign-in mapping, argument moves and the guard each have a test. A perfect draft scores perfectly, and an omitted `sends` scores as valid but under-risk (the case the validator can't catch). There is also an end-to-end run through a fake engine. -Run: `cd packages/eval/src && nice -n 10 node --experimental-transform-types --no-warnings connector-draft-eval.ts --mode owned|raw --harness v0|v1 [--think 256] [--set dev|holdout] --seeds 7,8,9 [--out file.jsonl]`. +Run: `cd packages/eval/src && nice -n 10 node --no-warnings connector-draft-eval.ts --mode owned|raw --harness v0|v1 [--think 256] [--set dev|holdout] --seeds 7,8,9 [--out file.jsonl]`. ## Measurements diff --git a/docs/research/web-task-spike.md b/docs/research/web-task-spike.md index c90bf01..bfda1f5 100644 --- a/docs/research/web-task-spike.md +++ b/docs/research/web-task-spike.md @@ -23,7 +23,7 @@ Date: 2026-11-14. Model: BotPsy-0.8B Q4_K_M, the phone's exact GGUF, on the Mac - v3: v2 plus a `fill` action: code turns the page's form into a typed object (options pinned, optional fields not required) and the model fills it in one call, like a skill's arguments. The submit stays a separate guarded click. - **Tests first**: `packages/eval/test/web-sim.test.ts`, `web-action.test.ts`, `web-form.test.ts`, `web-runner.test.ts` (49 tests), including an oracle run that proves every task is solvable in its optimal step count. -Run: `cd packages/eval/src && nice -n 10 node --experimental-transform-types --no-warnings web-task-eval.ts --harness v2 [--think 256] [--set dev|noise|holdout] --seeds 7,8,9 --mode free|forced|both`. +Run: `cd packages/eval/src && nice -n 10 node --no-warnings web-task-eval.ts --harness v2 [--think 256] [--set dev|noise|holdout] --seeds 7,8,9 --mode free|forced|both`. ## Measurements diff --git a/docs/research/x402-spike.md b/docs/research/x402-spike.md index 1136b15..dff707b 100644 --- a/docs/research/x402-spike.md +++ b/docs/research/x402-spike.md @@ -21,7 +21,7 @@ No x402 library was needed. The whole client is about 600 lines of pure TypeScri - `parseSettlement`: `PAYMENT-RESPONSE` or `X-PAYMENT-RESPONSE`. - `payWithX402`: the whole flow behind ports (`http`, `signer`, `approve`, `nowMs`, `randomBytes`) and the ledger. It reserves the spend in the ledger before asking and releases it (void) on decline, refusal, late approval or a signer error. The authorization is built before asking, so the approval quote carries its `validBefore` and digest and the signature covers exactly what was approved; nothing is signed until the person says yes, and an approval that returns after `validBefore` signs nothing (`approval_expired`). It never pays twice: anything short of a confirmed 2xx after signing (402, 500, a dropped connection, a failed or unparseable receipt, any exception) is `authorized_unconfirmed` and the record stays pending in the ledger; there is never a retry. - `localKeySigner` and `recoverTypedDataSigner`: a raw secp256k1 signer for tests and the desktop spike only. On the phone the signer is the WDK account. -- `packages/eval/src/x402-spike.ts`: the desktop dev tool (`pnpm --filter @hermit/eval spike:x402`, or `node --experimental-transform-types --no-warnings packages/eval/src/x402-spike.ts [url]`). Listed in the eslint network exception. It keeps its throwaway key outside the repository in the OS temp dir (mode 600), or takes `HERMIT_X402_TESTNET_KEY`; it never prints the key. +- `packages/eval/src/x402-spike.ts`: the desktop dev tool (`pnpm --filter @hermit/eval spike:x402`, or `node --no-warnings packages/eval/src/x402-spike.ts [url]`). Listed in the eslint network exception. It keeps its throwaway key outside the repository in the OS temp dir (mode 600), or takes `HERMIT_X402_TESTNET_KEY`; it never prints the key. - Tests: 71 in `packages/payments/test`, including the real 402 captured from the demo, and the EIP-712 domain separators checked against `DOMAIN_SEPARATOR()` read from both testnet token contracts. ## The run diff --git a/docs/superpowers/plans/2026-11-25-multi-bot-wave-1.md b/docs/superpowers/plans/2026-11-25-multi-bot-wave-1.md index e7a1ced..03ade6e 100644 --- a/docs/superpowers/plans/2026-11-25-multi-bot-wave-1.md +++ b/docs/superpowers/plans/2026-11-25-multi-bot-wave-1.md @@ -1871,7 +1871,7 @@ Expected: FAIL, `Failed to resolve import "../src/mode-table.ts"`. - [ ] **Step 4: Run it and see it pass; run the model eval** -Run: `pnpm -C packages/eval exec vitest run test/mode-table.test.ts`, then (llama-server already on :8090) `cd packages/eval && nice -n 10 node --experimental-transform-types --no-warnings src/bot-eval.ts botpsy-q4-native-think256 --out /tmp/hermit-eval/bots.jsonl` +Run: `pnpm -C packages/eval exec vitest run test/mode-table.test.ts`, then (llama-server already on :8090) `cd packages/eval && nice -n 10 node --no-warnings src/bot-eval.ts botpsy-q4-native-think256 --out /tmp/hermit-eval/bots.jsonl` Expected: PASS; the eval prints `refusals 24/24, outside-grant executions 0, role ≥ 21/24`, and the numbers go in the README with the commit hash. - [ ] **Step 5: Commit** diff --git a/packages/core/src/bots-store.ts b/packages/core/src/bots-store.ts index aac2e25..6740be0 100644 --- a/packages/core/src/bots-store.ts +++ b/packages/core/src/bots-store.ts @@ -10,9 +10,12 @@ import { quoteSafe } from "./quote.ts"; export type BotErrorCode = "not_found" | "primary" | "too_many_bots" | "too_many_pins" | "name_empty" | "name_too_long" | "role_too_long" | "bad_site"; export class BotError extends Error { - constructor(readonly code: BotErrorCode, message: string) { + readonly code: BotErrorCode; + + constructor(code: BotErrorCode, message: string) { super(message); this.name = "BotError"; + this.code = code; } } diff --git a/packages/core/src/memory.ts b/packages/core/src/memory.ts index 5540f52..d3563b9 100644 --- a/packages/core/src/memory.ts +++ b/packages/core/src/memory.ts @@ -21,8 +21,11 @@ export interface Note { id: number; fact: string; tainted: boolean; createdAt: n export interface RememberOptions { tainted: boolean; kinds: readonly ReadKind[]; now?: number } export class MemoryError extends Error { - constructor(readonly code: "too_long" | "empty" | "no_provenance" | "too_broad", message: string) { + readonly code: "too_long" | "empty" | "no_provenance" | "too_broad"; + + constructor(code: "too_long" | "empty" | "no_provenance" | "too_broad", message: string) { super(message); + this.code = code; } } diff --git a/packages/core/src/money.ts b/packages/core/src/money.ts index 19d3331..9495900 100644 --- a/packages/core/src/money.ts +++ b/packages/core/src/money.ts @@ -10,12 +10,15 @@ export interface Money { } export class MoneyError extends Error { + readonly code: "mismatch" | "negative" | "precision" | "unknown_asset"; + constructor( - readonly code: "mismatch" | "negative" | "precision" | "unknown_asset", + code: "mismatch" | "negative" | "precision" | "unknown_asset", message: string, ) { super(message); this.name = "MoneyError"; + this.code = code; } } diff --git a/packages/core/src/reminders.ts b/packages/core/src/reminders.ts index 53aba09..76c8270 100644 --- a/packages/core/src/reminders.ts +++ b/packages/core/src/reminders.ts @@ -25,12 +25,15 @@ const TRANSITIONS: Record = { }; export class ReminderError extends Error { + readonly code: "in_past" | "too_far" | "bad_time" | "empty" | "not_found" | "bad_transition"; + constructor( - readonly code: "in_past" | "too_far" | "bad_time" | "empty" | "not_found" | "bad_transition", + code: "in_past" | "too_far" | "bad_time" | "empty" | "not_found" | "bad_transition", message: string, ) { super(message); this.name = "ReminderError"; + this.code = code; } } diff --git a/packages/core/src/repair.ts b/packages/core/src/repair.ts index 09b42f2..7436e67 100644 --- a/packages/core/src/repair.ts +++ b/packages/core/src/repair.ts @@ -4,8 +4,11 @@ import type { JsonSchema } from "./types.ts"; // Each repair is recorded so the audit and the eval can see what was fixed. export class RepairError extends Error { - constructor(readonly code: "bad_json", message: string) { + readonly code: "bad_json"; + + constructor(code: "bad_json", message: string) { super(`${code}: ${message}`); + this.code = code; } } diff --git a/packages/core/src/wallet-history.ts b/packages/core/src/wallet-history.ts index 088a155..8224bc2 100644 --- a/packages/core/src/wallet-history.ts +++ b/packages/core/src/wallet-history.ts @@ -201,9 +201,12 @@ export const READ_METHODS = ["eth_blockNumber", "eth_getLogs", "eth_getBlockByNu export type ReadMethod = (typeof READ_METHODS)[number]; export class RpcError extends Error { - constructor(readonly code: string) { + readonly code: string; + + constructor(code: string) { super(`The RPC could not answer (${code}).`); this.name = "RpcError"; + this.code = code; } } diff --git a/packages/eval/package.json b/packages/eval/package.json index 88166be..7756cb8 100644 --- a/packages/eval/package.json +++ b/packages/eval/package.json @@ -10,15 +10,15 @@ "scripts": { "typecheck": "tsc -p tsconfig.json", "test": "vitest run", - "eval": "node --experimental-strip-types src/cli.ts", - "eval:mac": "node --experimental-strip-types src/mac-eval.ts", - "spike:x402": "node --experimental-transform-types --no-warnings src/x402-spike.ts", - "eval:x402-merchant": "node --experimental-transform-types --no-warnings src/x402-merchant-eval.ts", - "eval:trajectory": "node --experimental-transform-types --no-warnings src/trajectory-eval.ts", - "spike:mcp": "node --experimental-transform-types --no-warnings src/mcp-spike.ts", - "spike:connector-draft": "node --experimental-transform-types --no-warnings src/connector-draft-eval.ts", - "eval:modes": "node --experimental-transform-types --no-warnings src/mode-table.ts", - "eval:bots": "node --experimental-transform-types --no-warnings src/bot-eval.ts" + "eval": "node --no-warnings src/cli.ts", + "eval:mac": "node --no-warnings src/mac-eval.ts", + "spike:x402": "node --no-warnings src/x402-spike.ts", + "eval:x402-merchant": "node --no-warnings src/x402-merchant-eval.ts", + "eval:trajectory": "node --no-warnings src/trajectory-eval.ts", + "spike:mcp": "node --no-warnings src/mcp-spike.ts", + "spike:connector-draft": "node --no-warnings src/connector-draft-eval.ts", + "eval:modes": "node --no-warnings src/mode-table.ts", + "eval:bots": "node --no-warnings src/bot-eval.ts" }, "dependencies": { "@hermit/core": "workspace:*", diff --git a/packages/eval/src/bot-eval.ts b/packages/eval/src/bot-eval.ts index bdaf7b2..406bc7d 100644 --- a/packages/eval/src/bot-eval.ts +++ b/packages/eval/src/bot-eval.ts @@ -1,6 +1,6 @@ // Multi-bot eval (spec 6.4, PDR-003): role following and grant refusals for three synthetic bots, through the real // composition root with the model on llama-server, and the routing of "make me a bot" (no model). -// Usage: node --experimental-transform-types --no-warnings src/bot-eval.ts [profile-id] [--think N] [--only id] [--family role|refusal] [--routing-only] [--out file.jsonl] [--url http://localhost:8090] +// Usage: node --no-warnings src/bot-eval.ts [profile-id] [--think N] [--only id] [--family role|refusal] [--routing-only] [--out file.jsonl] [--url http://localhost:8090] import { readFileSync, writeFileSync } from "node:fs"; import { nodeSql } from "@hermit/sql-node"; import { ed25519Signer } from "@hermit/cage"; diff --git a/packages/eval/src/connector-draft-eval.ts b/packages/eval/src/connector-draft-eval.ts index 2b9c00a..5fe876a 100644 --- a/packages/eval/src/connector-draft-eval.ts +++ b/packages/eval/src/connector-draft-eval.ts @@ -1,6 +1,6 @@ // SL-52 spike: BotPsy drafts connector specs from API doc excerpts on the Mac lab's llama-server (the phone's // GGUF). Code assembles, validates and scores; findings in docs/research/connector-draft-spike.md. -// Usage: node --experimental-transform-types --no-warnings src/connector-draft-eval.ts [--mode owned|raw] +// Usage: node --no-warnings src/connector-draft-eval.ts [--mode owned|raw] // [--harness v0|v1] [--think N] [--set dev|holdout] [--seeds 7,8,9] [--only id] [--url http://localhost:8090] [--out file.jsonl] import { writeFileSync } from "node:fs"; import { llamaServerEngine, type Trace } from "./llama-engine.ts"; diff --git a/packages/eval/src/decision-check.ts b/packages/eval/src/decision-check.ts index 121f6bb..b946b89 100644 --- a/packages/eval/src/decision-check.ts +++ b/packages/eval/src/decision-check.ts @@ -1,6 +1,6 @@ // Decision-model spike (docs/research/decision-models.md): can a letter-choice "decision" prompt pick the skill // on the cases the phrase router misses? Same prompt for any llama-server model (BotPsy control, Intern-Decision). -// Usage: node --experimental-transform-types src/decision-check.ts [--decision-token 248077] [--sets va,holdout] +// Usage: node src/decision-check.ts [--decision-token 248077] [--sets va,holdout] import { routeIntent } from "../../model/src/intent-hints.ts"; import { firstWinSkills } from "../../skills/src/catalog.ts"; import type { EvalCase } from "./cases.ts"; diff --git a/packages/eval/src/long-form-eval.ts b/packages/eval/src/long-form-eval.ts index 26db3ab..01ddb05 100644 --- a/packages/eval/src/long-form-eval.ts +++ b/packages/eval/src/long-form-eval.ts @@ -2,7 +2,7 @@ // file and harness as the phone; only speed differs). Self-contained, so the same file measures master's snapshot (the // "before") and this branch: it streams from llama-server itself, so time to first token is what a person would see. // -// Usage: node --experimental-transform-types --no-warnings src/long-form-eval.ts [--out file.jsonl] +// Usage: node --no-warnings src/long-form-eval.ts [--out file.jsonl] // config: before (master as shipped), long (the shipped long cap), normal (the normal cap: a hot phone, Seguir until // done), long-think (the long cap with thinking 256), detect (the blind detection set, no model). import { writeFileSync } from "node:fs"; diff --git a/packages/eval/src/mac-eval.ts b/packages/eval/src/mac-eval.ts index d44d993..19c50ea 100644 --- a/packages/eval/src/mac-eval.ts +++ b/packages/eval/src/mac-eval.ts @@ -1,5 +1,5 @@ // Desktop harness eval: same cases, same GGUF, same harness code as the phone, on llama-server. -// Usage: node --experimental-strip-types src/mac-eval.ts [--url http://localhost:8090] [--out file.jsonl] +// Usage: node src/mac-eval.ts [--url http://localhost:8090] [--out file.jsonl] import { writeFileSync } from "node:fs"; import { describeNowForModel } from "@hermit/core"; import { createModelPort, profileById } from "@hermit/model"; diff --git a/packages/eval/src/mode-table.ts b/packages/eval/src/mode-table.ts index 88dca5a..556a31f 100644 --- a/packages/eval/src/mode-table.ts +++ b/packages/eval/src/mode-table.ts @@ -1,6 +1,6 @@ // Multi-bot eval (spec 6.4.1): every permission mode's decisions over the tier table, attended and alone, clean and tainted. // No model: `decide()` against an oracle written from the spec's table. Usage: -// node --experimental-transform-types --no-warnings src/mode-table.ts [--write] (--write puts the table in the README) +// node --no-warnings src/mode-table.ts [--write] (--write puts the table in the README) import { readFileSync, writeFileSync } from "node:fs"; import { argsHash, PERMISSION_MODES, SKILL_GROUPS, skillId, tierOf } from "@hermit/core"; import type { PermissionMode, ReadKind, Risk, RiskTier, SessionState, SkillGroup, TaintSource, ToolCall } from "@hermit/core"; diff --git a/packages/eval/src/trajectory-eval.ts b/packages/eval/src/trajectory-eval.ts index e8e6104..d94bcd5 100644 --- a/packages/eval/src/trajectory-eval.ts +++ b/packages/eval/src/trajectory-eval.ts @@ -1,6 +1,6 @@ // Trajectory eval: whole conversations through the real composition root (SQL, cage, // loop, skills) with the model on llama-server. Graded on end state, not on the first action. -// Usage: node --experimental-transform-types src/trajectory-eval.ts [profile-id] [--think N] [--only id] [--out file.jsonl] +// Usage: node src/trajectory-eval.ts [profile-id] [--think N] [--only id] [--out file.jsonl] import { readFileSync, writeFileSync } from "node:fs"; import { nodeSql } from "@hermit/sql-node"; import { ed25519Signer } from "@hermit/cage"; diff --git a/packages/eval/src/web-task-eval.ts b/packages/eval/src/web-task-eval.ts index 9d32d20..1b964cc 100644 --- a/packages/eval/src/web-task-eval.ts +++ b/packages/eval/src/web-task-eval.ts @@ -1,6 +1,6 @@ // SL-50 spike: BotPsy on known web tasks over simulated accessibility-tree pages, on the Mac lab's // llama-server with the phone's GGUF. Code sequences, validates and guards; the model picks one action a step. -// Usage: node --experimental-transform-types src/web-task-eval.ts [--mode free|forced|both] [--think N] +// Usage: node src/web-task-eval.ts [--mode free|forced|both] [--think N] // [--no-grammar] [--harness v0|v1|v2] [--set dev|noise|holdout] [--seeds 7,8,9] [--only id] [--url http://localhost:8090] [--out file.jsonl] import { writeFileSync } from "node:fs"; import { llamaServerEngine, type Trace } from "./llama-engine.ts"; diff --git a/packages/mail/src/cache.ts b/packages/mail/src/cache.ts index 1ea1eec..77da4ae 100644 --- a/packages/mail/src/cache.ts +++ b/packages/mail/src/cache.ts @@ -16,8 +16,11 @@ export class MailCache { readonly #refOf = new Map(); #next = 1; #shown: { skill: "mail_list" | "mail_search"; items: ShownItem[] } | undefined; + private readonly limit: number; - constructor(private readonly limit = 200) {} + constructor(limit = 200) { + this.limit = limit; + } /** The short id for a message, the same one if it was handed out before. */ put(h: MailHeader): string { diff --git a/packages/model/src/reply-cut.ts b/packages/model/src/reply-cut.ts index 6ad92c0..4c2c45e 100644 --- a/packages/model/src/reply-cut.ts +++ b/packages/model/src/reply-cut.ts @@ -138,8 +138,10 @@ export class ContinuationFilter { private restart = false; private listAt: number | undefined; private out = ""; + private readonly partial: string; - constructor(private readonly partial: string) { + constructor(partial: string) { + this.partial = partial; const lines = partial.split("\n"); this.said = lines.map(contentOf).filter((c) => c.length >= 3); const lists: string[][] = [[]]; diff --git a/packages/night/src/run.ts b/packages/night/src/run.ts index f27692c..02bbdac 100644 --- a/packages/night/src/run.ts +++ b/packages/night/src/run.ts @@ -172,8 +172,11 @@ type JobOutcome = | { status: "paused"; reason: PauseReason }; class Paused extends Error { - constructor(readonly reason: PauseReason) { + readonly reason: PauseReason; + + constructor(reason: PauseReason) { super(reason); + this.reason = reason; } } diff --git a/scripts/eval/mac-run.sh b/scripts/eval/mac-run.sh index f99919b..7636b4b 100755 --- a/scripts/eval/mac-run.sh +++ b/scripts/eval/mac-run.sh @@ -8,5 +8,5 @@ out=$1; shift mkdir -p /tmp/hermit-eval cd "$root/packages/eval" start=$(date +%s) -${HERMIT_HEAVY:-} nice -n 10 node --experimental-transform-types --no-warnings src/mac-eval.ts ${PROFILE:-botpsy-q4-native-think256} "$@" --out /tmp/hermit-eval/$out.jsonl 2>&1 | grep -v "^pass\|^FAIL" | tail -5 +${HERMIT_HEAVY:-} nice -n 10 node --no-warnings src/mac-eval.ts ${PROFILE:-botpsy-q4-native-think256} "$@" --out /tmp/hermit-eval/$out.jsonl 2>&1 | grep -v "^pass\|^FAIL" | tail -5 echo " ($out, $(( $(date +%s)-start ))s)"