openpond 0.0.51 → 0.0.53

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.
Files changed (95) hide show
  1. package/dist/chunks/{app-layer-DCUTQ4TM.js → app-layer-T26MAAGI.js} +2 -2
  2. package/dist/chunks/{app-server-runtime-Q3IGU5YB.js → app-server-runtime-332SNX3U.js} +6 -6
  3. package/dist/chunks/{apps-JDRCDAPE.js → apps-7KLTYKHN.js} +2 -2
  4. package/dist/chunks/{chunk-3PYU3XCS.js → chunk-55KT7K5P.js} +1 -2
  5. package/dist/chunks/{chunk-PFNX5XOT.js → chunk-6QWTEC2D.js} +1 -1
  6. package/dist/chunks/{chunk-IGSEFSMA.js → chunk-EIRW6Z6S.js} +1 -1
  7. package/dist/chunks/{chunk-R4PRXXTC.js → chunk-JSRCXDIL.js} +32 -32
  8. package/dist/chunks/{chunk-J4LLKY6E.js → chunk-LOYP2CAV.js} +1 -1
  9. package/dist/chunks/{chunk-CSN3DLWJ.js → chunk-M2OSF2YN.js} +1 -1
  10. package/dist/chunks/{chunk-UDTHREHB.js → chunk-TSICWFAI.js} +174 -97
  11. package/dist/chunks/{chunk-35OYRVVH.js → chunk-US7DOPAH.js} +19 -4
  12. package/dist/chunks/{chunk-V3HADQL5.js → chunk-V7CBYHXO.js} +1 -1
  13. package/dist/chunks/{chunk-LYEXNSCO.js → chunk-YGYO5AQF.js} +2 -2
  14. package/dist/chunks/{cli-2FTM4SXH.js → cli-WGGGZFLN.js} +5 -5
  15. package/dist/chunks/{core-commands-5BRR7TU4.js → core-commands-SND555SC.js} +3 -3
  16. package/dist/chunks/{desktop-test-EQ2BGZOM.js → desktop-test-WSWXNSFS.js} +2 -2
  17. package/dist/chunks/{extension-V3NZ7MU7.js → extension-3IKF6YQE.js} +1 -1
  18. package/dist/chunks/{help-WJBMX37U.js → help-DHGNXUA4.js} +1 -1
  19. package/dist/chunks/{opchat-W7DSKNNB.js → opchat-XYKT5KKO.js} +2 -2
  20. package/dist/chunks/{organizations-RHOF5H4Z.js → organizations-HKVC4CSA.js} +4 -4
  21. package/dist/chunks/{profile-B62ZWPTQ.js → profile-PLWXQHKF.js} +2 -2
  22. package/dist/chunks/{project-agent-QA25HHDV.js → project-agent-JNSP56KG.js} +2 -2
  23. package/dist/chunks/{sandbox-command-JFEVPU4X.js → sandbox-command-Z6LNNSSL.js} +2 -2
  24. package/dist/chunks/{sandbox-template-GEWTAWAR.js → sandbox-template-FVW2UTI4.js} +3 -3
  25. package/dist/chunks/{src-P2BL3KCV.js → src-2TP42H76.js} +3 -3
  26. package/dist/chunks/{src-JOTV67WO.js → src-U7KRR6II.js} +387 -599
  27. package/dist/chunks/{teams-bot-ODSMRNE4.js → teams-bot-FNPT4Q2B.js} +2 -2
  28. package/dist/chunks/{workspaces-7YHBJG5P.js → workspaces-PYRYXKJI.js} +2 -2
  29. package/dist/cli.js +13 -13
  30. package/dist/web/assets/{AppDialog-DylZeiI-.js → AppDialog-BEKS_Ixr.js} +1 -1
  31. package/dist/web/assets/{AppsView-Bz6C0a1u.js → AppsView-CbuT2sT2.js} +1 -1
  32. package/dist/web/assets/{BrowserSidebar-xXFxZP2-.js → BrowserSidebar-DgqVeW5u.js} +1 -1
  33. package/dist/web/assets/{CommandMenu-C9k5VdaR.js → CommandMenu-CQcaEB76.js} +1 -1
  34. package/dist/web/assets/{CommunityView-DcJlUNgd.js → CommunityView-CYX6iFcg.js} +1 -1
  35. package/dist/web/assets/{ComposerCreateImproveStrip-Yt3irJVo.js → ComposerCreateImproveStrip-DY4SQbL4.js} +1 -1
  36. package/dist/web/assets/{GetStartedView-BhD0Ij7c.js → GetStartedView-DnxeZaBB.js} +1 -1
  37. package/dist/web/assets/{LabModelVersionDetailPage-B-OoSJYT.js → LabModelVersionDetailPage-DYTfYGWv.js} +1 -1
  38. package/dist/web/assets/{LabSkillSidebar-dqdSTmHG.js → LabSkillSidebar-BpD-kjP_.js} +1 -1
  39. package/dist/web/assets/{LabsRoute-BMPI4vB8.js → LabsRoute-DVC7eZCs.js} +3 -3
  40. package/dist/web/assets/{MainChatThread-B0ajKiNL.js → MainChatThread-DTiX_8MC.js} +2 -2
  41. package/dist/web/assets/{MainPane-COs4xUGo.js → MainPane-CNoHJkXy.js} +3 -3
  42. package/dist/web/assets/{MarkdownText-CzZ60aWs.js → MarkdownText-_JhfBcQL.js} +1 -1
  43. package/dist/web/assets/{Messages-DGrK4iIj.js → Messages-Bo0-Uvcz.js} +1 -1
  44. package/dist/web/assets/{NativeSkillSidebar-BkpgGLSO.js → NativeSkillSidebar-CHQ87FW2.js} +1 -1
  45. package/dist/web/assets/{NewProjectDialog-BOdCdNcG.js → NewProjectDialog-B-1KuU5u.js} +1 -1
  46. package/dist/web/assets/{OutputsPage-CSBWIFdi.js → OutputsPage-BSimpEpA.js} +1 -1
  47. package/dist/web/assets/{RightChatPanelStack-PZR6NYJj.js → RightChatPanelStack-B8ZOyuFO.js} +1 -1
  48. package/dist/web/assets/{ScheduledWorkPage-WXLnwju_.js → ScheduledWorkPage-Blwy1G8r.js} +1 -1
  49. package/dist/web/assets/{SettingsView-CQJoEx-y.js → SettingsView-CTLTakyn.js} +3 -3
  50. package/dist/web/assets/{TeamChatView-BRnuD-lV.js → TeamChatView-dN3fUCbZ.js} +1 -1
  51. package/dist/web/assets/{TerminalOverlay-B5m8j4_C.js → TerminalOverlay-CPVGeO7U.js} +1 -1
  52. package/dist/web/assets/{TrainingCreationPanel-CA1rt7XZ.js → TrainingCreationPanel-ettNNJBP.js} +1 -1
  53. package/dist/web/assets/{TrainingDraftPanel-C0p3GP1n.js → TrainingDraftPanel-DUJBuII1.js} +1 -1
  54. package/dist/web/assets/{UsageSettingsSection-CpIKj4p-.js → UsageSettingsSection-BOZR3JE_.js} +1 -1
  55. package/dist/web/assets/{WorkspaceDiffPanel-BXk8mdZB.js → WorkspaceDiffPanel-99MjzMkW.js} +3 -3
  56. package/dist/web/assets/{WorkspaceEnvironmentMenu-BO60uNVj.js → WorkspaceEnvironmentMenu-C3s3mTyu.js} +1 -1
  57. package/dist/web/assets/{WorkspaceGitDialogs-hWBfhgaP.js → WorkspaceGitDialogs-BvurXjNP.js} +1 -1
  58. package/dist/web/assets/{WorkspaceMonacoEditor-ULPyacH8.js → WorkspaceMonacoEditor-BCXg9mBQ.js} +3 -3
  59. package/dist/web/assets/{arrow-up-right-CkfCgokz.js → arrow-up-right-DRIT5z3q.js} +1 -1
  60. package/dist/web/assets/{chevron-up-B5URpgIH.js → chevron-up-Hglu-Zx3.js} +1 -1
  61. package/dist/web/assets/{circle-alert-CAvjRdlQ.js → circle-alert-Crh3Zr2m.js} +1 -1
  62. package/dist/web/assets/{cloud-upload-DeQEwz1o.js → cloud-upload-mSm9KIL4.js} +1 -1
  63. package/dist/web/assets/{cssMode-B4V5a3OX.js → cssMode-CkQ4x6JA.js} +1 -1
  64. package/dist/web/assets/{folder-DgS_U9Lq.js → folder-DMeODEQJ.js} +1 -1
  65. package/dist/web/assets/{folder-git-2-BTtbxKWf.js → folder-git-2-B8TV5i0V.js} +1 -1
  66. package/dist/web/assets/{folder-open-CqjIkaDK.js → folder-open-DXaun_C3.js} +1 -1
  67. package/dist/web/assets/{folder-plus-CsS0KPW5.js → folder-plus-CUbTwu82.js} +1 -1
  68. package/dist/web/assets/{git-branch-BN2ijBYt.js → git-branch-CUlgF0kK.js} +1 -1
  69. package/dist/web/assets/{git-commit-horizontal-CVsl4u1O.js → git-commit-horizontal-DAQfyhbS.js} +1 -1
  70. package/dist/web/assets/{htmlMode-DRksGWJA.js → htmlMode-BfyAplZo.js} +1 -1
  71. package/dist/web/assets/index-Blindd8c.js +1 -0
  72. package/dist/web/assets/{index-Cxq5q-6B.js → index-CDJX5ZxL.js} +3 -3
  73. package/dist/web/assets/{info-DwVXRQli.js → info-Ll3PkeGE.js} +1 -1
  74. package/dist/web/assets/{jsonMode-eJvgtAy-.js → jsonMode-C9Vibh0P.js} +1 -1
  75. package/dist/web/assets/{lspLanguageFeatures-DCk7zUI-.js → lspLanguageFeatures-CFoA9--Z.js} +1 -1
  76. package/dist/web/assets/{monaco.contribution-B02C5mDa.js → monaco.contribution-C2q-tDuk.js} +2 -2
  77. package/dist/web/assets/{monaco.contribution-DWVguH46.js → monaco.contribution-C8tRjUqy.js} +2 -2
  78. package/dist/web/assets/{monaco.contribution-WGT1eYvk.js → monaco.contribution-Co4ZPnCC.js} +2 -2
  79. package/dist/web/assets/{monaco.contribution-CPnN-lZN.js → monaco.contribution-vWDjhuCI.js} +2 -2
  80. package/dist/web/assets/{play-DGCzapdE.js → play-lC5KpmRD.js} +1 -1
  81. package/dist/web/assets/{python-DRPzruv8.js → python-I5xkyvMs.js} +1 -1
  82. package/dist/web/assets/{refresh-cw-BKF4NhDI.js → refresh-cw-8a_wz4tX.js} +1 -1
  83. package/dist/web/assets/{save-DQXtfx_4.js → save-Dj9ex3Ce.js} +1 -1
  84. package/dist/web/assets/{square-Dp5eGICS.js → square-DfEM9XgY.js} +1 -1
  85. package/dist/web/assets/{square-pen-j-mZ_UkO.js → square-pen-CgX3HoJ6.js} +1 -1
  86. package/dist/web/assets/{toggleHighContrast-wDmA5YPb.js → toggleHighContrast-BkNzz1Bg.js} +1 -1
  87. package/dist/web/assets/{tsMode-DELTv39m.js → tsMode-CNwaV0ZJ.js} +1 -1
  88. package/dist/web/assets/{upload-_rNli8wK.js → upload-Co5zYY9Z.js} +1 -1
  89. package/dist/web/assets/{useLocalAgentSchedules-DRVUfTbv.js → useLocalAgentSchedules-QY4_XS2F.js} +1 -1
  90. package/dist/web/assets/{wifi-off-uKPwd8A7.js → wifi-off-CFzyn7Tf.js} +1 -1
  91. package/dist/web/assets/{workers-CXbluSB3.js → workers-DqFxl1zu.js} +1 -1
  92. package/dist/web/assets/{yaml-BMqi-3ui.js → yaml-Bbm66uDK.js} +1 -1
  93. package/dist/web/index.html +1 -1
  94. package/package.json +1 -1
  95. package/dist/web/assets/index-SKvMOpII.js +0 -1
