@alpic-ai/tracks 0.16.0 → 0.17.1
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/main.js +5 -7
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -567,17 +567,15 @@ var RunNotIdle = class extends Schema.TaggedError()("RunNotIdle", { message: Sch
|
|
|
567
567
|
}) {};
|
|
568
568
|
const Count$1 = Schema.Natural;
|
|
569
569
|
const RunUsage = Schema.Struct({
|
|
570
|
-
cost_usd: Schema.Number.annotate({ description: "
|
|
570
|
+
cost_usd: Schema.Number.annotate({ description: "What was taken from your balance for the run so far, its model calls and its run fee, in US dollars." }),
|
|
571
|
+
run_fee_usd: Schema.Number.annotate({ description: "The run fee, in US dollars: charged once the run has ended, unless it failed on our side, 0 until then." }),
|
|
571
572
|
models: Schema.Array(Schema.Struct({
|
|
572
573
|
provider: Schema.String.annotate({ description: "Company serving the model, such as `anthropic`." }),
|
|
573
574
|
model: Schema.String,
|
|
574
575
|
quantities: Schema.Record(Schema.String, Count$1).annotate({ description: "Units consumed, keyed by unit as the provider counts them, such as input tokens or web searches." }),
|
|
575
576
|
cost_usd: Schema.Number.annotate({ description: "Cost of this model's usage, in US dollars." })
|
|
576
577
|
})).annotate({ description: "Model usage, one entry per model." }),
|
|
577
|
-
sandbox: Schema.Struct({
|
|
578
|
-
seconds: Schema.Number.annotate({ description: "Time the sandbox ran, in seconds." }),
|
|
579
|
-
cost_usd: Schema.Number.annotate({ description: "Cost of the sandbox time, in US dollars." })
|
|
580
|
-
})
|
|
578
|
+
sandbox: Schema.Struct({ seconds: Schema.Number.annotate({ description: "Time the sandbox ran, in seconds, covered by the run fee." }) })
|
|
581
579
|
}).annotate({
|
|
582
580
|
identifier: "RunUsage",
|
|
583
581
|
description: "What a run consumed and what it cost."
|
|
@@ -765,7 +763,7 @@ var RunsApi = class extends HttpApiGroup.make("runs").add(HttpApiEndpoint.post("
|
|
|
765
763
|
error: RunNotFound
|
|
766
764
|
}).annotateMerge(OpenApi.annotations({
|
|
767
765
|
summary: "Get a run's usage",
|
|
768
|
-
description: "Returns what the run has consumed so far, per model and in sandbox time, and what it
|
|
766
|
+
description: "Returns what the run has consumed so far, per model and in sandbox time, and what it is charged."
|
|
769
767
|
})), HttpApiEndpoint.post("end", "/runs/:id/end", {
|
|
770
768
|
params: { id: RunId },
|
|
771
769
|
success: Run.pipe(HttpApiSchema.status(202)),
|
|
@@ -1364,7 +1362,7 @@ const isDatabaseVariable = (name) => DATABASE_ENV.some((databaseName) => databas
|
|
|
1364
1362
|
SERVICE_ENV.flatMap((name) => isSecret(name) && !isDatabaseVariable(name) ? [name] : []);
|
|
1365
1363
|
const readEnv = (...names) => Config.schema(Env.mapFields(Struct.pick(names)));
|
|
1366
1364
|
// package.json
|
|
1367
|
-
var version = "0.
|
|
1365
|
+
var version = "0.17.1";
|
|
1368
1366
|
// src/connections.ts
|
|
1369
1367
|
const encodeConnection = Schema.encodeEffect(Schema.fromJsonString(Connection, { space: 2 }));
|
|
1370
1368
|
const encodeConnections = Schema.encodeEffect(Schema.fromJsonString(List(Connection), { space: 2 }));
|