@usenaive-sdk/managed-agents 0.12.2 → 0.12.3

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.d.ts CHANGED
@@ -3257,6 +3257,10 @@ interface ProxyMessageCreate {
3257
3257
  description?: string;
3258
3258
  input_schema: Record<string, unknown>;
3259
3259
  }[];
3260
+ /** `disabled` runs the model at its lowest published effort (`client.models.list()` `efforts`). */
3261
+ thinking?: {
3262
+ type: "disabled";
3263
+ };
3260
3264
  }
3261
3265
  /**
3262
3266
  * The reply. `id` is the request id — the same value on `x-request-id` and on the ledger entry, so
@@ -3307,6 +3311,8 @@ interface ProxyCompletionCreate {
3307
3311
  max_completion_tokens?: number;
3308
3312
  max_tokens?: number;
3309
3313
  temperature?: number;
3314
+ /** One of the efforts this model publishes on `client.models.list()`; any other is refused. */
3315
+ reasoning_effort?: "low" | "medium" | "high";
3310
3316
  tools?: {
3311
3317
  type: "function";
3312
3318
  function: {
package/dist/index.js CHANGED
@@ -7561,6 +7561,21 @@ var ExecResultSchema = z66.object({
7561
7561
  truncated: z66.boolean().optional()
7562
7562
  });
7563
7563
  var DirectorySchema = z66.object({ entries: z66.array(FileEntrySchema) });
7564
+ async function* untilExit(path, frames2) {
7565
+ let exited = false;
7566
+ for await (const frame of frames2) {
7567
+ if ("exit" in frame) exited = true;
7568
+ yield frame;
7569
+ }
7570
+ if (!exited) {
7571
+ throw new ApiError(502, {
7572
+ type: "api_error",
7573
+ code: "internal_error",
7574
+ message: `POST ${path} ended without an exit frame; the command may have run \u2014 check GET \u2026/commands before re-running it`,
7575
+ request_id: ""
7576
+ });
7577
+ }
7578
+ }
7564
7579
  var workspace = (config) => ({
7565
7580
  /** The name, and nothing else (§41.5). */
7566
7581
  update: (id, body) => request(config, ComputerSchema, { method: "PATCH", path: `/v1/computers/${encodeURIComponent(id)}`, body }),
@@ -7570,11 +7585,14 @@ var workspace = (config) => ({
7570
7585
  * The same run as `exec`, frame by frame (§41.2): `{stdout}`/`{stderr}` as they arrive, then one
7571
7586
  * `{exit}` naming the `computer_command` row it was recorded as. One connection, no resume.
7572
7587
  */
7573
- execStream: (id, command, opts = {}) => streamFrames(config, ExecStreamFrameSchema, {
7574
- method: "POST",
7575
- path: `/v1/computers/${encodeURIComponent(id)}/exec/stream`,
7576
- body: { command, ...opts.timeoutMs === void 0 ? {} : { timeout_ms: opts.timeoutMs } }
7577
- }),
7588
+ execStream: (id, command, opts = {}) => {
7589
+ const body = { command, ...opts.timeoutMs === void 0 ? {} : { timeout_ms: opts.timeoutMs } };
7590
+ return untilExit(`/v1/computers/${encodeURIComponent(id)}/exec/stream`, streamFrames(config, ExecStreamFrameSchema, {
7591
+ method: "POST",
7592
+ path: `/v1/computers/${encodeURIComponent(id)}/exec/stream`,
7593
+ body
7594
+ }));
7595
+ },
7578
7596
  /** What has been run on the box, newest first (§41.3). */
7579
7597
  commands: (id, query2 = {}) => request(config, page(ComputerCommandSchema), {
7580
7598
  method: "GET",