@@ -21,7 +21,7 @@ import {
21
21
  loadOpenPondAccountContext,
22
22
  loadOpenPondHostedModels,
23
23
  streamOpenPondHostedChatTurn
24
- } from "./chunk-IGSEFSMA.js";
24
+ } from "./chunk-EIRW6Z6S.js";
25
25
  import {
26
26
  assertSafeBranchName,
27
27
  isGeneratedWorkspacePath,
@@ -34,14 +34,14 @@ import {
34
34
  truncatePatch,
35
35
  uniqueSortedPaths,
36
36
  workspaceImageContentType
37
- } from "./chunk-V3HADQL5.js";
37
+ } from "./chunk-V7CBYHXO.js";
38
38
  import {
39
39
  HOSTED_CHAT_SYSTEM_PROMPT,
40
40
  VERSION,
41
41
  event,
42
42
  now,
43
43
  textFromUnknown
44
- } from "./chunk-J4LLKY6E.js";
44
+ } from "./chunk-LOYP2CAV.js";
45
45
  import {
46
46
  AppPreferencesSchema,
47
47
  ApplyCreateImproveRunActionRequestSchema,
@@ -158,7 +158,7 @@ import {
158
158
  runAgentSdkProjectCommand,
159
159
  runProfileSkillCommand,
160
160
  sidebarFileBookmarkId
161
- } from "./chunk-3PYU3XCS.js";
161
+ } from "./chunk-55KT7K5P.js";
162
162
  import {
163
163
  AgentSnapshotSchema,
164
164
  AttemptReceiptSchema,
@@ -236,7 +236,7 @@ import {
236
236
  stableId,
237
237
  uniqueEventRefs,
238
238
  validateConnectedAppProviderOperationRequest
239
- } from "./chunk-35OYRVVH.js";
239
+ } from "./chunk-US7DOPAH.js";
240
240
  import {
241
241
  external_exports
242
242
  } from "./chunk-WYDVQOBL.js";
