@alpic-ai/tracks 0.16.0 → 0.18.0

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 (2) hide show
  1. package/dist/main.js +22 -10
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -475,7 +475,7 @@ const FailureKind = Schema.Literals([
475
475
  "unexpected"
476
476
  ]).annotate({
477
477
  identifier: "FailureKind",
478
- description: "What kind of thing went wrong: the repository could not be checked out, the environment's setup command failed, the browser did not start, the sandbox disappeared, the agent's process was lost, the sandbox provider failed, the agent of a run that accepts no follow-ups stopped with an error, or something unexpected."
478
+ description: "What kind of thing went wrong: the repository could not be checked out, the environment's setup command failed, the browser did not start, the sandbox disappeared, the agent's process was lost, the sandbox provider failed, the agent stopped with an error on the last prompt of a one-shot run or of a run you ended, or something unexpected."
479
479
  });
480
480
  const runFields = {
481
481
  id: RunId,
@@ -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: "Total cost of the run so far, in US dollars." }),
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,14 +763,14 @@ 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 cost."
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)),
772
770
  error: RunNotFound
773
771
  }).annotateMerge(OpenApi.annotations({
774
772
  summary: "End a run",
775
- description: "Ends the run with `finished` once its current prompt finishes, then destroys its sandbox. Ending a run that has ended does nothing."
773
+ description: "Ends the run once its current prompt finishes, with `finished`, or `errored` if the agent stopped with an error on that prompt, then destroys its sandbox. Ending a run that has ended does nothing."
776
774
  })), HttpApiEndpoint.post("cancel", "/runs/:id/cancel", {
777
775
  params: { id: RunId },
778
776
  success: Run.pipe(HttpApiSchema.status(202)),
@@ -918,6 +916,16 @@ const ExcludedVariant = Schema.Struct({
918
916
  identifier: "ExcludedVariant",
919
917
  description: "A combination of repository and agent tools not to run."
920
918
  });
919
+ const Persona = Schema.Literals([
920
+ "none",
921
+ "default",
922
+ "developer",
923
+ "vibe_coder",
924
+ "product_manager"
925
+ ]).annotate({
926
+ identifier: "Persona",
927
+ description: "Who answers the agent when it stops, up to 5 times a run, so each run is a conversation: `none` (no one, the agent gets the prompt alone), `default` (a plain user who tells it to go ahead), `developer` (a terse technical user who expects idiomatic, tested work), `vibe_coder` (a non-technical user happy with whatever works) or `product_manager` (a user focused on users and outcomes, who answers requirements and leaves technical choices to the agent). Its replies are written from the scenario's prompt, never from its evaluations, and are free. A conversation takes more time and money than one prompt: raise the time limit and budget. Defaults to `default` for a new experiment; omitted from an update, the experiment keeps its own."
928
+ });
921
929
  const RunSettings = Schema.Struct({
922
930
  repetitions: Schema.Int.check(Schema.isGreaterThanOrEqualTo(1)).annotate({ description: "Identical runs started for each scenario, variant and agent, to compare results beyond chance." }),
923
931
  time_limit_seconds: Schema.Finite.check(Schema.isBetween({
@@ -930,6 +938,7 @@ const RunSettings = Schema.Struct({
930
938
  exclusiveMinimum: true,
931
939
  maximum: MAX_BUDGET_USD
932
940
  })).annotate({ description: `Most each run may spend, in US dollars, above 0 and at most ${MAX_BUDGET_USD}.` }),
941
+ persona: Persona,
933
942
  setup: script("Shell script run in each run's sandbox after checkout and before the prompt."),
934
943
  teardown: script("Shell script run in each run's sandbox after the run ends."),
935
944
  variables: Schema.Array(Schema.Struct({
@@ -961,7 +970,10 @@ const ScenarioInput = Scenario.mapFields(Struct.evolve({
961
970
  input_files: (inputFiles) => inputFiles.pipe(Schema.withDecodingDefaultKey(Effect.succeed([]))),
962
971
  evaluations: () => withUniqueIds(EvaluationInput, "evaluations")
963
972
  })).annotate({ identifier: "ScenarioInput" });
964
- const RunSettingsInput = RunSettings.mapFields(Struct.evolve({ variables: (variables) => variables.pipe(Schema.withDecodingDefaultKey(Effect.succeed([]))) })).annotate({ identifier: "RunSettingsInput" });
973
+ const RunSettingsInput = RunSettings.mapFields(Struct.evolve({
974
+ persona: (persona) => Schema.optionalKey(persona),
975
+ variables: (variables) => variables.pipe(Schema.withDecodingDefaultKey(Effect.succeed([])))
976
+ })).annotate({ identifier: "RunSettingsInput" });
965
977
  const unknownExclusions = (input) => input.excluded_variants.flatMap((excluded, index) => [...input.agent_tools.some((agentTools) => agentTools.id === excluded.agent_tools_id) ? [] : [{
966
978
  path: [
967
979
  "excluded_variants",
@@ -1364,7 +1376,7 @@ const isDatabaseVariable = (name) => DATABASE_ENV.some((databaseName) => databas
1364
1376
  SERVICE_ENV.flatMap((name) => isSecret(name) && !isDatabaseVariable(name) ? [name] : []);
1365
1377
  const readEnv = (...names) => Config.schema(Env.mapFields(Struct.pick(names)));
1366
1378
  // package.json
1367
- var version = "0.16.0";
1379
+ var version = "0.18.0";
1368
1380
  // src/connections.ts
1369
1381
  const encodeConnection = Schema.encodeEffect(Schema.fromJsonString(Connection, { space: 2 }));
1370
1382
  const encodeConnections = Schema.encodeEffect(Schema.fromJsonString(List(Connection), { space: 2 }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alpic-ai/tracks",
3
- "version": "0.16.0",
3
+ "version": "0.18.0",
4
4
  "description": "Run coding agents in sandboxes from the command line",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {