@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 +3 -0
- package/dist/index.cjs +38 -0
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +38 -0
- package/dist/index.mjs.map +2 -2
- package/dist/resources/simulations.js +32 -0
- package/dist/resources/simulations.js.map +1 -1
- package/dist/types/generated/api.d.ts +437 -1
- package/dist/types/generated/api.d.ts.map +1 -1
- package/dist/types/resources/external-integrations.d.ts.map +1 -1
- package/dist/types/resources/intake.d.ts.map +1 -1
- package/dist/types/resources/integrations.d.ts.map +1 -1
- package/dist/types/resources/metrics.d.ts.map +1 -1
- package/dist/types/resources/operators.d.ts +1 -1
- package/dist/types/resources/operators.d.ts.map +1 -1
- package/dist/types/resources/services.d.ts.map +1 -1
- package/dist/types/resources/settings.d.ts.map +1 -1
- package/dist/types/resources/simulations.d.ts +27 -0
- package/dist/types/resources/simulations.d.ts.map +1 -1
- package/dist/types/resources/surfaces.d.ts.map +1 -1
- package/dist/types/resources/world.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3151,6 +3151,44 @@ var SimulationsResource = class extends WorkspaceScopedResource {
|
|
|
3151
3151
|
})
|
|
3152
3152
|
);
|
|
3153
3153
|
}
|
|
3154
|
+
/**
|
|
3155
|
+
* Fork a session into N branches — clone the session at its current turn and
|
|
3156
|
+
* step each alternative caller utterance atomically. The session must belong
|
|
3157
|
+
* to a coverage run (branches attribute to the parent's `run_id`); forking a
|
|
3158
|
+
* run-less session is rejected server-side. `session_id` travels in the path,
|
|
3159
|
+
* so `body` carries only the alternatives.
|
|
3160
|
+
*/
|
|
3161
|
+
async forkSession(sessionId, body) {
|
|
3162
|
+
return extractData(
|
|
3163
|
+
await this.client.POST("/v1/{workspace_id}/simulations/sessions/{session_id}/fork", {
|
|
3164
|
+
params: { path: { workspace_id: this.workspaceId, session_id: sessionId } },
|
|
3165
|
+
body
|
|
3166
|
+
})
|
|
3167
|
+
);
|
|
3168
|
+
}
|
|
3169
|
+
/** Assign a score (and optional rationale) to a completed simulation session. */
|
|
3170
|
+
async scoreSession(sessionId, body) {
|
|
3171
|
+
return extractData(
|
|
3172
|
+
await this.client.POST("/v1/{workspace_id}/simulations/sessions/{session_id}/score", {
|
|
3173
|
+
params: { path: { workspace_id: this.workspaceId, session_id: sessionId } },
|
|
3174
|
+
body
|
|
3175
|
+
})
|
|
3176
|
+
);
|
|
3177
|
+
}
|
|
3178
|
+
/**
|
|
3179
|
+
* Promote a run-less (interactive playground) session into a coverage run so
|
|
3180
|
+
* it can be forked/scored. Creates a run, binds the session to it, and writes
|
|
3181
|
+
* the coverage session record. Idempotent: a session that already belongs to
|
|
3182
|
+
* a run returns that run with `already_bound: true`. No request body —
|
|
3183
|
+
* `session_id` travels in the path.
|
|
3184
|
+
*/
|
|
3185
|
+
async promoteSession(sessionId) {
|
|
3186
|
+
return extractData(
|
|
3187
|
+
await this.client.POST("/v1/{workspace_id}/simulations/sessions/{session_id}/promote", {
|
|
3188
|
+
params: { path: { workspace_id: this.workspaceId, session_id: sessionId } }
|
|
3189
|
+
})
|
|
3190
|
+
);
|
|
3191
|
+
}
|
|
3154
3192
|
/**
|
|
3155
3193
|
* Multi-session simulation runs — orchestrate a batch of scenarios against
|
|
3156
3194
|
* a service to compute coverage and surface regressions. Use this when you
|