@parcha/agentrun-serve 0.1.0-beta.40 → 0.1.0-beta.42
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 +130 -0
- package/NOTICE +2 -0
- package/README.md +149 -21
- package/dist/agent-rows.d.ts +1 -1
- package/dist/agents-store.js +3 -1
- package/dist/api-only.d.ts +3 -1
- package/dist/api-only.js +4 -2
- package/dist/api-token.d.ts +30 -0
- package/dist/api-token.js +89 -0
- package/dist/calendar/address.d.ts +49 -0
- package/dist/calendar/address.js +153 -0
- package/dist/calendar/fetch.d.ts +24 -0
- package/dist/calendar/fetch.js +146 -0
- package/dist/calendar/ics-faux.d.ts +39 -0
- package/dist/calendar/ics-faux.js +236 -0
- package/dist/calendar/labels.d.ts +3 -0
- package/dist/calendar/labels.js +61 -0
- package/dist/calendar/names.d.ts +52 -0
- package/dist/calendar/names.js +54 -0
- package/dist/calendar/parse.d.ts +108 -0
- package/dist/calendar/parse.js +625 -0
- package/dist/calendar/routes.d.ts +17 -0
- package/dist/calendar/routes.js +81 -0
- package/dist/calendar/tools.d.ts +23 -0
- package/dist/calendar/tools.js +124 -0
- package/dist/cli.js +22 -6
- package/dist/composio-made.d.ts +54 -0
- package/dist/composio-made.js +83 -0
- package/dist/composio-preset.d.ts +16 -8
- package/dist/composio-preset.js +106 -43
- package/dist/composio-triggers.d.ts +7 -2
- package/dist/composio-triggers.js +13 -7
- package/dist/computer-attach.d.ts +29 -11
- package/dist/computer-attach.js +141 -47
- package/dist/computer-keys.d.ts +4 -0
- package/dist/computer-keys.js +5 -0
- package/dist/computer-record.d.ts +55 -0
- package/dist/computer-record.js +315 -0
- package/dist/computer-setting.d.ts +1 -0
- package/dist/computer-setting.js +15 -2
- package/dist/computers.d.ts +11 -1
- package/dist/computers.js +23 -26
- package/dist/console/assets/{index-B8Zn1Iqn.css → index-C3gNPz58.css} +1 -1
- package/dist/console/assets/index-DYJ_wj27.js +711 -0
- package/dist/console/index.html +2 -2
- package/dist/decisions.js +9 -2
- package/dist/eval-feed.d.ts +26 -0
- package/dist/eval-feed.js +72 -0
- package/dist/eval-mailbox.d.ts +4 -1
- package/dist/eval-mailbox.js +11 -3
- package/dist/exa-keyless.d.ts +1 -1
- package/dist/exa-keyless.js +1 -1
- package/dist/feed/feed-faux.d.ts +62 -0
- package/dist/feed/feed-faux.js +123 -0
- package/dist/feed/fetch.d.ts +41 -0
- package/dist/feed/fetch.js +128 -0
- package/dist/feed/parse.d.ts +42 -0
- package/dist/feed/parse.js +291 -0
- package/dist/feed/pointer.d.ts +2 -0
- package/dist/feed/pointer.js +17 -0
- package/dist/file-types.js +1 -0
- package/dist/host-command.d.ts +3 -0
- package/dist/host-command.js +18 -0
- package/dist/host.d.ts +3 -0
- package/dist/host.js +3 -0
- package/dist/learn/check.d.ts +17 -1
- package/dist/learn/check.js +240 -5
- package/dist/learn/compile.d.ts +48 -27
- package/dist/learn/compile.js +134 -101
- package/dist/learn/promote.d.ts +61 -5
- package/dist/learn/promote.js +12 -2
- package/dist/learned-nodes.d.ts +21 -4
- package/dist/learned-nodes.js +21 -8
- package/dist/learned-workflow.d.ts +3 -3
- package/dist/learned-workflow.js +14 -5
- package/dist/learning-setting.d.ts +23 -0
- package/dist/learning-setting.js +51 -0
- package/dist/learning-words.d.ts +3 -0
- package/dist/learning-words.js +3 -0
- package/dist/learning.d.ts +3 -2
- package/dist/learning.js +5 -3
- package/dist/mcp-oauth.d.ts +23 -1
- package/dist/mcp-oauth.js +46 -5
- package/dist/mcp-pin-first.d.ts +4 -2
- package/dist/mcp-pin-first.js +4 -3
- package/dist/mcp-private-hosts.d.ts +13 -0
- package/dist/mcp-private-hosts.js +16 -0
- package/dist/mcp-servers-store.d.ts +58 -5
- package/dist/mcp-servers-store.js +136 -17
- package/dist/mcp.d.ts +2 -2
- package/dist/mcp.js +2 -2
- package/dist/observation/http.d.ts +4 -1
- package/dist/observation/http.js +5 -4
- package/dist/openapi.d.ts +1 -0
- package/dist/openapi.js +151 -21
- package/dist/print.d.ts +6 -3
- package/dist/print.js +4 -2
- package/dist/run-files.d.ts +6 -2
- package/dist/run-files.js +29 -7
- package/dist/run-labels.d.ts +23 -0
- package/dist/run-labels.js +79 -0
- package/dist/run-learning-served.d.ts +1 -1
- package/dist/run-reads-over-store.d.ts +5 -1
- package/dist/run-reads-over-store.js +8 -4
- package/dist/run-recordings.d.ts +20 -0
- package/dist/run-recordings.js +133 -0
- package/dist/run-secrets.js +12 -4
- package/dist/runner/adapter-loop.d.ts +1 -1
- package/dist/runner/adapter-loop.js +94 -16
- package/dist/runner/adapter-run-spec.d.ts +19 -0
- package/dist/runner/adapter-run-spec.js +57 -36
- package/dist/runner/beside.d.ts +6 -3
- package/dist/runner/beside.js +9 -7
- package/dist/runner/cli-run-spec.js +41 -32
- package/dist/runner/conformance/harness.js +69 -14
- package/dist/runner/conformance/subject.d.ts +4 -1
- package/dist/runner/feedback-round.d.ts +9 -25
- package/dist/runner/feedback-round.js +22 -40
- package/dist/runner/learning-end.d.ts +17 -7
- package/dist/runner/learning-end.js +79 -53
- package/dist/runner/main.d.ts +12 -1
- package/dist/runner/main.js +31 -4
- package/dist/runner/mcp-claim.d.ts +3 -0
- package/dist/runner/mcp-claim.js +1 -1
- package/dist/runner/mcp-run.d.ts +6 -2
- package/dist/runner/mcp-run.js +5 -3
- package/dist/runner/model-route.d.ts +4 -2
- package/dist/runner/model-route.js +8 -8
- package/dist/runner/promotion.d.ts +44 -4
- package/dist/runner/promotion.js +323 -21
- package/dist/runner/reflect-hook.d.ts +5 -0
- package/dist/runner/reflect-hook.js +22 -14
- package/dist/runner/store-secrets.js +3 -1
- package/dist/runner/workflow-first.d.ts +6 -11
- package/dist/runner/workflow-first.js +16 -20
- package/dist/runs-over-store.d.ts +1 -1
- package/dist/runs-over-store.js +5 -2
- package/dist/sdk/runs.d.ts +7 -1
- package/dist/sdk/runs.js +21 -7
- package/dist/secret-cut.js +3 -1
- package/dist/secrets.js +5 -3
- package/dist/server.d.ts +31 -5
- package/dist/server.js +240 -61
- package/dist/store/agent-body.d.ts +5 -3
- package/dist/store/agent-body.js +14 -10
- package/dist/store/dialect.d.ts +3 -0
- package/dist/store/dialect.js +1 -0
- package/dist/store/index.d.ts +1 -1
- package/dist/store/postgres/dialect.js +1 -0
- package/dist/store/postgres/migrations/0015_run_labels.sql +5 -0
- package/dist/store/postgres/migrations/0016_minted_tokens.sql +21 -0
- package/dist/store/schema.d.ts +9 -0
- package/dist/store/schema.js +26 -2
- package/dist/store/sqlite/connection.js +11 -3
- package/dist/store/sqlite/run-patch.d.ts +2 -1
- package/dist/store/sqlite/run-patch.js +3 -2
- package/dist/store/sqlite/store.js +64 -10
- package/dist/store/store.d.ts +38 -1
- package/dist/store-reads/journal.js +2 -1
- package/dist/store-reads/learning.d.ts +1 -1
- package/dist/store-reads/learning.js +6 -1
- package/dist/store-reads/loop.d.ts +1 -0
- package/dist/store-reads/loop.js +14 -4
- package/dist/store-reads/runs.d.ts +4 -3
- package/dist/store-reads/runs.js +3 -2
- package/dist/store-view.d.ts +5 -0
- package/dist/store-view.js +8 -2
- package/dist/template-eval.d.ts +11 -0
- package/dist/template-eval.js +177 -52
- package/dist/templates.d.ts +13 -1
- package/dist/templates.js +89 -18
- package/dist/timeline/computer.js +2 -1
- package/dist/timeline/origin.d.ts +1 -1
- package/dist/timeline/origin.js +2 -2
- package/dist/tool-list.js +1 -0
- package/dist/tools.d.ts +7 -0
- package/dist/tools.js +11 -0
- package/dist/trigger-adapter.d.ts +9 -4
- package/dist/trigger-adapters.js +2 -1
- package/dist/trigger-feed.d.ts +12 -0
- package/dist/trigger-feed.js +420 -0
- package/dist/triggers.d.ts +2 -1
- package/dist/triggers.js +23 -5
- package/dist/validate.js +7 -2
- package/dist/webhooks.js +9 -5
- package/dist/workspace/computer-deps.d.ts +5 -1
- package/dist/workspace/computer-deps.js +2 -2
- package/dist/workspace/computer-for-claim.d.ts +7 -0
- package/dist/workspace/computer-for-claim.js +12 -2
- package/dist/workspace/index.d.ts +1 -0
- package/dist/workspace/index.js +2 -0
- package/dist/workspace/paths.d.ts +4 -0
- package/dist/workspace/paths.js +9 -0
- package/dist/workspace/resolve-computer.d.ts +35 -4
- package/dist/workspace/resolve-computer.js +47 -9
- package/launcher/agentrun-serve +34 -22
- package/package.json +11 -9
- package/templates/README.md +38 -4
- package/dist/console/assets/index-Jbxjcmdp.js +0 -705
|
@@ -51,7 +51,8 @@ export function piShaped(entries) {
|
|
|
51
51
|
const timestamp = typeof data.at === "number" ? { timestamp: data.at } : {};
|
|
52
52
|
if (entry.kind === KINDS.message) {
|
|
53
53
|
const text = typeof data.text === "string" ? data.text : "";
|
|
54
|
-
|
|
54
|
+
// The person's message, and one they steered into a turn in flight (claude-agent's), as pi writes both: a user turn.
|
|
55
|
+
if (data.role === "person" || data.role === "steer")
|
|
55
56
|
return { ...entry, kind: "pi.user", model: [{ role: "user", content: text, ...timestamp }] };
|
|
56
57
|
// A model turn's text; its stop reason is the answer's (a cut at the output limit reads "length", as pi's does).
|
|
57
58
|
const stopReason = data.stopReason === "length" ? "length" : "stop";
|
|
@@ -311,7 +311,7 @@ export declare function runLearningOverStore(store: Store, runId: string, shown:
|
|
|
311
311
|
graded_at: string;
|
|
312
312
|
path: "agent" | "workflow" | "handed_back" | "replay";
|
|
313
313
|
workflow_digest: string | null;
|
|
314
|
-
feedback: "
|
|
314
|
+
feedback: "look_back" | null;
|
|
315
315
|
run_id: string;
|
|
316
316
|
correct: boolean;
|
|
317
317
|
};
|
|
@@ -105,10 +105,15 @@ async function endOfKept(store, kept, row, records = store) {
|
|
|
105
105
|
const proposed = { state: "proposed", reason: null, detail: row.detail ?? null, at, ...left };
|
|
106
106
|
if (!kept.learningRunId)
|
|
107
107
|
return proposed;
|
|
108
|
-
|
|
108
|
+
let learningRun = await records.runs.get(kept.learningRunId);
|
|
109
109
|
const { merged, dropped, graded } = await learningEndEntries(store, kept.learningRunId, learningRun);
|
|
110
110
|
if (!merged && !dropped)
|
|
111
111
|
return proposed;
|
|
112
|
+
// The loop saves its end entry and the learning run's end (state, ended_at) in one transaction, and the row was read
|
|
113
|
+
// before the journal: an end the row had not seen landed between the two reads. The row read again from the store (past
|
|
114
|
+
// any list read before) is the ended one, so the end is at its ended_at, never once at the proposal's time.
|
|
115
|
+
if (!(learningRun && FINAL_STATES.includes(learningRun.state)))
|
|
116
|
+
learningRun = await store.runs.get(kept.learningRunId);
|
|
112
117
|
const endedAt = learningRun?.endedAt ? timeOf(learningRun.endedAt) : at;
|
|
113
118
|
// What the grade spent: the graded entry's, or what a grade that failed spent before it did.
|
|
114
119
|
const spent = graded ?? (dropped && "usd" in dropped ? { usd: dropped.usd ?? null, tokens: dropped.tokens ?? null } : undefined);
|
package/dist/store-reads/loop.js
CHANGED
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
// how often it handed the run back, and each run's p, with the run's grade when the workflow's own answer was graded.
|
|
6
6
|
// Aggregates and the checks' own words only: no input, no answer.
|
|
7
7
|
import { FINAL_STATES } from "../store/store.js";
|
|
8
|
-
import { GRADES_KEPT, gradesOf, promotionsOf } from "../learn/promote.js";
|
|
9
|
-
import { promotedOf } from "../learn/compile.js";
|
|
8
|
+
import { GRADES_KEPT, gradesOf, promotionOf, promotionsOf } from "../learn/promote.js";
|
|
9
|
+
import { lastOwnRuns, promotedOf } from "../learn/compile.js";
|
|
10
|
+
import { loopOf } from "../learning-setting.js";
|
|
10
11
|
import { roundsOf } from "./learning.js";
|
|
11
12
|
/** How many compile turns the read gives, the newest. */
|
|
12
13
|
export const LOOP_COMPILES_MAX = 50;
|
|
@@ -49,6 +50,11 @@ function perStep(rows) {
|
|
|
49
50
|
* hand-back's answer was the agent's, and a replay run is never graded. */
|
|
50
51
|
export async function agentLoopOverStore(store, agentId) {
|
|
51
52
|
const ended = (await store.runs.list({ agentId })).filter((run) => run.agentId === agentId && FINAL_STATES.includes(run.state) && !run.importedFrom && run.archivedAt === null).sort((a, b) => a.startedAt - b.startedAt || (a.id < b.id ? -1 : 1));
|
|
53
|
+
// The completed runs of the agent's own toward its compile (what compileDue counts), at most compile_after: the tab
|
|
54
|
+
// says "N of compile_after" from this, never from the one page of runs it reads.
|
|
55
|
+
const current = (await store.agents.get(agentId))?.currentRevision;
|
|
56
|
+
const body = current ? (await store.agents.revision(current))?.body : undefined;
|
|
57
|
+
const completed_runs = (await lastOwnRuns(store, agentId, loopOf(body?.learning).compile_after)).length;
|
|
52
58
|
const [grades, promotions] = await Promise.all([gradesOf(store.settings, agentId).catch(() => []), promotionsOf(store.settings, agentId).catch(() => [])]);
|
|
53
59
|
const graded = new Map(grades.map((grade) => [grade.run, grade.correct]));
|
|
54
60
|
// The grades kept are the newest GRADES_KEPT (putGrade trims the oldest): once full, a run that ended before the oldest
|
|
@@ -97,9 +103,13 @@ export async function agentLoopOverStore(store, agentId) {
|
|
|
97
103
|
continue;
|
|
98
104
|
const attempts = Array.isArray(named?.attempts) ? named.attempts.filter((one) => one && typeof one === "object" && typeof one.ok === "boolean").map((one) => ({ ok: one.ok, errors: texts(one.errors) })) : [];
|
|
99
105
|
const kept16 = typeof named?.digest === "string" && /^[0-9a-f]{16}$/.test(named.digest) ? named.digest : null;
|
|
106
|
+
// A draft its check had nothing to run on stopped (runner/promotion.ts stopUnchecked): its record's reason is one
|
|
107
|
+
// of the draft's errors, never silent.
|
|
108
|
+
const own = named && kept16 ? promotionOf(promotions, named.workflow, kept16) : undefined;
|
|
109
|
+
const unchecked = own?.decided === "hold" && own.source === "check" && own.check?.stopped && own.check.n === 0 ? [own.reason] : [];
|
|
100
110
|
compiles.push({
|
|
101
111
|
createdAt: kept.createdAt, run_id: run.id, round: kept.round, at: new Date(kept.createdAt).toISOString(), workflow: named ? named.workflow : null, from_notes: texts(named?.from_notes), attempts,
|
|
102
|
-
digest: kept16, promoted: named && kept16 ? (promotedOf(promotions, named.workflow, kept16) ?? null) : null, draft_errors: errors,
|
|
112
|
+
digest: kept16, promoted: named && kept16 ? (promotedOf(promotions, named.workflow, kept16) ?? null) : null, draft_errors: [...errors, ...unchecked],
|
|
103
113
|
});
|
|
104
114
|
}
|
|
105
115
|
}
|
|
@@ -107,5 +117,5 @@ export async function agentLoopOverStore(store, agentId) {
|
|
|
107
117
|
// Newest first by when each round kept it (a later round of an earlier run can be newer than a later run's), the run's
|
|
108
118
|
// start and its round breaking a tie.
|
|
109
119
|
const newest = compiles.map((one, i) => ({ one, i })).sort((a, b) => b.one.createdAt - a.one.createdAt || b.i - a.i).slice(0, LOOP_COMPILES_MAX);
|
|
110
|
-
return { compiles: newest.map(({ one: { createdAt: _createdAt, ...one } }) => one), guards };
|
|
120
|
+
return { compiles: newest.map(({ one: { createdAt: _createdAt, ...one } }) => one), guards, completed_runs };
|
|
111
121
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Context } from "@earendil-works/chord/context";
|
|
2
|
-
import { type ImportedFrom, type RunRow, type Store } from "../store/store.js";
|
|
2
|
+
import { type ImportedFrom, type RunLabels, type RunRow, type Store } from "../store/store.js";
|
|
3
3
|
/** A revision's kind, as the row names it. */
|
|
4
4
|
export type RevisionKind = "agentic" | "workflow";
|
|
5
5
|
/** The run state the v2 API serves, as the old store kept it: a non-terminal run is 'running' (the live view refines its
|
|
@@ -29,11 +29,12 @@ export interface RunRowView {
|
|
|
29
29
|
* stopped (`kind`: its revision's), whose turn ended and never the run, as main's stop leaves one (runs.ts statusOf: a
|
|
30
30
|
* stopped run is input_required and idle). A cancel, a workflow's stop and an imported run's read 'stopped'. */
|
|
31
31
|
export declare function runReadState(run: RunRow, kind: RevisionKind): RunReadState;
|
|
32
|
-
/** The runs, newest first; `agent` and `
|
|
33
|
-
* the archive time coalesced onto each row, and a not-ended run's cost its booked-so-far spend. */
|
|
32
|
+
/** The runs, newest first; `agent`, `revision` and `labels` (every one held) narrow it. Archived runs are listed too (the
|
|
33
|
+
* server filters them), with the archive time coalesced onto each row, and a not-ended run's cost its booked-so-far spend. */
|
|
34
34
|
export declare function listRuns(store: Store, filter: {
|
|
35
35
|
agent?: string;
|
|
36
36
|
revision?: string;
|
|
37
|
+
labels?: RunLabels;
|
|
37
38
|
}, context: Context): Promise<RunRowView[]>;
|
|
38
39
|
/** One run with its agent's name; undefined for an unknown run. */
|
|
39
40
|
export declare function readRun(store: Store, runId: string, context: Context): Promise<(RunRowView & {
|
package/dist/store-reads/runs.js
CHANGED
|
@@ -60,12 +60,13 @@ function joins(store, context) {
|
|
|
60
60
|
},
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
|
-
/** The runs, newest first; `agent` and `
|
|
64
|
-
* the archive time coalesced onto each row, and a not-ended run's cost its booked-so-far spend. */
|
|
63
|
+
/** The runs, newest first; `agent`, `revision` and `labels` (every one held) narrow it. Archived runs are listed too (the
|
|
64
|
+
* server filters them), with the archive time coalesced onto each row, and a not-ended run's cost its booked-so-far spend. */
|
|
65
65
|
export async function listRuns(store, filter, context) {
|
|
66
66
|
const runs = await store.runs.list({
|
|
67
67
|
...(filter.agent !== undefined ? { agentId: filter.agent } : {}),
|
|
68
68
|
...(filter.revision !== undefined ? { revisionId: filter.revision } : {}),
|
|
69
|
+
...(filter.labels !== undefined ? { labels: filter.labels } : {}),
|
|
69
70
|
});
|
|
70
71
|
const join = joins(store, context);
|
|
71
72
|
const views = [];
|
package/dist/store-view.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { type TimelineEvent } from "./timeline/index.js";
|
|
|
2
2
|
import { type ItemStatus } from "./learning.js";
|
|
3
3
|
import { type RunMoment, type SignInReader } from "./run-view.js";
|
|
4
4
|
import { type Store } from "./store/store.js";
|
|
5
|
+
import type { RecordingView } from "./run-recordings.js";
|
|
5
6
|
/** What the store-backed view needs beside the store: where its console lives, every secret it never shows (read now, so
|
|
6
7
|
* one rotated is cut at once), and the agents' saved sign-ins (for the handed-pointer cut). The server passes the same it
|
|
7
8
|
* passes the file path. */
|
|
@@ -19,6 +20,10 @@ export interface ViewDeps {
|
|
|
19
20
|
/** Each learned item's status on agent `agentId`'s learning folder's main (learning-routes.ts statusesOf): what a run held
|
|
20
21
|
* for its owner's OK reads as it stands there. None: as the merge wrote it. */
|
|
21
22
|
readonly statuses?: (agentId: string) => Promise<ReadonlyMap<string, ItemStatus> | undefined>;
|
|
23
|
+
/** Run `runId`'s screen recordings (run-recordings.ts recordingsOf), the run ended at `endedAt` (null: it has not). Only
|
|
24
|
+
* the reads that answer a run as a whole pass it (a run's own read, its archive): absent, the view has no `recordings`,
|
|
25
|
+
* so a list, a poll or a status read opens no file. */
|
|
26
|
+
readonly recordings?: (agentId: string, runId: string, endedAt: number | null) => Promise<RecordingView[]>;
|
|
22
27
|
}
|
|
23
28
|
/** A run's whole answer as answerOfRun read it from the rows: its newest final-answer row, never the learning turn's, and
|
|
24
29
|
* never an earlier turn's: a final answer row before the person's last message belongs to the turn that message
|
package/dist/store-view.js
CHANGED
|
@@ -459,8 +459,14 @@ export async function viewOverStore(store, runId, deps) {
|
|
|
459
459
|
// Only what an imported run shows: never the server's internal file stamp (importedFrom.file).
|
|
460
460
|
imported_from: runRow.importedFrom ? { source: runRow.importedFrom.source, session: runRow.importedFrom.session } : null,
|
|
461
461
|
trigger: launch?.trigger ? { id: launch.trigger.id, firing_key: launch.trigger.firing_key } : null,
|
|
462
|
+
// The caller's labels, as given at the start ({} when none): its own strings, never cut.
|
|
463
|
+
labels: runRow.labels,
|
|
462
464
|
// Cut by the run's one cut (the pointers it was handed among them), and none for a withheld run, as its words.
|
|
463
465
|
learning: unshown ? null : learningViewOf(run.learningEnd, secretsShown(values), settled),
|
|
466
|
+
// Its screen recordings (computer.record), from the files on this machine, where its read asks for them; none for a
|
|
467
|
+
// withheld run, whose files are refused. A run that left running with no end stamped (parked) ends now, each read: only
|
|
468
|
+
// a file's trailer finishes it there.
|
|
469
|
+
...(deps.recordings ? { recordings: unshown ? [] : await deps.recordings(row.agent, row.id, ended ? (runRow.endedAt ?? Date.now()) : null) } : {}),
|
|
464
470
|
poll_after_ms: settled ? 0 : 1000,
|
|
465
471
|
last_progress_at: run.lastProgressAt,
|
|
466
472
|
};
|
|
@@ -470,13 +476,13 @@ export async function summaryOverStore(store, runId, deps) {
|
|
|
470
476
|
const view = await viewOverStore(store, runId, deps);
|
|
471
477
|
if (!view)
|
|
472
478
|
return undefined;
|
|
473
|
-
const { run_id, agent_id, agent_version, console_url, revision, kind, sha, status, state, title, effort, created_at, ended_at, error, review, pending, cost, archived_at, imported_from, trigger, learning } = view;
|
|
479
|
+
const { run_id, agent_id, agent_version, console_url, revision, kind, sha, status, state, title, effort, created_at, ended_at, error, review, pending, cost, archived_at, imported_from, trigger, labels, learning } = view;
|
|
474
480
|
return {
|
|
475
481
|
run_id, agent_id, agent_version, console_url, revision, kind, sha, status, state, title,
|
|
476
482
|
...(view.sdk ? { sdk: view.sdk } : {}),
|
|
477
483
|
...(view.native ? { native: view.native } : {}),
|
|
478
484
|
...(effort ? { effort } : {}),
|
|
479
|
-
created_at, ended_at, error, review, pending, cost, archived_at, imported_from, trigger,
|
|
485
|
+
created_at, ended_at, error, review, pending, cost, archived_at, imported_from, trigger, labels,
|
|
480
486
|
learning: learning ? shortOf(learning) : null,
|
|
481
487
|
};
|
|
482
488
|
}
|
package/dist/template-eval.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type Layout, type MailboxAfter, type MailboxFixture, type MailboxRecord } from "./eval-mailbox.js";
|
|
2
|
+
import { type FeedFixture } from "./eval-feed.js";
|
|
2
3
|
import type { MonidFake } from "./runner/monid-run.js";
|
|
3
4
|
import { type WebFake } from "./web-fake.js";
|
|
4
5
|
import { type Package } from "./templates.js";
|
|
@@ -121,6 +122,16 @@ export type EvalCase = {
|
|
|
121
122
|
/** The case's fake mailbox (eval-mailbox.ts): each run on each of its layouts gets a fake account seeded from it, and is
|
|
122
123
|
* started by the package's trigger as it would be. Absent: the server's account, if any. */
|
|
123
124
|
email?: MailboxFixture;
|
|
125
|
+
/** The case's calendar (`calendar:`, an .ics file in the case): served on loopback by a fake calendar server
|
|
126
|
+
* (calendar/ics-faux.ts) and saved as the eval's own server's calendar for the case's runs, read by calendar_events with
|
|
127
|
+
* the case's `now` as its clock. Absent: the server's calendar, if any. */
|
|
128
|
+
calendar?: {
|
|
129
|
+
file: string;
|
|
130
|
+
text: string;
|
|
131
|
+
};
|
|
132
|
+
/** The case's fake feed (eval-feed.ts): each run gets fake feeds served from it, read in place of the URLs the
|
|
133
|
+
* package's feed trigger names, and is started by that trigger as it would be. */
|
|
134
|
+
feed?: FeedFixture;
|
|
124
135
|
};
|
|
125
136
|
/** Cases that do not check: every problem, each naming its file. */
|
|
126
137
|
export declare class CaseError extends Error {
|