polymath-society 0.2.4 → 0.2.5

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/index.js CHANGED
@@ -3012,7 +3012,7 @@ function buildOperate(p, detail) {
3012
3012
  // src/server.ts
3013
3013
  import http from "http";
3014
3014
  import { promises as fs21 } from "fs";
3015
- import path25 from "path";
3015
+ import path26 from "path";
3016
3016
  import { fileURLToPath as fileURLToPath2 } from "url";
3017
3017
 
3018
3018
  // src/auth.ts
@@ -5154,8 +5154,8 @@ function getErrorMap() {
5154
5154
 
5155
5155
  // ../../node_modules/zod/v3/helpers/parseUtil.js
5156
5156
  var makeIssue = (params) => {
5157
- const { data, path: path26, errorMaps, issueData } = params;
5158
- const fullPath = [...path26, ...issueData.path || []];
5157
+ const { data, path: path27, errorMaps, issueData } = params;
5158
+ const fullPath = [...path27, ...issueData.path || []];
5159
5159
  const fullIssue = {
5160
5160
  ...issueData,
5161
5161
  path: fullPath
@@ -5271,11 +5271,11 @@ var errorUtil;
5271
5271
 
5272
5272
  // ../../node_modules/zod/v3/types.js
5273
5273
  var ParseInputLazyPath = class {
5274
- constructor(parent, value, path26, key) {
5274
+ constructor(parent, value, path27, key) {
5275
5275
  this._cachedPath = [];
5276
5276
  this.parent = parent;
5277
5277
  this.data = value;
5278
- this._path = path26;
5278
+ this._path = path27;
5279
5279
  this._key = key;
5280
5280
  }
5281
5281
  get path() {
@@ -18062,39 +18062,39 @@ function createOpenAI(options = {}) {
18062
18062
  });
18063
18063
  const createChatModel = (modelId, settings = {}) => new OpenAIChatLanguageModel(modelId, settings, {
18064
18064
  provider: `${providerName}.chat`,
18065
- url: ({ path: path26 }) => `${baseURL}${path26}`,
18065
+ url: ({ path: path27 }) => `${baseURL}${path27}`,
18066
18066
  headers: getHeaders,
18067
18067
  compatibility,
18068
18068
  fetch: options.fetch
18069
18069
  });
18070
18070
  const createCompletionModel = (modelId, settings = {}) => new OpenAICompletionLanguageModel(modelId, settings, {
18071
18071
  provider: `${providerName}.completion`,
18072
- url: ({ path: path26 }) => `${baseURL}${path26}`,
18072
+ url: ({ path: path27 }) => `${baseURL}${path27}`,
18073
18073
  headers: getHeaders,
18074
18074
  compatibility,
18075
18075
  fetch: options.fetch
18076
18076
  });
18077
18077
  const createEmbeddingModel = (modelId, settings = {}) => new OpenAIEmbeddingModel(modelId, settings, {
18078
18078
  provider: `${providerName}.embedding`,
18079
- url: ({ path: path26 }) => `${baseURL}${path26}`,
18079
+ url: ({ path: path27 }) => `${baseURL}${path27}`,
18080
18080
  headers: getHeaders,
18081
18081
  fetch: options.fetch
18082
18082
  });
18083
18083
  const createImageModel = (modelId, settings = {}) => new OpenAIImageModel(modelId, settings, {
18084
18084
  provider: `${providerName}.image`,
18085
- url: ({ path: path26 }) => `${baseURL}${path26}`,
18085
+ url: ({ path: path27 }) => `${baseURL}${path27}`,
18086
18086
  headers: getHeaders,
18087
18087
  fetch: options.fetch
18088
18088
  });
18089
18089
  const createTranscriptionModel = (modelId) => new OpenAITranscriptionModel(modelId, {
18090
18090
  provider: `${providerName}.transcription`,
18091
- url: ({ path: path26 }) => `${baseURL}${path26}`,
18091
+ url: ({ path: path27 }) => `${baseURL}${path27}`,
18092
18092
  headers: getHeaders,
18093
18093
  fetch: options.fetch
18094
18094
  });
18095
18095
  const createSpeechModel = (modelId) => new OpenAISpeechModel(modelId, {
18096
18096
  provider: `${providerName}.speech`,
18097
- url: ({ path: path26 }) => `${baseURL}${path26}`,
18097
+ url: ({ path: path27 }) => `${baseURL}${path27}`,
18098
18098
  headers: getHeaders,
18099
18099
  fetch: options.fetch
18100
18100
  });
@@ -18115,7 +18115,7 @@ function createOpenAI(options = {}) {
18115
18115
  const createResponsesModel = (modelId) => {
18116
18116
  return new OpenAIResponsesLanguageModel(modelId, {
18117
18117
  provider: `${providerName}.responses`,
18118
- url: ({ path: path26 }) => `${baseURL}${path26}`,
18118
+ url: ({ path: path27 }) => `${baseURL}${path27}`,
18119
18119
  headers: getHeaders,
18120
18120
  fetch: options.fetch
18121
18121
  });
@@ -21681,9 +21681,31 @@ async function handleVisibility(dataDir, method, body) {
21681
21681
  }
21682
21682
  }
21683
21683
 
21684
+ // src/dataHome.ts
21685
+ import { existsSync as existsSync4 } from "fs";
21686
+ import os5 from "os";
21687
+ import path25 from "path";
21688
+ function electronAppData() {
21689
+ const candidates = [
21690
+ "/Applications/Polymath.app/Contents/Resources/standalone/.data",
21691
+ path25.join(os5.homedir(), "Applications", "Polymath.app", "Contents", "Resources", "standalone", ".data")
21692
+ ];
21693
+ for (const c of candidates) if (existsSync4(path25.join(c, "coding"))) return c;
21694
+ return null;
21695
+ }
21696
+ function resolveDataRoot(env = process.env, cwd = process.cwd(), appData = electronAppData) {
21697
+ const fromEnv = env.POLYMATH_DATA_DIR;
21698
+ if (fromEnv && fromEnv.trim()) return path25.resolve(fromEnv);
21699
+ const local = path25.join(cwd, ".data");
21700
+ if (existsSync4(local)) return local;
21701
+ const fromApp = appData();
21702
+ if (fromApp) return fromApp;
21703
+ return path25.join(os5.homedir(), ".polymath-society", "data");
21704
+ }
21705
+
21684
21706
  // src/server.ts
21685
- var __dirname = path25.dirname(fileURLToPath2(import.meta.url));
21686
- var UI_DIR = path25.join(__dirname, "web");
21707
+ var __dirname = path26.dirname(fileURLToPath2(import.meta.url));
21708
+ var UI_DIR = path26.join(__dirname, "web");
21687
21709
  var DEFAULT_SHARE_URL = "https://polymathsociety.us/api/coding-share";
21688
21710
  var MIME = {
21689
21711
  ".html": "text/html; charset=utf-8",
@@ -21714,19 +21736,19 @@ async function readBody(req, maxBytes = 8e6) {
21714
21736
  async function serveStatic(res, urlPath) {
21715
21737
  const clean = urlPath.split("?")[0];
21716
21738
  const rel = clean === "/" ? "index.html" : clean.replace(/^\/+/, "");
21717
- const full = path25.normalize(path25.join(UI_DIR, rel));
21739
+ const full = path26.normalize(path26.join(UI_DIR, rel));
21718
21740
  if (!full.startsWith(UI_DIR)) {
21719
21741
  res.writeHead(403).end("forbidden");
21720
21742
  return;
21721
21743
  }
21722
21744
  try {
21723
21745
  const data = await fs21.readFile(full);
21724
- res.writeHead(200, { "content-type": MIME[path25.extname(full)] ?? "application/octet-stream" });
21746
+ res.writeHead(200, { "content-type": MIME[path26.extname(full)] ?? "application/octet-stream" });
21725
21747
  res.end(data);
21726
21748
  } catch {
21727
- if (!path25.extname(full)) {
21749
+ if (!path26.extname(full)) {
21728
21750
  try {
21729
- const idx = await fs21.readFile(path25.join(UI_DIR, "index.html"));
21751
+ const idx = await fs21.readFile(path26.join(UI_DIR, "index.html"));
21730
21752
  res.writeHead(200, { "content-type": MIME[".html"] }).end(idx);
21731
21753
  return;
21732
21754
  } catch {
@@ -21751,7 +21773,7 @@ async function handleShare(res, body, opts, dataDir) {
21751
21773
  res.writeHead(400, { "content-type": "application/json" }).end(JSON.stringify({ ok: false, error: "bad JSON" }));
21752
21774
  return;
21753
21775
  }
21754
- const all = opts.profile?.sections ?? {};
21776
+ const all = opts.shareSections ?? opts.profile?.sections ?? {};
21755
21777
  const wanted = parsed.all ? Object.keys(all) : Array.isArray(parsed.sections) ? parsed.sections : [];
21756
21778
  const sections = {};
21757
21779
  for (const key of wanted) {
@@ -21791,8 +21813,10 @@ async function handleShare(res, body, opts, dataDir) {
21791
21813
  }
21792
21814
  }
21793
21815
  function startServer(opts) {
21816
+ let liveProfile = opts.profile;
21817
+ let liveProgress = {};
21794
21818
  const host = opts.host ?? "127.0.0.1";
21795
- const dataDir = opts.dataDir ?? path25.join(process.cwd(), ".data");
21819
+ const dataDir = opts.dataDir ?? resolveDataRoot();
21796
21820
  let serverUrl = "";
21797
21821
  const json = (res, status, body) => res.writeHead(status, { "content-type": MIME[".json"] }).end(JSON.stringify(body));
21798
21822
  const server = http.createServer(async (req, res) => {
@@ -21800,7 +21824,11 @@ function startServer(opts) {
21800
21824
  const url = req.url ?? "/";
21801
21825
  const route = url.split("?")[0];
21802
21826
  if (req.method === "GET" && (url === "/api/coding" || url === "/profile.json" || url.startsWith("/profile.json?"))) {
21803
- res.writeHead(200, { "content-type": MIME[".json"] }).end(JSON.stringify(opts.profile));
21827
+ res.writeHead(200, { "content-type": MIME[".json"] }).end(JSON.stringify(liveProfile));
21828
+ return;
21829
+ }
21830
+ if (req.method === "GET" && url === "/api/progress") {
21831
+ res.writeHead(200, { "content-type": MIME[".json"] }).end(JSON.stringify(liveProgress));
21804
21832
  return;
21805
21833
  }
21806
21834
  if (req.method === "GET" && route === "/meta.json") {
@@ -21940,7 +21968,7 @@ function startServer(opts) {
21940
21968
  }
21941
21969
  if (route === "/api/coding/chat" && req.method === "POST") {
21942
21970
  const body = JSON.parse(await readBody(req) || "{}");
21943
- await handleCodingChat(opts.profile, dataDir, body, res);
21971
+ await handleCodingChat(liveProfile, dataDir, body, res);
21944
21972
  return;
21945
21973
  }
21946
21974
  if (req.method === "POST" && url === "/share") {
@@ -21976,7 +22004,13 @@ function startServer(opts) {
21976
22004
  resolve2({
21977
22005
  url: serverUrl,
21978
22006
  port,
21979
- close: () => new Promise((r) => server.close(() => r()))
22007
+ close: () => new Promise((r) => server.close(() => r())),
22008
+ setProfile: (p) => {
22009
+ liveProfile = p;
22010
+ },
22011
+ setProgress: (p) => {
22012
+ liveProgress = p;
22013
+ }
21980
22014
  });
21981
22015
  });
21982
22016
  });
@@ -134,7 +134,7 @@ var require_secure_json_parse = __commonJS({
134
134
  });
135
135
 
136
136
  // ../../scripts/coding-agglomerate.mts
137
- import path10 from "path";
137
+ import path11 from "path";
138
138
 
139
139
  // ../../lib/agents/coding/agglomerate.ts
140
140
  import { promises as fs4 } from "fs";
@@ -2154,8 +2154,8 @@ function getErrorMap() {
2154
2154
 
2155
2155
  // ../../node_modules/zod/v3/helpers/parseUtil.js
2156
2156
  var makeIssue = (params) => {
2157
- const { data, path: path11, errorMaps, issueData } = params;
2158
- const fullPath = [...path11, ...issueData.path || []];
2157
+ const { data, path: path12, errorMaps, issueData } = params;
2158
+ const fullPath = [...path12, ...issueData.path || []];
2159
2159
  const fullIssue = {
2160
2160
  ...issueData,
2161
2161
  path: fullPath
@@ -2271,11 +2271,11 @@ var errorUtil;
2271
2271
 
2272
2272
  // ../../node_modules/zod/v3/types.js
2273
2273
  var ParseInputLazyPath = class {
2274
- constructor(parent, value, path11, key) {
2274
+ constructor(parent, value, path12, key) {
2275
2275
  this._cachedPath = [];
2276
2276
  this.parent = parent;
2277
2277
  this.data = value;
2278
- this._path = path11;
2278
+ this._path = path12;
2279
2279
  this._key = key;
2280
2280
  }
2281
2281
  get path() {
@@ -15062,39 +15062,39 @@ function createOpenAI(options = {}) {
15062
15062
  });
15063
15063
  const createChatModel = (modelId, settings = {}) => new OpenAIChatLanguageModel(modelId, settings, {
15064
15064
  provider: `${providerName}.chat`,
15065
- url: ({ path: path11 }) => `${baseURL}${path11}`,
15065
+ url: ({ path: path12 }) => `${baseURL}${path12}`,
15066
15066
  headers: getHeaders,
15067
15067
  compatibility,
15068
15068
  fetch: options.fetch
15069
15069
  });
15070
15070
  const createCompletionModel = (modelId, settings = {}) => new OpenAICompletionLanguageModel(modelId, settings, {
15071
15071
  provider: `${providerName}.completion`,
15072
- url: ({ path: path11 }) => `${baseURL}${path11}`,
15072
+ url: ({ path: path12 }) => `${baseURL}${path12}`,
15073
15073
  headers: getHeaders,
15074
15074
  compatibility,
15075
15075
  fetch: options.fetch
15076
15076
  });
15077
15077
  const createEmbeddingModel = (modelId, settings = {}) => new OpenAIEmbeddingModel(modelId, settings, {
15078
15078
  provider: `${providerName}.embedding`,
15079
- url: ({ path: path11 }) => `${baseURL}${path11}`,
15079
+ url: ({ path: path12 }) => `${baseURL}${path12}`,
15080
15080
  headers: getHeaders,
15081
15081
  fetch: options.fetch
15082
15082
  });
15083
15083
  const createImageModel = (modelId, settings = {}) => new OpenAIImageModel(modelId, settings, {
15084
15084
  provider: `${providerName}.image`,
15085
- url: ({ path: path11 }) => `${baseURL}${path11}`,
15085
+ url: ({ path: path12 }) => `${baseURL}${path12}`,
15086
15086
  headers: getHeaders,
15087
15087
  fetch: options.fetch
15088
15088
  });
15089
15089
  const createTranscriptionModel = (modelId) => new OpenAITranscriptionModel(modelId, {
15090
15090
  provider: `${providerName}.transcription`,
15091
- url: ({ path: path11 }) => `${baseURL}${path11}`,
15091
+ url: ({ path: path12 }) => `${baseURL}${path12}`,
15092
15092
  headers: getHeaders,
15093
15093
  fetch: options.fetch
15094
15094
  });
15095
15095
  const createSpeechModel = (modelId) => new OpenAISpeechModel(modelId, {
15096
15096
  provider: `${providerName}.speech`,
15097
- url: ({ path: path11 }) => `${baseURL}${path11}`,
15097
+ url: ({ path: path12 }) => `${baseURL}${path12}`,
15098
15098
  headers: getHeaders,
15099
15099
  fetch: options.fetch
15100
15100
  });
@@ -15115,7 +15115,7 @@ function createOpenAI(options = {}) {
15115
15115
  const createResponsesModel = (modelId) => {
15116
15116
  return new OpenAIResponsesLanguageModel(modelId, {
15117
15117
  provider: `${providerName}.responses`,
15118
- url: ({ path: path11 }) => `${baseURL}${path11}`,
15118
+ url: ({ path: path12 }) => `${baseURL}${path12}`,
15119
15119
  headers: getHeaders,
15120
15120
  fetch: options.fetch
15121
15121
  });
@@ -15848,18 +15848,177 @@ async function agglomerate(opts) {
15848
15848
  }
15849
15849
  }
15850
15850
 
15851
+ // ../../lib/agents/coding/profile.ts
15852
+ import path10 from "path";
15853
+
15854
+ // ../../lib/agents/coding/walkthrough.ts
15855
+ var IDLE_CAP_MS = 12 * 6e4;
15856
+
15857
+ // ../coding-core/dist/words.js
15858
+ var NOTE = "((ran|created|edited|read|wrote|searched) (a|an|\\d+) [a-z]+|updated todos)";
15859
+ var TRANSCRIPT_LINE_RE = new RegExp(`^\\s*(${NOTE})((,| and) ${NOTE})*\\s*$|^\\s*thought for .{1,30}$`, "im");
15860
+
15861
+ // ../../lib/calibration/index.ts
15862
+ var DEFAULT_CALIBRATION = {
15863
+ version: "2026-07-12.2",
15864
+ // = RUBRIC_FINGERPRINT of the shipped npm rubric (packages/coding-analyzer/
15865
+ // src/grade/criteria.ts). A unit test fails loud when the rubric changes
15866
+ // without this being updated (and re-pushed to the server).
15867
+ rubricVersion: "f51b3a93a3",
15868
+ // Canonical scale = the one the product owner set for the public report
15869
+ // (11=0.01% … 8=2%), extended downward from the old report ladder. The old
15870
+ // CodeAnalysisView / npm-viewer maps (7→10%/15%, 6→25%/30%) were drift, not
15871
+ // intent.
15872
+ scoreBands: [
15873
+ { score: 11, label: "Top 0.01%" },
15874
+ { score: 10, label: "Top 0.1%" },
15875
+ { score: 9, label: "Top 0.5%" },
15876
+ { score: 8, label: "Top 2%" },
15877
+ { score: 7, label: "Top 5%" },
15878
+ { score: 6, label: "Top 15%" },
15879
+ { score: 5, label: "Top 50%" },
15880
+ { score: 4, label: "Top 65%" },
15881
+ { score: 3, label: "Top 80%" },
15882
+ { score: 2, label: "Top 90%" },
15883
+ { score: 1, label: "Top 97%" }
15884
+ ],
15885
+ minRankedScore: 6,
15886
+ benchmarkBands: [
15887
+ {
15888
+ level: "11",
15889
+ name: "Superhuman",
15890
+ rank: "Top 0.01%",
15891
+ oneIn: "1 in 10,000+",
15892
+ meaning: "Beyond the normal human ceiling for the trait \u2014 the genuine power-law outlier. Almost no one earns this; when the evidence shows it, it is scored, not rounded down.",
15893
+ foundIn: [
15894
+ "Fields Medal and Nobel-track researchers",
15895
+ "Founders of generational companies",
15896
+ "The handful of people a frontier field is named after"
15897
+ ],
15898
+ maxTopPct: 0.01
15899
+ },
15900
+ {
15901
+ level: "10",
15902
+ name: "World-class",
15903
+ rank: "Top 0.1%",
15904
+ oneIn: "1 in 1,000",
15905
+ meaning: "Among the best alive at this trait \u2014 the level entire institutions are built to find.",
15906
+ foundIn: [
15907
+ "Researchers at frontier AI labs",
15908
+ "Faculty at top-5 research universities",
15909
+ "IMO / IOI medalists",
15910
+ "Founders backed by the top decile of venture firms"
15911
+ ],
15912
+ maxTopPct: 0.1
15913
+ },
15914
+ {
15915
+ level: "9",
15916
+ name: "Exceptional",
15917
+ rank: "Top 1%",
15918
+ oneIn: "1 in 100",
15919
+ meaning: "Clearly exceptional \u2014 the strongest person on most strong teams.",
15920
+ foundIn: [
15921
+ "PhD students at top programs",
15922
+ "Early engineers at breakout startups",
15923
+ "YC-class founders",
15924
+ "National olympiad finalists"
15925
+ ],
15926
+ maxTopPct: 1
15927
+ },
15928
+ {
15929
+ level: "8",
15930
+ name: "Strong",
15931
+ rank: "Top 10%",
15932
+ oneIn: "1 in 10",
15933
+ meaning: "Strong against the whole population \u2014 the best person in most rooms, not every room.",
15934
+ foundIn: [
15935
+ "Senior engineers at selective tech companies",
15936
+ "Graduates of demanding technical programs",
15937
+ "Operators who get promoted everywhere they go"
15938
+ ],
15939
+ maxTopPct: 10
15940
+ },
15941
+ {
15942
+ level: "5",
15943
+ name: "Median",
15944
+ rank: "50th percentile",
15945
+ oneIn: "1 in 2",
15946
+ meaning: 'The middle of the general population. The reference class is all ~8 billion humans \u2014 so even "strong" above already means top 10% of everyone.',
15947
+ foundIn: ["The general population \u2014 most people, most places"],
15948
+ maxTopPct: 100
15949
+ }
15950
+ ],
15951
+ codingTiers: {
15952
+ push: { median: 300, sigma: 1.121, tag: "estimated \u2014 log-normal fit", source: "Anthropic 2026 Claude Code study (400k sessions): median engaged user ~8 prompts/day at ~35 words \u2014 ~300 directed words/day; tail shape from its actions-per-prompt distribution. AVERAGE over substantial days, cumulative not spiky." },
15953
+ focus: { median: 0.08, sigma: 0.559, tag: "estimated \u2014 proxy-anchored", source: "median: Anthropic 20h/week engaged-user figure implies ~1h/day of true rapid exchange against an 8h working day; ceiling anchored to the ~4h/day deep-work limit (45% share = 1-in-1,000). AVERAGE share, cumulative not spiky." },
15954
+ orchestration: { tag: "estimated \u2014 behavior bands", source: "no published concurrency distribution exists; ceiling anchored to the Claude Code lead's documented 10-15 parallel sessions" }
15955
+ },
15956
+ codingBenchmarks: {
15957
+ flow: {
15958
+ // typical knowledge worker ≈ 35% of an 8h day focused; ~4h/day is the
15959
+ // recognized deep-work ceiling (Newport) ≈ 50% — most sit far below it.
15960
+ typicalPctOfDay: 0.35,
15961
+ topPctOfDay: 0.5,
15962
+ tag: "measured",
15963
+ source: "RescueTime 2019 (~2h48m focused/day) \xB7 Cal Newport, Deep Work (~4h/day deep-work ceiling)",
15964
+ line: "the best spend ~half the workday in true deep flow; ~4h/day is the human ceiling"
15965
+ },
15966
+ longestRun: {
15967
+ typicalHours: 0.67,
15968
+ // ~40 min before the average worker is interrupted
15969
+ topHours: 4,
15970
+ tag: "measured",
15971
+ source: "RescueTime (avg max ~40 min focus before interruption) \xB7 deep-work single-block ceiling ~3\u20134h",
15972
+ line: "a top performer can hold a single ~3\u20134h uninterrupted block; the average worker breaks at ~40 min"
15973
+ },
15974
+ parallelism: {
15975
+ topMaxConcurrent: 12,
15976
+ // Boris Cherny ~10–15 interactive sessions
15977
+ topAvgConcurrent: 6,
15978
+ // time-weighted average while active (anecdotal, same source)
15979
+ worktreesTip: "3\u20135 git worktrees at once",
15980
+ tag: "anecdotal",
15981
+ source: "Boris Cherny (Claude Code lead, Anthropic): ~10\u201315 concurrent sessions, 'dozens of Claudes running at all times'; 3\u20135 worktrees = 'the single biggest productivity unlock'",
15982
+ line: "the Claude Code lead runs 10\u201315 sessions at once; his #1 tip is 3\u20135 git worktrees in parallel"
15983
+ },
15984
+ throughput: {
15985
+ // Top-0.1% words/day reference lines, anchored to the throughput ladder
15986
+ // (THROUGHPUT_LADDER in throughput.ts): score 10 "world-class sustained" =
15987
+ // 9k/day, score 11 "superhuman ceiling" = 12k/day. Calibrated to the person's
15988
+ // own anchors, not a wild guess — but still a target, not a measured population.
15989
+ topAvgWordsPerDay: 9e3,
15990
+ topPeakWordsPerDay: 12e3,
15991
+ benchLabel: "top 0.1%",
15992
+ // No published "words typed/day" for heavy users — the real story is OUTPUT.
15993
+ loopsHeadline: ">1,000,000 lines of Rust at 99.8% tests passing",
15994
+ loopsDetail: "the Bun runtime was ported Zig\u2192Rust largely autonomously \u2014 hundreds of parallel subagents, two AI reviewers per file",
15995
+ tag: "measured",
15996
+ source: "The Register, May 2026 (Bun Zig\u2192Rust rewrite)",
15997
+ line: "autonomous fleets ported >1M lines of Rust at 99.8% tests passing; a while-loop agent delivered a $50k contract for $297 of compute"
15998
+ }
15999
+ }
16000
+ };
16001
+
16002
+ // ../../lib/agents/coding/benchmarks.ts
16003
+ var BEST = DEFAULT_CALIBRATION.codingBenchmarks;
16004
+
16005
+ // ../../lib/agents/coding/profile.ts
16006
+ var ROOT = process.cwd();
16007
+ var CODING_DIR = process.env.POLYMATH_DATA_DIR ? path10.join(process.env.POLYMATH_DATA_DIR, "coding") : path10.join(ROOT, ".data", "coding");
16008
+ var GRADES = path10.join(CODING_DIR, "grades");
16009
+
15851
16010
  // ../../scripts/coding-agglomerate.mts
15852
16011
  var argv = process.argv.slice(2);
15853
16012
  var model = argv.indexOf("--model") >= 0 ? argv[argv.indexOf("--model") + 1] : "sonnet";
15854
- var CODING = path10.join(process.cwd(), ".data", "coding");
16013
+ var CODING = CODING_DIR;
15855
16014
  async function main() {
15856
16015
  console.log(`[agglomerate] synthesizing across graded sessions on ${model}\u2026`);
15857
- const agg = await agglomerate({ model, gradesDir: path10.join(CODING, "grades"), outFile: path10.join(CODING, "agglomerate.json") });
16016
+ const agg = await agglomerate({ model, gradesDir: path11.join(CODING, "grades"), outFile: path11.join(CODING, "agglomerate.json") });
15858
16017
  if (!agg) {
15859
16018
  console.log("[agglomerate] no grades found \u2014 run coding-grade.mts first");
15860
16019
  return;
15861
16020
  }
15862
- console.log(`[agglomerate] ${agg.sessionsUsed} sessions \xB7 ${agg.criteria.length} criteria \xB7 ${agg.signatureMoves.length} signature moves \xB7 $${agg.meta.costUsd?.toFixed(2) ?? "?"}`);
16021
+ console.log(`[agglomerate] ${agg.sessionsUsed} sessions \xB7 ${agg.criteria.length} criteria \xB7 ${agg.signatureMoves.length} signature moves`);
15863
16022
  console.log(`
15864
16023
  OVERALL:
15865
16024
  ${agg.overall}