openpond 0.0.52 → 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.
- package/dist/chunks/{app-server-runtime-2P2727X6.js → app-server-runtime-332SNX3U.js} +3 -3
- package/dist/chunks/{chunk-C4DAHPVI.js → chunk-LOYP2CAV.js} +1 -1
- package/dist/chunks/{chunk-KNKZSVGO.js → chunk-TSICWFAI.js} +96 -92
- package/dist/chunks/{chunk-FFD2YSZR.js → chunk-V7CBYHXO.js} +1 -1
- package/dist/chunks/{chunk-3UPQUD6Y.js → chunk-YGYO5AQF.js} +1 -1
- package/dist/chunks/{cli-Z2CULBCU.js → cli-WGGGZFLN.js} +2 -2
- package/dist/chunks/{src-R5VKB33T.js → src-U7KRR6II.js} +4 -4
- package/dist/chunks/{workspaces-YLNB6DS7.js → workspaces-PYRYXKJI.js} +2 -2
- package/dist/cli.js +5 -5
- package/package.json +1 -1
|
@@ -2,11 +2,11 @@ import { createRequire as __openpondCreateRequire } from "node:module"; var requ
|
|
|
2
2
|
import {
|
|
3
3
|
APP_SERVER_COMPOSITION,
|
|
4
4
|
createOpenPondAppServer
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-TSICWFAI.js";
|
|
6
6
|
import "./chunk-NFNEENNR.js";
|
|
7
7
|
import "./chunk-EIRW6Z6S.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-V7CBYHXO.js";
|
|
9
|
+
import "./chunk-LOYP2CAV.js";
|
|
10
10
|
import "./chunk-55KT7K5P.js";
|
|
11
11
|
import "./chunk-US7DOPAH.js";
|
|
12
12
|
import "./chunk-WYDVQOBL.js";
|
|
@@ -3,7 +3,7 @@ import { createRequire as __openpondCreateRequire } from "node:module"; var requ
|
|
|
3
3
|
// ../server/src/constants.ts
|
|
4
4
|
var DEFAULT_HOST = "127.0.0.1";
|
|
5
5
|
var DEFAULT_PORT = 17874;
|
|
6
|
-
var VERSION = "0.0.
|
|
6
|
+
var VERSION = "0.0.53";
|
|
7
7
|
var HOSTED_CHAT_SYSTEM_PROMPT = "You are OpenPond Chat. Respond in the user's language. If the user's latest message is language-neutral, ambiguous, or only a short test, respond in English. Be concise and directly answer the latest request. Do not use emojis. Use Markdown when it improves scanability. If you emit reasoning or thinking content, keep it sparse and user-readable: at most one short sentence for major progress, decisions, or blockers. Omit reasoning for routine searches, reads, tool calls, and obvious next steps. Do not restate the user request, narrate every action, or include code blocks, code excerpts, diffs, raw tool payloads, or markdown examples in reasoning. Put necessary code or exact snippets only in the final assistant answer. When the user asks to show or preview an image that is available as a workspace path or signed image URL, use Markdown image syntax like  instead of a bare path or raw HTML. For workspace-backed answers, use a Codex-style shape: brief outcome first, then Changed Files if files changed, then Verification if checks ran. End with a concise final answer that summarizes the result and verification when relevant. Do not mention raw tool JSON, internal repo paths, or origin/remote URLs unless the user explicitly asks for them or they are necessary to explain a git/deploy failure.";
|
|
8
8
|
var APP_PREFERENCES_CACHE_TYPE = "app_preferences";
|
|
9
9
|
var APP_PREFERENCES_CACHE_KEY = "global";
|
|
@@ -34,14 +34,14 @@ import {
|
|
|
34
34
|
truncatePatch,
|
|
35
35
|
uniqueSortedPaths,
|
|
36
36
|
workspaceImageContentType
|
|
37
|
-
} from "./chunk-
|
|
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-
|
|
44
|
+
} from "./chunk-LOYP2CAV.js";
|
|
45
45
|
import {
|
|
46
46
|
AppPreferencesSchema,
|
|
47
47
|
ApplyCreateImproveRunActionRequestSchema,
|
|
@@ -29447,6 +29447,92 @@ function asRecord11(value) {
|
|
|
29447
29447
|
return value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
29448
29448
|
}
|
|
29449
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
|
+
|
|
29450
29536
|
// ../server/src/training/taskset-work-attempt-runner.ts
|
|
29451
29537
|
async function runTasksetWorkAttempt(input) {
|
|
29452
29538
|
if (input.taskset.environment.kind !== "work") {
|
|
@@ -30001,7 +30087,11 @@ async function runTasksetWorkAttempt(input) {
|
|
|
30001
30087
|
};
|
|
30002
30088
|
}
|
|
30003
30089
|
);
|
|
30004
|
-
const
|
|
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;
|
|
30005
30095
|
const costComponents = [
|
|
30006
30096
|
providerInferenceUsd,
|
|
30007
30097
|
workRuntimeCost?.billableUsd ?? null
|
|
@@ -31821,92 +31911,6 @@ function isRecord4(value) {
|
|
|
31821
31911
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
31822
31912
|
}
|
|
31823
31913
|
|
|
31824
|
-
// ../server/src/training/hosted-token-pricing.ts
|
|
31825
|
-
function hostedTokenPricingFromCatalog(raw) {
|
|
31826
|
-
const pricing = record4(record4(record4(raw.metadata).billing).pricing);
|
|
31827
|
-
return {
|
|
31828
|
-
version: requiredString5(pricing.version, "pricing version"),
|
|
31829
|
-
source: requiredString5(pricing.source, "pricing source"),
|
|
31830
|
-
effectiveAt: requiredString5(pricing.effectiveAt, "pricing effective date"),
|
|
31831
|
-
inputUsdPerMillionTokens: requiredRate(
|
|
31832
|
-
pricing.inputUsdPerMillionTokens,
|
|
31833
|
-
"input token rate"
|
|
31834
|
-
),
|
|
31835
|
-
cachedInputUsdPerMillionTokens: requiredRate(
|
|
31836
|
-
pricing.cachedInputUsdPerMillionTokens,
|
|
31837
|
-
"cached input token rate"
|
|
31838
|
-
),
|
|
31839
|
-
outputUsdPerMillionTokens: requiredRate(
|
|
31840
|
-
pricing.outputUsdPerMillionTokens,
|
|
31841
|
-
"output token rate"
|
|
31842
|
-
)
|
|
31843
|
-
};
|
|
31844
|
-
}
|
|
31845
|
-
function hostedTokenPricingFromValue(value) {
|
|
31846
|
-
const pricing = record4(value);
|
|
31847
|
-
try {
|
|
31848
|
-
return {
|
|
31849
|
-
version: requiredString5(pricing.version, "pricing version"),
|
|
31850
|
-
source: requiredString5(pricing.source, "pricing source"),
|
|
31851
|
-
effectiveAt: requiredString5(pricing.effectiveAt, "pricing effective date"),
|
|
31852
|
-
inputUsdPerMillionTokens: requiredRate(
|
|
31853
|
-
pricing.inputUsdPerMillionTokens,
|
|
31854
|
-
"input token rate"
|
|
31855
|
-
),
|
|
31856
|
-
cachedInputUsdPerMillionTokens: requiredRate(
|
|
31857
|
-
pricing.cachedInputUsdPerMillionTokens,
|
|
31858
|
-
"cached input token rate"
|
|
31859
|
-
),
|
|
31860
|
-
outputUsdPerMillionTokens: requiredRate(
|
|
31861
|
-
pricing.outputUsdPerMillionTokens,
|
|
31862
|
-
"output token rate"
|
|
31863
|
-
)
|
|
31864
|
-
};
|
|
31865
|
-
} catch {
|
|
31866
|
-
return null;
|
|
31867
|
-
}
|
|
31868
|
-
}
|
|
31869
|
-
function hostedUsageCostUsd(usage, pricing) {
|
|
31870
|
-
const normalized = normalizeModelUsageTokens(usage);
|
|
31871
|
-
if (normalized.promptTokens === null && normalized.completionTokens === null) return null;
|
|
31872
|
-
const usageRecord = record4(usage);
|
|
31873
|
-
const cached = Math.min(
|
|
31874
|
-
normalized.promptTokens ?? 0,
|
|
31875
|
-
cachedInputTokens(usageRecord)
|
|
31876
|
-
);
|
|
31877
|
-
const uncached = Math.max(0, (normalized.promptTokens ?? 0) - cached);
|
|
31878
|
-
return (uncached * pricing.inputUsdPerMillionTokens + cached * pricing.cachedInputUsdPerMillionTokens + (normalized.completionTokens ?? 0) * pricing.outputUsdPerMillionTokens) / 1e6;
|
|
31879
|
-
}
|
|
31880
|
-
function cachedInputTokens(usage) {
|
|
31881
|
-
const candidates = [
|
|
31882
|
-
usage.cached_input_tokens,
|
|
31883
|
-
usage.cachedInputTokens,
|
|
31884
|
-
record4(usage.prompt_tokens_details).cached_tokens,
|
|
31885
|
-
record4(usage.promptTokensDetails).cachedTokens,
|
|
31886
|
-
record4(usage.input_tokens_details).cached_tokens,
|
|
31887
|
-
record4(usage.inputTokensDetails).cachedTokens
|
|
31888
|
-
];
|
|
31889
|
-
for (const value of candidates) {
|
|
31890
|
-
if (typeof value === "number" && Number.isFinite(value) && value >= 0) {
|
|
31891
|
-
return Math.trunc(value);
|
|
31892
|
-
}
|
|
31893
|
-
}
|
|
31894
|
-
return 0;
|
|
31895
|
-
}
|
|
31896
|
-
function record4(value) {
|
|
31897
|
-
return value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
31898
|
-
}
|
|
31899
|
-
function requiredString5(value, label) {
|
|
31900
|
-
if (typeof value === "string" && value.trim()) return value.trim();
|
|
31901
|
-
throw new Error(`Hosted model catalog is missing ${label}.`);
|
|
31902
|
-
}
|
|
31903
|
-
function requiredRate(value, label) {
|
|
31904
|
-
if (typeof value === "number" && Number.isFinite(value) && value >= 0) {
|
|
31905
|
-
return value;
|
|
31906
|
-
}
|
|
31907
|
-
throw new Error(`Hosted model catalog is missing ${label}.`);
|
|
31908
|
-
}
|
|
31909
|
-
|
|
31910
31914
|
// ../server/src/training/hosted-provider-retry.ts
|
|
31911
31915
|
function retryableHostedError(error) {
|
|
31912
31916
|
const message = hostedErrorText(error);
|
|
@@ -41908,7 +41912,7 @@ function uniqueEvidence(run, evidence) {
|
|
|
41908
41912
|
}
|
|
41909
41913
|
async function verifyAppliedProfileCommit(input) {
|
|
41910
41914
|
const command = input.command ?? (async (name, args, cwd, env) => {
|
|
41911
|
-
const { runWorkspaceCommand } = await import("./workspaces-
|
|
41915
|
+
const { runWorkspaceCommand } = await import("./workspaces-PYRYXKJI.js");
|
|
41912
41916
|
return runWorkspaceCommand(name, args, cwd, env);
|
|
41913
41917
|
});
|
|
41914
41918
|
const result = await command("git", ["rev-parse", "HEAD"], input.repoPath);
|
|
@@ -49591,12 +49595,12 @@ export {
|
|
|
49591
49595
|
createWebFetchModelToolDefinition,
|
|
49592
49596
|
createWebSearchModelToolDefinition,
|
|
49593
49597
|
waitForWorkReceiptSettlement,
|
|
49598
|
+
hostedTokenPricingFromValue,
|
|
49599
|
+
hostedUsageCostUsd,
|
|
49594
49600
|
compileDesktopHarnessContext,
|
|
49595
49601
|
createTaskEvaluationService,
|
|
49596
49602
|
qualifyHarnessModelImprovement,
|
|
49597
49603
|
requireQualifiedModelImprovement,
|
|
49598
|
-
hostedTokenPricingFromValue,
|
|
49599
|
-
hostedUsageCostUsd,
|
|
49600
49604
|
retryableHostedError,
|
|
49601
49605
|
hostedRetryDelayMs,
|
|
49602
49606
|
abortableDelay,
|
|
@@ -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-
|
|
4
|
+
} from "./chunk-LOYP2CAV.js";
|
|
5
5
|
|
|
6
6
|
// ../server/src/workspace/workspace-command.ts
|
|
7
7
|
import { spawn, spawnSync } from "node:child_process";
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
resolveWebLaunchMessages,
|
|
4
4
|
runOpenPondAppServerCli,
|
|
5
5
|
runOpenPondServerCli
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YGYO5AQF.js";
|
|
7
7
|
import "./chunk-NFNEENNR.js";
|
|
8
8
|
import "./chunk-EIRW6Z6S.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-LOYP2CAV.js";
|
|
10
10
|
import "./chunk-55KT7K5P.js";
|
|
11
11
|
import "./chunk-US7DOPAH.js";
|
|
12
12
|
import "./chunk-WYDVQOBL.js";
|
|
@@ -117,10 +117,10 @@ import {
|
|
|
117
117
|
workspaceHasHead,
|
|
118
118
|
workspaceToolExperienceBlocker,
|
|
119
119
|
writeWorkspaceFile
|
|
120
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-TSICWFAI.js";
|
|
121
121
|
import {
|
|
122
122
|
runOpenPondServerCli
|
|
123
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-YGYO5AQF.js";
|
|
124
124
|
import {
|
|
125
125
|
createAppServer,
|
|
126
126
|
runAgentCompaction
|
|
@@ -166,7 +166,7 @@ import {
|
|
|
166
166
|
runCommand,
|
|
167
167
|
startMacOSCommandLineToolsInstall,
|
|
168
168
|
workspaceImageContentType
|
|
169
|
-
} from "./chunk-
|
|
169
|
+
} from "./chunk-V7CBYHXO.js";
|
|
170
170
|
import {
|
|
171
171
|
APP_PREFERENCES_CACHE_KEY,
|
|
172
172
|
APP_PREFERENCES_CACHE_TYPE,
|
|
@@ -178,7 +178,7 @@ import {
|
|
|
178
178
|
isCliEntrypoint,
|
|
179
179
|
now,
|
|
180
180
|
textFromUnknown
|
|
181
|
-
} from "./chunk-
|
|
181
|
+
} from "./chunk-LOYP2CAV.js";
|
|
182
182
|
import {
|
|
183
183
|
AccountStateSchema,
|
|
184
184
|
AdapterValidationReceiptSchema,
|
|
@@ -45,8 +45,8 @@ import {
|
|
|
45
45
|
truncatePatch,
|
|
46
46
|
uniqueSortedPaths,
|
|
47
47
|
workspaceImageContentType
|
|
48
|
-
} from "./chunk-
|
|
49
|
-
import "./chunk-
|
|
48
|
+
} from "./chunk-V7CBYHXO.js";
|
|
49
|
+
import "./chunk-LOYP2CAV.js";
|
|
50
50
|
import "./chunk-UACZUFIA.js";
|
|
51
51
|
export {
|
|
52
52
|
MACOS_GIT_MISSING_DEVELOPER_TOOLS_ERROR,
|
package/dist/cli.js
CHANGED
|
@@ -70,8 +70,8 @@ async function runEmbeddedCompanion(argv) {
|
|
|
70
70
|
if (argv[0] === "__app-server") {
|
|
71
71
|
process.argv = [process.execPath, "openpond-app-server", ...argv.slice(1)];
|
|
72
72
|
const [{ createOpenPondAppServer }, { runOpenPondAppServerCli }] = await Promise.all([
|
|
73
|
-
import("./chunks/app-server-runtime-
|
|
74
|
-
import("./chunks/cli-
|
|
73
|
+
import("./chunks/app-server-runtime-332SNX3U.js"),
|
|
74
|
+
import("./chunks/cli-WGGGZFLN.js")
|
|
75
75
|
]);
|
|
76
76
|
await runOpenPondAppServerCli(createOpenPondAppServer);
|
|
77
77
|
return true;
|
|
@@ -79,10 +79,10 @@ async function runEmbeddedCompanion(argv) {
|
|
|
79
79
|
if (argv[0] === "__server") {
|
|
80
80
|
process.argv = [process.execPath, "openpond-server", ...argv.slice(1)];
|
|
81
81
|
const [{ createOpenPondServer }, { runOpenPondServerCli }] = await Promise.all([
|
|
82
|
-
import("./chunks/src-
|
|
83
|
-
import("./chunks/cli-
|
|
82
|
+
import("./chunks/src-U7KRR6II.js"),
|
|
83
|
+
import("./chunks/cli-WGGGZFLN.js")
|
|
84
84
|
]);
|
|
85
|
-
const { createOpenPondAppServer } = await import("./chunks/app-server-runtime-
|
|
85
|
+
const { createOpenPondAppServer } = await import("./chunks/app-server-runtime-332SNX3U.js");
|
|
86
86
|
await runOpenPondServerCli({ createOpenPondServer, createOpenPondAppServer });
|
|
87
87
|
return true;
|
|
88
88
|
}
|