@tangle-network/agent-app 0.63.28 → 0.63.30
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/{TimelineEditor-VB2UJ34D.js → TimelineEditor-MUY35ULL.js} +3 -3
- package/dist/app-auth/index.js +3 -3
- package/dist/assistant/index.js +9 -9
- package/dist/chat-react/index.js +3 -3
- package/dist/chat-routes/default-backend.d.ts +19 -2
- package/dist/chat-routes/hybrid-producer.d.ts +7 -2
- package/dist/chat-routes/index.js +4 -4
- package/dist/chat-routes/route-storage.d.ts +1 -1
- package/dist/chat-routes/router-producer.d.ts +2 -1
- package/dist/chat-routes/turn-route-contracts.d.ts +1 -1
- package/dist/chunk-53ZX7XZY.js +371 -0
- package/dist/chunk-53ZX7XZY.js.map +1 -0
- package/dist/{chunk-56JUV4DK.js → chunk-5AUZR655.js} +3335 -3020
- package/dist/chunk-5AUZR655.js.map +1 -0
- package/dist/{chunk-IVBREL7A.js → chunk-5HBIN366.js} +10 -10
- package/dist/{chunk-A7JD27SN.js → chunk-6UMIOEDR.js} +13 -13
- package/dist/{chunk-QUT3T2IN.js → chunk-L3QR274L.js} +11 -3
- package/dist/chunk-L3QR274L.js.map +1 -0
- package/dist/chunk-N425HGJW.js +261 -0
- package/dist/chunk-N425HGJW.js.map +1 -0
- package/dist/{chunk-DCJCZ7EP.js → chunk-QLZ6A73E.js} +37 -19
- package/dist/chunk-QLZ6A73E.js.map +1 -0
- package/dist/{chunk-ZZTPTCMY.js → chunk-XJXAULNI.js} +7 -7
- package/dist/conformance/cli.d.ts +2 -0
- package/dist/conformance/cli.js +67 -0
- package/dist/conformance/cli.js.map +1 -0
- package/dist/conformance/index.d.ts +3 -0
- package/dist/conformance/index.js +9 -0
- package/dist/conformance/index.js.map +1 -0
- package/dist/conformance/revision.d.ts +13 -0
- package/dist/conformance/run.d.ts +48 -0
- package/dist/conformance/session.d.ts +24 -0
- package/dist/conformance/turns.d.ts +37 -0
- package/dist/design-canvas/index.js +6 -6
- package/dist/design-canvas-react/index.js +4 -4
- package/dist/model-resolution/index.js +1 -1
- package/dist/operator/index.js +24 -252
- package/dist/operator/index.js.map +1 -1
- package/dist/platform/index.js +8 -8
- package/dist/public-consultation/index.d.ts +2 -2
- package/dist/public-consultation/index.js +4 -4
- package/dist/sandbox/computer-files.d.ts +67 -0
- package/dist/sandbox/computer-receipts.d.ts +46 -0
- package/dist/sandbox/computer-step.d.ts +78 -0
- package/dist/sandbox/index.d.ts +4 -0
- package/dist/sandbox/index.js +23 -1
- package/dist/sandbox/router-models.d.ts +26 -0
- package/dist/sandbox/sandbox-run-tool.d.ts +5 -4
- package/dist/sequences-react/index.js +3 -3
- package/dist/settings-react/index.js +1 -1
- package/dist/web-react/index.js +28 -28
- package/dist/workspace-react/index.js +5 -5
- package/package.json +8 -2
- package/dist/chunk-56JUV4DK.js.map +0 -1
- package/dist/chunk-DCJCZ7EP.js.map +0 -1
- package/dist/chunk-QUT3T2IN.js.map +0 -1
- /package/dist/{TimelineEditor-VB2UJ34D.js.map → TimelineEditor-MUY35ULL.js.map} +0 -0
- /package/dist/{chunk-IVBREL7A.js.map → chunk-5HBIN366.js.map} +0 -0
- /package/dist/{chunk-A7JD27SN.js.map → chunk-6UMIOEDR.js.map} +0 -0
- /package/dist/{chunk-ZZTPTCMY.js.map → chunk-XJXAULNI.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/conformance/session.ts","../src/conformance/revision.ts","../src/conformance/turns.ts","../src/conformance/run.ts"],"sourcesContent":["/**\n * Sign-in for the conformance runner: the two ways a member reaches an agent app, and one question both answer,\n * \"does the app accept this session?\". Nothing here is specific to an app; a product whose sign-in differs\n * fails the check with the status it answered.\n */\n\nexport type SignInMode = 'password' | 'sso'\n\n/** A check failed for a reason worth reporting; its message is the cause. */\nexport class Failure extends Error {}\n\nexport interface MemberSession {\n origin: string\n /** A request to the app as the signed-in member; `path` is root-relative. */\n fetch(path: string, init?: RequestInit): Promise<Response>\n}\n\nconst REQUEST_MS = 30_000\n\n/** Cookies by origin: enough of a jar for one sign-in and the calls after it. */\nclass Jar {\n private readonly byOrigin = new Map<string, Map<string, string>>()\n\n header(url: string): string {\n return [...(this.byOrigin.get(new URL(url).origin) ?? [])].map(([name, value]) => `${name}=${value}`).join('; ')\n }\n\n async send(url: string, init: RequestInit = {}): Promise<Response> {\n const headers = new Headers(init.headers)\n const cookie = this.header(url)\n if (cookie) headers.set('cookie', cookie)\n const response = await fetch(url, { ...init, headers, redirect: 'manual', signal: init.signal ?? AbortSignal.timeout(REQUEST_MS) })\n this.absorb(url, response)\n return response\n }\n\n private absorb(url: string, response: Response): void {\n const origin = new URL(url).origin\n const jar = this.byOrigin.get(origin) ?? new Map<string, string>()\n for (const line of response.headers.getSetCookie()) {\n const [pair = '', ...attributes] = line.split(';')\n const eq = pair.indexOf('=')\n if (eq < 1) continue\n const name = pair.slice(0, eq).trim()\n const value = pair.slice(eq + 1).trim()\n const attribute = (key: string) => attributes.map(item => item.trim()).find(item => item.toLowerCase().startsWith(`${key}=`))?.slice(key.length + 1)\n const maxAge = attribute('max-age')\n const expires = attribute('expires')\n const gone = !value || (maxAge !== undefined && Number(maxAge) <= 0)\n || (maxAge === undefined && expires !== undefined && Date.parse(expires) <= Date.now())\n if (gone) jar.delete(name)\n else jar.set(name, value)\n }\n this.byOrigin.set(origin, jar)\n }\n}\n\nconst snippet = async (response: Response) => (await response.text().catch(() => '')).replace(/\\s+/g, ' ').slice(0, 160)\n\n/** A sign-in POST. An auth service that answers 429 is asked again after its Retry-After (at most 20 s), twice at most. */\nasync function postSignIn(jar: Jar, origin: string, email: string, password: string): Promise<Response> {\n for (let attempt = 0; ; attempt += 1) {\n const response = await jar.send(`${origin}/api/auth/sign-in/email`, {\n method: 'POST', headers: { 'content-type': 'application/json', origin }, body: JSON.stringify({ email, password }),\n })\n if (response.status !== 429 || attempt === 2) return response\n const wait = Number(response.headers.get('retry-after'))\n await response.body?.cancel().catch(() => {})\n await new Promise(resolve => setTimeout(resolve, Math.min(20, Number.isFinite(wait) && wait > 0 ? wait : 5) * 1000))\n }\n}\n\nasync function passwordSignIn(jar: Jar, origin: string, email: string, password: string): Promise<void> {\n const response = await postSignIn(jar, origin, email, password)\n if (response.status !== 200) throw new Failure(`password sign-in answered ${response.status}: ${await snippet(response)}`)\n}\n\nconst TANGLE_AUTH_PATH = /(^|\\/)auth\\/tangle\\//\n\n/**\n * The app's \"Log in with Tangle\": its start route sends the browser to Platform, Platform signs the member in and\n * authorizes, and the app's callback sets its own session. Apps mount the start route at `/auth/tangle/start` or\n * under `/api`.\n */\nasync function ssoSignIn(jar: Jar, origin: string, email: string, password: string): Promise<void> {\n const answers: string[] = []\n let location: string | null = null\n for (const path of ['/auth/tangle/start', '/api/auth/tangle/start']) {\n const start = await jar.send(`${origin}${path}`)\n location = start.headers.get('location')\n if (location) break\n answers.push(`${path} answered ${start.status}`)\n }\n if (!location) throw new Failure(`SSO start sent the member nowhere (${answers.join('; ')})`)\n const authorize = new URL(location, origin)\n const platform = authorize.origin\n const member = await postSignIn(jar, platform, email, password)\n if (member.status !== 200) throw new Failure(`Platform sign-in answered ${member.status}: ${await snippet(member)}`)\n let next = authorize.href\n for (let hop = 0; hop < 8; hop += 1) {\n const response = await jar.send(next)\n const redirect = response.headers.get('location')\n if (!redirect) throw new Failure(`SSO stopped at ${new URL(next).pathname} with ${response.status}`)\n const url = new URL(redirect, next)\n if (url.origin === origin && !TANGLE_AUTH_PATH.test(url.pathname)) {\n if (url.pathname.startsWith('/login') || url.searchParams.has('error') || url.searchParams.get('connection') === 'failed') {\n throw new Failure(`the app's SSO callback sent the member to ${url.pathname}${url.search.slice(0, 80)}`)\n }\n return\n }\n next = url.href\n }\n throw new Failure('SSO did not return to the app within 8 redirects')\n}\n\n/** A redirect to sign-in or an error page is an app that did not accept the session. */\nasync function sessionAccepted(session: MemberSession): Promise<string> {\n const who = await session.fetch('/api/auth/get-session')\n if (who.status === 200) {\n const body = await who.json().catch(() => null) as { user?: { id?: unknown } } | null\n if (typeof body?.user?.id === 'string' && body.user.id) return 'GET /api/auth/get-session returned the user'\n }\n const workspaces = await session.fetch('/api/workspaces')\n if (workspaces.status === 200) return 'GET /api/workspaces answered 200 as the member'\n throw new Failure(`signed in, but the app does not accept the session: GET /api/auth/get-session answered ${who.status}, GET /api/workspaces ${workspaces.status}`)\n}\n\n/** Signs in and proves the app accepts the session; the detail names the proof. */\nexport async function signIn(input: { origin: string; mode: SignInMode; email: string; password: string }): Promise<{ session: MemberSession; detail: string }> {\n const jar = new Jar()\n if (input.mode === 'password') await passwordSignIn(jar, input.origin, input.email, input.password)\n else await ssoSignIn(jar, input.origin, input.email, input.password)\n const session: MemberSession = {\n origin: input.origin,\n fetch: (path, init = {}) => {\n const headers = new Headers(init.headers)\n if (!headers.has('origin')) headers.set('origin', input.origin)\n return jar.send(`${input.origin}${path}`, { ...init, headers })\n },\n }\n return { session, detail: `${input.mode}: ${await sessionAccepted(session)}` }\n}\n","/**\n * The served revision, read the way an operator reads it: from the app's own `GET /api/health` body, or from the\n * `x-<app>-revision` / `x-<app>-version` header the app puts on its responses. An app that serves neither cannot\n * say what it is running, so a release cannot be told from the one before it.\n */\n\nimport { Failure } from './session.js'\n\nconst REVISION_HEADER = /^x-[a-z0-9-]+-(revision|version)$/i\nconst REQUEST_MS = 20_000\n\nconst text = (value: unknown): string | null => typeof value === 'string' && value.trim() ? value.trim() : null\n\n/** The revision a health body carries: `revision`, or what `release` carries. */\nfunction fromHealth(body: unknown): string | null {\n if (!body || typeof body !== 'object') return null\n const record = body as Record<string, unknown>\n const release = record.release && typeof record.release === 'object' ? record.release as Record<string, unknown> : {}\n return text(record.revision) ?? text(release.revision) ?? text(release.sha) ?? text(release.tag)\n}\n\nfunction fromHeaders(response: Response): { name: string; value: string } | null {\n for (const [name, value] of response.headers) if (REVISION_HEADER.test(name) && value.trim()) return { name, value: value.trim() }\n return null\n}\n\n/**\n * Reads the revision, or throws a Failure naming every place it looked. `source` says where it was read, e.g.\n * `GET /api/health` or `GET / x-creative-revision`.\n */\nexport async function readRevision(origin: string, expect?: string): Promise<{ revision: string; source: string }> {\n const looked: string[] = []\n const found = await (async (): Promise<{ revision: string; source: string } | null> => {\n for (const path of ['/api/health', '/']) {\n let response: Response\n try {\n response = await fetch(`${origin}${path}`, { headers: { accept: 'application/json' }, redirect: 'manual', signal: AbortSignal.timeout(REQUEST_MS) })\n } catch (error) {\n looked.push(`GET ${path} failed (${error instanceof Error ? error.name : 'error'})`)\n continue\n }\n const header = fromHeaders(response)\n if (path === '/api/health' && response.ok) {\n const revision = fromHealth(await response.json().catch(() => null))\n if (revision) return { revision, source: 'GET /api/health' }\n }\n if (header) return { revision: header.value, source: `GET ${path} ${header.name}` }\n await response.body?.cancel().catch(() => {})\n looked.push(`GET ${path} answered ${response.status} without a revision`)\n }\n return null\n })()\n if (!found) throw new Failure(`the app serves no readable revision (${looked.join('; ')})`)\n if (expect) {\n const [a, b] = [found.revision.toLowerCase(), expect.trim().toLowerCase()]\n if (b.length < 7 || !(a.startsWith(b) || b.startsWith(a))) {\n throw new Failure(`the app serves revision ${found.revision} (${found.source}), not the expected ${expect}`)\n }\n }\n return found\n}\n","/**\n * The conformance turns, run through the operator API every agent app mounts the same way\n * (docs/operator-api.md), so one runner drives every product. The verdict is the settled turn the app stored.\n *\n * plain a reply with text;\n * computer a turn only the workspace computer can answer: either the digest of a fresh nonce, which the model\n * cannot know without running the command, or a file the computer saves that the app then serves back.\n */\n\nimport { createHash, randomBytes, randomUUID } from 'node:crypto'\nimport { createOperatorClient, type OperatorClient } from '../operator/client.js'\nimport type { OperatorTurn, OperatorWorkspace } from '../operator/contract.js'\nimport { Failure, type MemberSession } from './session.js'\n\nexport type ComputerProof = 'digest' | 'file'\n\nconst REQUEST_MS = 30_000\nconst KEY_LIFETIME_MS = 60 * 60_000\n\nexport interface OperatorAccess {\n client: OperatorClient\n workspace: OperatorWorkspace\n /** The app's own account of what the key may do. */\n scopes: readonly string[]\n}\n\n/** An expiring key for the signed-in member, through the route every app's API access page uses. */\nexport async function mintKey(session: MemberSession): Promise<{ id: string; key: string }> {\n const response = await session.fetch('/api/keys', {\n method: 'POST', headers: { 'content-type': 'application/json' }, signal: AbortSignal.timeout(REQUEST_MS),\n body: JSON.stringify({\n name: `conformance ${new Date().toISOString()}`, scopes: ['operator:read', 'operator:run'],\n expiresAt: new Date(Date.now() + KEY_LIFETIME_MS).toISOString(), workspaceIds: [],\n }),\n })\n if (response.status === 404) {\n throw new Failure('the app has no key route (POST /api/keys answered 404), so a conformance turn has no credential; give it an operator key')\n }\n const body = await response.json().catch(() => null) as { id?: unknown; key?: unknown; error?: unknown } | null\n if (!response.ok || typeof body?.id !== 'string' || typeof body.key !== 'string') {\n throw new Failure(`POST /api/keys answered ${response.status}: ${typeof body?.error === 'string' ? body.error.slice(0, 160) : 'no key in the response'}`)\n }\n return { id: body.id, key: body.key }\n}\n\n/** Revokes a key this run created. Apps accept the id in the path, or in the body of the collection route. */\nexport async function revokeKey(session: MemberSession, id: string): Promise<void> {\n const byPath = await session.fetch(`/api/keys/${encodeURIComponent(id)}`, { method: 'DELETE', signal: AbortSignal.timeout(REQUEST_MS) })\n if (byPath.ok) return\n const byBody = await session.fetch('/api/keys', {\n method: 'DELETE', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ id }), signal: AbortSignal.timeout(REQUEST_MS),\n })\n if (byBody.ok) return\n throw new Failure(`the minted key ${id} was not revoked: DELETE /api/keys/:id answered ${byPath.status}, DELETE /api/keys ${byBody.status} (it expires within the hour)`)\n}\n\n/**\n * Opens the operator API with `key` and picks the workspace the turns run in: `workspace` is its id or exact name,\n * and omitted, the key must reach exactly one. `requestMs` bounds any one request, a held turn read included.\n */\nexport async function openOperatorAccess(\n { origin, key, workspace, requestMs }: { origin: string; key: string; workspace: string | undefined; requestMs: number },\n): Promise<OperatorAccess> {\n const client = createOperatorClient({\n origin,\n getApiKey: () => key,\n fetchImpl: (url, init) => fetch(url, { ...init, signal: init?.signal ? AbortSignal.any([init.signal, AbortSignal.timeout(requestMs)]) : AbortSignal.timeout(requestMs) }),\n })\n const described = await client.describe()\n if (!described.succeeded) throw new Failure(`GET /api/operator/v1 answered ${described.status} ${described.code}: ${described.error.slice(0, 160)}`)\n const scopes = described.value.principal.scopes\n const missing = ['operator:read', 'operator:run'].filter(scope => !scopes.includes(scope) && !scopes.includes('*'))\n if (missing.length) throw new Failure(`the operator key lacks ${missing.join(' and ')}`)\n const listed = await client.listWorkspaces()\n if (!listed.succeeded) throw new Failure(`GET /api/operator/v1/workspaces answered ${listed.status} ${listed.code}: ${listed.error.slice(0, 160)}`)\n const chosen = workspace\n ? listed.value.filter(candidate => candidate.id === workspace || candidate.name === workspace)\n : listed.value.length === 1 ? listed.value : []\n if (chosen.length !== 1) {\n const names = listed.value.slice(0, 12).map(candidate => `${candidate.name} (${candidate.id.slice(0, 8)})`).join(', ')\n throw new Failure(workspace\n ? `${chosen.length} of the key's ${listed.value.length} workspaces match \"${workspace}\": ${names}`\n : `the key reaches ${listed.value.length} workspaces; name the canary workspace: ${names}`)\n }\n return { client, workspace: chosen[0]!, scopes }\n}\n\nconst reply = (turn: OperatorTurn) => (turn.reply?.content ?? '').trim()\n\n/** One turn on a new thread, followed until it settles. */\nasync function runTurn(access: OperatorAccess, title: string, content: string, turnMs: number): Promise<{ turn: OperatorTurn; where: string }> {\n const turnId = randomUUID()\n const started = await access.client.startTurn(access.workspace.id, { turnId, content, title })\n if (!started.succeeded) throw new Failure(`the turn was refused: ${started.status} ${started.code}: ${started.error.slice(0, 200)}`)\n const where = `thread ${started.value.threadId}`\n const settled = await access.client.waitForTurn(access.workspace.id, started.value.threadId, started.value.turnId, { timeoutMs: turnMs })\n if (!settled.succeeded) throw new Failure(`reading the turn answered ${settled.status} ${settled.code}: ${settled.error.slice(0, 160)} (${where})`)\n const turn = settled.value\n if (turn.state === 'failed') throw new Failure(`the turn failed${turn.failure?.code ? ` (${turn.failure.code})` : ''}: ${(turn.failure?.message ?? 'no message').slice(0, 300)} (${where})`)\n if (turn.state === 'input-required' || turn.approvals.length > 0) throw new Failure(`the turn is waiting on a decision, which no one can answer in a conformance run (${where})`)\n if (turn.state !== 'succeeded') throw new Failure(`the turn had not settled after ${Math.round(turnMs / 1000)} s (state ${turn.state}; ${where})`)\n return { turn, where }\n}\n\nexport async function plainTurn(access: OperatorAccess, turnMs: number): Promise<string> {\n const { turn, where } = await runTurn(access, 'Conformance: plain turn',\n 'Conformance check: reply with one short sentence confirming you can answer.', turnMs)\n if (!reply(turn)) throw new Failure(`the turn succeeded with an empty reply (${where})`)\n return `${reply(turn).length} characters (${where})`\n}\n\nexport async function computerTurn(access: OperatorAccess, turnMs: number, proof: ComputerProof, fileDir: string): Promise<string> {\n const nonce = `conformance-${randomBytes(12).toString('hex')}`\n if (proof === 'digest') {\n const digest = createHash('sha256').update(nonce).digest('hex')\n const { turn, where } = await runTurn(access, 'Conformance: computer turn',\n 'Conformance check: run this exact shell command on the workspace computer (sandbox_run when you have it), then reply with only '\n + `the 64-character hex digest it prints:\\nprintf %s '${nonce}' | sha256sum`, turnMs)\n if (!reply(turn).includes(digest)) {\n throw new Failure(`the reply does not hold the digest of the fresh nonce, so the computer did not run the command: \"${reply(turn).slice(0, 160)}\" (${where})`)\n }\n return `the reply carries the digest ${digest.slice(0, 12)}… (${where})`\n }\n const path = `${fileDir.replace(/\\/+$/, '')}/${nonce}.md`\n const { where } = await runTurn(access, 'Conformance: computer turn',\n `Conformance check: use the workspace computer to save a file at ${path} whose whole content is this one line, then reply with the word saved:\\n${nonce}`, turnMs)\n const read = await access.client.readFile(access.workspace.id, path)\n if (!read.succeeded) throw new Failure(`the turn succeeded, but the app does not serve ${path}: ${read.status} ${read.code} (${where})`)\n if (read.value.content.trim() !== nonce) {\n throw new Failure(`${path} holds ${JSON.stringify(read.value.content.slice(0, 80))}, not the nonce (${where})`)\n }\n return `the app serves ${path} with the nonce (${where})`\n}\n","import { readRevision } from './revision.js'\nimport { Failure, signIn, type MemberSession, type SignInMode } from './session.js'\nimport { computerTurn, mintKey, openOperatorAccess, plainTurn, revokeKey, type ComputerProof, type OperatorAccess } from './turns.js'\n\nexport type CheckName = 'sign-in' | 'revision' | 'operator-access' | 'plain-turn' | 'computer-turn' | 'key-revoke'\n\n/**\n * One check's verdict. `blocked` means an earlier check it depends on failed, so nothing was measured; a blocked\n * check fails the run like a failed one, and its cause names the check that blocked it.\n */\nexport interface CheckResult {\n /** When the check started, ISO 8601. */\n at: string\n app: string\n url: string\n check: CheckName\n status: 'pass' | 'fail' | 'blocked'\n ms: number\n /** Why a failed or blocked check is not a pass. */\n cause?: string\n /** What a passing check observed: the revision read, the thread a turn ran in. */\n detail?: string\n}\n\nexport interface ConformanceOptions {\n /** A label for the result lines, e.g. `gtm`. */\n app: string\n /** The deployed origin, e.g. `https://gtm.tangle.tools`. */\n origin: string\n /** The member that signs in. Required: sign-in is the first thing a customer does. */\n member?: { mode: SignInMode; email: string; password: string }\n /** A key that already has `operator:read` and `operator:run`; without one, the signed-in member mints a one-hour key. */\n operatorKey?: string\n /** Id or exact name of the workspace the turns run in: the app's canary or smoke workspace, never a customer's. */\n workspace?: string\n /** `digest` hashes a fresh nonce on the workspace computer; `file` has the computer save a file the app serves back. */\n computer?: ComputerProof\n /** Where the `file` proof is saved, relative to the workspace root. */\n fileDir?: string\n /** The budget of each turn, a cold box included. */\n turnMs?: number\n /** Fail unless the served revision starts with, or is a prefix of, this. */\n expectRevision?: string\n /** Called with each result as it lands. */\n onResult?(result: CheckResult): void\n}\n\nconst DEFAULT_TURN_MS = 300_000\n\n/** Why an unexpected error is not a pass, in a line. */\nfunction describe(error: unknown): string {\n if (error instanceof Failure) return error.message\n if (error instanceof Error) {\n const cause = error.cause as { code?: unknown } | undefined\n return `${error.name}: ${error.message}${typeof cause?.code === 'string' ? ` (${cause.code})` : ''}`\n }\n return String(error)\n}\n\n/** Runs the checks against one deployed app and returns every result, in the order they ran. */\nexport async function checkDeployedApp(options: ConformanceOptions): Promise<CheckResult[]> {\n const origin = options.origin.replace(/\\/+$/, '')\n const turnMs = options.turnMs ?? DEFAULT_TURN_MS\n const secrets = [options.member?.password, options.operatorKey].filter((value): value is string => Boolean(value && value.length >= 6))\n const redact = (text: string) => secrets.reduce((out, secret) => out.split(secret).join('[redacted]'), text)\n const results: CheckResult[] = []\n\n const record = (result: CheckResult) => {\n const clean = { ...result, ...(result.cause ? { cause: redact(result.cause) } : {}), ...(result.detail ? { detail: redact(result.detail) } : {}) }\n results.push(clean)\n options.onResult?.(clean)\n }\n /** Runs `body`; whatever it returns is the passing detail, whatever it throws is the cause. */\n async function check<T>(name: CheckName, body: () => Promise<{ value: T; detail?: string }>): Promise<T | undefined> {\n const at = new Date().toISOString()\n const started = Date.now()\n const base = { at, app: options.app, url: origin, check: name }\n try {\n const { value, detail } = await body()\n record({ ...base, status: 'pass', ms: Date.now() - started, ...(detail ? { detail } : {}) })\n return value\n } catch (error) {\n record({ ...base, status: 'fail', ms: Date.now() - started, cause: describe(error) })\n return undefined\n }\n }\n const blocked = (name: CheckName, because: string) =>\n record({ at: new Date().toISOString(), app: options.app, url: origin, check: name, status: 'blocked', ms: 0, cause: because })\n\n let session: MemberSession | undefined\n if (!options.member) {\n const at = new Date().toISOString()\n record({ at, app: options.app, url: origin, check: 'sign-in', status: 'fail', ms: 0, cause: 'no member is configured: give the canary member email and password' })\n } else {\n const member = options.member\n session = await check('sign-in', async () => {\n const signedIn = await signIn({ origin, ...member })\n return { value: signedIn.session, detail: signedIn.detail }\n })\n }\n\n await check('revision', async () => {\n const served = await readRevision(origin, options.expectRevision)\n return { value: served, detail: `${served.revision} (${served.source})` }\n })\n\n let minted: { id: string } | null = null\n let access: OperatorAccess | undefined\n if (!options.operatorKey && !session) {\n blocked('operator-access', 'blocked by sign-in: no operator key is configured, and the member did not sign in to mint one')\n } else {\n access = await check('operator-access', async () => {\n let secret = options.operatorKey\n if (!secret) {\n const created = await mintKey(session!)\n secrets.push(created.key)\n secret = created.key\n minted = { id: created.id }\n }\n const opened = await openOperatorAccess({ origin, key: secret, workspace: options.workspace, requestMs: turnMs + 60_000 })\n return {\n value: opened,\n detail: `${minted ? 'a minted one-hour key' : 'the configured operator key'} reaches \"${opened.workspace.name}\" with ${opened.scopes.join(', ')}`,\n }\n })\n }\n\n if (access) {\n const open = access\n await check('plain-turn', async () => ({ value: true, detail: await plainTurn(open, turnMs) }))\n await check('computer-turn', async () => ({\n value: true, detail: await computerTurn(open, turnMs, options.computer ?? 'digest', options.fileDir ?? 'proof'),\n }))\n } else {\n blocked('plain-turn', 'blocked by operator-access')\n blocked('computer-turn', 'blocked by operator-access')\n }\n\n // A key this run minted is revoked whether or not the turns ran: it names the member and would outlive the run.\n const mintedKey = minted as { id: string } | null\n if (mintedKey && session) {\n const member = session\n await check('key-revoke', async () => {\n await revokeKey(member, mintedKey.id)\n return { value: true, detail: 'the minted key was revoked' }\n })\n }\n return results\n}\n"],"mappings":";;;;;AASO,IAAM,UAAN,cAAsB,MAAM;AAAC;AAQpC,IAAM,aAAa;AAGnB,IAAM,MAAN,MAAU;AAAA,EACS,WAAW,oBAAI,IAAiC;AAAA,EAEjE,OAAO,KAAqB;AAC1B,WAAO,CAAC,GAAI,KAAK,SAAS,IAAI,IAAI,IAAI,GAAG,EAAE,MAAM,KAAK,CAAC,CAAE,EAAE,IAAI,CAAC,CAAC,MAAM,KAAK,MAAM,GAAG,IAAI,IAAI,KAAK,EAAE,EAAE,KAAK,IAAI;AAAA,EACjH;AAAA,EAEA,MAAM,KAAK,KAAa,OAAoB,CAAC,GAAsB;AACjE,UAAM,UAAU,IAAI,QAAQ,KAAK,OAAO;AACxC,UAAM,SAAS,KAAK,OAAO,GAAG;AAC9B,QAAI,OAAQ,SAAQ,IAAI,UAAU,MAAM;AACxC,UAAM,WAAW,MAAM,MAAM,KAAK,EAAE,GAAG,MAAM,SAAS,UAAU,UAAU,QAAQ,KAAK,UAAU,YAAY,QAAQ,UAAU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