@langwatch/scenario 0.4.8 → 0.4.9

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/index.js CHANGED
@@ -3794,10 +3794,10 @@ var ScenarioExecution = class {
3794
3794
  scriptLength: this.config.script.length
3795
3795
  });
3796
3796
  this.reset();
3797
- this.newTurn();
3798
- this.state.currentTurn = 0;
3799
3797
  const scenarioRunId = this.preAssignedRunId || generateScenarioRunId();
3800
3798
  this.scenarioRunId = scenarioRunId;
3799
+ this.newTurn();
3800
+ this.state.currentTurn = 0;
3801
3801
  this.logger.debug(`[${this.config.id}] ${this.preAssignedRunId ? "Using pre-assigned" : "Generated"} run ID: ${scenarioRunId}`);
3802
3802
  this.emitRunStarted({ scenarioRunId });
3803
3803
  const subscription = this.state.events$.pipe(
@@ -3995,7 +3995,8 @@ var ScenarioExecution = class {
3995
3995
  agentSpanName,
3996
3996
  {
3997
3997
  attributes: {
3998
- [import_observability3.attributes.ATTR_LANGWATCH_THREAD_ID]: this.state.threadId
3998
+ [import_observability3.attributes.ATTR_LANGWATCH_THREAD_ID]: this.state.threadId,
3999
+ "scenario.role": role
3999
4000
  }
4000
4001
  },
4001
4002
  agentContext,
@@ -4504,6 +4505,7 @@ var ScenarioExecution = class {
4504
4505
  this.currentTurnSpan = this.tracer.startSpan("Scenario Turn", {
4505
4506
  attributes: {
4506
4507
  "langwatch.origin": "simulation",
4508
+ "scenario.run_id": this.scenarioRunId ?? "",
4507
4509
  "scenario.name": this.config.name,
4508
4510
  "scenario.id": this.config.id,
4509
4511
  [import_observability3.attributes.ATTR_LANGWATCH_THREAD_ID]: this.state.threadId,
package/dist/index.mjs CHANGED
@@ -3730,10 +3730,10 @@ var ScenarioExecution = class {
3730
3730
  scriptLength: this.config.script.length
3731
3731
  });
3732
3732
  this.reset();
3733
- this.newTurn();
3734
- this.state.currentTurn = 0;
3735
3733
  const scenarioRunId = this.preAssignedRunId || generateScenarioRunId();
3736
3734
  this.scenarioRunId = scenarioRunId;
3735
+ this.newTurn();
3736
+ this.state.currentTurn = 0;
3737
3737
  this.logger.debug(`[${this.config.id}] ${this.preAssignedRunId ? "Using pre-assigned" : "Generated"} run ID: ${scenarioRunId}`);
3738
3738
  this.emitRunStarted({ scenarioRunId });
3739
3739
  const subscription = this.state.events$.pipe(
@@ -3931,7 +3931,8 @@ var ScenarioExecution = class {
3931
3931
  agentSpanName,
3932
3932
  {
3933
3933
  attributes: {
3934
- [attributes3.ATTR_LANGWATCH_THREAD_ID]: this.state.threadId
3934
+ [attributes3.ATTR_LANGWATCH_THREAD_ID]: this.state.threadId,
3935
+ "scenario.role": role
3935
3936
  }
3936
3937
  },
3937
3938
  agentContext,
@@ -4440,6 +4441,7 @@ var ScenarioExecution = class {
4440
4441
  this.currentTurnSpan = this.tracer.startSpan("Scenario Turn", {
4441
4442
  attributes: {
4442
4443
  "langwatch.origin": "simulation",
4444
+ "scenario.run_id": this.scenarioRunId ?? "",
4443
4445
  "scenario.name": this.config.name,
4444
4446
  "scenario.id": this.config.id,
4445
4447
  [attributes3.ATTR_LANGWATCH_THREAD_ID]: this.state.threadId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langwatch/scenario",
3
- "version": "0.4.8",
3
+ "version": "0.4.9",
4
4
  "description": "A TypeScript library for testing AI agents using scenarios",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",