@simular-ai/sai-sdk 0.1.0-alpha.1 → 0.1.0-alpha.2
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/README.md +72 -5
- package/dist/client.d.ts +1 -1
- package/dist/client.js +1 -1
- package/dist/client.js.map +1 -1
- package/dist/errors.d.ts +2 -1
- package/dist/errors.js +2 -1
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/learn.d.ts +81 -12
- package/dist/learn.js +88 -9
- package/dist/learn.js.map +1 -1
- package/dist/tenants.d.ts +39 -3
- package/dist/tenants.js +65 -5
- package/dist/tenants.js.map +1 -1
- package/dist/types.d.ts +119 -8
- package/dist/types.js +86 -2
- package/dist/types.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -221,7 +221,7 @@ const turn = await session.send('Open {{site}} and read the title of the top sto
|
|
|
221
221
|
})
|
|
222
222
|
await sai.turns.wait(turn)
|
|
223
223
|
|
|
224
|
-
const learned = await sai.learn.create([turn]) //
|
|
224
|
+
const learned = await sai.learn.create([turn]) // waits for the code; longer for a longer task
|
|
225
225
|
console.log(
|
|
226
226
|
learned.template,
|
|
227
227
|
learned.parameters.map((p) => p.name),
|
|
@@ -232,7 +232,7 @@ await using lease = await sai.control.open({ machine: pc })
|
|
|
232
232
|
const r = await lease.run(learned, { site: 'https://lobste.rs' }) // inputs over the defaults
|
|
233
233
|
console.log(r.result) // what main returned
|
|
234
234
|
|
|
235
|
-
// It broke on a new site: repair it from the run (or from
|
|
235
|
+
// It broke on a new site: repair it from the run (or from guidance, or a new turn that solved it)
|
|
236
236
|
const fixed = await sai.learn.create([], {
|
|
237
237
|
initialCode: learned.code,
|
|
238
238
|
evaluations: [{ inputs: { site: 'https://lobste.rs' }, result: r, passed: false }],
|
|
@@ -249,6 +249,44 @@ console.log(judgement.verdict, judgement.criteria[0]?.score)
|
|
|
249
249
|
`learned.status` is `failed` when the code still has `learned.validation.errors` after one retry.
|
|
250
250
|
Pass a judgement as `{ ..., judgement }` in an evaluation to repair code from its evidence.
|
|
251
251
|
|
|
252
|
+
### Run, judge and repair on a machine (policy iteration)
|
|
253
|
+
|
|
254
|
+
With `maxIterations`, `learn` also runs the code on a machine, judges each run, and repairs the code
|
|
255
|
+
after a failed run, for up to that many versions. It starts from your `turns`, or, without them, the
|
|
256
|
+
agent does `taskTemplate` first. The call answers at once with a job; `wait` reads it until it ends.
|
|
257
|
+
|
|
258
|
+
```ts
|
|
259
|
+
const job = await sai.learn.create([], {
|
|
260
|
+
taskTemplate: 'Open {{site}} and read the title of the top story',
|
|
261
|
+
inputs: { site: 'https://news.ycombinator.com' },
|
|
262
|
+
machine: pc,
|
|
263
|
+
criteria: 'The answer is the title of the top story on the page',
|
|
264
|
+
maxIterations: 3, // up to 3 code versions; 0 (the default) only writes the code
|
|
265
|
+
rollouts: 3, // each version must pass 3 runs in a row
|
|
266
|
+
reset: { code: 'await machine.browser.newtab("https://news.ycombinator.com")' }, // or { task: '...' }
|
|
267
|
+
continueWithAgent: true, // after a failed run, the agent finishes the task and the repair learns from it
|
|
268
|
+
})
|
|
269
|
+
const done = await sai.learn.wait(job) // can take an hour; `timeoutMs` to stop waiting
|
|
270
|
+
console.log(done.status, done.stopReason) // did the call do its work
|
|
271
|
+
console.log(done.testResult) // { status: 'passed', passedRuns: 3, requiredRuns: 3, inputs }
|
|
272
|
+
console.log(done.code) // the latest version
|
|
273
|
+
for (const it of done.iterations)
|
|
274
|
+
console.log(
|
|
275
|
+
it.index,
|
|
276
|
+
it.changes,
|
|
277
|
+
it.rollouts.map((r) => r.verdict),
|
|
278
|
+
)
|
|
279
|
+
|
|
280
|
+
const run = await sai.learn.rollout(job, 1, 1) // what run 1 of version 1 returned, and its judgement
|
|
281
|
+
await sai.learn.cancel(job) // stops at once and keeps the last complete results
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
`status` says whether the call did its work (`succeeded`, `failed` when no code was written, or
|
|
285
|
+
`stopped` with a `stopReason` such as `cancelled`, `time_limit` or `agent_failed`); `testResult` says
|
|
286
|
+
how the returned code did on `inputs`. With `judgeInitialAgentRun: true`, a job whose agent run fails
|
|
287
|
+
the judge stops before writing code; pass its `agentTurnId` as `turns` to start again from that run.
|
|
288
|
+
The runs do the task for real, so use test inputs or a test account.
|
|
289
|
+
|
|
252
290
|
## Run Sai for your customers
|
|
253
291
|
|
|
254
292
|
With an [Organisation](https://platform.simular.ai/documentation/organisations), each customer is a
|
|
@@ -268,11 +306,40 @@ await session.run("Open the calendar and read today's appointments")
|
|
|
268
306
|
|
|
269
307
|
- `tenants.list({ status, externalId, limit, cursor })` resolves with one page: `page.tenants`,
|
|
270
308
|
`page.nextCursor`. `externalId` finds your customer's Tenant without storing `tenant.id`.
|
|
271
|
-
- `tenants.update(tenant, { name, metadata, status: 'disabled' | 'active' })
|
|
272
|
-
|
|
309
|
+
- `tenants.update(tenant, { name, metadata, status: 'disabled' | 'active', cloudMachineLimit, residentialProxy })`.
|
|
310
|
+
`cloudMachineLimit` is 0 to 1000, and `null` removes the cap. `tenants.get` also returns
|
|
311
|
+
`cloudMachineCount` and `residentialProxy`.
|
|
312
|
+
- `tenants.delete(tenant)` disables it and revokes every enrolled machine. Its cloud machines stay
|
|
313
|
+
until you delete them.
|
|
273
314
|
- `tenants.token(tenant)` is the raw exchange: a one-hour `TenantToken` to pass as
|
|
274
315
|
`new Sai({ apiKey: token.token })`.
|
|
275
|
-
- `tenantMachines.
|
|
316
|
+
- `tenantMachines.list(tenant)` and `tenantMachines.get(tenant, machineId)` return both kinds:
|
|
317
|
+
`machine.kind` is `enrolled` or `cloud`, and `machine.state` is `online` / `offline` for an
|
|
318
|
+
enrolled machine, or `provisioning`, `ready`, `starting`, `hibernated`, `deleting` or `failed` for a
|
|
319
|
+
cloud one.
|
|
320
|
+
- `tenantMachines.delete(tenant, machine)` resolves with `'revoked'` for an enrolled machine and
|
|
321
|
+
`'deleting'` for a cloud machine, whose disk goes with it.
|
|
322
|
+
|
|
323
|
+
### Cloud machines
|
|
324
|
+
|
|
325
|
+
Sai can host a computer for a Tenant instead of the Tenant enrolling its own:
|
|
326
|
+
|
|
327
|
+
```ts
|
|
328
|
+
const machine = await org.tenantMachines.create(tenant, {
|
|
329
|
+
os: 'windows', // or 'linux'
|
|
330
|
+
name: 'intake-desk-3',
|
|
331
|
+
requestId: crypto.randomUUID(), // keep it, and send it again if you retry this create
|
|
332
|
+
wait: true, // read the machine until it is ready (timeoutMs: 10 minutes)
|
|
333
|
+
})
|
|
334
|
+
const onCloud = await clinic.sessions.create({ machine: machine.id })
|
|
335
|
+
await onCloud.run("Open the calendar and read today's appointments")
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
Without `wait: true`, `create` resolves at once with `state: 'provisioning'`. A create can throw
|
|
339
|
+
`SaiError` (402 `insufficient_credits`), `SpendCapReachedError` (the Tenant's budget, `err.body.scope`),
|
|
340
|
+
`ConflictError` (`machine_limit_reached` with `err.body.limit` and `err.body.used`, or
|
|
341
|
+
`request_id_reused`), `PermissionDeniedError` (`tenant_disabled`) or `ServiceUnavailableError`
|
|
342
|
+
(`capacity_unavailable`: retry later). A 500 carries `err.body.errorId` to quote to support.
|
|
276
343
|
|
|
277
344
|
## Errors
|
|
278
345
|
|
package/dist/client.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ export declare class Sai {
|
|
|
45
45
|
readonly account: AccountResource;
|
|
46
46
|
/** Your customers under an Organisation. Takes an Organisation Key. */
|
|
47
47
|
readonly tenants: Tenants;
|
|
48
|
-
/** A Tenant's enrolled
|
|
48
|
+
/** A Tenant's computers: enrolled, and cloud machines Sai hosts. Takes an Organisation Key. */
|
|
49
49
|
readonly tenantMachines: TenantMachines;
|
|
50
50
|
/** @param credential internal: `tenants.client()` passes a token source instead of `apiKey`. */
|
|
51
51
|
constructor(opts?: SaiOptions, credential?: Credential);
|
package/dist/client.js
CHANGED
|
@@ -29,7 +29,7 @@ export class Sai {
|
|
|
29
29
|
account;
|
|
30
30
|
/** Your customers under an Organisation. Takes an Organisation Key. */
|
|
31
31
|
tenants;
|
|
32
|
-
/** A Tenant's enrolled
|
|
32
|
+
/** A Tenant's computers: enrolled, and cloud machines Sai hosts. Takes an Organisation Key. */
|
|
33
33
|
tenantMachines;
|
|
34
34
|
/** @param credential internal: `tenants.client()` passes a token source instead of `apiKey`. */
|
|
35
35
|
constructor(opts = {}, credential) {
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAmC,MAAM,WAAW,CAAA;AACnF,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EACL,YAAY,EACZ,eAAe,EACf,UAAU,GAIX,MAAM,YAAY,CAAA;AAmBnB;;;;;;;;GAQG;AACH,MAAM,OAAO,GAAG;IACL,QAAQ,CAAU;IAClB,QAAQ,CAAU;IAClB,KAAK,CAAO;IACrB,0EAA0E;IACjE,KAAK,CAAO;IACrB,oEAAoE;IAC3D,KAAK,CAAO;IACZ,OAAO,CAAS;IAChB,MAAM,CAAQ;IACd,KAAK,CAAO;IACZ,OAAO,CAAiB;IACjC,uEAAuE;IAC9D,OAAO,CAAS;IACzB
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts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ACvC;YACD,SAAS,EAAE,OAAO;SACnB,CAAC,CAAA;QACF,OAAO,eAAe,CAAC,CAAC,CAAC,CAAA;IAC3B,CAAC;CACF;AAED,MAAM,OAAO,eAAe;IACG;IAA7B,YAA6B,IAAU;QAAV,SAAI,GAAJ,IAAI,CAAM;IAAG,CAAC;IAE3C,iFAAiF;IACjF,KAAK,CAAC,GAAG;QACP,OAAO,YAAY,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAA;IACxE,CAAC;CACF"}
|
package/dist/errors.d.ts
CHANGED
|
@@ -60,7 +60,8 @@ export declare class LinkOnlyApprovalError extends ConflictError {
|
|
|
60
60
|
get approvalUrl(): string | undefined;
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
|
-
* 403 `spend_cap_reached`: the key reached its monthly spend limit
|
|
63
|
+
* 403 `spend_cap_reached`: the key reached its monthly spend limit, or (on a
|
|
64
|
+
* cloud machine create, `body.scope === 'tenant'`) the Tenant reached its budget. Not
|
|
64
65
|
* retryable: the limit resets at `resetsAt` (ISO 8601, 00:00 UTC on the 1st),
|
|
65
66
|
* or raise it for the key in the portal.
|
|
66
67
|
*/
|
package/dist/errors.js
CHANGED
|
@@ -67,7 +67,8 @@ export class LinkOnlyApprovalError extends ConflictError {
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
70
|
-
* 403 `spend_cap_reached`: the key reached its monthly spend limit
|
|
70
|
+
* 403 `spend_cap_reached`: the key reached its monthly spend limit, or (on a
|
|
71
|
+
* cloud machine create, `body.scope === 'tenant'`) the Tenant reached its budget. Not
|
|
71
72
|
* retryable: the limit resets at `resetsAt` (ISO 8601, 00:00 UTC on the 1st),
|
|
72
73
|
* or raise it for the key in the portal.
|
|
73
74
|
*/
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.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AAO,IAAI,CAAC,iBAAiB,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;IACjG,OAAO,IAAI,GAAG,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAA;AACnE,CAAC;AAED,SAAS,aAAa,CAAC,CAAS;IAC9B,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAA;AAClE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* TypeScript SDK for the Sai API.
|
|
3
3
|
*
|
|
4
4
|
* - `sai.sessions`: give Sai a task on a computer and get the answer back.
|
|
5
|
-
* - `sai.learn`, `sai.judge`: turn recorded turns into Simulang code, repair it,
|
|
5
|
+
* - `sai.learn`, `sai.judge`: turn recorded turns or a task into Simulang code, repair it, run
|
|
6
|
+
* judge and repair it on a machine (policy iteration), judge turns.
|
|
6
7
|
* - `sai.control`: drive a cloud computer yourself with Simulang.
|
|
7
8
|
* - `sai.machines`, `sai.models`, `sai.files`, `sai.account`.
|
|
8
9
|
* - `sai.tenants`, `sai.tenantMachines`: your customers under an Organisation (an Organisation Key).
|
|
@@ -15,5 +16,5 @@ export type { TenantMachineRef, TenantRef } from './tenants.js';
|
|
|
15
16
|
export type { TurnRef } from './turns.js';
|
|
16
17
|
export type { JudgeOptions, LearnOptions } from './learn.js';
|
|
17
18
|
export { Session, Turn, type ApprovalAnswer, type ApprovalHandler, type SendOptions, type WaitOptions, } from './sessions.js';
|
|
18
|
-
export { EVENT_KINDS, TURN_RECORD_STATUSES, TURN_STATUSES, type Account, type Approval, type Attachment, type Check, type CriterionResult, type Enrollment, type Evaluation, type Event, type Evidence, type EventKind, type ExecError, type ExecResult, type Judgement, type LearnParameter, type LearnResult, type LiveView, type Machine, type Model, type Tenant, type TenantMachine, type TenantPage, type TenantToken, type TrajectoryStep, type TurnRecord, type TurnRecordStatus, type TurnResult, type TurnStatus, type Usage, } from './types.js';
|
|
19
|
+
export { EVENT_KINDS, TURN_RECORD_STATUSES, TURN_STATUSES, type Account, type Approval, type Attachment, type Check, type CriterionResult, type Enrollment, type Evaluation, type Event, type Evidence, type EventKind, type ExecError, type ExecResult, type Judgement, type LearnIteration, type LearnParameter, type LearnReset, type LearnResult, type LearnRollout, type LearnRun, type LearnTestResult, type LiveView, type Machine, type Model, type Tenant, type TenantMachine, type TenantPage, type TenantToken, type TrajectoryStep, type TurnRecord, type TurnRecordStatus, type TurnResult, type TurnStatus, type Usage, } from './types.js';
|
|
19
20
|
export { VERSION } from './version.js';
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* TypeScript SDK for the Sai API.
|
|
3
3
|
*
|
|
4
4
|
* - `sai.sessions`: give Sai a task on a computer and get the answer back.
|
|
5
|
-
* - `sai.learn`, `sai.judge`: turn recorded turns into Simulang code, repair it,
|
|
5
|
+
* - `sai.learn`, `sai.judge`: turn recorded turns or a task into Simulang code, repair it, run
|
|
6
|
+
* judge and repair it on a machine (policy iteration), judge turns.
|
|
6
7
|
* - `sai.control`: drive a cloud computer yourself with Simulang.
|
|
7
8
|
* - `sai.machines`, `sai.models`, `sai.files`, `sai.account`.
|
|
8
9
|
* - `sai.tenants`, `sai.tenantMachines`: your customers under an Organisation (an Organisation Key).
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,GAAG,EAAmB,MAAM,aAAa,CAAA;AAClD,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,UAAU,EACV,aAAa,EACb,eAAe,EACf,SAAS,EACT,qBAAqB,EACrB,aAAa,EACb,qBAAqB,EACrB,cAAc,EACd,QAAQ,EACR,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAK3C,OAAO,EACL,OAAO,EACP,IAAI,GAKL,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,aAAa,GAkCd,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA"}
|
package/dist/learn.d.ts
CHANGED
|
@@ -1,22 +1,69 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Learn and judge (research preview): turn recorded turns
|
|
3
|
-
* code, and
|
|
2
|
+
* Learn and judge (research preview): turn recorded turns, or a task the agent does first, into
|
|
3
|
+
* Simulang code you own; repair that code; run, judge and repair it on a machine until it passes
|
|
4
|
+
* (policy iteration); and judge turns against criteria you choose now.
|
|
4
5
|
*
|
|
5
6
|
* Maps to `/v1/agents/learn` and `/v1/agents/judge`.
|
|
6
7
|
*/
|
|
7
8
|
import type { Http } from './http.js';
|
|
9
|
+
import { type MachineRef } from './machines.js';
|
|
8
10
|
import type { TurnRef } from './turns.js';
|
|
9
|
-
import { type Check, type Evaluation, type Judgement, type LearnResult } from './types.js';
|
|
11
|
+
import { type LearnRun, type Check, type Evaluation, type Judgement, type LearnResult } from './types.js';
|
|
10
12
|
export interface LearnOptions {
|
|
11
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* The task, with `{{name}}` placeholders: `'Submit claim for {{patient}} to {{payer}}'`. Without
|
|
15
|
+
* `turns`, the agent does this task first. With `turns`, it defaults to the first turn's.
|
|
16
|
+
*/
|
|
17
|
+
taskTemplate?: string;
|
|
18
|
+
/** @deprecated Use `taskTemplate`. */
|
|
12
19
|
template?: string;
|
|
13
|
-
/**
|
|
20
|
+
/** A value for every placeholder; with `turns`, defaults to the first turn's. */
|
|
21
|
+
inputs?: Record<string, string | number | boolean>;
|
|
22
|
+
/** Code to repair (with `maxIterations` 0), or to start the run-judge-repair loop from. */
|
|
14
23
|
initialCode?: string;
|
|
15
|
-
/** How `initialCode` did on runs. */
|
|
24
|
+
/** How `initialCode` did on runs (a repair only). */
|
|
16
25
|
evaluations?: Evaluation[];
|
|
17
|
-
/**
|
|
26
|
+
/** What you know about the task, for writing and repairing the code, e.g. "the Save button is under the ⋯ menu". */
|
|
27
|
+
guidance?: string;
|
|
28
|
+
/** @deprecated Use `guidance`. */
|
|
18
29
|
feedback?: string;
|
|
19
|
-
/**
|
|
30
|
+
/** For a repair: what earlier versions of the code changed and how they failed, so the repair does not repeat them. */
|
|
31
|
+
history?: string;
|
|
32
|
+
/**
|
|
33
|
+
* For a conversion: the code will be run again and again with no reset in between, so it opens
|
|
34
|
+
* the app or URL itself instead of assuming the screen it starts on.
|
|
35
|
+
*/
|
|
36
|
+
runsWithoutReset?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Code versions to run, judge and repair: 0 (the default) only writes the code; 3 allows up to
|
|
39
|
+
* two repairs. At most 5.
|
|
40
|
+
*/
|
|
41
|
+
maxIterations?: number;
|
|
42
|
+
/** Runs per code version; a version passes when all of them pass. Default 3, at most 5. */
|
|
43
|
+
rollouts?: number;
|
|
44
|
+
/** The machine to run on; optional with one machine. */
|
|
45
|
+
machine?: MachineRef;
|
|
46
|
+
/** What "done" means for the judge; default: the task as written, with its inputs. */
|
|
47
|
+
criteria?: string | Check[];
|
|
48
|
+
/** Run before the agent run and before every run of the code: Simulang `code`, or a `task` for the agent. */
|
|
49
|
+
reset?: {
|
|
50
|
+
code: string;
|
|
51
|
+
} | {
|
|
52
|
+
task: string;
|
|
53
|
+
};
|
|
54
|
+
/** Judge the agent run first; if it fails, the job stops with the judgement and writes no code. */
|
|
55
|
+
judgeInitialAgentRun?: boolean;
|
|
56
|
+
/** After a failed run, let the agent finish the task; its turn feeds the repair. */
|
|
57
|
+
continueWithAgent?: boolean;
|
|
58
|
+
/** Limit of each run of the code, in minutes. Default 15. */
|
|
59
|
+
rolloutMinutes?: number;
|
|
60
|
+
/** Limit of the agent run and of each reset task, in minutes. Default 15. */
|
|
61
|
+
agentRunMinutes?: number;
|
|
62
|
+
/** Limit of each continuation, in minutes. Default 15. */
|
|
63
|
+
continuationMinutes?: number;
|
|
64
|
+
/** Limit of the whole job, in minutes. Default 615, at most 690. */
|
|
65
|
+
maxJobMinutes?: number;
|
|
66
|
+
/** A model id from `sai.models.list()`; without it, Sai picks the model. */
|
|
20
67
|
model?: string;
|
|
21
68
|
/** The same key again returns the earlier result and runs nothing. */
|
|
22
69
|
idempotencyKey?: string;
|
|
@@ -26,13 +73,35 @@ export declare class Learn {
|
|
|
26
73
|
private readonly http;
|
|
27
74
|
constructor(http: Http);
|
|
28
75
|
/**
|
|
29
|
-
* Make Simulang code
|
|
30
|
-
*
|
|
31
|
-
*
|
|
76
|
+
* Make Simulang code, and optionally run, judge and repair it on a machine.
|
|
77
|
+
*
|
|
78
|
+
* - `create(turns)`: code from recorded turns (ordered, one session, each sent with
|
|
79
|
+
* `recordTrajectory`). Answers with the code; a longer task takes longer.
|
|
80
|
+
* - `create([], { initialCode, guidance | evaluations })`: a repair. Answers with the code.
|
|
81
|
+
* - `create(turns, { maxIterations: 3 })` or `create([], { taskTemplate, inputs, maxIterations: 3 })`:
|
|
82
|
+
* a job on the machine (from `turns`, or after the agent does the task). Answers at once with
|
|
83
|
+
* `status: 'running'`; read it with `wait()`.
|
|
84
|
+
*
|
|
85
|
+
* A result with `validation.errors` comes back `failed`.
|
|
32
86
|
*/
|
|
33
87
|
create(turns: TurnRef[], opts?: LearnOptions): Promise<LearnResult>;
|
|
34
|
-
/** A learn call's result,
|
|
88
|
+
/** A learn call's result, or a job's progress so far. */
|
|
35
89
|
get(learnId: string): Promise<LearnResult>;
|
|
90
|
+
/**
|
|
91
|
+
* Read a learn job until it ends (`succeeded`, `failed` or `stopped`). `timeoutMs` throws a
|
|
92
|
+
* `TimeoutError` (DOMException) with the job still running; it keeps running.
|
|
93
|
+
*/
|
|
94
|
+
wait(job: LearnResult | string, opts?: {
|
|
95
|
+
timeoutMs?: number;
|
|
96
|
+
pollMs?: number;
|
|
97
|
+
}): Promise<LearnResult>;
|
|
98
|
+
/**
|
|
99
|
+
* Stop a learn job at once, whatever step it is on. It keeps the last complete results and
|
|
100
|
+
* reads `stopped` / `cancelled` once it has ended, normally within seconds.
|
|
101
|
+
*/
|
|
102
|
+
cancel(job: LearnResult | string): Promise<void>;
|
|
103
|
+
/** One run of a learn job's code: what it returned and logged, and its judgement. */
|
|
104
|
+
rollout(job: LearnResult | string, iteration: number, rollout: number): Promise<LearnRun>;
|
|
36
105
|
}
|
|
37
106
|
export interface JudgeOptions {
|
|
38
107
|
/** Default: the first turn's message. */
|
package/dist/learn.js
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Learn and judge (research preview): turn recorded turns
|
|
3
|
-
* code, and
|
|
2
|
+
* Learn and judge (research preview): turn recorded turns, or a task the agent does first, into
|
|
3
|
+
* Simulang code you own; repair that code; run, judge and repair it on a machine until it passes
|
|
4
|
+
* (policy iteration); and judge turns against criteria you choose now.
|
|
4
5
|
*
|
|
5
6
|
* Maps to `/v1/agents/learn` and `/v1/agents/judge`.
|
|
6
7
|
*/
|
|
7
|
-
import {
|
|
8
|
+
import { RateLimitError } from './errors.js';
|
|
9
|
+
import { idOf } from './machines.js';
|
|
10
|
+
import { parseJudgement, parseLearnResult, parseLearnRun, } from './types.js';
|
|
8
11
|
/** A conversion is two model calls of up to a minute or two each, plus one retry. */
|
|
9
12
|
const LEARN_TIMEOUT_MS = 600_000;
|
|
10
13
|
const JUDGE_TIMEOUT_MS = 180_000;
|
|
11
14
|
/** The last log lines of a run sent with an evaluation; the API takes 20 KB per result. */
|
|
12
15
|
const EVAL_LOG_LINES = 30;
|
|
16
|
+
/** How often `wait` reads a learn job; a job's steps take tens of seconds to minutes. */
|
|
17
|
+
const LEARN_POLL_INTERVAL_MS = 10_000;
|
|
13
18
|
const turnId = (t) => {
|
|
14
19
|
const id = typeof t === 'string' ? t : t.id;
|
|
15
20
|
if (!id)
|
|
@@ -40,20 +45,53 @@ export class Learn {
|
|
|
40
45
|
this.http = http;
|
|
41
46
|
}
|
|
42
47
|
/**
|
|
43
|
-
* Make Simulang code
|
|
44
|
-
*
|
|
45
|
-
*
|
|
48
|
+
* Make Simulang code, and optionally run, judge and repair it on a machine.
|
|
49
|
+
*
|
|
50
|
+
* - `create(turns)`: code from recorded turns (ordered, one session, each sent with
|
|
51
|
+
* `recordTrajectory`). Answers with the code; a longer task takes longer.
|
|
52
|
+
* - `create([], { initialCode, guidance | evaluations })`: a repair. Answers with the code.
|
|
53
|
+
* - `create(turns, { maxIterations: 3 })` or `create([], { taskTemplate, inputs, maxIterations: 3 })`:
|
|
54
|
+
* a job on the machine (from `turns`, or after the agent does the task). Answers at once with
|
|
55
|
+
* `status: 'running'`; read it with `wait()`.
|
|
56
|
+
*
|
|
57
|
+
* A result with `validation.errors` comes back `failed`.
|
|
46
58
|
*/
|
|
47
59
|
async create(turns, opts = {}) {
|
|
48
60
|
const body = { turns: turns.map(turnId) };
|
|
49
|
-
|
|
61
|
+
// The old names go out as sent, so code that uses them keeps working with an older API.
|
|
62
|
+
if (opts.taskTemplate !== undefined)
|
|
63
|
+
body.taskTemplate = opts.taskTemplate;
|
|
64
|
+
else if (opts.template !== undefined)
|
|
50
65
|
body.template = opts.template;
|
|
66
|
+
if (opts.inputs !== undefined)
|
|
67
|
+
body.inputs = opts.inputs;
|
|
51
68
|
if (opts.initialCode !== undefined)
|
|
52
69
|
body.initialCode = opts.initialCode;
|
|
53
70
|
if (opts.evaluations)
|
|
54
71
|
body.evaluations = opts.evaluations.map(evaluationJson);
|
|
55
|
-
if (opts.
|
|
72
|
+
if (opts.guidance !== undefined)
|
|
73
|
+
body.guidance = opts.guidance;
|
|
74
|
+
else if (opts.feedback !== undefined)
|
|
56
75
|
body.feedback = opts.feedback;
|
|
76
|
+
if (opts.machine !== undefined)
|
|
77
|
+
body.machineId = idOf(opts.machine);
|
|
78
|
+
for (const k of [
|
|
79
|
+
'history',
|
|
80
|
+
'runsWithoutReset',
|
|
81
|
+
'maxIterations',
|
|
82
|
+
'rollouts',
|
|
83
|
+
'criteria',
|
|
84
|
+
'reset',
|
|
85
|
+
'judgeInitialAgentRun',
|
|
86
|
+
'continueWithAgent',
|
|
87
|
+
'rolloutMinutes',
|
|
88
|
+
'agentRunMinutes',
|
|
89
|
+
'continuationMinutes',
|
|
90
|
+
'maxJobMinutes',
|
|
91
|
+
]) {
|
|
92
|
+
if (opts[k] !== undefined)
|
|
93
|
+
body[k] = opts[k];
|
|
94
|
+
}
|
|
57
95
|
if (opts.model !== undefined)
|
|
58
96
|
body.model = opts.model;
|
|
59
97
|
if (opts.idempotencyKey !== undefined)
|
|
@@ -63,11 +101,52 @@ export class Learn {
|
|
|
63
101
|
timeoutMs: opts.timeoutMs ?? LEARN_TIMEOUT_MS,
|
|
64
102
|
}));
|
|
65
103
|
}
|
|
66
|
-
/** A learn call's result,
|
|
104
|
+
/** A learn call's result, or a job's progress so far. */
|
|
67
105
|
async get(learnId) {
|
|
68
106
|
return parseLearnResult(await this.http.json('GET', `/v1/agents/learn/${encodeURIComponent(learnId)}`));
|
|
69
107
|
}
|
|
108
|
+
/**
|
|
109
|
+
* Read a learn job until it ends (`succeeded`, `failed` or `stopped`). `timeoutMs` throws a
|
|
110
|
+
* `TimeoutError` (DOMException) with the job still running; it keeps running.
|
|
111
|
+
*/
|
|
112
|
+
async wait(job, opts = {}) {
|
|
113
|
+
const learnId = typeof job === 'string' ? job : job.id;
|
|
114
|
+
const poll = opts.pollMs ?? LEARN_POLL_INTERVAL_MS;
|
|
115
|
+
const deadline = opts.timeoutMs === undefined ? null : Date.now() + opts.timeoutMs;
|
|
116
|
+
for (;;) {
|
|
117
|
+
let r;
|
|
118
|
+
try {
|
|
119
|
+
r = await this.get(learnId);
|
|
120
|
+
}
|
|
121
|
+
catch (err) {
|
|
122
|
+
if (!(err instanceof RateLimitError))
|
|
123
|
+
throw err;
|
|
124
|
+
await sleep((err.retryAfter ?? 30) * 1000);
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
if (r.status !== 'running')
|
|
128
|
+
return r;
|
|
129
|
+
if (deadline !== null && Date.now() + poll > deadline) {
|
|
130
|
+
throw new DOMException(`Learn job ${learnId} is still running.`, 'TimeoutError');
|
|
131
|
+
}
|
|
132
|
+
await sleep(poll);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Stop a learn job at once, whatever step it is on. It keeps the last complete results and
|
|
137
|
+
* reads `stopped` / `cancelled` once it has ended, normally within seconds.
|
|
138
|
+
*/
|
|
139
|
+
async cancel(job) {
|
|
140
|
+
const learnId = typeof job === 'string' ? job : job.id;
|
|
141
|
+
await this.http.json('POST', `/v1/agents/learn/${encodeURIComponent(learnId)}/cancel`);
|
|
142
|
+
}
|
|
143
|
+
/** One run of a learn job's code: what it returned and logged, and its judgement. */
|
|
144
|
+
async rollout(job, iteration, rollout) {
|
|
145
|
+
const learnId = typeof job === 'string' ? job : job.id;
|
|
146
|
+
return parseLearnRun(await this.http.json('GET', `/v1/agents/learn/${encodeURIComponent(learnId)}/iterations/${iteration}/rollouts/${rollout}`));
|
|
147
|
+
}
|
|
70
148
|
}
|
|
149
|
+
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
71
150
|
export class Judge {
|
|
72
151
|
http;
|
|
73
152
|
constructor(http) {
|
package/dist/learn.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"learn.js","sourceRoot":"","sources":["../src/learn.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"learn.js","sourceRoot":"","sources":["../src/learn.ts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AAA;IACH,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,WAAmB;QAC3B,OAAO,cAAc,CACnB,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,oBAAoB,kBAAkB,CAAC,WAAW,CAAC,EAAE,CAAC,CACnF,CAAA;IACH,CAAC;CACF"}
|
package/dist/tenants.d.ts
CHANGED
|
@@ -30,13 +30,23 @@ export declare class Tenants {
|
|
|
30
30
|
/**
|
|
31
31
|
* `metadata` replaces the whole map. `status: 'disabled'` stops the Tenant's tokens and
|
|
32
32
|
* machines; `status: 'active'` brings it back.
|
|
33
|
+
*
|
|
34
|
+
* `cloudMachineLimit` (0 to 1000) caps the Tenant's cloud machines; `null` removes the cap.
|
|
35
|
+
* Lowering it deletes nothing: creates are refused until the count fits. `residentialProxy`
|
|
36
|
+
* is the Tenant's residential proxy switch; it has no effect yet, and traffic goes direct.
|
|
37
|
+
* Only the Organisation Key or an owner may set these two.
|
|
33
38
|
*/
|
|
34
39
|
update(tenant: TenantRef, opts: {
|
|
35
40
|
name?: string;
|
|
36
41
|
metadata?: Record<string, string>;
|
|
37
42
|
status?: string;
|
|
43
|
+
cloudMachineLimit?: number | null;
|
|
44
|
+
residentialProxy?: boolean;
|
|
38
45
|
}): Promise<Tenant>;
|
|
39
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* Disables the Tenant and revokes every enrolled machine. Cloud machines stay and hibernate:
|
|
48
|
+
* delete them with `tenantMachines.delete`. Its data is kept: erase it from the console.
|
|
49
|
+
*/
|
|
40
50
|
delete(tenant: TenantRef): Promise<void>;
|
|
41
51
|
/** A single-use code that enrolls one computer into the Tenant. It expires in 15 minutes. */
|
|
42
52
|
createEnrollment(tenant: TenantRef): Promise<Enrollment>;
|
|
@@ -55,12 +65,38 @@ export declare class Tenants {
|
|
|
55
65
|
orgId?: string;
|
|
56
66
|
}): Promise<Sai>;
|
|
57
67
|
}
|
|
58
|
-
/** A Tenant's enrolled
|
|
68
|
+
/** A Tenant's computers, enrolled and cloud. Every call takes an Organisation Key. */
|
|
59
69
|
export declare class TenantMachines {
|
|
60
70
|
private readonly http;
|
|
61
71
|
constructor(http: Http);
|
|
72
|
+
/**
|
|
73
|
+
* Create a cloud machine for the Tenant. `os` is `windows` or `linux`; the size follows it.
|
|
74
|
+
* `name` (up to 64 characters) is a label you show your users.
|
|
75
|
+
*
|
|
76
|
+
* `requestId` (letters, digits, `_` and `-`, up to 128) makes a retry safe: the same id and
|
|
77
|
+
* body return the first machine, and the same id with another body throws `ConflictError`
|
|
78
|
+
* (`request_id_reused`). Without one, every call creates a machine.
|
|
79
|
+
*
|
|
80
|
+
* Returns at once with `state: 'provisioning'`. `wait: true` reads the machine until it is
|
|
81
|
+
* `ready`; it throws `SaiError` if the machine fails or is deleted, and a `TimeoutError`
|
|
82
|
+
* (DOMException) after `timeoutMs` (default 10 minutes).
|
|
83
|
+
*/
|
|
84
|
+
create(tenant: TenantRef, opts: {
|
|
85
|
+
os: 'windows' | 'linux';
|
|
86
|
+
name?: string;
|
|
87
|
+
requestId?: string;
|
|
88
|
+
wait?: boolean;
|
|
89
|
+
timeoutMs?: number;
|
|
90
|
+
}): Promise<TenantMachine>;
|
|
91
|
+
/** Both kinds, enrolled and cloud. A cloud machine is listed from the moment it is created. */
|
|
62
92
|
list(tenant: TenantRef): Promise<TenantMachine[]>;
|
|
63
93
|
get(tenant: TenantRef, machineId: string): Promise<TenantMachine>;
|
|
64
|
-
/**
|
|
94
|
+
/**
|
|
95
|
+
* An enrolled machine is signed out at once (`'revoked'`); enroll it again with a new code to
|
|
96
|
+
* bring it back. A cloud machine is deleted with its disk (`'deleting'`), which cannot be
|
|
97
|
+
* undone; it leaves the list when the deletion finishes.
|
|
98
|
+
*/
|
|
99
|
+
delete(tenant: TenantRef, machine: TenantMachineRef): Promise<'revoked' | 'deleting'>;
|
|
100
|
+
/** `delete` without its answer. On a cloud machine it deletes the machine: use `delete`. */
|
|
65
101
|
revoke(tenant: TenantRef, machine: TenantMachineRef): Promise<void>;
|
|
66
102
|
}
|
package/dist/tenants.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { RateLimitError, SaiError } from './errors.js';
|
|
1
2
|
import { parseEnrollment, parseTenant, parseTenantMachine, parseTenantToken, } from './types.js';
|
|
2
3
|
/** `tenants.client()` exchanges again when its token has less than this left. */
|
|
3
4
|
export const TOKEN_REFRESH_MARGIN_MS = 5 * 60 * 1000;
|
|
5
|
+
/** Between machine reads while `tenantMachines.create({ wait: true })` waits. */
|
|
6
|
+
const MACHINE_POLL_INTERVAL_MS = 5_000;
|
|
4
7
|
const q = encodeURIComponent;
|
|
5
8
|
const tenantPath = (tenant) => `/v1/tenants/${q(typeof tenant === 'string' ? tenant : tenant.id)}`;
|
|
6
9
|
/** Tenants: your customers, under an Organisation. Every call takes an Organisation Key. */
|
|
@@ -33,11 +36,19 @@ export class Tenants {
|
|
|
33
36
|
/**
|
|
34
37
|
* `metadata` replaces the whole map. `status: 'disabled'` stops the Tenant's tokens and
|
|
35
38
|
* machines; `status: 'active'` brings it back.
|
|
39
|
+
*
|
|
40
|
+
* `cloudMachineLimit` (0 to 1000) caps the Tenant's cloud machines; `null` removes the cap.
|
|
41
|
+
* Lowering it deletes nothing: creates are refused until the count fits. `residentialProxy`
|
|
42
|
+
* is the Tenant's residential proxy switch; it has no effect yet, and traffic goes direct.
|
|
43
|
+
* Only the Organisation Key or an owner may set these two.
|
|
36
44
|
*/
|
|
37
45
|
async update(tenant, opts) {
|
|
38
46
|
return parseTenant(await this.http.json('PATCH', tenantPath(tenant), { json: opts }));
|
|
39
47
|
}
|
|
40
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* Disables the Tenant and revokes every enrolled machine. Cloud machines stay and hibernate:
|
|
50
|
+
* delete them with `tenantMachines.delete`. Its data is kept: erase it from the console.
|
|
51
|
+
*/
|
|
41
52
|
async delete(tenant) {
|
|
42
53
|
await this.http.request('DELETE', tenantPath(tenant));
|
|
43
54
|
}
|
|
@@ -75,12 +86,51 @@ export class Tenants {
|
|
|
75
86
|
});
|
|
76
87
|
}
|
|
77
88
|
}
|
|
78
|
-
/** A Tenant's enrolled
|
|
89
|
+
/** A Tenant's computers, enrolled and cloud. Every call takes an Organisation Key. */
|
|
79
90
|
export class TenantMachines {
|
|
80
91
|
http;
|
|
81
92
|
constructor(http) {
|
|
82
93
|
this.http = http;
|
|
83
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* Create a cloud machine for the Tenant. `os` is `windows` or `linux`; the size follows it.
|
|
97
|
+
* `name` (up to 64 characters) is a label you show your users.
|
|
98
|
+
*
|
|
99
|
+
* `requestId` (letters, digits, `_` and `-`, up to 128) makes a retry safe: the same id and
|
|
100
|
+
* body return the first machine, and the same id with another body throws `ConflictError`
|
|
101
|
+
* (`request_id_reused`). Without one, every call creates a machine.
|
|
102
|
+
*
|
|
103
|
+
* Returns at once with `state: 'provisioning'`. `wait: true` reads the machine until it is
|
|
104
|
+
* `ready`; it throws `SaiError` if the machine fails or is deleted, and a `TimeoutError`
|
|
105
|
+
* (DOMException) after `timeoutMs` (default 10 minutes).
|
|
106
|
+
*/
|
|
107
|
+
async create(tenant, opts) {
|
|
108
|
+
let machine = parseTenantMachine(await this.http.json('POST', `${tenantPath(tenant)}/machines`, {
|
|
109
|
+
json: { os: opts.os, name: opts.name, requestId: opts.requestId },
|
|
110
|
+
}));
|
|
111
|
+
if (!opts.wait)
|
|
112
|
+
return machine;
|
|
113
|
+
const deadline = Date.now() + (opts.timeoutMs ?? 600_000);
|
|
114
|
+
while (machine.state !== 'ready') {
|
|
115
|
+
if (machine.state === 'failed' || machine.state === 'deleting') {
|
|
116
|
+
throw new SaiError(`Cloud machine ${machine.id} is ${machine.state} and will not become ready.`, { body: machine.raw });
|
|
117
|
+
}
|
|
118
|
+
if (Date.now() + MACHINE_POLL_INTERVAL_MS > deadline) {
|
|
119
|
+
throw new DOMException(`Cloud machine ${machine.id} still ${machine.state}.`, 'TimeoutError');
|
|
120
|
+
}
|
|
121
|
+
await sleep(MACHINE_POLL_INTERVAL_MS);
|
|
122
|
+
try {
|
|
123
|
+
machine = await this.get(tenant, machine.id);
|
|
124
|
+
}
|
|
125
|
+
catch (err) {
|
|
126
|
+
if (!(err instanceof RateLimitError))
|
|
127
|
+
throw err;
|
|
128
|
+
await sleep((err.retryAfter ?? 30) * 1000);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return machine;
|
|
132
|
+
}
|
|
133
|
+
/** Both kinds, enrolled and cloud. A cloud machine is listed from the moment it is created. */
|
|
84
134
|
async list(tenant) {
|
|
85
135
|
const d = await this.http.json('GET', `${tenantPath(tenant)}/machines`);
|
|
86
136
|
return (d.machines ?? []).map(parseTenantMachine);
|
|
@@ -88,10 +138,20 @@ export class TenantMachines {
|
|
|
88
138
|
async get(tenant, machineId) {
|
|
89
139
|
return parseTenantMachine(await this.http.json('GET', `${tenantPath(tenant)}/machines/${q(machineId)}`));
|
|
90
140
|
}
|
|
91
|
-
/**
|
|
92
|
-
|
|
141
|
+
/**
|
|
142
|
+
* An enrolled machine is signed out at once (`'revoked'`); enroll it again with a new code to
|
|
143
|
+
* bring it back. A cloud machine is deleted with its disk (`'deleting'`), which cannot be
|
|
144
|
+
* undone; it leaves the list when the deletion finishes.
|
|
145
|
+
*/
|
|
146
|
+
async delete(tenant, machine) {
|
|
93
147
|
const id = typeof machine === 'string' ? machine : machine.id;
|
|
94
|
-
await this.http.request('DELETE', `${tenantPath(tenant)}/machines/${q(id)}`);
|
|
148
|
+
const res = await this.http.request('DELETE', `${tenantPath(tenant)}/machines/${q(id)}`);
|
|
149
|
+
return res.status === 202 ? 'deleting' : 'revoked';
|
|
150
|
+
}
|
|
151
|
+
/** `delete` without its answer. On a cloud machine it deletes the machine: use `delete`. */
|
|
152
|
+
async revoke(tenant, machine) {
|
|
153
|
+
await this.delete(tenant, machine);
|
|
95
154
|
}
|
|
96
155
|
}
|
|
156
|
+
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
97
157
|
//# sourceMappingURL=tenants.js.map
|
package/dist/tenants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenants.js","sourceRoot":"","sources":["../src/tenants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tenants.js","sourceRoot":"","sources":["../src/tenants.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtD,OAAO,EACL,eAAe,EACf,WAAW,EACX,kBAAkB,EAClB,gBAAgB,GAMjB,MAAM,YAAY,CAAA;AAKnB,iFAAiF;AACjF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAA;AAEpD,iFAAiF;AACjF,MAAM,wBAAwB,GAAG,KAAK,CAAA;AAEtC,MAAM,CAAC,GAAG,kBAAkB,CAAA;AAC5B,MAAM,UAAU,GAAG,CAAC,MAAiB,EAAU,EAAE,CAC/C,eAAe,CAAC,CAAC,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAA;AAErE,4FAA4F;AAC5F,MAAM,OAAO,OAAO;IAEC;IACA;IACA;IAHnB,YACmB,IAAU,EACV,KAAyB,EACzB,cAA+C;QAF/C,SAAI,GAAJ,IAAI,CAAM;QACV,UAAK,GAAL,KAAK,CAAoB;QACzB,mBAAc,GAAd,cAAc,CAAiC;IAC/D,CAAC;IAEJ,qGAAqG;IACrG,KAAK,CAAC,MAAM,CACV,IAAY,EACZ,OAAmE,EAAE;QAErE,OAAO,WAAW,CAChB,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,aAAa,EAAE;YAC1C,IAAI,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE;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AE,OAAO,CAAC,CAAA;IACpC,CAAC;CACF;AAED,MAAM,KAAK,GAAG,CAAC,EAAU,EAAiB,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA"}
|
package/dist/types.d.ts
CHANGED
|
@@ -54,7 +54,17 @@ export interface Tenant {
|
|
|
54
54
|
/** Unix time in milliseconds. */
|
|
55
55
|
createdAt: number;
|
|
56
56
|
disabledAt: number | null;
|
|
57
|
+
/** Enrolled machines. */
|
|
57
58
|
machineCount: number;
|
|
59
|
+
/** Most cloud machines the Tenant may have at once. null: no limit. */
|
|
60
|
+
cloudMachineLimit: number | null;
|
|
61
|
+
/**
|
|
62
|
+
* The Tenant's residential proxy switch. It has no effect yet: traffic goes direct. Set by `get` and
|
|
63
|
+
* `update`; null from `list` and from servers before cloud machines.
|
|
64
|
+
*/
|
|
65
|
+
residentialProxy: boolean | null;
|
|
66
|
+
/** Set by `get` and `update`; null from `list` and from servers before cloud machines. */
|
|
67
|
+
cloudMachineCount: number | null;
|
|
58
68
|
raw: Json;
|
|
59
69
|
}
|
|
60
70
|
export declare function parseTenant(d: Json): Tenant;
|
|
@@ -63,16 +73,28 @@ export interface TenantPage {
|
|
|
63
73
|
/** Pass as `cursor` for the next page; null on the last page. */
|
|
64
74
|
nextCursor: string | null;
|
|
65
75
|
}
|
|
66
|
-
/** A Tenant's own
|
|
76
|
+
/** A Tenant's computer: its own, enrolled, or a cloud machine Sai hosts for it. */
|
|
67
77
|
export interface TenantMachine {
|
|
68
78
|
id: string;
|
|
69
79
|
name: string | null;
|
|
70
80
|
platform: string | null;
|
|
81
|
+
/** Older servers only; empty on servers with cloud machines. Read `state`. */
|
|
71
82
|
status: string;
|
|
72
|
-
/** True when
|
|
83
|
+
/** True when an enrolled machine reported in the last 3 minutes, or a cloud machine is `ready`. */
|
|
73
84
|
online: boolean;
|
|
74
85
|
lastSeen: number | null;
|
|
75
86
|
runtimeVersion: string | null;
|
|
87
|
+
kind: 'enrolled' | 'cloud';
|
|
88
|
+
/**
|
|
89
|
+
* Enrolled: `online` or `offline`. Cloud: `provisioning`, `ready`, `starting`, `hibernated`,
|
|
90
|
+
* `deleting` or `failed`. A run starts without waiting only on `ready`; a hibernated machine
|
|
91
|
+
* wakes when a run is sent to it.
|
|
92
|
+
*/
|
|
93
|
+
state: string;
|
|
94
|
+
/** Cloud only: the billing class, e.g. `win32-4c8g`. */
|
|
95
|
+
machineClass: string | null;
|
|
96
|
+
/** Unix time in milliseconds. null from servers before cloud machines. */
|
|
97
|
+
createdAt: number | null;
|
|
76
98
|
raw: Json;
|
|
77
99
|
}
|
|
78
100
|
export declare function parseTenantMachine(d: Json): TenantMachine;
|
|
@@ -285,16 +307,93 @@ export interface Evaluation {
|
|
|
285
307
|
passed?: boolean;
|
|
286
308
|
note?: string;
|
|
287
309
|
}
|
|
310
|
+
/** What a `reset` did before a run or before the agent run. */
|
|
311
|
+
export interface LearnReset {
|
|
312
|
+
kind: 'code' | 'task';
|
|
313
|
+
ok: boolean;
|
|
314
|
+
durationMs: number | null;
|
|
315
|
+
/** A reset task's turn. */
|
|
316
|
+
turnId: string | null;
|
|
317
|
+
error: string | null;
|
|
318
|
+
}
|
|
319
|
+
/** One run of a version of the code in a learn job. */
|
|
320
|
+
export interface LearnRollout {
|
|
321
|
+
index: number;
|
|
322
|
+
/**
|
|
323
|
+
* `stopped`: the job stopped during this run (see the job's `stopReason`); `error`: the run could
|
|
324
|
+
* not be judged; `null` while the run is going.
|
|
325
|
+
*/
|
|
326
|
+
verdict: 'passed' | 'failed' | 'error' | 'stopped' | null;
|
|
327
|
+
reset: LearnReset | null;
|
|
328
|
+
error: string | null;
|
|
329
|
+
result: Json | null;
|
|
330
|
+
durationMs: number | null;
|
|
331
|
+
judgementId: string | null;
|
|
332
|
+
/** The judge's summary. */
|
|
333
|
+
summary: string | null;
|
|
334
|
+
/** With `continueWithAgent`, the agent's turn after this failed run. */
|
|
335
|
+
continuationTurnId: string | null;
|
|
336
|
+
continuationTimedOut: boolean;
|
|
337
|
+
}
|
|
338
|
+
/** One version of the code in a learn job and its runs. */
|
|
339
|
+
export interface LearnIteration {
|
|
340
|
+
/** 1-based. */
|
|
341
|
+
index: number;
|
|
342
|
+
/** The convert or heal record that wrote this version (`sai.learn.get()` reads it). */
|
|
343
|
+
learnId: string | null;
|
|
344
|
+
/** What the repair changed and why. */
|
|
345
|
+
changes: string | null;
|
|
346
|
+
passed: number;
|
|
347
|
+
runs: number;
|
|
348
|
+
rollouts: LearnRollout[];
|
|
349
|
+
}
|
|
350
|
+
/** How the returned code did when it was run, on `inputs` only. */
|
|
351
|
+
export interface LearnTestResult {
|
|
352
|
+
/** `not_judged`: the code was not run all its runs; `passed`: it passed every run; `failed`: a run failed. */
|
|
353
|
+
status: 'not_judged' | 'passed' | 'failed';
|
|
354
|
+
passedRuns: number;
|
|
355
|
+
requiredRuns: number;
|
|
356
|
+
inputs: Record<string, string | number | boolean> | null;
|
|
357
|
+
}
|
|
288
358
|
/**
|
|
289
|
-
* The result of `sai.learn.create()`: Simulang code made from recorded turns
|
|
290
|
-
* code you sent
|
|
359
|
+
* The result of `sai.learn.create()`: Simulang code made from recorded turns or from an agent
|
|
360
|
+
* run, a repair of code you sent, or a learn job that runs, judges and repairs the code. Run the
|
|
361
|
+
* code with `lease.run(learned, inputs)`. Research preview.
|
|
291
362
|
*/
|
|
292
363
|
export interface LearnResult {
|
|
293
364
|
id: string;
|
|
294
|
-
/** `convert` (code from turns)
|
|
295
|
-
mode: 'convert' | 'heal';
|
|
296
|
-
/**
|
|
297
|
-
|
|
365
|
+
/** `convert` (code from turns), `heal` (a repair of `initialCode`), or `policyIteration` (a job that runs the code). */
|
|
366
|
+
mode: 'convert' | 'heal' | 'policyIteration';
|
|
367
|
+
/**
|
|
368
|
+
* Whether the call did its work: `running` while a job runs; `failed` when it wrote no code
|
|
369
|
+
* (e.g. `validation.errors`); `stopped` when a job ended early (see `stopReason`).
|
|
370
|
+
* How the code did is `testResult`.
|
|
371
|
+
*/
|
|
372
|
+
status: 'succeeded' | 'failed' | 'running' | 'stopped';
|
|
373
|
+
/** Why a job ended early, e.g. `cancelled`, `time_limit`, `agent_failed`, `interrupted`. */
|
|
374
|
+
stopReason: string | null;
|
|
375
|
+
/** One sentence on why a job stopped. */
|
|
376
|
+
message: string | null;
|
|
377
|
+
/** How the returned code did when it was run. */
|
|
378
|
+
testResult: LearnTestResult | null;
|
|
379
|
+
/** While a job runs: the step it is on. */
|
|
380
|
+
progress: {
|
|
381
|
+
step: string;
|
|
382
|
+
iteration: number | null;
|
|
383
|
+
rollout: number | null;
|
|
384
|
+
} | null;
|
|
385
|
+
/** A job's agent run; pass it as `turns` to start again from that run. */
|
|
386
|
+
agentTurnId: string | null;
|
|
387
|
+
agentRunReset: LearnReset | null;
|
|
388
|
+
/** With `judgeInitialAgentRun`: the judgement of the agent run. */
|
|
389
|
+
agentJudgement: {
|
|
390
|
+
judgementId: string;
|
|
391
|
+
verdict: string;
|
|
392
|
+
summary: string | null;
|
|
393
|
+
} | null;
|
|
394
|
+
/** Which iteration `code` is from. */
|
|
395
|
+
version: number | null;
|
|
396
|
+
iterations: LearnIteration[];
|
|
298
397
|
title: string | null;
|
|
299
398
|
/** The task with `{{name}}` placeholders: send it to `session.send()` with `inputs` to run it with the agent. */
|
|
300
399
|
template: string | null;
|
|
@@ -318,6 +417,18 @@ export interface LearnResult {
|
|
|
318
417
|
raw: Json;
|
|
319
418
|
}
|
|
320
419
|
export declare function parseLearnResult(d: Json): LearnResult;
|
|
420
|
+
/** One run of a learn job's code, from `sai.learn.rollout()`. */
|
|
421
|
+
export interface LearnRun {
|
|
422
|
+
learnId: string;
|
|
423
|
+
iteration: number;
|
|
424
|
+
rollout: number;
|
|
425
|
+
/** What the run returned and logged: `{ result, logs, error, durationMs }`. */
|
|
426
|
+
run: Json;
|
|
427
|
+
/** The judge's record of the run, when it was judged. */
|
|
428
|
+
judgement: Json | null;
|
|
429
|
+
raw: Json;
|
|
430
|
+
}
|
|
431
|
+
export declare function parseLearnRun(d: Json): LearnRun;
|
|
321
432
|
/** The verdict on one criterion of a judgement. */
|
|
322
433
|
export interface CriterionResult {
|
|
323
434
|
/** The check's id; null for a natural-language criteria. */
|
package/dist/types.js
CHANGED
|
@@ -52,18 +52,27 @@ export function parseTenant(d) {
|
|
|
52
52
|
createdAt: num(d.createdAt),
|
|
53
53
|
disabledAt: typeof d.disabledAt === 'number' ? d.disabledAt : null,
|
|
54
54
|
machineCount: num(d.machineCount),
|
|
55
|
+
cloudMachineLimit: typeof d.cloudMachineLimit === 'number' ? d.cloudMachineLimit : null,
|
|
56
|
+
residentialProxy: typeof d.residentialProxy === 'boolean' ? d.residentialProxy : null,
|
|
57
|
+
cloudMachineCount: typeof d.cloudMachineCount === 'number' ? d.cloudMachineCount : null,
|
|
55
58
|
raw: d,
|
|
56
59
|
};
|
|
57
60
|
}
|
|
58
61
|
export function parseTenantMachine(d) {
|
|
62
|
+
// Servers before cloud machines send `online` and `status` and no `kind` or `state`.
|
|
63
|
+
const state = str(d.state) || (d.online ? 'online' : 'offline');
|
|
59
64
|
return {
|
|
60
65
|
id: str(d.machineId) ?? '',
|
|
61
66
|
name: str(d.name) ?? null,
|
|
62
67
|
platform: str(d.platform) ?? null,
|
|
63
68
|
status: str(d.status) ?? '',
|
|
64
|
-
online: Boolean(d.online),
|
|
69
|
+
online: 'online' in d ? Boolean(d.online) : state === 'online' || state === 'ready',
|
|
65
70
|
lastSeen: typeof d.lastSeen === 'number' ? d.lastSeen : null,
|
|
66
71
|
runtimeVersion: str(d.runtimeVersion) ?? null,
|
|
72
|
+
kind: d.kind === 'cloud' ? 'cloud' : 'enrolled',
|
|
73
|
+
state,
|
|
74
|
+
machineClass: str(d.machineClass) ?? null,
|
|
75
|
+
createdAt: typeof d.createdAt === 'number' ? d.createdAt : null,
|
|
67
76
|
raw: d,
|
|
68
77
|
};
|
|
69
78
|
}
|
|
@@ -227,13 +236,78 @@ export function parseExecResult(d) {
|
|
|
227
236
|
raw: d,
|
|
228
237
|
};
|
|
229
238
|
}
|
|
239
|
+
function parseLearnReset(v) {
|
|
240
|
+
if (!v || typeof v !== 'object')
|
|
241
|
+
return null;
|
|
242
|
+
const r = v;
|
|
243
|
+
return {
|
|
244
|
+
kind: str(r.kind) === 'task' ? 'task' : 'code',
|
|
245
|
+
ok: Boolean(r.ok),
|
|
246
|
+
durationMs: typeof r.durationMs === 'number' ? r.durationMs : null,
|
|
247
|
+
turnId: str(r.turnId) ?? null,
|
|
248
|
+
error: str(r.error) ?? null,
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
function parseIteration(d) {
|
|
252
|
+
return {
|
|
253
|
+
index: num(d.index),
|
|
254
|
+
learnId: str(d.learnId) ?? null,
|
|
255
|
+
changes: str(d.changes) ?? null,
|
|
256
|
+
passed: num(d.passed),
|
|
257
|
+
runs: num(d.runs),
|
|
258
|
+
rollouts: (Array.isArray(d.rollouts) ? d.rollouts : []).map((r) => ({
|
|
259
|
+
index: num(r.index),
|
|
260
|
+
verdict: (str(r.verdict) ?? null),
|
|
261
|
+
reset: parseLearnReset(r.reset),
|
|
262
|
+
error: str(r.error) ?? null,
|
|
263
|
+
result: r.result ?? null,
|
|
264
|
+
durationMs: typeof r.durationMs === 'number' ? r.durationMs : null,
|
|
265
|
+
judgementId: str(r.judgementId) ?? null,
|
|
266
|
+
summary: str(r.summary) ?? null,
|
|
267
|
+
continuationTurnId: str(r.continuationTurnId) ?? null,
|
|
268
|
+
continuationTimedOut: Boolean(r.continuationTimedOut),
|
|
269
|
+
})),
|
|
270
|
+
};
|
|
271
|
+
}
|
|
230
272
|
export function parseLearnResult(d) {
|
|
231
273
|
const v = obj(d.validation);
|
|
232
274
|
const status = (str(d.status) ?? 'running');
|
|
275
|
+
const mode = str(d.mode);
|
|
276
|
+
const t = d.testResult ? obj(d.testResult) : null;
|
|
277
|
+
const p = d.progress ? obj(d.progress) : null;
|
|
278
|
+
const aj = d.agentJudgement ? obj(d.agentJudgement) : null;
|
|
233
279
|
return {
|
|
234
280
|
id: str(d.learnId) ?? '',
|
|
235
|
-
mode:
|
|
281
|
+
mode: mode === 'heal' || mode === 'policyIteration' ? mode : 'convert',
|
|
236
282
|
status,
|
|
283
|
+
stopReason: str(d.stopReason) ?? null,
|
|
284
|
+
message: str(d.message) ?? null,
|
|
285
|
+
testResult: t
|
|
286
|
+
? {
|
|
287
|
+
status: (str(t.status) ?? 'not_judged'),
|
|
288
|
+
passedRuns: num(t.passedRuns),
|
|
289
|
+
requiredRuns: num(t.requiredRuns),
|
|
290
|
+
inputs: t.inputs ? obj(t.inputs) : null,
|
|
291
|
+
}
|
|
292
|
+
: null,
|
|
293
|
+
progress: p
|
|
294
|
+
? {
|
|
295
|
+
step: str(p.step) ?? '',
|
|
296
|
+
iteration: typeof p.iteration === 'number' ? p.iteration : null,
|
|
297
|
+
rollout: typeof p.rollout === 'number' ? p.rollout : null,
|
|
298
|
+
}
|
|
299
|
+
: null,
|
|
300
|
+
agentTurnId: str(d.agentTurnId) ?? null,
|
|
301
|
+
agentRunReset: parseLearnReset(d.agentRunReset),
|
|
302
|
+
agentJudgement: aj
|
|
303
|
+
? {
|
|
304
|
+
judgementId: str(aj.judgementId) ?? '',
|
|
305
|
+
verdict: str(aj.verdict) ?? '',
|
|
306
|
+
summary: str(aj.summary) ?? null,
|
|
307
|
+
}
|
|
308
|
+
: null,
|
|
309
|
+
version: typeof d.version === 'number' ? d.version : null,
|
|
310
|
+
iterations: (Array.isArray(d.iterations) ? d.iterations : []).map(parseIteration),
|
|
237
311
|
title: str(d.title) ?? null,
|
|
238
312
|
template: str(d.template) ?? null,
|
|
239
313
|
parameters: (Array.isArray(d.parameters) ? d.parameters : []).map((p) => ({
|
|
@@ -256,6 +330,16 @@ export function parseLearnResult(d) {
|
|
|
256
330
|
raw: d,
|
|
257
331
|
};
|
|
258
332
|
}
|
|
333
|
+
export function parseLearnRun(d) {
|
|
334
|
+
return {
|
|
335
|
+
learnId: str(d.learnId) ?? '',
|
|
336
|
+
iteration: num(d.iteration),
|
|
337
|
+
rollout: num(d.rollout),
|
|
338
|
+
run: obj(d.run),
|
|
339
|
+
judgement: d.judgement ? obj(d.judgement) : null,
|
|
340
|
+
raw: d,
|
|
341
|
+
};
|
|
342
|
+
}
|
|
259
343
|
export function parseJudgement(d) {
|
|
260
344
|
const verdict = (str(d.verdict) ?? null);
|
|
261
345
|
return {
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,GAAG,GAAG,CAAC,CAAU,EAAsB,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;AACvF,MAAM,GAAG,GAAG,CAAC,CAAU,EAAE,CAAC,GAAG,CAAC,EAAU,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAC1E,MAAM,GAAG,GAAG,CAAC,CAAU,EAAQ,EAAE,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAE,CAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;AAajF,MAAM,UAAU,YAAY,CAAC,CAAO;IAClC,MAAM,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;IACxB,MAAM,OAAO,GAAG,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA;IAC9B,OAAO;QACL,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE;QAC3B,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,IAAI;QAC5B,SAAS,EAAE,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EAAE,EAAE,OAAO,KAAK,QAAQ;QACxB,GAAG,EAAE,CAAC;KACP,CAAA;AACH,CAAC"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.0-alpha.
|
|
1
|
+
export declare const VERSION = "0.1.0-alpha.2";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.1.0-alpha.
|
|
1
|
+
export const VERSION = '0.1.0-alpha.2';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simular-ai/sai-sdk",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.2",
|
|
4
4
|
"description": "TypeScript SDK for the Sai API: delegate desktop work to Sai, or drive a cloud computer directly.",
|
|
5
5
|
"homepage": "https://platform.simular.ai/documentation/sdks/typescript",
|
|
6
6
|
"license": "MIT",
|