@amigo-ai/platform-sdk 0.96.0 → 0.98.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.
package/api.md CHANGED
@@ -335,6 +335,9 @@ All workspace-scoped resources also expose `withOptions(options)`.
335
335
  - `step`
336
336
  - `recommend`
337
337
  - `getIntelligence`
338
+ - `forkSession`
339
+ - `scoreSession`
340
+ - `promoteSession`
338
341
  - `runs.list`
339
342
  - `runs.create`
340
343
  - `runs.get`
package/dist/index.cjs CHANGED
@@ -3267,6 +3267,44 @@ var SimulationsResource = class extends WorkspaceScopedResource {
3267
3267
  })
3268
3268
  );
3269
3269
  }
3270
+ /**
3271
+ * Fork a session into N branches — clone the session at its current turn and
3272
+ * step each alternative caller utterance atomically. The session must belong
3273
+ * to a coverage run (branches attribute to the parent's `run_id`); forking a
3274
+ * run-less session is rejected server-side. `session_id` travels in the path,
3275
+ * so `body` carries only the alternatives.
3276
+ */
3277
+ async forkSession(sessionId, body) {
3278
+ return extractData(
3279
+ await this.client.POST("/v1/{workspace_id}/simulations/sessions/{session_id}/fork", {
3280
+ params: { path: { workspace_id: this.workspaceId, session_id: sessionId } },
3281
+ body
3282
+ })
3283
+ );
3284
+ }
3285
+ /** Assign a score (and optional rationale) to a completed simulation session. */
3286
+ async scoreSession(sessionId, body) {
3287
+ return extractData(
3288
+ await this.client.POST("/v1/{workspace_id}/simulations/sessions/{session_id}/score", {
3289
+ params: { path: { workspace_id: this.workspaceId, session_id: sessionId } },
3290
+ body
3291
+ })
3292
+ );
3293
+ }
3294
+ /**
3295
+ * Promote a run-less (interactive playground) session into a coverage run so
3296
+ * it can be forked/scored. Creates a run, binds the session to it, and writes
3297
+ * the coverage session record. Idempotent: a session that already belongs to
3298
+ * a run returns that run with `already_bound: true`. No request body —
3299
+ * `session_id` travels in the path.
3300
+ */
3301
+ async promoteSession(sessionId) {
3302
+ return extractData(
3303
+ await this.client.POST("/v1/{workspace_id}/simulations/sessions/{session_id}/promote", {
3304
+ params: { path: { workspace_id: this.workspaceId, session_id: sessionId } }
3305
+ })
3306
+ );
3307
+ }
3270
3308
  /**
3271
3309
  * Multi-session simulation runs — orchestrate a batch of scenarios against
3272
3310
  * a service to compute coverage and surface regressions. Use this when you