bitfab 0.72.0 → 0.73.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7e1f7e41d0dcac668a09e2c2bf57e1d1c928ba5943e51d526e83a43009987369
4
- data.tar.gz: 80600ab8d5c6a7230799d08b70346de0a68e79beded3858f4321c66f061456c0
3
+ metadata.gz: 1a30e89baf273769afece482948a0ff108d9a1a2481fad9b2edbcbf8169a344f
4
+ data.tar.gz: c6807a2ba664c08f1626b879242fab202a37859f0c8c3af2c833e6fc5df74b0d
5
5
  SHA512:
6
- metadata.gz: 3d062220939f258721a0359f5cef0fecac374810b2203c8a74efafbe4f626b7e220249dd34beb5d91896154d6f560dc3a98347693e161f4615c51afb4464627c
7
- data.tar.gz: b7d66ca98007fbdc7d6f0d334e909711be612ae9892316da02ad25e08dcc43cbb48853e110af5ec979edab56836ca5f4c67c72ec8d0c7121bbd27404dba43fac
6
+ metadata.gz: fffcdc93382999f0f4e087f8cdeab967768afebfc14ef98d9235257102604d5a9e2203d4953f5fa2f04e77c4656fdd14d08113276c5ccbb34162663bdd9a2180
7
+ data.tar.gz: 123101bb86a8eafa4fb4f89e86f1856a29e9d262adfc134b0fbad9ca505e9bf51b46532df51658509d1d7c54b7d7362c0faa8ebb71cd15b3cc880660eb4707a4
@@ -32,11 +32,13 @@ module Bitfab
32
32
  # "kind" says who decides the assertion: "judge" (the LLM judge), "code"
33
33
  # ("code" decides every replay), or "hybrid" ("code" decides what it can
34
34
  # and returns "defer" for the rest). Send "code" or "hybrid" together with
35
- # "code", {"source" => ..., "spanNames" => [...]}. "source" is the body of a
36
- # TypeScript (or plain JavaScript) function called with spans (each
37
- # {name, input, output, metadata}, in start order), input, and output,
38
- # returning "pass", "fail", or "defer" (hybrid only), or {result, reason},
39
- # within one second. "spanNames" lists every span a correct run is
35
+ # "code", {"source" => ..., "spanNames" => [...]}. "source" is the body of
36
+ # an async TypeScript (or plain JavaScript) function called with spans
37
+ # (each {name, index, hasData}, in start order, without its data), input,
38
+ # and output. It reads span data with await named("span name") or await
39
+ # span.data(), and returns "pass", "fail", or "defer" (hybrid only), or
40
+ # {result, reason}, with one second of compute and the data of at most 50
41
+ # spans loaded within ten seconds. "spanNames" lists every span a correct run is
40
42
  # expected to produce. Code that cannot run on the trace, or that returns
41
43
  # "defer" for a "code" assertion, is refused. Omit both to keep them, or
42
44
  # pass "kind" => "judge" to remove the code. Returned assertions carry
@@ -9,14 +9,22 @@ module Bitfab
9
9
  RECORDS_KEYS_IN_DATA = %w[records sources].freeze
10
10
  private_constant :RECORDS_KEYS_IN_DATA
11
11
 
12
+ # Reads the scenario built from trace_id, in any creation state, and returns its hash. "creationStatus" is
13
+ # "empty" when nothing has started building it, "generating" while Bitfab builds it or waits for the scenario
14
+ # callback to save it, "created" once it is built, and "error" when building failed, with "creationError" saying
15
+ # why. "trigger", "data", "triggerSummary", and "dataSummary" are nil until the scenario is built. After
16
+ # generate_scenario, poll this until "creationStatus" is "created" or "error". A trace with no scenario at all
17
+ # raises an error.
12
18
  def get_scenario(trace_id)
13
19
  @http_client.get(scenario_path(trace_id))["scenario"]
14
20
  end
15
21
 
16
- # Starts building the scenario for trace_id and returns at once, without waiting for it. Read it later with
17
- # get_scenario. Returns {"status", "traceId", "scenarioId"}: "status" is "started" while Bitfab builds it in the
18
- # background, or "already_generated" when the trace already has a scenario, which is left as it is and named by
19
- # "scenarioId". "scenarioId" is nil while the trace has no scenario yet.
22
+ # Starts building the scenario for trace_id and returns at once, without waiting for it. Poll get_scenario until
23
+ # its "creationStatus" is "created" or "error". Returns {"status", "traceId", "scenarioId", "creationStatus"}:
24
+ # "status" is "started" while Bitfab builds it in the background, or "already_generated" when the trace already
25
+ # has a scenario, which is left as it is and named by "scenarioId". A scenario whose build failed is started
26
+ # again. "scenarioId" is nil while the trace has no scenario yet, and "creationStatus" is the scenario's creation
27
+ # status right after the call.
20
28
  #
21
29
  # A replay, a trace outside the organization, or a trace Bitfab cannot build a scenario for (not
22
30
  # noah-agent-turn and no scenario callback) raises an error. Adding a trace to a dataset starts the same build
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bitfab
4
- VERSION = "0.72.0"
4
+ VERSION = "0.73.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bitfab
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.72.0
4
+ version: 0.73.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harvest Team