@pome-sh/cli 0.7.0 → 0.9.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/dist/build-info.json +3 -3
- package/dist/src/cli/agent-identity.js +7 -2
- package/dist/src/cli/compile-seeds.js +51 -5
- package/dist/src/cli/docs-topics.js +5 -3
- package/dist/src/cli/main.js +21 -11
- package/dist/src/cli/project-config.d.ts +8 -0
- package/dist/src/cli/project-config.js +18 -0
- package/dist/src/cli/register.d.ts +15 -0
- package/dist/src/cli/register.js +26 -3
- package/dist/src/cli/session.d.ts +10 -0
- package/dist/src/cli/session.js +28 -2
- package/dist/src/fix-prompt/index.d.ts +1 -1
- package/dist/src/fix-prompt/index.js +2 -2
- package/dist/src/fix-prompt/prompt.d.ts +2 -2
- package/dist/src/fix-prompt/prompt.js +9 -9
- package/dist/src/hosted/client.d.ts +8 -2
- package/dist/src/hosted/client.js +108 -26
- package/dist/src/hosted/errors.d.ts +14 -0
- package/dist/src/hosted/errors.js +22 -0
- package/dist/src/hosted/evalResultCache.d.ts +4 -4
- package/dist/src/hosted/evalResultCache.js +10 -3
- package/dist/src/recorder/artifacts.d.ts +1 -1
- package/dist/src/recorder/artifacts.js +8 -1
- package/dist/src/runner/runTask.d.ts +14 -0
- package/dist/src/runner/runTaskHosted.js +9 -2
- package/dist/src/runner/runTrialGroup.js +4 -1
- package/dist/src/task/taskSchema.d.ts +52 -16
- package/node_modules/@pome-sh/shared-types/dist/seed-state.d.ts +27 -0
- package/node_modules/@pome-sh/shared-types/dist/seed-state.js +12 -0
- package/node_modules/@pome-sh/shared-types/dist/seed-state.js.map +1 -1
- package/node_modules/@pome-sh/shared-types/dist/task.d.ts +18 -0
- package/node_modules/@pome-sh/shared-types/package.json +1 -1
- package/node_modules/@pome-sh/shared-types/trace-contract.json +1 -1
- package/node_modules/@pome-sh/twin-gmail/CHANGELOG.md +21 -0
- package/node_modules/@pome-sh/twin-gmail/HOSTED.md +37 -15
- package/node_modules/@pome-sh/twin-gmail/LIMITS.md +10 -0
- package/node_modules/@pome-sh/twin-gmail/README.md +52 -11
- package/node_modules/@pome-sh/twin-gmail/dist/fixtures/mcp-tools-list.canonical.json +242 -7
- package/node_modules/@pome-sh/twin-gmail/dist/src/db.js +6 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/db.js.map +1 -1
- package/node_modules/@pome-sh/twin-gmail/dist/src/domain/drafts.d.ts +41 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/domain/drafts.js +138 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/domain/drafts.js.map +1 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/domain/filters.d.ts +10 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/{domain-search.js → domain/filters.js} +52 -36
- package/node_modules/@pome-sh/twin-gmail/dist/src/domain/filters.js.map +1 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/{domain.d.ts → domain/gmail-domain.d.ts} +45 -34
- package/node_modules/@pome-sh/twin-gmail/dist/src/domain/gmail-domain.js +174 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/domain/gmail-domain.js.map +1 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/domain/hydrate.d.ts +8 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/domain/hydrate.js +122 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/domain/hydrate.js.map +1 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/domain/index.d.ts +4 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/domain/index.js +5 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/domain/index.js.map +1 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/domain/labels.d.ts +40 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/domain/labels.js +122 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/domain/labels.js.map +1 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/domain/messages.d.ts +49 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/domain/messages.js +276 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/domain/messages.js.map +1 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/domain/search-sql.d.ts +19 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/domain/search-sql.js +179 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/domain/search-sql.js.map +1 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/domain/settings.d.ts +27 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/domain/settings.js +98 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/domain/settings.js.map +1 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/errors.js +2 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/errors.js.map +1 -1
- package/node_modules/@pome-sh/twin-gmail/dist/src/faults.d.ts +21 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/faults.js +52 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/faults.js.map +1 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/identity.d.ts +1 -6
- package/node_modules/@pome-sh/twin-gmail/dist/src/identity.js +0 -11
- package/node_modules/@pome-sh/twin-gmail/dist/src/identity.js.map +1 -1
- package/node_modules/@pome-sh/twin-gmail/dist/src/index.d.ts +4 -3
- package/node_modules/@pome-sh/twin-gmail/dist/src/index.js +3 -3
- package/node_modules/@pome-sh/twin-gmail/dist/src/index.js.map +1 -1
- package/node_modules/@pome-sh/twin-gmail/dist/src/mcp-schemas.d.ts +48 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/mcp-schemas.js +23 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/mcp-schemas.js.map +1 -1
- package/node_modules/@pome-sh/twin-gmail/dist/src/mcp.d.ts +1 -1
- package/node_modules/@pome-sh/twin-gmail/dist/src/mcp.js +39 -1
- package/node_modules/@pome-sh/twin-gmail/dist/src/mcp.js.map +1 -1
- package/node_modules/@pome-sh/twin-gmail/dist/src/rest-routes-drafts.js +4 -5
- package/node_modules/@pome-sh/twin-gmail/dist/src/rest-routes-drafts.js.map +1 -1
- package/node_modules/@pome-sh/twin-gmail/dist/src/rest-routes-kit.d.ts +2 -3
- package/node_modules/@pome-sh/twin-gmail/dist/src/rest-routes-kit.js +4 -4
- package/node_modules/@pome-sh/twin-gmail/dist/src/rest-routes-kit.js.map +1 -1
- package/node_modules/@pome-sh/twin-gmail/dist/src/rest-routes-messages.js +7 -8
- package/node_modules/@pome-sh/twin-gmail/dist/src/rest-routes-messages.js.map +1 -1
- package/node_modules/@pome-sh/twin-gmail/dist/src/rest-routes-resources.js +20 -21
- package/node_modules/@pome-sh/twin-gmail/dist/src/rest-routes-resources.js.map +1 -1
- package/node_modules/@pome-sh/twin-gmail/dist/src/rest-routes.d.ts +1 -1
- package/node_modules/@pome-sh/twin-gmail/dist/src/rest-serializers.d.ts +2 -4
- package/node_modules/@pome-sh/twin-gmail/dist/src/rest-serializers.js +4 -6
- package/node_modules/@pome-sh/twin-gmail/dist/src/rest-serializers.js.map +1 -1
- package/node_modules/@pome-sh/twin-gmail/dist/src/search-match.d.ts +4 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/search-match.js +179 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/search-match.js.map +1 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/search-parse.d.ts +61 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/search-parse.js +318 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/search-parse.js.map +1 -0
- package/node_modules/@pome-sh/twin-gmail/dist/src/search.d.ts +3 -61
- package/node_modules/@pome-sh/twin-gmail/dist/src/search.js +2 -503
- package/node_modules/@pome-sh/twin-gmail/dist/src/search.js.map +1 -1
- package/node_modules/@pome-sh/twin-gmail/dist/src/seed.d.ts +13 -4
- package/node_modules/@pome-sh/twin-gmail/dist/src/seed.js +3 -1
- package/node_modules/@pome-sh/twin-gmail/dist/src/seed.js.map +1 -1
- package/node_modules/@pome-sh/twin-gmail/dist/src/server.js +1 -1
- package/node_modules/@pome-sh/twin-gmail/dist/src/server.js.map +1 -1
- package/node_modules/@pome-sh/twin-gmail/dist/src/storage.js +1 -1
- package/node_modules/@pome-sh/twin-gmail/dist/src/storage.js.map +1 -1
- package/node_modules/@pome-sh/twin-gmail/dist/src/twin.d.ts +2 -3
- package/node_modules/@pome-sh/twin-gmail/dist/src/twin.js +1 -4
- package/node_modules/@pome-sh/twin-gmail/dist/src/twin.js.map +1 -1
- package/node_modules/@pome-sh/twin-gmail/dist/src/types.d.ts +1 -0
- package/node_modules/@pome-sh/twin-gmail/fidelity.inventory.json +42 -435
- package/node_modules/@pome-sh/twin-gmail/fixtures/README.md +4 -4
- package/node_modules/@pome-sh/twin-gmail/fixtures/mcp-tools-list.canonical.json +242 -7
- package/node_modules/@pome-sh/twin-gmail/fixtures/mcp-tools-list.meta.json +3 -3
- package/node_modules/@pome-sh/twin-gmail/package.json +3 -2
- package/node_modules/hono/dist/cjs/client/utils.js +1 -1
- package/node_modules/hono/dist/cjs/helper/streaming/sse.js +5 -4
- package/node_modules/hono/dist/cjs/middleware/cache/index.js +1 -1
- package/node_modules/hono/dist/cjs/middleware/compress/index.js +2 -1
- package/node_modules/hono/dist/cjs/middleware/method-override/index.js +5 -3
- package/node_modules/hono/dist/cjs/middleware/secure-headers/secure-headers.js +10 -4
- package/node_modules/hono/dist/cjs/request.js +8 -3
- package/node_modules/hono/dist/cjs/utils/accept.js +1 -1
- package/node_modules/hono/dist/cjs/utils/body.js +6 -0
- package/node_modules/hono/dist/cjs/utils/url.js +1 -1
- package/node_modules/hono/dist/client/utils.js +1 -1
- package/node_modules/hono/dist/helper/streaming/sse.js +5 -4
- package/node_modules/hono/dist/middleware/cache/index.js +1 -1
- package/node_modules/hono/dist/middleware/compress/index.js +2 -1
- package/node_modules/hono/dist/middleware/method-override/index.js +5 -3
- package/node_modules/hono/dist/middleware/secure-headers/secure-headers.js +10 -4
- package/node_modules/hono/dist/request.js +8 -3
- package/node_modules/hono/dist/types/adapter/aws-lambda/types.d.ts +9 -0
- package/node_modules/hono/dist/types/helper/websocket/index.d.ts +1 -1
- package/node_modules/hono/dist/types/middleware/combine/index.d.ts +1 -1
- package/node_modules/hono/dist/utils/accept.js +1 -1
- package/node_modules/hono/dist/utils/body.js +6 -0
- package/node_modules/hono/dist/utils/url.js +1 -1
- package/node_modules/hono/package.json +3 -3
- package/package.json +3 -3
- package/node_modules/@pome-sh/twin-gmail/dist/src/domain-search.d.ts +0 -5
- package/node_modules/@pome-sh/twin-gmail/dist/src/domain-search.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/dist/src/domain.js +0 -407
- package/node_modules/@pome-sh/twin-gmail/dist/src/domain.js.map +0 -1
- package/node_modules/@pome-sh/twin-gmail/dist/src/rest-store.d.ts +0 -75
- package/node_modules/@pome-sh/twin-gmail/dist/src/rest-store.js +0 -282
- package/node_modules/@pome-sh/twin-gmail/dist/src/rest-store.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
|
2
2
|
import { createEvalSessionResponseSchema, createSessionResponseSchema, finalizeResponseSchema, sessionPublicSchema, submitResultResponseSchema, } from "../types/shared.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
import { HostedAuthError, HostedOrchError, HostedQuotaError, } from "./errors.js";
|
|
4
|
+
import { HostedAuthError, HostedOrchError, HostedQuotaError, HostedDiscardRefusedError, } from "./errors.js";
|
|
5
5
|
// Multi-twin (M3): provenance marker for `per_twin`. A single-twin OLD cloud
|
|
6
6
|
// ships NO `per_twin` key; `createSessionResponseSchema` then SYNTHESIZES one
|
|
7
7
|
// (host-rewrites api.pome.sh→mcp.pome.sh with no `/mcp` suffix). Consumers that
|
|
@@ -98,6 +98,46 @@ class RetryableFinalizeStatusError extends HostedOrchError {
|
|
|
98
98
|
this.name = "RetryableFinalizeStatusError";
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
+
/** Read a 409 body as an F-983 discard refusal. Only ever called for status
|
|
102
|
+
* 409 — a non-409 that happens to echo `details.reason` is a server error,
|
|
103
|
+
* not a refusal, and must keep its own status-based handling. */
|
|
104
|
+
async function readDiscardRefusal(res) {
|
|
105
|
+
let body;
|
|
106
|
+
try {
|
|
107
|
+
body = await res.clone().json();
|
|
108
|
+
}
|
|
109
|
+
catch {
|
|
110
|
+
return { kind: "none" };
|
|
111
|
+
}
|
|
112
|
+
const error = body?.error;
|
|
113
|
+
const details = error?.details;
|
|
114
|
+
if (!details || details.reason !== "ungraded_session")
|
|
115
|
+
return { kind: "none" };
|
|
116
|
+
const discardToken = details.discard_token;
|
|
117
|
+
if (typeof discardToken !== "string" || discardToken.length === 0) {
|
|
118
|
+
return { kind: "unusable" };
|
|
119
|
+
}
|
|
120
|
+
return {
|
|
121
|
+
kind: "refusal",
|
|
122
|
+
refusal: {
|
|
123
|
+
message: typeof error?.message === "string" ? error.message : "",
|
|
124
|
+
sessionId: typeof details.session_id === "string" ? details.session_id : "",
|
|
125
|
+
state: typeof details.state === "string" ? details.state : "open",
|
|
126
|
+
taskName: typeof details.task_name === "string" ? details.task_name : null,
|
|
127
|
+
openSeconds: typeof details.open_seconds === "number" ? details.open_seconds : 0,
|
|
128
|
+
discardToken,
|
|
129
|
+
},
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
/** The delete was refused but the refusal is unreplayable. Say plainly that
|
|
133
|
+
* the session is still running: a best-effort caller would otherwise read
|
|
134
|
+
* silence as success. NOT HostedDiscardRefusedError — with no token to
|
|
135
|
+
* replay, that type would be a lie. */
|
|
136
|
+
function unusableRefusalError(sessionId) {
|
|
137
|
+
return new HostedOrchError(`DELETE /v1/sessions/${sessionId} → 409: the server refused to delete this ` +
|
|
138
|
+
`session but sent no usable discard_token, so the session was NOT ` +
|
|
139
|
+
`stopped. Retry, or stop it from the dashboard.`, undefined, 409);
|
|
140
|
+
}
|
|
101
141
|
export function createHostedClient(config) {
|
|
102
142
|
const timeoutMs = config.timeoutMs ?? 30_000;
|
|
103
143
|
const finalizeTimeoutMs = config.finalizeTimeoutMs ?? 5 * 60_000;
|
|
@@ -590,33 +630,75 @@ export function createHostedClient(config) {
|
|
|
590
630
|
state_final_json_b64: Buffer.from(input.stateFinalJson, "utf8").toString("base64"),
|
|
591
631
|
}, (raw) => submitResultResponseSchema.parse(raw));
|
|
592
632
|
},
|
|
593
|
-
async deleteSession(sessionId, bestEffort = true) {
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
633
|
+
async deleteSession(sessionId, bestEffort = true, opts = {}) {
|
|
634
|
+
// One DELETE attempt, including the read of a 409 body. `confirmDiscard`
|
|
635
|
+
// replays the token the control plane hands back with an F-983 refusal.
|
|
636
|
+
const attempt = async (confirmDiscard) => {
|
|
637
|
+
const ctrl = new AbortController();
|
|
638
|
+
const timer = setTimeout(() => ctrl.abort(), timeoutMs);
|
|
639
|
+
const qs = confirmDiscard
|
|
640
|
+
? `?confirm_discard=${encodeURIComponent(confirmDiscard)}`
|
|
641
|
+
: "";
|
|
642
|
+
try {
|
|
643
|
+
const res = await fetch(`${config.baseUrl}/v1/sessions/${encodeURIComponent(sessionId)}${qs}`, {
|
|
644
|
+
method: "DELETE",
|
|
645
|
+
// authHeaders, not a hardcoded x-api-key: demo teardown carries a
|
|
646
|
+
// bearer demo_token (FDRS-643 live-run finding — the hardcoded
|
|
647
|
+
// header made every demo DELETE an opaque 404, silently swallowed
|
|
648
|
+
// by best-effort).
|
|
649
|
+
headers: authHeaders,
|
|
650
|
+
signal: ctrl.signal,
|
|
651
|
+
});
|
|
652
|
+
// Keep the timeout active while consuming a 409 body — fetch()
|
|
653
|
+
// resolves after headers, before the body finishes (same hazard,
|
|
654
|
+
// same fix, as postJson's readResponse above).
|
|
655
|
+
const read = res.status === 409
|
|
656
|
+
? await readDiscardRefusal(res)
|
|
657
|
+
: { kind: "none" };
|
|
658
|
+
return { res, read };
|
|
659
|
+
}
|
|
660
|
+
catch (err) {
|
|
661
|
+
if (bestEffort)
|
|
662
|
+
return null;
|
|
663
|
+
throw new HostedOrchError(err instanceof Error ? err.message : "network error");
|
|
664
|
+
}
|
|
665
|
+
finally {
|
|
666
|
+
clearTimeout(timer);
|
|
667
|
+
}
|
|
668
|
+
};
|
|
669
|
+
let first = await attempt();
|
|
670
|
+
if (!first)
|
|
671
|
+
return; // bestEffort transport failure
|
|
672
|
+
let res = first.res;
|
|
673
|
+
// F-983: a 409 carrying reason=ungraded_session is a REFUSAL, not the
|
|
674
|
+
// already-closed race. Never fold it into the idempotent-success branch
|
|
675
|
+
// below — that swallow is exactly what made the CLI lie about stopping.
|
|
676
|
+
// Scoped to 409: a 5xx that echoes the same `details` is a server
|
|
677
|
+
// error and keeps its status-based handling.
|
|
678
|
+
if (first.read.kind === "unusable")
|
|
679
|
+
throw unusableRefusalError(sessionId);
|
|
680
|
+
if (first.read.kind === "refusal") {
|
|
681
|
+
const { refusal } = first.read;
|
|
682
|
+
if (!opts.discard) {
|
|
683
|
+
throw new HostedDiscardRefusedError(refusal.message, refusal.sessionId || sessionId, refusal.state, refusal.taskName, refusal.openSeconds, refusal.discardToken);
|
|
684
|
+
}
|
|
685
|
+
const confirmed = await attempt(refusal.discardToken);
|
|
686
|
+
if (!confirmed)
|
|
610
687
|
return;
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
688
|
+
res = confirmed.res;
|
|
689
|
+
// No third attempt either way: the token was already spent.
|
|
690
|
+
if (confirmed.read.kind === "unusable") {
|
|
691
|
+
throw unusableRefusalError(sessionId);
|
|
692
|
+
}
|
|
693
|
+
if (confirmed.read.kind === "refusal") {
|
|
694
|
+
const stillRefused = confirmed.read.refusal;
|
|
695
|
+
throw new HostedDiscardRefusedError(stillRefused.message, stillRefused.sessionId || sessionId, stillRefused.state, stillRefused.taskName, stillRefused.openSeconds, stillRefused.discardToken);
|
|
696
|
+
}
|
|
615
697
|
}
|
|
616
698
|
// Cloud spec (pome-cloud docs/05-api-spec.md): 204 on success. Accept
|
|
617
|
-
// 200 too in case a future control-plane returns a body. 409
|
|
618
|
-
// best-effort teardown idempotent when a
|
|
619
|
-
// closed the row.
|
|
699
|
+
// 200 too in case a future control-plane returns a body. A 409 that is
|
|
700
|
+
// NOT an F-983 refusal keeps best-effort teardown idempotent when a
|
|
701
|
+
// concurrent reaper already closed the row.
|
|
620
702
|
if (res.status === 204 || res.status === 200 || res.status === 409)
|
|
621
703
|
return;
|
|
622
704
|
if (res.status === 404) {
|
|
@@ -627,7 +709,7 @@ export function createHostedClient(config) {
|
|
|
627
709
|
if (res.status === 401 || res.status === 403) {
|
|
628
710
|
throw new HostedAuthError(`DELETE /v1/sessions/${sessionId} → ${res.status}`);
|
|
629
711
|
}
|
|
630
|
-
//
|
|
712
|
+
// 5xx — thrown, but caller can swallow if mid-teardown.
|
|
631
713
|
throw new HostedOrchError(`DELETE /v1/sessions/${sessionId} → ${res.status}`);
|
|
632
714
|
},
|
|
633
715
|
};
|
|
@@ -43,4 +43,18 @@ export declare class HostedTrialError extends Error {
|
|
|
43
43
|
readonly errorCode: string;
|
|
44
44
|
constructor(message: string, errorCode: string);
|
|
45
45
|
}
|
|
46
|
+
/** F-983 — `DELETE /v1/sessions/:id` refused to destroy a session whose run
|
|
47
|
+
* has not been graded. Pome creates the `runs` row at finalize, so an open
|
|
48
|
+
* session holds an ungraded run and deleting it discards the evidence. The
|
|
49
|
+
* control plane issues `discardToken`; replaying it confirms the discard.
|
|
50
|
+
* Deliberately NOT swallowed by `bestEffort` — that flag covers transport
|
|
51
|
+
* noise and already-closed races, not a deliberate server refusal. */
|
|
52
|
+
export declare class HostedDiscardRefusedError extends Error {
|
|
53
|
+
readonly sessionId: string;
|
|
54
|
+
readonly state: string;
|
|
55
|
+
readonly taskName: string | null;
|
|
56
|
+
readonly openSeconds: number;
|
|
57
|
+
readonly discardToken: string;
|
|
58
|
+
constructor(message: string, sessionId: string, state: string, taskName: string | null, openSeconds: number, discardToken: string);
|
|
59
|
+
}
|
|
46
60
|
export declare function exitCodeFor(err: unknown): number;
|
|
@@ -87,6 +87,28 @@ export class HostedTrialError extends Error {
|
|
|
87
87
|
this.name = "HostedTrialError";
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
+
/** F-983 — `DELETE /v1/sessions/:id` refused to destroy a session whose run
|
|
91
|
+
* has not been graded. Pome creates the `runs` row at finalize, so an open
|
|
92
|
+
* session holds an ungraded run and deleting it discards the evidence. The
|
|
93
|
+
* control plane issues `discardToken`; replaying it confirms the discard.
|
|
94
|
+
* Deliberately NOT swallowed by `bestEffort` — that flag covers transport
|
|
95
|
+
* noise and already-closed races, not a deliberate server refusal. */
|
|
96
|
+
export class HostedDiscardRefusedError extends Error {
|
|
97
|
+
sessionId;
|
|
98
|
+
state;
|
|
99
|
+
taskName;
|
|
100
|
+
openSeconds;
|
|
101
|
+
discardToken;
|
|
102
|
+
constructor(message, sessionId, state, taskName, openSeconds, discardToken) {
|
|
103
|
+
super(message);
|
|
104
|
+
this.sessionId = sessionId;
|
|
105
|
+
this.state = state;
|
|
106
|
+
this.taskName = taskName;
|
|
107
|
+
this.openSeconds = openSeconds;
|
|
108
|
+
this.discardToken = discardToken;
|
|
109
|
+
this.name = "HostedDiscardRefusedError";
|
|
110
|
+
}
|
|
111
|
+
}
|
|
90
112
|
export function exitCodeFor(err) {
|
|
91
113
|
if (err instanceof HostedAuthError)
|
|
92
114
|
return 3;
|
|
@@ -6,9 +6,9 @@ export interface VerdictArtifact {
|
|
|
6
6
|
/** Provenance: the only writer is the /finalize response path. */
|
|
7
7
|
source: "cloud-finalize";
|
|
8
8
|
task_name: string;
|
|
9
|
-
/** The
|
|
10
|
-
*
|
|
11
|
-
|
|
9
|
+
/** The task path as the run invocation saw it (may move later — readers
|
|
10
|
+
* must tolerate a dangling path). */
|
|
11
|
+
task_path: string;
|
|
12
12
|
/** Shared trial-group id (`grp_` + nanoid21); null on single runs. */
|
|
13
13
|
group_id: string | null;
|
|
14
14
|
session_id: string;
|
|
@@ -37,7 +37,7 @@ export interface RunSet {
|
|
|
37
37
|
/** null = a single run that never had a group. */
|
|
38
38
|
groupId: string | null;
|
|
39
39
|
taskName: string;
|
|
40
|
-
/** The
|
|
40
|
+
/** The task path recorded at run time (first trial's). */
|
|
41
41
|
taskPath: string;
|
|
42
42
|
/** Trials sorted by finalized_at ascending. */
|
|
43
43
|
trials: TrialVerdict[];
|
|
@@ -44,7 +44,7 @@ function isVerdictArtifact(parsed) {
|
|
|
44
44
|
return false;
|
|
45
45
|
if (typeof v.task_name !== "string")
|
|
46
46
|
return false;
|
|
47
|
-
if (typeof v.scenario_path !== "string")
|
|
47
|
+
if (typeof v.task_path !== "string" && typeof v.scenario_path !== "string")
|
|
48
48
|
return false;
|
|
49
49
|
if (v.group_id !== null && typeof v.group_id !== "string")
|
|
50
50
|
return false;
|
|
@@ -69,6 +69,13 @@ function isVerdictArtifact(parsed) {
|
|
|
69
69
|
typeof result.skipped === "boolean");
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
|
+
/** F-933 — collapse the legacy `scenario_path` onto `task_path` so callers
|
|
73
|
+
* only ever deal with one spelling. Validation ran first, so at least one of
|
|
74
|
+
* the two is a string. */
|
|
75
|
+
function normalizeVerdictArtifact(parsed) {
|
|
76
|
+
const { scenario_path: legacyPath, task_path: taskPath, ...rest } = parsed;
|
|
77
|
+
return { ...rest, task_path: taskPath ?? legacyPath };
|
|
78
|
+
}
|
|
72
79
|
export async function readVerdictArtifact(runDir) {
|
|
73
80
|
const path = join(runDir, VERDICT_FILENAME);
|
|
74
81
|
let raw;
|
|
@@ -82,7 +89,7 @@ export async function readVerdictArtifact(runDir) {
|
|
|
82
89
|
const parsed = JSON.parse(raw);
|
|
83
90
|
if (!isVerdictArtifact(parsed))
|
|
84
91
|
return null;
|
|
85
|
-
return { runDir, verdict: parsed };
|
|
92
|
+
return { runDir, verdict: normalizeVerdictArtifact(parsed) };
|
|
86
93
|
}
|
|
87
94
|
catch {
|
|
88
95
|
return null;
|
|
@@ -136,7 +143,7 @@ export function groupRunSets(trials) {
|
|
|
136
143
|
sets.push({
|
|
137
144
|
groupId: bucket[0].verdict.group_id,
|
|
138
145
|
taskName: bucket[0].verdict.task_name,
|
|
139
|
-
taskPath: bucket[0].verdict.
|
|
146
|
+
taskPath: bucket[0].verdict.task_path,
|
|
140
147
|
trials: bucket,
|
|
141
148
|
latestFinalizedAt: last.verdict.finalized_at,
|
|
142
149
|
anyFailed: bucket.some((t) => !t.verdict.passed),
|
|
@@ -22,7 +22,7 @@ export type RunArtifactCoreInput = {
|
|
|
22
22
|
export declare function writeRunArtifactsCore(input: RunArtifactCoreInput): Promise<RunArtifacts>;
|
|
23
23
|
export declare function readLatestRun(artifactsDir: string): Promise<{
|
|
24
24
|
run_id: string;
|
|
25
|
-
|
|
25
|
+
task: string;
|
|
26
26
|
run_dir: string;
|
|
27
27
|
} | undefined>;
|
|
28
28
|
export type RunMetaSummary = {
|
|
@@ -78,9 +78,16 @@ export async function writeRunArtifactsCore(input) {
|
|
|
78
78
|
await writeJson(join(runDir, "state_final.json"), input.stateFinal);
|
|
79
79
|
await writeFile(join(runDir, "stdout.txt"), redactText(input.stdout));
|
|
80
80
|
await writeFile(join(runDir, "stderr.log"), redactText(input.stderr));
|
|
81
|
+
// F-933 — `task`, not `scenario`. latest.json is a purely local pointer:
|
|
82
|
+
// every run overwrites it and its only readers are `pome eval` / `pome
|
|
83
|
+
// inspect`, which dereference `run_dir`/`run_id`. Nothing on the wire and
|
|
84
|
+
// nothing in the cloud parses it, so the rename needs no compat window.
|
|
85
|
+
// meta.json's `scenario` key is deliberately NOT renamed here — that one is
|
|
86
|
+
// uploaded to cloud finalize and read back out of older run dirs (see
|
|
87
|
+
// AGENTS.md's sanctioned-survivor list).
|
|
81
88
|
await writeJson(join(input.artifactsDir, "latest.json"), {
|
|
82
89
|
run_id: input.runId,
|
|
83
|
-
|
|
90
|
+
task: input.scenario.slug,
|
|
84
91
|
run_dir: runDir
|
|
85
92
|
});
|
|
86
93
|
return { runId: input.runId, runDir };
|
|
@@ -290,6 +290,13 @@ export declare function runTask(options: RunTaskOptions): Promise<{
|
|
|
290
290
|
}[];
|
|
291
291
|
deliveryMode: "sender-only" | "seeded-mailboxes";
|
|
292
292
|
clock: string;
|
|
293
|
+
faults: {
|
|
294
|
+
name: "rate-limited";
|
|
295
|
+
target: string;
|
|
296
|
+
succeedFirst: number;
|
|
297
|
+
throttleFor: number;
|
|
298
|
+
retryAfterSeconds: number;
|
|
299
|
+
}[];
|
|
293
300
|
} | {
|
|
294
301
|
clock: string;
|
|
295
302
|
defaultSid: string;
|
|
@@ -678,6 +685,13 @@ export declare function runTask(options: RunTaskOptions): Promise<{
|
|
|
678
685
|
}[];
|
|
679
686
|
deliveryMode: "sender-only" | "seeded-mailboxes";
|
|
680
687
|
clock: string;
|
|
688
|
+
faults: {
|
|
689
|
+
name: "rate-limited";
|
|
690
|
+
target: string;
|
|
691
|
+
succeedFirst: number;
|
|
692
|
+
throttleFor: number;
|
|
693
|
+
retryAfterSeconds: number;
|
|
694
|
+
}[];
|
|
681
695
|
} | {
|
|
682
696
|
clock: string;
|
|
683
697
|
defaultSid: string;
|
|
@@ -504,7 +504,7 @@ export async function runTaskHosted(options) {
|
|
|
504
504
|
version: VERDICT_ARTIFACT_VERSION,
|
|
505
505
|
source: "cloud-finalize",
|
|
506
506
|
task_name: scenario.slug,
|
|
507
|
-
|
|
507
|
+
task_path: options.taskPath,
|
|
508
508
|
group_id: options.groupId ?? null,
|
|
509
509
|
session_id: session.session_id,
|
|
510
510
|
cloud_run_id: finalized.run_id,
|
|
@@ -548,7 +548,14 @@ export async function runTaskHosted(options) {
|
|
|
548
548
|
finally {
|
|
549
549
|
// Best-effort teardown. TTL would reap anyway; explicit delete keeps
|
|
550
550
|
// the dashboard sessions list tidy.
|
|
551
|
-
|
|
551
|
+
// F-983: this teardown deliberately discards. On the success path the
|
|
552
|
+
// session is already `done` (finalize closed it) and the DELETE is a
|
|
553
|
+
// no-op; on the failure path we accept losing an ungraded tape rather
|
|
554
|
+
// than leaving open sessions to linger to TTL and pollute the
|
|
555
|
+
// reliability view. Flagged as known residue in the F-983 spec.
|
|
556
|
+
await client
|
|
557
|
+
.deleteSession(session.session_id, true, { discard: true })
|
|
558
|
+
.catch(() => undefined);
|
|
552
559
|
await rm(signalsDir, { recursive: true, force: true }).catch(() => undefined);
|
|
553
560
|
}
|
|
554
561
|
}
|
|
@@ -115,7 +115,10 @@ export async function runTrialGroup(options) {
|
|
|
115
115
|
// Roll the half-group back so abandoned mints never linger as open
|
|
116
116
|
// sessions polluting the reliability view; then let the caller map the
|
|
117
117
|
// error to the documented exit code.
|
|
118
|
-
await Promise.all(
|
|
118
|
+
await Promise.all(
|
|
119
|
+
// F-983: these sessions were minted and never launched, so there is no
|
|
120
|
+
// tape to lose — an explicit discard is honest here.
|
|
121
|
+
sessions.map((s) => client.deleteSession(s.session_id, true, { discard: true }).catch(() => undefined)));
|
|
119
122
|
throw err;
|
|
120
123
|
}
|
|
121
124
|
const concurrency = sessions.length;
|
|
@@ -141,8 +141,8 @@ export declare const seedStateSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
141
141
|
forwardingAddresses: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
142
142
|
forwardingEmail: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
143
143
|
verificationStatus: z.ZodDefault<z.ZodEnum<{
|
|
144
|
-
pending: "pending";
|
|
145
144
|
accepted: "accepted";
|
|
145
|
+
pending: "pending";
|
|
146
146
|
}>>;
|
|
147
147
|
}, z.core.$strict>>>;
|
|
148
148
|
sendAs: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -152,8 +152,8 @@ export declare const seedStateSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
152
152
|
isPrimary: z.ZodDefault<z.ZodBoolean>;
|
|
153
153
|
isDefault: z.ZodDefault<z.ZodBoolean>;
|
|
154
154
|
verificationStatus: z.ZodDefault<z.ZodEnum<{
|
|
155
|
-
pending: "pending";
|
|
156
155
|
accepted: "accepted";
|
|
156
|
+
pending: "pending";
|
|
157
157
|
}>>;
|
|
158
158
|
}, z.core.$strict>>>;
|
|
159
159
|
}, z.core.$strict>;
|
|
@@ -246,8 +246,8 @@ export declare const seedStateSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
246
246
|
forwardingAddresses: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
247
247
|
forwardingEmail: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
248
248
|
verificationStatus: z.ZodDefault<z.ZodEnum<{
|
|
249
|
-
pending: "pending";
|
|
250
249
|
accepted: "accepted";
|
|
250
|
+
pending: "pending";
|
|
251
251
|
}>>;
|
|
252
252
|
}, z.core.$strict>>>;
|
|
253
253
|
sendAs: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -257,8 +257,8 @@ export declare const seedStateSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
257
257
|
isPrimary: z.ZodDefault<z.ZodBoolean>;
|
|
258
258
|
isDefault: z.ZodDefault<z.ZodBoolean>;
|
|
259
259
|
verificationStatus: z.ZodDefault<z.ZodEnum<{
|
|
260
|
-
pending: "pending";
|
|
261
260
|
accepted: "accepted";
|
|
261
|
+
pending: "pending";
|
|
262
262
|
}>>;
|
|
263
263
|
}, z.core.$strict>>>;
|
|
264
264
|
}, z.core.$strict>>>;
|
|
@@ -267,6 +267,15 @@ export declare const seedStateSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
267
267
|
"seeded-mailboxes": "seeded-mailboxes";
|
|
268
268
|
}>>;
|
|
269
269
|
clock: z.ZodDefault<z.ZodString>;
|
|
270
|
+
faults: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
271
|
+
name: z.ZodEnum<{
|
|
272
|
+
"rate-limited": "rate-limited";
|
|
273
|
+
}>;
|
|
274
|
+
target: z.ZodDefault<z.ZodString>;
|
|
275
|
+
succeedFirst: z.ZodDefault<z.ZodNumber>;
|
|
276
|
+
throttleFor: z.ZodDefault<z.ZodNumber>;
|
|
277
|
+
retryAfterSeconds: z.ZodDefault<z.ZodNumber>;
|
|
278
|
+
}, z.core.$strict>>>;
|
|
270
279
|
}, z.core.$strict>, z.ZodObject<{
|
|
271
280
|
team: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
272
281
|
users: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
@@ -605,8 +614,8 @@ export declare const seedEnvelopeSchema: z.ZodRecord<z.ZodString, z.ZodUnion<rea
|
|
|
605
614
|
forwardingAddresses: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
606
615
|
forwardingEmail: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
607
616
|
verificationStatus: z.ZodDefault<z.ZodEnum<{
|
|
608
|
-
pending: "pending";
|
|
609
617
|
accepted: "accepted";
|
|
618
|
+
pending: "pending";
|
|
610
619
|
}>>;
|
|
611
620
|
}, z.core.$strict>>>;
|
|
612
621
|
sendAs: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -616,8 +625,8 @@ export declare const seedEnvelopeSchema: z.ZodRecord<z.ZodString, z.ZodUnion<rea
|
|
|
616
625
|
isPrimary: z.ZodDefault<z.ZodBoolean>;
|
|
617
626
|
isDefault: z.ZodDefault<z.ZodBoolean>;
|
|
618
627
|
verificationStatus: z.ZodDefault<z.ZodEnum<{
|
|
619
|
-
pending: "pending";
|
|
620
628
|
accepted: "accepted";
|
|
629
|
+
pending: "pending";
|
|
621
630
|
}>>;
|
|
622
631
|
}, z.core.$strict>>>;
|
|
623
632
|
}, z.core.$strict>;
|
|
@@ -710,8 +719,8 @@ export declare const seedEnvelopeSchema: z.ZodRecord<z.ZodString, z.ZodUnion<rea
|
|
|
710
719
|
forwardingAddresses: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
711
720
|
forwardingEmail: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
712
721
|
verificationStatus: z.ZodDefault<z.ZodEnum<{
|
|
713
|
-
pending: "pending";
|
|
714
722
|
accepted: "accepted";
|
|
723
|
+
pending: "pending";
|
|
715
724
|
}>>;
|
|
716
725
|
}, z.core.$strict>>>;
|
|
717
726
|
sendAs: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -721,8 +730,8 @@ export declare const seedEnvelopeSchema: z.ZodRecord<z.ZodString, z.ZodUnion<rea
|
|
|
721
730
|
isPrimary: z.ZodDefault<z.ZodBoolean>;
|
|
722
731
|
isDefault: z.ZodDefault<z.ZodBoolean>;
|
|
723
732
|
verificationStatus: z.ZodDefault<z.ZodEnum<{
|
|
724
|
-
pending: "pending";
|
|
725
733
|
accepted: "accepted";
|
|
734
|
+
pending: "pending";
|
|
726
735
|
}>>;
|
|
727
736
|
}, z.core.$strict>>>;
|
|
728
737
|
}, z.core.$strict>>>;
|
|
@@ -731,6 +740,15 @@ export declare const seedEnvelopeSchema: z.ZodRecord<z.ZodString, z.ZodUnion<rea
|
|
|
731
740
|
"seeded-mailboxes": "seeded-mailboxes";
|
|
732
741
|
}>>;
|
|
733
742
|
clock: z.ZodDefault<z.ZodString>;
|
|
743
|
+
faults: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
744
|
+
name: z.ZodEnum<{
|
|
745
|
+
"rate-limited": "rate-limited";
|
|
746
|
+
}>;
|
|
747
|
+
target: z.ZodDefault<z.ZodString>;
|
|
748
|
+
succeedFirst: z.ZodDefault<z.ZodNumber>;
|
|
749
|
+
throttleFor: z.ZodDefault<z.ZodNumber>;
|
|
750
|
+
retryAfterSeconds: z.ZodDefault<z.ZodNumber>;
|
|
751
|
+
}, z.core.$strict>>>;
|
|
734
752
|
}, z.core.$strict>, z.ZodObject<{
|
|
735
753
|
team: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
736
754
|
users: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
@@ -1091,8 +1109,8 @@ export declare const taskSchema: z.ZodObject<{
|
|
|
1091
1109
|
forwardingAddresses: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1092
1110
|
forwardingEmail: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1093
1111
|
verificationStatus: z.ZodDefault<z.ZodEnum<{
|
|
1094
|
-
pending: "pending";
|
|
1095
1112
|
accepted: "accepted";
|
|
1113
|
+
pending: "pending";
|
|
1096
1114
|
}>>;
|
|
1097
1115
|
}, z.core.$strict>>>;
|
|
1098
1116
|
sendAs: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -1102,8 +1120,8 @@ export declare const taskSchema: z.ZodObject<{
|
|
|
1102
1120
|
isPrimary: z.ZodDefault<z.ZodBoolean>;
|
|
1103
1121
|
isDefault: z.ZodDefault<z.ZodBoolean>;
|
|
1104
1122
|
verificationStatus: z.ZodDefault<z.ZodEnum<{
|
|
1105
|
-
pending: "pending";
|
|
1106
1123
|
accepted: "accepted";
|
|
1124
|
+
pending: "pending";
|
|
1107
1125
|
}>>;
|
|
1108
1126
|
}, z.core.$strict>>>;
|
|
1109
1127
|
}, z.core.$strict>;
|
|
@@ -1196,8 +1214,8 @@ export declare const taskSchema: z.ZodObject<{
|
|
|
1196
1214
|
forwardingAddresses: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1197
1215
|
forwardingEmail: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1198
1216
|
verificationStatus: z.ZodDefault<z.ZodEnum<{
|
|
1199
|
-
pending: "pending";
|
|
1200
1217
|
accepted: "accepted";
|
|
1218
|
+
pending: "pending";
|
|
1201
1219
|
}>>;
|
|
1202
1220
|
}, z.core.$strict>>>;
|
|
1203
1221
|
sendAs: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -1207,8 +1225,8 @@ export declare const taskSchema: z.ZodObject<{
|
|
|
1207
1225
|
isPrimary: z.ZodDefault<z.ZodBoolean>;
|
|
1208
1226
|
isDefault: z.ZodDefault<z.ZodBoolean>;
|
|
1209
1227
|
verificationStatus: z.ZodDefault<z.ZodEnum<{
|
|
1210
|
-
pending: "pending";
|
|
1211
1228
|
accepted: "accepted";
|
|
1229
|
+
pending: "pending";
|
|
1212
1230
|
}>>;
|
|
1213
1231
|
}, z.core.$strict>>>;
|
|
1214
1232
|
}, z.core.$strict>>>;
|
|
@@ -1217,6 +1235,15 @@ export declare const taskSchema: z.ZodObject<{
|
|
|
1217
1235
|
"seeded-mailboxes": "seeded-mailboxes";
|
|
1218
1236
|
}>>;
|
|
1219
1237
|
clock: z.ZodDefault<z.ZodString>;
|
|
1238
|
+
faults: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1239
|
+
name: z.ZodEnum<{
|
|
1240
|
+
"rate-limited": "rate-limited";
|
|
1241
|
+
}>;
|
|
1242
|
+
target: z.ZodDefault<z.ZodString>;
|
|
1243
|
+
succeedFirst: z.ZodDefault<z.ZodNumber>;
|
|
1244
|
+
throttleFor: z.ZodDefault<z.ZodNumber>;
|
|
1245
|
+
retryAfterSeconds: z.ZodDefault<z.ZodNumber>;
|
|
1246
|
+
}, z.core.$strict>>>;
|
|
1220
1247
|
}, z.core.$strict>, z.ZodObject<{
|
|
1221
1248
|
team: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1222
1249
|
users: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
@@ -1554,8 +1581,8 @@ export declare const taskSchema: z.ZodObject<{
|
|
|
1554
1581
|
forwardingAddresses: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1555
1582
|
forwardingEmail: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1556
1583
|
verificationStatus: z.ZodDefault<z.ZodEnum<{
|
|
1557
|
-
pending: "pending";
|
|
1558
1584
|
accepted: "accepted";
|
|
1585
|
+
pending: "pending";
|
|
1559
1586
|
}>>;
|
|
1560
1587
|
}, z.core.$strict>>>;
|
|
1561
1588
|
sendAs: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -1565,8 +1592,8 @@ export declare const taskSchema: z.ZodObject<{
|
|
|
1565
1592
|
isPrimary: z.ZodDefault<z.ZodBoolean>;
|
|
1566
1593
|
isDefault: z.ZodDefault<z.ZodBoolean>;
|
|
1567
1594
|
verificationStatus: z.ZodDefault<z.ZodEnum<{
|
|
1568
|
-
pending: "pending";
|
|
1569
1595
|
accepted: "accepted";
|
|
1596
|
+
pending: "pending";
|
|
1570
1597
|
}>>;
|
|
1571
1598
|
}, z.core.$strict>>>;
|
|
1572
1599
|
}, z.core.$strict>;
|
|
@@ -1659,8 +1686,8 @@ export declare const taskSchema: z.ZodObject<{
|
|
|
1659
1686
|
forwardingAddresses: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1660
1687
|
forwardingEmail: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1661
1688
|
verificationStatus: z.ZodDefault<z.ZodEnum<{
|
|
1662
|
-
pending: "pending";
|
|
1663
1689
|
accepted: "accepted";
|
|
1690
|
+
pending: "pending";
|
|
1664
1691
|
}>>;
|
|
1665
1692
|
}, z.core.$strict>>>;
|
|
1666
1693
|
sendAs: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -1670,8 +1697,8 @@ export declare const taskSchema: z.ZodObject<{
|
|
|
1670
1697
|
isPrimary: z.ZodDefault<z.ZodBoolean>;
|
|
1671
1698
|
isDefault: z.ZodDefault<z.ZodBoolean>;
|
|
1672
1699
|
verificationStatus: z.ZodDefault<z.ZodEnum<{
|
|
1673
|
-
pending: "pending";
|
|
1674
1700
|
accepted: "accepted";
|
|
1701
|
+
pending: "pending";
|
|
1675
1702
|
}>>;
|
|
1676
1703
|
}, z.core.$strict>>>;
|
|
1677
1704
|
}, z.core.$strict>>>;
|
|
@@ -1680,6 +1707,15 @@ export declare const taskSchema: z.ZodObject<{
|
|
|
1680
1707
|
"seeded-mailboxes": "seeded-mailboxes";
|
|
1681
1708
|
}>>;
|
|
1682
1709
|
clock: z.ZodDefault<z.ZodString>;
|
|
1710
|
+
faults: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1711
|
+
name: z.ZodEnum<{
|
|
1712
|
+
"rate-limited": "rate-limited";
|
|
1713
|
+
}>;
|
|
1714
|
+
target: z.ZodDefault<z.ZodString>;
|
|
1715
|
+
succeedFirst: z.ZodDefault<z.ZodNumber>;
|
|
1716
|
+
throttleFor: z.ZodDefault<z.ZodNumber>;
|
|
1717
|
+
retryAfterSeconds: z.ZodDefault<z.ZodNumber>;
|
|
1718
|
+
}, z.core.$strict>>>;
|
|
1683
1719
|
}, z.core.$strict>, z.ZodObject<{
|
|
1684
1720
|
team: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1685
1721
|
users: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
@@ -310,6 +310,15 @@ export declare const gmailSeedStateSchema: z.ZodObject<{
|
|
|
310
310
|
"seeded-mailboxes": "seeded-mailboxes";
|
|
311
311
|
}>>;
|
|
312
312
|
clock: z.ZodDefault<z.ZodString>;
|
|
313
|
+
faults: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
314
|
+
name: z.ZodEnum<{
|
|
315
|
+
"rate-limited": "rate-limited";
|
|
316
|
+
}>;
|
|
317
|
+
target: z.ZodDefault<z.ZodString>;
|
|
318
|
+
succeedFirst: z.ZodDefault<z.ZodNumber>;
|
|
319
|
+
throttleFor: z.ZodDefault<z.ZodNumber>;
|
|
320
|
+
retryAfterSeconds: z.ZodDefault<z.ZodNumber>;
|
|
321
|
+
}, z.core.$strict>>>;
|
|
313
322
|
}, z.core.$strip>;
|
|
314
323
|
export type GmailSeedState = z.infer<typeof gmailSeedStateSchema>;
|
|
315
324
|
export declare const linearSeedStateSchema: z.ZodObject<{
|
|
@@ -780,6 +789,15 @@ export declare const providerScopedSeedStateSchema: z.ZodObject<{
|
|
|
780
789
|
"seeded-mailboxes": "seeded-mailboxes";
|
|
781
790
|
}>>;
|
|
782
791
|
clock: z.ZodDefault<z.ZodString>;
|
|
792
|
+
faults: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
793
|
+
name: z.ZodEnum<{
|
|
794
|
+
"rate-limited": "rate-limited";
|
|
795
|
+
}>;
|
|
796
|
+
target: z.ZodDefault<z.ZodString>;
|
|
797
|
+
succeedFirst: z.ZodDefault<z.ZodNumber>;
|
|
798
|
+
throttleFor: z.ZodDefault<z.ZodNumber>;
|
|
799
|
+
retryAfterSeconds: z.ZodDefault<z.ZodNumber>;
|
|
800
|
+
}, z.core.$strict>>>;
|
|
783
801
|
}, z.core.$strip>;
|
|
784
802
|
}, z.core.$strip>>;
|
|
785
803
|
linear: z.ZodOptional<z.ZodObject<{
|
|
@@ -1320,6 +1338,15 @@ export declare const seedStateSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1320
1338
|
"seeded-mailboxes": "seeded-mailboxes";
|
|
1321
1339
|
}>>;
|
|
1322
1340
|
clock: z.ZodDefault<z.ZodString>;
|
|
1341
|
+
faults: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1342
|
+
name: z.ZodEnum<{
|
|
1343
|
+
"rate-limited": "rate-limited";
|
|
1344
|
+
}>;
|
|
1345
|
+
target: z.ZodDefault<z.ZodString>;
|
|
1346
|
+
succeedFirst: z.ZodDefault<z.ZodNumber>;
|
|
1347
|
+
throttleFor: z.ZodDefault<z.ZodNumber>;
|
|
1348
|
+
retryAfterSeconds: z.ZodDefault<z.ZodNumber>;
|
|
1349
|
+
}, z.core.$strict>>>;
|
|
1323
1350
|
}, z.core.$strip>;
|
|
1324
1351
|
}, z.core.$strip>>;
|
|
1325
1352
|
linear: z.ZodOptional<z.ZodObject<{
|