@@ -7869,11 +7869,12 @@ var MAX_PDF_ARTIFACTS = 10;
7869
7869
  var MAX_PDF_BYTES = 20 * 1024 * 1024;
7870
7870
  var execFileAsync = promisify(execFile);
7871
7871
  async function loadBoundedRefinerContext(store, trigger, observations) {
7872
- const [session, turn, events, turns] = await Promise.all([
7872
+ const [session, turn, events, turns, usageRecords] = await Promise.all([
7873
7873
  store.getSession(trigger.runRef),
7874
7874
  store.getTurn(trigger.turnId),
7875
7875
  store.runtimeEventsForSession(trigger.runRef, { limit: 1e3 }),
7876
- store.turnsForSession(trigger.runRef, 1e3)
7876
+ store.turnsForSession(trigger.runRef, 1e3),
7877
+ store.listModelUsageRecords({ turnId: trigger.turnId, limit: 1e4 })
7877
7878
  ]);
7878
7879
  const orderedTurns = [...turns].sort(
7879
7880
  (left, right) => left.startedAt.localeCompare(right.startedAt)
@@ -7900,6 +7901,23 @@ async function loadBoundedRefinerContext(store, trigger, observations) {
7900
7901
  limit: trigger.policy.maxEvidenceEvents
7901
7902
  });
7902
7903
  const assistantOutput = assistantOutputForTurn(events, trigger.turnId);
7904
+ const observationKinds = observations.map((observation) => observation.kind);
7905
+ const receiptProfile = tasksetGradeExecutionProfile(events, trigger.turnId);
7906
+ const durableUsage = {
7907
+ modelRequestCount: usageRecords.length || receiptProfile.modelRequestCount,
7908
+ promptTokens: usageRecords.reduce(
7909
+ (total, record9) => total + (record9.promptTokens ?? 0),
7910
+ 0
7911
+ ) || receiptProfile.promptTokens,
7912
+ completionTokens: usageRecords.reduce(
7913
+ (total, record9) => total + (record9.completionTokens ?? 0),
7914
+ 0
7915
+ ) || receiptProfile.completionTokens,
7916
+ totalTokens: usageRecords.reduce(
7917
+ (total, record9) => total + (record9.totalTokens ?? 0),
7918
+ 0
7919
+ ) || receiptProfile.totalTokens
7920
+ };
7903
7921
  return {
7904
7922
  task: {
7905
7923
  prompt: turn?.prompt ? redactAndBoundRefinerText(turn.prompt, 8e3) : null,
@@ -7908,6 +7926,18 @@ async function loadBoundedRefinerContext(store, trigger, observations) {
7908
7926
  previousAssistantOutput: previousTurn ? assistantOutputForTurn(events, previousTurn.id) : null
7909
7927
  },
7910
7928
  artifactDiagnostics: await inspectBoundedPdfArtifactDiagnostics(session?.cwd),
7929
+ executionProfile: {
7930
+ modelRequestCount: durableUsage.modelRequestCount,
7931
+ failedModelRequestCount: usageRecords.filter(
7932
+ (record9) => record9.status === "failed" || record9.status === "interrupted"
7933
+ ).length,
7934
+ promptTokens: durableUsage.promptTokens,
7935
+ completionTokens: durableUsage.completionTokens,
7936
+ totalTokens: durableUsage.totalTokens,
7937
+ toolFailureCount: observationKinds.filter((kind) => kind === "tool_failure").length,
7938
+ retryCount: observationKinds.filter((kind) => kind === "retry").length,
7939
+ recoveryCount: observationKinds.filter((kind) => kind === "recovery").length
7940
+ },
7911
7941
  eventExcerpts: evidenceEvents.map((runtimeEvent) => {
7912
7942
  const data = asRecord(runtimeEvent.data);
7913
7943
  const result = asRecord(data.result);
@@ -7927,6 +7957,34 @@ async function loadBoundedRefinerContext(store, trigger, observations) {
7927
7957
  })
7928
7958
  };
7929
7959
  }
7960
+ function tasksetGradeExecutionProfile(events, turnId) {
7961
+ const fallback = {
7962
+ modelRequestCount: 0,
7963
+ promptTokens: 0,
7964
+ completionTokens: 0,
7965
+ totalTokens: 0
7966
+ };
7967
+ const diagnostic = [...events].reverse().find(
7968
+ (runtimeEvent) => runtimeEvent.turnId === turnId && runtimeEvent.name === "diagnostic" && runtimeEvent.action === "taskset_grade" && typeof runtimeEvent.output === "string"
7969
+ );
7970
+ if (!diagnostic?.output) return fallback;
7971
+ try {
7972
+ const payload = asRecord(JSON.parse(diagnostic.output));
7973
+ const attempt = asRecord(payload.attempt);
7974
+ const usage = asRecord(attempt.usage);
7975
+ return {
7976
+ modelRequestCount: nonnegativeInteger(attempt.modelRequestCount),
7977
+ promptTokens: nonnegativeInteger(usage.promptTokens),
7978
+ completionTokens: nonnegativeInteger(usage.completionTokens),
7979
+ totalTokens: nonnegativeInteger(usage.totalTokens)
7980
+ };
7981
+ } catch {
7982
+ return fallback;
7983
+ }
7984
+ }
7985
+ function nonnegativeInteger(value) {
7986
+ return typeof value === "number" && Number.isFinite(value) && value >= 0 ? Math.trunc(value) : 0;
7987
+ }
7930
7988
  async function inspectBoundedPdfArtifactDiagnostics(cwd) {
7931
7989
  if (!cwd) return [];
7932
7990
  const pdfs = [];
@@ -11022,6 +11080,19 @@ async function runLocalHarnessRefinerWorker(input) {
11022
11080
  trigger,
11023
11081
  observations
11024
11082
  );
11083
+ const currentObservationHashes = new Set(
11084
+ observations.map((observation) => observation.contentHash)
11085
+ );
11086
+ const recentObservations = (await input.store.listHarnessImprovementArtifacts(
11087
+ workspace.id,
11088
+ "observation",
11089
+ 100
11090
+ )).filter((observation) => !currentObservationHashes.has(observation.contentHash)).sort((left, right) => right.createdAt.localeCompare(left.createdAt)).slice(0, 20).map((observation) => ({
11091
+ ...boundedObservationEvidence(observation),
11092
+ runRef: observation.runRef,
11093
+ turnId: observation.turnId,
11094
+ createdAt: observation.createdAt
11095
+ }));
11025
11096
  const recentOutcomes = (await input.store.listHarnessImprovementArtifacts(
11026
11097
  workspace.id,
11027
11098
  "refiner_outcome",
@@ -11039,6 +11110,8 @@ async function runLocalHarnessRefinerWorker(input) {
11039
11110
  task: boundedContext.task,
11040
11111
  eventExcerpts: boundedContext.eventExcerpts,
11041
11112
  artifactDiagnostics: boundedContext.artifactDiagnostics,
11113
+ executionProfile: boundedContext.executionProfile,
11114
+ recentObservations,
11042
11115
  recentOutcomes,
11043
11116
  sourceFiles: source.files,
11044
11117
  sourceCatalog: source.catalog,
@@ -29374,6 +29447,92 @@ function asRecord11(value) {
29374
29447
  return value && typeof value === "object" && !Array.isArray(value) ? value : {};
29375
29448
  }
29376
29449
 
29450
+ // ../server/src/training/hosted-token-pricing.ts
29451
+ function hostedTokenPricingFromCatalog(raw) {
29452
+ const pricing = record4(record4(record4(raw.metadata).billing).pricing);
29453
+ return {
29454
+ version: requiredString5(pricing.version, "pricing version"),
29455
+ source: requiredString5(pricing.source, "pricing source"),
29456
+ effectiveAt: requiredString5(pricing.effectiveAt, "pricing effective date"),
29457
+ inputUsdPerMillionTokens: requiredRate(
29458
+ pricing.inputUsdPerMillionTokens,
29459
+ "input token rate"
29460
+ ),
29461
+ cachedInputUsdPerMillionTokens: requiredRate(
29462
+ pricing.cachedInputUsdPerMillionTokens,
29463
+ "cached input token rate"
29464
+ ),
29465
+ outputUsdPerMillionTokens: requiredRate(
29466
+ pricing.outputUsdPerMillionTokens,
29467
+ "output token rate"
29468
+ )
29469
+ };
29470
+ }
29471
+ function hostedTokenPricingFromValue(value) {
29472
+ const pricing = record4(value);
29473
+ try {
29474
+ return {
29475
+ version: requiredString5(pricing.version, "pricing version"),
29476
+ source: requiredString5(pricing.source, "pricing source"),
29477
+ effectiveAt: requiredString5(pricing.effectiveAt, "pricing effective date"),
29478
+ inputUsdPerMillionTokens: requiredRate(
29479
+ pricing.inputUsdPerMillionTokens,
29480
+ "input token rate"
29481
+ ),
29482
+ cachedInputUsdPerMillionTokens: requiredRate(
29483
+ pricing.cachedInputUsdPerMillionTokens,
29484
+ "cached input token rate"
29485
+ ),
29486
+ outputUsdPerMillionTokens: requiredRate(
29487
+ pricing.outputUsdPerMillionTokens,
29488
+ "output token rate"
29489
+ )
29490
+ };
29491
+ } catch {
29492
+ return null;
29493
+ }
29494
+ }
29495
+ function hostedUsageCostUsd(usage, pricing) {
29496
+ const normalized = normalizeModelUsageTokens(usage);
29497
+ if (normalized.promptTokens === null && normalized.completionTokens === null) return null;
29498
+ const usageRecord = record4(usage);
29499
+ const cached = Math.min(
29500
+ normalized.promptTokens ?? 0,
29501
+ cachedInputTokens(usageRecord)
29502
+ );
29503
+ const uncached = Math.max(0, (normalized.promptTokens ?? 0) - cached);
29504
+ return (uncached * pricing.inputUsdPerMillionTokens + cached * pricing.cachedInputUsdPerMillionTokens + (normalized.completionTokens ?? 0) * pricing.outputUsdPerMillionTokens) / 1e6;
29505
+ }
29506
+ function cachedInputTokens(usage) {
29507
+ const candidates = [
29508
+ usage.cached_input_tokens,
29509
+ usage.cachedInputTokens,
29510
+ record4(usage.prompt_tokens_details).cached_tokens,
29511
+ record4(usage.promptTokensDetails).cachedTokens,
29512
+ record4(usage.input_tokens_details).cached_tokens,
29513
+ record4(usage.inputTokensDetails).cachedTokens
29514
+ ];
29515
+ for (const value of candidates) {
29516
+ if (typeof value === "number" && Number.isFinite(value) && value >= 0) {
29517
+ return Math.trunc(value);
29518
+ }
29519
+ }
29520
+ return 0;
29521
+ }
29522
+ function record4(value) {
29523
+ return value && typeof value === "object" && !Array.isArray(value) ? value : {};
29524
+ }
29525
+ function requiredString5(value, label) {
29526
+ if (typeof value === "string" && value.trim()) return value.trim();
29527
+ throw new Error(`Hosted model catalog is missing ${label}.`);
29528
+ }
29529
+ function requiredRate(value, label) {
29530
+ if (typeof value === "number" && Number.isFinite(value) && value >= 0) {
29531
+ return value;
29532
+ }
29533
+ throw new Error(`Hosted model catalog is missing ${label}.`);
29534
+ }
29535
+
29377
29536
  // ../server/src/training/taskset-work-attempt-runner.ts
29378
29537
  async function runTasksetWorkAttempt(input) {
29379
29538
  if (input.taskset.environment.kind !== "work") {
@@ -29928,7 +30087,11 @@ async function runTasksetWorkAttempt(input) {
29928
30087
  };
29929
30088
  }
29930
30089
  );
29931
- const providerInferenceUsd = explicitCosts.length ? sumUsd(explicitCosts) : null;
30090
+ const estimatedUsageCosts = input.hostedTokenPricing ? usages.flatMap((usage) => {
30091
+ const cost = hostedUsageCostUsd(usage, input.hostedTokenPricing);
30092
+ return cost === null ? [] : [cost];
30093
+ }) : [];
30094
+ const providerInferenceUsd = explicitCosts.length ? sumUsd(explicitCosts) : estimatedUsageCosts.length ? sumUsd(estimatedUsageCosts) : infrastructureError && usages.length === 0 ? 0 : null;
29932
30095
  const costComponents = [
29933
30096
  providerInferenceUsd,
29934
30097
  workRuntimeCost?.billableUsd ?? null
@@ -31748,92 +31911,6 @@ function isRecord4(value) {
31748
31911
  return Boolean(value) && typeof value === "object" && !Array.isArray(value);
31749
31912
  }
31750
31913
 
31751
- // ../server/src/training/hosted-token-pricing.ts
31752
- function hostedTokenPricingFromCatalog(raw) {
31753
- const pricing = record4(record4(record4(raw.metadata).billing).pricing);
31754
- return {
31755
- version: requiredString5(pricing.version, "pricing version"),
31756
- source: requiredString5(pricing.source, "pricing source"),
31757
- effectiveAt: requiredString5(pricing.effectiveAt, "pricing effective date"),
31758
- inputUsdPerMillionTokens: requiredRate(
31759
- pricing.inputUsdPerMillionTokens,
31760
- "input token rate"
31761
- ),
31762
- cachedInputUsdPerMillionTokens: requiredRate(
31763
- pricing.cachedInputUsdPerMillionTokens,
31764
- "cached input token rate"
31765
- ),
31766
- outputUsdPerMillionTokens: requiredRate(
31767
- pricing.outputUsdPerMillionTokens,
31768
- "output token rate"
31769
- )
31770
- };
31771
- }
31772
- function hostedTokenPricingFromValue(value) {
31773
- const pricing = record4(value);
31774
- try {
31775
- return {
31776
- version: requiredString5(pricing.version, "pricing version"),
31777
- source: requiredString5(pricing.source, "pricing source"),
31778
- effectiveAt: requiredString5(pricing.effectiveAt, "pricing effective date"),
31779
- inputUsdPerMillionTokens: requiredRate(
31780
- pricing.inputUsdPerMillionTokens,
31781
- "input token rate"
31782
- ),
31783
- cachedInputUsdPerMillionTokens: requiredRate(
31784
- pricing.cachedInputUsdPerMillionTokens,
31785
- "cached input token rate"
31786
- ),
31787
- outputUsdPerMillionTokens: requiredRate(
31788
- pricing.outputUsdPerMillionTokens,
31789
- "output token rate"
31790
- )
31791
- };
31792
- } catch {
31793
- return null;
31794
- }
31795
- }
31796
- function hostedUsageCostUsd(usage, pricing) {
31797
- const normalized = normalizeModelUsageTokens(usage);
31798
- if (normalized.promptTokens === null && normalized.completionTokens === null) return null;
31799
- const usageRecord = record4(usage);
31800
- const cached = Math.min(
31801
- normalized.promptTokens ?? 0,
31802
- cachedInputTokens(usageRecord)
31803
- );
31804
- const uncached = Math.max(0, (normalized.promptTokens ?? 0) - cached);
31805
- return (uncached * pricing.inputUsdPerMillionTokens + cached * pricing.cachedInputUsdPerMillionTokens + (normalized.completionTokens ?? 0) * pricing.outputUsdPerMillionTokens) / 1e6;
31806
- }
31807
- function cachedInputTokens(usage) {
31808
- const candidates = [
31809
- usage.cached_input_tokens,
31810
- usage.cachedInputTokens,
31811
- record4(usage.prompt_tokens_details).cached_tokens,
31812
- record4(usage.promptTokensDetails).cachedTokens,
31813
- record4(usage.input_tokens_details).cached_tokens,
31814
- record4(usage.inputTokensDetails).cachedTokens
31815
- ];
31816
- for (const value of candidates) {
31817
- if (typeof value === "number" && Number.isFinite(value) && value >= 0) {
31818
- return Math.trunc(value);
31819
- }
31820
- }
31821
- return 0;
31822
- }
31823
- function record4(value) {
31824
- return value && typeof value === "object" && !Array.isArray(value) ? value : {};
31825
- }
31826
- function requiredString5(value, label) {
31827
- if (typeof value === "string" && value.trim()) return value.trim();
31828
- throw new Error(`Hosted model catalog is missing ${label}.`);
31829
- }
31830
- function requiredRate(value, label) {
31831
- if (typeof value === "number" && Number.isFinite(value) && value >= 0) {
31832
- return value;
31833
- }
31834
- throw new Error(`Hosted model catalog is missing ${label}.`);
31835
- }
31836
-
31837
31914
  // ../server/src/training/hosted-provider-retry.ts
31838
31915
  function retryableHostedError(error) {
31839
31916
  const message = hostedErrorText(error);
@@ -41835,7 +41912,7 @@ function uniqueEvidence(run, evidence) {
41835
41912
  }
41836
41913
  async function verifyAppliedProfileCommit(input) {
41837
41914
  const command = input.command ?? (async (name, args, cwd, env) => {
41838
- const { runWorkspaceCommand } = await import("./workspaces-7YHBJG5P.js");
41915
+ const { runWorkspaceCommand } = await import("./workspaces-PYRYXKJI.js");
41839
41916
  return runWorkspaceCommand(name, args, cwd, env);
41840
41917
  });
41841
41918
  const result = await command("git", ["rev-parse", "HEAD"], input.repoPath);
@@ -49518,12 +49595,12 @@ export {
49518
49595
  createWebFetchModelToolDefinition,
49519
49596
  createWebSearchModelToolDefinition,
49520
49597
  waitForWorkReceiptSettlement,
49598
+ hostedTokenPricingFromValue,
49599
+ hostedUsageCostUsd,
49521
49600
  compileDesktopHarnessContext,
49522
49601
  createTaskEvaluationService,
49523
49602
  qualifyHarnessModelImprovement,
49524
49603
  requireQualifiedModelImprovement,
49525
- hostedTokenPricingFromValue,
49526
- hostedUsageCostUsd,
49527
49604
  retryableHostedError,
49528
49605
  hostedRetryDelayMs,
49529
49606
  abortableDelay,
@@ -2770,6 +2770,17 @@ var LocalHarnessRefinerEvidenceSchema = external_exports.object({
2770
2770
  }).strict(),
2771
2771
  eventExcerpts: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown())).max(20),
2772
2772
  artifactDiagnostics: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown())).max(20),
2773
+ executionProfile: external_exports.object({
2774
+ modelRequestCount: external_exports.number().int().nonnegative(),
2775
+ failedModelRequestCount: external_exports.number().int().nonnegative(),
2776
+ promptTokens: external_exports.number().int().nonnegative(),
2777
+ completionTokens: external_exports.number().int().nonnegative(),
2778
+ totalTokens: external_exports.number().int().nonnegative(),
2779
+ toolFailureCount: external_exports.number().int().nonnegative(),
2780
+ retryCount: external_exports.number().int().nonnegative(),
2781
+ recoveryCount: external_exports.number().int().nonnegative()
2782
+ }).strict(),
2783
+ recentObservations: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown())).max(20),
2773
2784
  recentOutcomes: external_exports.array(external_exports.object({
2774
2785
  id: external_exports.string().trim().min(1).max(2e3),
2775
2786
  decision: external_exports.enum(["no_action", "proposed"]),
@@ -2882,7 +2893,10 @@ function refinerMessages(evidence2) {
2882
2893
  "The task's assistantOutputLinkCount and artifactDiagnostics are objective observations, not decision rules. Failed artifact diagnostics can contradict a claimed successful visual check; decide whether the evidence supports a reusable Harness correction, an external route, or no action. When a user requests linked evidence, named sources without clickable links do not satisfy the request; an explicit request for links authorizes including them and must not be excused as a generic URL-formatting constraint.",
2883
2894
  "For claims presented as current web verification, consider whether user-visible citations let the user inspect the supporting evidence even when the request did not literally say 'include links'. Source names and hidden retrieval metadata alone do not make a current factual claim verifiable.",
2884
2895
  "A recovered error can still justify improvement when the same avoidable first attempt is likely to recur. Ordinary successful work, one-off artifact details, and continuation of the current task usually require no_action.",
2896
+ "executionProfile is bounded cost evidence for the completed turn. Use request, token, tool-failure, retry, and recovery counts to distinguish a cheap recovery from a material recurring tax. High cost alone is not a reason to edit the Harness, but repeated repair loops supported by recentObservations can justify removing the failed first strategy for future related work.",
2897
+ "recentObservations is a bounded window of earlier raw improvement observations from this Harness workspace. Use it to detect recurrence across distinct real turns even when an earlier Refiner outcome was no_action. Match the reusable root behavior, not merely a shared tool name, topic, artifact type, or benchmark family.",
2885
2898
  "recentOutcomes is a small bounded window of earlier Refiner decisions from this Harness workspace. Use it as recurrence evidence only when you judge the underlying behavior to be related; repeated no_action decisions do not force a proposal, and differently worded incidents may still share one root behavior.",
2899
+ "Optimize future related work, not the already completed turn. Prefer a small instruction or workflow correction that removes the repeated failed attempt, redundant search, full rewrite, or unnecessary output while preserving the requested result. Do not prescribe a library, command, file format, or subject-specific workaround unless the durable Harness already standardizes that workflow.",
2886
2900
  "Propose only the reusable root behavior. Do not encode the task's subject, named entities, business facts, requested artifact outline, benchmark wording, or transient paths. A durable proposal must plausibly help materially different future tasks with the same failure class; otherwise choose no_action or route the underlying runtime/product concern.",
2887
2901
  "Choose the smallest correct layer. Use memory for durable user facts or preferences, prompt for broad behavior, skill for a reusable workflow, and agent for a reusable role. Use route for runtime, product, taskset, or training concerns that this step must not mutate.",
2888
2902
  "Do not confuse 'no safe Harness edit' with no_action. If the evidence exposes a durable defect owned by runtime, product, evaluation, or training, return route even when the agent recovered and completed the task.",
@@ -3823,7 +3837,7 @@ var harnessRefinerBenchmarkRelease = TasksetReleaseSchema.parse({
3823
3837
  ]
3824
3838
  }
3825
3839
  ],
3826
- "contentHash": "05dbf9058c09b75bc950ca5cdf4ac03650dba7bb0cb74a3d9e152b16c110a2f7",
3840
+ "contentHash": "4cef91a9c92df39d16f741b4d901dbde6b62e72bd8a48647a4a81c0d517d9634",
3827
3841
  "environment": {
3828
3842
  "defaultTimeoutMs": 9e5,
3829
3843
  "deterministicSeeds": false,
@@ -3879,14 +3893,15 @@ var harnessRefinerBenchmarkRelease = TasksetReleaseSchema.parse({
3879
3893
  "weight": 1
3880
3894
  }
3881
3895
  ],
3882
- "id": "harness-refiner-public-v1",
3896
+ "id": "harness-refiner-08112026",
3883
3897
  "metadata": {
3884
3898
  "adaptationSplit": "validation",
3885
3899
  "benchmark": "harness-refiner",
3886
3900
  "frozenEvaluationSplit": "frozen_eval",
3887
3901
  "primaryMetric": "paired_foreground_provider_tokens",
3888
- "protocolVersion": "1",
3902
+ "protocolVersion": "2",
3889
3903
  "qualityPolicy": "hard_non_regression",
3904
+ "refinementMode": "sequential_product_lifecycle",
3890
3905
  "toolDeclarationSource": "openpond-production-model-tool-definitions",
3891
3906
  "trainingSideEffect": false
3892
3907
  },
@@ -3903,7 +3918,7 @@ var harnessRefinerBenchmarkRelease = TasksetReleaseSchema.parse({
3903
3918
  "expectedOutput"
3904
3919
  ]
3905
3920
  },
3906
- "revision": 3,
3921
+ "revision": 1,
3907
3922
  "schemaVersion": "openpond.tasksetRelease.v2",
3908
3923
  "tasks": [
3909
3924
  {
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
2
  import {
3
3
  now
4
- } from "./chunk-J4LLKY6E.js";
4
+ } from "./chunk-LOYP2CAV.js";
5
5
 
6
6
  // ../server/src/workspace/workspace-command.ts
7
7
  import { spawn, spawnSync } from "node:child_process";
@@ -5,12 +5,12 @@ import {
5
5
  import {
6
6
  getBundledRuntimeVersion,
7
7
  openUrlWithSystemBrowser
8
- } from "./chunk-IGSEFSMA.js";
8
+ } from "./chunk-EIRW6Z6S.js";
9
9
  import {
10
10
  DEFAULT_HOST,
11
11
  DEFAULT_PORT,
12
12
  parseListen
13
- } from "./chunk-J4LLKY6E.js";
13
+ } from "./chunk-LOYP2CAV.js";
14
14
 
15
15
  // ../server/src/cli.ts
16
16
  import { existsSync } from "node:fs";
@@ -3,12 +3,12 @@ import {
3
3
  resolveWebLaunchMessages,
4
4
  runOpenPondAppServerCli,
5
5
  runOpenPondServerCli
6
- } from "./chunk-LYEXNSCO.js";
6
+ } from "./chunk-YGYO5AQF.js";
7
7
  import "./chunk-NFNEENNR.js";
8
- import "./chunk-IGSEFSMA.js";
9
- import "./chunk-J4LLKY6E.js";
10
- import "./chunk-3PYU3XCS.js";
11
- import "./chunk-35OYRVVH.js";
8
+ import "./chunk-EIRW6Z6S.js";
9
+ import "./chunk-LOYP2CAV.js";
10
+ import "./chunk-55KT7K5P.js";
11
+ import "./chunk-US7DOPAH.js";
12
12
  import "./chunk-WYDVQOBL.js";
13
13
  import "./chunk-KHNHUA2H.js";
14
14
  import "./chunk-UACZUFIA.js";
@@ -16,12 +16,12 @@ import {
16
16
  runTemplateUpdate,
17
17
  runToolList,
18
18
  runToolRun
19
- } from "./chunk-CSN3DLWJ.js";
19
+ } from "./chunk-M2OSF2YN.js";
20
20
  import "./chunk-FCVVOMIP.js";
21
21
  import "./chunk-KHNHUA2H.js";
22
- import "./chunk-PFNX5XOT.js";
22
+ import "./chunk-6QWTEC2D.js";
23
23
  import "./chunk-SMNFI2FU.js";
24
- import "./chunk-R4PRXXTC.js";
24
+ import "./chunk-JSRCXDIL.js";
25
25
  import "./chunk-DBHSOTYZ.js";
26
26
  import "./chunk-KSRWKXRB.js";
27
27
  import "./chunk-MUMPWI4O.js";
@@ -5,9 +5,9 @@ import {
5
5
  import "./chunk-KHNHUA2H.js";
6
6
  import {
7
7
  CliUsageError
8
- } from "./chunk-PFNX5XOT.js";
8
+ } from "./chunk-6QWTEC2D.js";
9
9
  import "./chunk-SMNFI2FU.js";
10
- import "./chunk-R4PRXXTC.js";
10
+ import "./chunk-JSRCXDIL.js";
11
11
  import "./chunk-DBHSOTYZ.js";
12
12
  import "./chunk-KSRWKXRB.js";
13
13
  import {
@@ -17,7 +17,7 @@ import {
17
17
  SandboxTemplateValidationDiagnosticSchema,
18
18
  ToolDeclarationSchema,
19
19
  validateConnectedAppToolCallRequest
20
- } from "./chunk-35OYRVVH.js";
20
+ } from "./chunk-US7DOPAH.js";
21
21
  import {
22
22
  external_exports
23
23
  } from "./chunk-WYDVQOBL.js";
@@ -3,7 +3,7 @@ import {
3
3
  CLI_GLOBAL_OPTION_SCHEMA,
4
4
  formatCliCommandUsage,
5
5
  listCliCommandDefinitions
6
- } from "./chunk-R4PRXXTC.js";
6
+ } from "./chunk-JSRCXDIL.js";
7
7
  import "./chunk-MUMPWI4O.js";
8
8
  import "./chunk-UACZUFIA.js";
9
9
 
@@ -11,13 +11,13 @@ import {
11
11
  ensureApiKey
12
12
  } from "./chunk-FCVVOMIP.js";
13
13
  import "./chunk-KHNHUA2H.js";
14
- import "./chunk-PFNX5XOT.js";
14
+ import "./chunk-6QWTEC2D.js";
15
15
  import {
16
16
  resolveApiBaseUrlOption,
17
17
  resolveBaseUrl,
18
18
  resolveChatApiBaseUrlOption
19
19
  } from "./chunk-SMNFI2FU.js";
20
- import "./chunk-R4PRXXTC.js";
20
+ import "./chunk-JSRCXDIL.js";
21
21
  import {
22
22
  loadConfig
23
23
  } from "./chunk-DBHSOTYZ.js";
@@ -1,6 +1,6 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import "./chunk-3PYU3XCS.js";
3
- import "./chunk-35OYRVVH.js";
2
+ import "./chunk-55KT7K5P.js";
3
+ import "./chunk-US7DOPAH.js";
4
4
  import "./chunk-WYDVQOBL.js";
5
5
  import {
6
6
  resolveSandboxClient
@@ -9,9 +9,9 @@ import {
9
9
  DEFAULT_OPENPOND_API_BASE_URL,
10
10
  DEFAULT_OPENPOND_WEB_BASE_URL
11
11
  } from "./chunk-KHNHUA2H.js";
12
- import "./chunk-PFNX5XOT.js";
12
+ import "./chunk-6QWTEC2D.js";
13
13
  import "./chunk-SMNFI2FU.js";
14
- import "./chunk-R4PRXXTC.js";
14
+ import "./chunk-JSRCXDIL.js";
15
15
  import "./chunk-DBHSOTYZ.js";
16
16
  import "./chunk-KSRWKXRB.js";
17
17
  import {
@@ -30,9 +30,9 @@ import {
30
30
  resolveSandboxClient
31
31
  } from "./chunk-FCVVOMIP.js";
32
32
  import "./chunk-KHNHUA2H.js";
33
- import "./chunk-PFNX5XOT.js";
33
+ import "./chunk-6QWTEC2D.js";
34
34
  import "./chunk-SMNFI2FU.js";
35
- import "./chunk-R4PRXXTC.js";
35
+ import "./chunk-JSRCXDIL.js";
36
36
  import "./chunk-DBHSOTYZ.js";
37
37
  import "./chunk-KSRWKXRB.js";
38
38
  import {
@@ -36,9 +36,9 @@ import {
36
36
  runCommand
37
37
  } from "./chunk-FCVVOMIP.js";
38
38
  import "./chunk-KHNHUA2H.js";
39
- import "./chunk-PFNX5XOT.js";
39
+ import "./chunk-6QWTEC2D.js";
40
40
  import "./chunk-SMNFI2FU.js";
41
- import "./chunk-R4PRXXTC.js";
41
+ import "./chunk-JSRCXDIL.js";
42
42
  import "./chunk-DBHSOTYZ.js";
43
43
  import "./chunk-KSRWKXRB.js";
44
44
  import {
@@ -22,9 +22,9 @@ import {
22
22
  summarizeSandboxSecret
23
23
  } from "./chunk-FCVVOMIP.js";
24
24
  import "./chunk-KHNHUA2H.js";
25
- import "./chunk-PFNX5XOT.js";
25
+ import "./chunk-6QWTEC2D.js";
26
26
  import "./chunk-SMNFI2FU.js";
27
- import "./chunk-R4PRXXTC.js";
27
+ import "./chunk-JSRCXDIL.js";
28
28
  import "./chunk-DBHSOTYZ.js";
29
29
  import "./chunk-KSRWKXRB.js";
30
30
  import {
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-3HW6OSHP.js";
6
6
  import {
7
7
  resolveGitBranch
8
- } from "./chunk-CSN3DLWJ.js";
8
+ } from "./chunk-M2OSF2YN.js";
9
9
  import {
10
10
  OPENPOND_MANIFEST_FILE_NAME,
11
11
  SANDBOX_TEMPLATE_BUILD_PLAN_FILE_NAME,
@@ -35,12 +35,12 @@ import {
35
35
  warnOnRepoHostMismatch
36
36
  } from "./chunk-FCVVOMIP.js";
37
37
  import "./chunk-KHNHUA2H.js";
38
- import "./chunk-PFNX5XOT.js";
38
+ import "./chunk-6QWTEC2D.js";
39
39
  import {
40
40
  resolveBaseUrl,
41
41
  resolvePublicApiBaseUrl
42
42
  } from "./chunk-SMNFI2FU.js";
43
- import "./chunk-R4PRXXTC.js";
43
+ import "./chunk-JSRCXDIL.js";
44
44
  import {
45
45
  createRepo,
46
46
  loadConfig