humanish 0.120.1 → 0.122.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/CHANGELOG.md +30 -0
- package/dist/actors/computer-use/actor.d.ts +3 -0
- package/dist/actors/computer-use/actor.js +1 -0
- package/dist/actors/computer-use/loop/backstop.d.ts +6 -1
- package/dist/actors/computer-use/loop/backstop.js +13 -1
- package/dist/actors/computer-use/loop/clock.d.ts +20 -0
- package/dist/actors/computer-use/loop/clock.js +64 -0
- package/dist/actors/computer-use/loop/ending.d.ts +1 -1
- package/dist/actors/computer-use/loop/session.d.ts +1 -1
- package/dist/actors/computer-use/loop/session.js +2 -1
- package/dist/actors/computer-use/loop/types.d.ts +16 -0
- package/dist/actors/computer-use/loop.d.ts +1 -1
- package/dist/actors/computer-use/loop.js +43 -8
- package/dist/actors/computer-use/wait.d.ts +3 -2
- package/dist/actors/computer-use/wait.js +5 -4
- package/dist/actors/contract.d.ts +3 -3
- package/dist/actors/contract.js +3 -0
- package/dist/actors/stop-cause.js +1 -0
- package/dist/cli/commands/study-format.js +25 -4
- package/dist/routes/computer-use/bundle.d.ts +3 -1
- package/dist/routes/computer-use/bundle.js +2 -1
- package/dist/routes/computer-use/diagnostics.d.ts +1 -1
- package/dist/routes/computer-use/diagnostics.js +4 -0
- package/dist/routes/computer-use/fanout-bundle.d.ts +2 -3
- package/dist/routes/computer-use/fanout-bundle.js +22 -14
- package/dist/routes/computer-use/live-phase.d.ts +1 -2
- package/dist/routes/computer-use/live-phase.js +2 -4
- package/dist/routes/computer-use/participant-deps.d.ts +1 -1
- package/dist/routes/computer-use/participant-deps.js +3 -1
- package/dist/routes/computer-use/participant-execution.d.ts +9 -14
- package/dist/routes/computer-use/participant-execution.js +102 -89
- package/dist/routes/computer-use/participant-model.js +17 -0
- package/dist/routes/computer-use/participant-runs.d.ts +11 -1
- package/dist/routes/computer-use/participant-runs.js +31 -4
- package/dist/routes/computer-use/plan.js +8 -1
- package/dist/routes/computer-use/result.js +57 -9
- package/dist/routes/computer-use/setup.d.ts +1 -1
- package/dist/routes/computer-use/single-bundle.d.ts +3 -0
- package/dist/routes/computer-use/single-bundle.js +3 -2
- package/dist/routes/computer-use/types.d.ts +33 -7
- package/dist/routes/shared-world/provisioned.js +2 -2
- package/dist/run/host-suspension.d.ts +56 -0
- package/dist/run/host-suspension.js +106 -0
- package/dist/run/judge.d.ts +1 -1
- package/dist/run/outcomes.js +3 -1
- package/dist/run/run.d.ts +15 -2
- package/dist/run/run.js +15 -8
- package/dist/run/status.d.ts +8 -2
- package/dist/run/status.js +11 -8
- package/dist/study/arrivals.d.ts +52 -5
- package/dist/study/arrivals.js +105 -15
- package/dist/study/keys.d.ts +6 -0
- package/dist/study/keys.js +4 -0
- package/dist/study/migrate/v2.js +8 -5
- package/dist/study/parse/actors.d.ts +1 -1
- package/dist/study/parse/actors.js +33 -4
- package/dist/study/plan-participants.d.ts +10 -1
- package/dist/study/plan-participants.js +10 -1
- package/dist/study/preflight.js +11 -1
- package/dist/study/study-deps.d.ts +6 -0
- package/dist/study/types.d.ts +26 -0
- package/dist/study/validation.d.ts +3 -2
- package/dist/study/validation.js +22 -4
- package/dist/tui-app.js +35 -35
- package/docs/contracts/run-bundle.md +20 -1
- package/docs/contracts/schemas.md +24 -3
- package/package.json +1 -1
|
@@ -37,8 +37,9 @@ export declare function cloneTargetValidationReason(config: StudyConfig): string
|
|
|
37
37
|
/** Refuse a claimed output bound when the route cannot pass it to the first-party provider. */
|
|
38
38
|
export declare function outputTokenLimitValidationReason(config: StudyConfig): string | null;
|
|
39
39
|
/**
|
|
40
|
-
* Refuse a wait field out of range, or an idle wait longer than the longest wait
|
|
41
|
-
*
|
|
40
|
+
* Refuse a wait field out of range, or an idle wait longer than the longest wait: the actor's, and
|
|
41
|
+
* each participant's own idleWaitMs under actor.maxWaitMs. On a route whose participants take no
|
|
42
|
+
* wait actions the fields are inert (warnings.ts).
|
|
42
43
|
*/
|
|
43
44
|
export declare function waitLimitValidationReason(config: StudyConfig): string | null;
|
|
44
45
|
/**
|
package/dist/study/validation.js
CHANGED
|
@@ -6,7 +6,7 @@ import { isHttpUrl, isLoopbackUrl } from "./parse/subject.js";
|
|
|
6
6
|
import { declaredTargets } from "./plan-participants.js";
|
|
7
7
|
import { actorResolvesToComputerUse, computerUseParticipantCount, participantCountReason, registeredComputerUseActors, resolveEntryUrl, isComputerUseComposition, isScriptedBrowserComposition, isSharedWorldComposition, isTerminalProductComposition, } from "./routing.js";
|
|
8
8
|
import { participantList } from "./study-fields.js";
|
|
9
|
-
import { isStartAfterMs, rosterStartsReason, startAfterMessage } from "./arrivals.js";
|
|
9
|
+
import { isStartAfterMs, rosterStartsReason, startAfterMessage, windowReason } from "./arrivals.js";
|
|
10
10
|
/**
|
|
11
11
|
* Cross-validate the computer-use fan-out declaration (`per-lane-worlds`). Returns the failure
|
|
12
12
|
* message, or null when valid. The parser enforces it, and runStudyWith checks it again for a config
|
|
@@ -82,6 +82,9 @@ function rosterStructuralValidationReason(config) {
|
|
|
82
82
|
if (entry.startAfterMs !== undefined && !isStartAfterMs(entry.startAfterMs)) {
|
|
83
83
|
return startAfterMessage(`participants[${index}].startAfterMs`);
|
|
84
84
|
}
|
|
85
|
+
const window = windowReason(entry, `participants[${index}]`);
|
|
86
|
+
if (window !== undefined)
|
|
87
|
+
return window;
|
|
85
88
|
const id = entry.id;
|
|
86
89
|
if (id === undefined) {
|
|
87
90
|
continue;
|
|
@@ -107,6 +110,10 @@ function rosterStructuralValidationReason(config) {
|
|
|
107
110
|
* runStudyWith takes a config that skipped the parser.
|
|
108
111
|
*/
|
|
109
112
|
export function sharedWorldValidationReason(config) {
|
|
113
|
+
// The subject sandbox's deadline assumes every participant runs for execution.timeoutMs.
|
|
114
|
+
const ending = participantList(config)?.findIndex((entry) => entry?.endAfterMs !== undefined);
|
|
115
|
+
if (ending !== undefined && ending >= 0)
|
|
116
|
+
return `participants[${ending}].endAfterMs ends a participant at a set time on route: computer-use only. A shared-world participant runs for execution.timeoutMs; remove endAfterMs and windDownMs.`;
|
|
110
117
|
return config.subject.source === "app-url"
|
|
111
118
|
? externalPublicSharedWorldValidationReason(config)
|
|
112
119
|
: concurrentSharedWorldValidationReason(config);
|
|
@@ -250,11 +257,22 @@ export function outputTokenLimitValidationReason(config) {
|
|
|
250
257
|
return null;
|
|
251
258
|
}
|
|
252
259
|
/**
|
|
253
|
-
* Refuse a wait field out of range, or an idle wait longer than the longest wait
|
|
254
|
-
*
|
|
260
|
+
* Refuse a wait field out of range, or an idle wait longer than the longest wait: the actor's, and
|
|
261
|
+
* each participant's own idleWaitMs under actor.maxWaitMs. On a route whose participants take no
|
|
262
|
+
* wait actions the fields are inert (warnings.ts).
|
|
255
263
|
*/
|
|
256
264
|
export function waitLimitValidationReason(config) {
|
|
257
|
-
|
|
265
|
+
const actorReason = config.actor === undefined ? null : waitFieldsReason(config.actor, "actor.");
|
|
266
|
+
if (actorReason !== null)
|
|
267
|
+
return actorReason;
|
|
268
|
+
for (const [index, entry] of (participantList(config) ?? []).entries()) {
|
|
269
|
+
if (entry?.idleWaitMs === undefined)
|
|
270
|
+
continue;
|
|
271
|
+
const reason = waitFieldsReason({ idleWaitMs: entry.idleWaitMs, maxWaitMs: config.actor?.maxWaitMs }, `participants[${index}].`, "actor.");
|
|
272
|
+
if (reason !== null)
|
|
273
|
+
return reason;
|
|
274
|
+
}
|
|
275
|
+
return null;
|
|
258
276
|
}
|
|
259
277
|
/**
|
|
260
278
|
* Shared-world participants share one live app, so at least two must be live at once. The
|