@somewhere-cloud/cli 0.38.49 → 0.38.53
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/commands/advisor.d.ts +9 -0
- package/dist/commands/ai.d.ts +2 -0
- package/dist/commands/api.d.ts +14 -0
- package/dist/commands/auth.d.ts +30 -0
- package/dist/commands/browser.d.ts +247 -0
- package/dist/commands/call.d.ts +22 -0
- package/dist/commands/catalog.d.ts +16 -0
- package/dist/commands/check.d.ts +114 -0
- package/dist/commands/claim.d.ts +5 -0
- package/dist/commands/cron.d.ts +14 -0
- package/dist/commands/db-rows.d.ts +2 -0
- package/dist/commands/db.d.ts +2 -0
- package/dist/commands/deploy.d.ts +235 -0
- package/dist/commands/dev.d.ts +171 -0
- package/dist/commands/docs.d.ts +85 -0
- package/dist/commands/email.d.ts +8 -0
- package/dist/commands/env.d.ts +2 -0
- package/dist/commands/errors.d.ts +2 -0
- package/dist/commands/feedback.d.ts +2 -0
- package/dist/commands/fs.d.ts +2 -0
- package/dist/commands/git.d.ts +2 -0
- package/dist/commands/grep.d.ts +2 -0
- package/dist/commands/hooks.d.ts +2 -0
- package/dist/commands/init.d.ts +17 -0
- package/dist/commands/link.d.ts +8 -0
- package/dist/commands/lint.d.ts +2 -0
- package/dist/commands/logs.d.ts +2 -0
- package/dist/commands/mcp.d.ts +4 -0
- package/dist/commands/open.d.ts +2 -0
- package/dist/commands/postgres.d.ts +2 -0
- package/dist/commands/project.d.ts +8 -0
- package/dist/commands/promote.d.ts +28 -0
- package/dist/commands/pull.d.ts +2 -0
- package/dist/commands/restore.d.ts +5 -0
- package/dist/commands/rollback.d.ts +21 -0
- package/dist/commands/run.d.ts +2 -0
- package/dist/commands/skills.d.ts +2 -0
- package/dist/commands/status.d.ts +27 -0
- package/dist/commands/support.d.ts +2 -0
- package/dist/commands/tasks.d.ts +2 -0
- package/dist/commands/test-users.d.ts +4 -0
- package/dist/commands/test.d.ts +2 -0
- package/dist/commands/test.js +100 -0
- package/dist/commands/test.js.map +1 -0
- package/dist/commands/typecheck.d.ts +9 -0
- package/dist/commands/update.d.ts +25 -0
- package/dist/commands/upgrade.d.ts +12 -0
- package/dist/commands/usage.d.ts +2 -0
- package/dist/commands/verify.d.ts +419 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/advisor-context.d.ts +20 -0
- package/dist/lib/advisor-runs.d.ts +26 -0
- package/dist/lib/agent-hooks.d.ts +74 -0
- package/dist/lib/allowed-origins.d.ts +11 -0
- package/dist/lib/auth.d.ts +12 -0
- package/dist/lib/base-files.d.ts +31 -0
- package/dist/lib/browser-actions.d.ts +106 -0
- package/dist/lib/browser-flow-preflight.d.ts +6 -0
- package/dist/lib/browser-refusal.d.ts +17 -0
- package/dist/lib/browser-run.d.ts +102 -0
- package/dist/lib/build-errors.d.ts +24 -0
- package/dist/lib/chrome.d.ts +66 -0
- package/dist/lib/claim-handoff.d.ts +11 -0
- package/dist/lib/client.d.ts +150 -0
- package/dist/lib/config.d.ts +125 -0
- package/dist/lib/declared-data.d.ts +50 -0
- package/dist/lib/deploy-check.d.ts +56 -0
- package/dist/lib/device-login.d.ts +41 -0
- package/dist/lib/device.d.ts +2 -0
- package/dist/lib/envfile-write.d.ts +17 -0
- package/dist/lib/files.d.ts +111 -0
- package/dist/lib/frontend-dev.d.ts +28 -0
- package/dist/lib/generic-lint.d.ts +9 -0
- package/dist/lib/help-summary.d.ts +2 -0
- package/dist/lib/http.d.ts +9 -0
- package/dist/lib/init-agent-guide.d.ts +13 -0
- package/dist/lib/init-feature-template.d.ts +8 -0
- package/dist/lib/init-feature-template.js +10 -7
- package/dist/lib/init-feature-template.js.map +1 -1
- package/dist/lib/init-features.d.ts +50 -0
- package/dist/lib/init-green-template.d.ts +2 -0
- package/dist/lib/init-install.d.ts +14 -0
- package/dist/lib/init-scaffold.d.ts +44 -0
- package/dist/lib/init-template.d.ts +2 -0
- package/dist/lib/init-test-template.d.ts +2 -0
- package/dist/lib/init-test-template.js +44 -21
- package/dist/lib/init-test-template.js.map +1 -1
- package/dist/lib/init-ui-kit.d.ts +8 -0
- package/dist/lib/last-run.d.ts +38 -0
- package/dist/lib/link-hint.d.ts +5 -0
- package/dist/lib/next-actions.d.ts +48 -0
- package/dist/lib/notify/index.d.ts +18 -0
- package/dist/lib/notify/providers/update.d.ts +45 -0
- package/dist/lib/notify/types.d.ts +25 -0
- package/dist/lib/open.d.ts +1 -0
- package/dist/lib/output.d.ts +61 -0
- package/dist/lib/platform-command.d.ts +6 -0
- package/dist/lib/platform-contract.d.ts +26 -0
- package/dist/lib/platform-tools.d.ts +77 -0
- package/dist/lib/playwright-fixtures.d.ts +20 -0
- package/dist/lib/playwright-fixtures.js +171 -0
- package/dist/lib/playwright-fixtures.js.map +1 -0
- package/dist/lib/post-live-render.d.ts +48 -0
- package/dist/lib/project-notices.d.ts +18 -0
- package/dist/lib/project-pin.d.ts +57 -0
- package/dist/lib/project-ref.d.ts +32 -0
- package/dist/lib/project-urls.d.ts +18 -0
- package/dist/lib/promote-handoff.d.ts +65 -0
- package/dist/lib/promote-outcome.d.ts +98 -0
- package/dist/lib/publish-surface.d.ts +8 -0
- package/dist/lib/repro-packet.d.ts +35 -0
- package/dist/lib/scaffold.d.ts +46 -0
- package/dist/lib/skills-pack.d.ts +81 -0
- package/dist/lib/skills-pack.generated.d.ts +2 -0
- package/dist/lib/source-lint.d.ts +42 -0
- package/dist/lib/spinner.d.ts +14 -0
- package/dist/lib/startup-notice.d.ts +23 -0
- package/dist/lib/surface-counts.d.ts +88 -0
- package/dist/lib/temp-auth.d.ts +53 -0
- package/dist/lib/terminal-text.d.ts +10 -0
- package/dist/lib/test-diagnostics.d.ts +16 -0
- package/dist/lib/test-diagnostics.js +29 -0
- package/dist/lib/test-diagnostics.js.map +1 -0
- package/dist/lib/test-identities.d.ts +122 -0
- package/dist/lib/test-identities.js +1 -1
- package/dist/lib/test-identities.js.map +1 -1
- package/dist/lib/test-reporter.d.ts +12 -0
- package/dist/lib/test-reporter.js +30 -0
- package/dist/lib/test-reporter.js.map +1 -0
- package/dist/lib/typecheck-version.d.ts +1 -0
- package/dist/lib/typecheck.d.ts +136 -0
- package/dist/lib/update-security.d.ts +25 -0
- package/dist/lib/vendor/deploy-paths.d.ts +21 -0
- package/dist/lib/vendor/repro-guidance.d.ts +111 -0
- package/dist/lib/verify-keep.d.ts +92 -0
- package/dist/lib/verify-progress.d.ts +2 -0
- package/dist/lib/verify-report.d.ts +4 -0
- package/dist/lib/version.d.ts +1 -0
- package/dist/testing.d.ts +37 -0
- package/dist/testing.js +2 -0
- package/dist/testing.js.map +1 -1
- package/dist/types.d.ts +104 -0
- package/npm-shrinkwrap.json +48 -2
- package/package.json +14 -3
- package/runtime/PLATFORM-SOURCE.json +1 -1
- package/runtime/SOURCE-LINT-VENDOR.json +1 -1
- package/src/testing.ts +3 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import type { ApiClient } from './client.js';
|
|
2
|
+
export declare const TEST_STATE_DIR: string;
|
|
3
|
+
export declare const TEST_STATE_GITIGNORE_LINE = ".somewhere/test/";
|
|
4
|
+
export declare const MANIFEST_FILE = "manifest.json";
|
|
5
|
+
export declare const CLEANUP_RECEIPT_FILE = "cleanup-receipt.json";
|
|
6
|
+
export declare const MAX_PER_CREATE = 5;
|
|
7
|
+
export type TestRole = 'user' | 'admin';
|
|
8
|
+
export interface ActorSpec {
|
|
9
|
+
name: string;
|
|
10
|
+
role: TestRole;
|
|
11
|
+
}
|
|
12
|
+
export interface ManifestActor {
|
|
13
|
+
name: string;
|
|
14
|
+
user_id: string;
|
|
15
|
+
email: string;
|
|
16
|
+
role: TestRole;
|
|
17
|
+
created_at: string;
|
|
18
|
+
access_expires_at: string;
|
|
19
|
+
session_expires_at: string;
|
|
20
|
+
state_file: string;
|
|
21
|
+
}
|
|
22
|
+
export interface TestManifest {
|
|
23
|
+
schema: 1;
|
|
24
|
+
project_id: string;
|
|
25
|
+
origin: string;
|
|
26
|
+
run_id: string;
|
|
27
|
+
created_at: string;
|
|
28
|
+
/** Every identity this run created, written as each create succeeds, so cleanup can reconcile a partial run. */
|
|
29
|
+
actors: ManifestActor[];
|
|
30
|
+
status: 'preparing' | 'prepared' | 'partial';
|
|
31
|
+
retained_note: string;
|
|
32
|
+
}
|
|
33
|
+
export declare const RETAINED_NOTE = "Deleting a test identity removes its sign-in records only. App rows, files and stored test mail it created are kept; use a disposable project for full isolation.";
|
|
34
|
+
/** `alice`, `bob:admin` → specs; names are unique and file-safe. */
|
|
35
|
+
export declare function parseActorSpecs(values: string[]): ActorSpec[];
|
|
36
|
+
/** The project's production origin, exactly; anything else is refused rather than guessed. */
|
|
37
|
+
export declare function productionOrigin(prodFallback: unknown, requested?: string): {
|
|
38
|
+
origin: string;
|
|
39
|
+
host: string;
|
|
40
|
+
};
|
|
41
|
+
export declare function stateDir(root: string): string;
|
|
42
|
+
export declare function ensurePrivateDir(dir: string): void;
|
|
43
|
+
/** Atomic 0600 write: a reader never sees a partial or world-readable file. */
|
|
44
|
+
export declare function writePrivateFile(path: string, content: string): void;
|
|
45
|
+
/** Make sure git ignores the state directory; create .gitignore if the folder has none. */
|
|
46
|
+
export declare function ensureGitignored(root: string): 'present' | 'added' | 'created';
|
|
47
|
+
/** The manifest is a file on disk that may have been committed or edited, so every field later used
|
|
48
|
+
* to touch the filesystem or the API is validated here: an actor's state file is always exactly
|
|
49
|
+
* `<name>.state.json` for a valid actor name, so cleanup can never delete outside .somewhere/test/. */
|
|
50
|
+
export declare function readManifest(root: string): TestManifest | null;
|
|
51
|
+
export declare function writeManifest(root: string, manifest: TestManifest): void;
|
|
52
|
+
/** The server's own times, read from the access token (not verified here; the server does that). */
|
|
53
|
+
export declare function tokenTimes(accessToken: string): {
|
|
54
|
+
iat: number;
|
|
55
|
+
exp: number;
|
|
56
|
+
} | null;
|
|
57
|
+
export interface IssuedIdentity {
|
|
58
|
+
user: {
|
|
59
|
+
id: string;
|
|
60
|
+
email: string;
|
|
61
|
+
role?: string;
|
|
62
|
+
email_verified?: boolean;
|
|
63
|
+
test?: boolean;
|
|
64
|
+
created_at?: number;
|
|
65
|
+
};
|
|
66
|
+
access_token: string;
|
|
67
|
+
refresh_token: string;
|
|
68
|
+
expires_in: number;
|
|
69
|
+
session_ttl_seconds: number;
|
|
70
|
+
}
|
|
71
|
+
export interface PlaywrightStorageState {
|
|
72
|
+
cookies: Array<{
|
|
73
|
+
name: string;
|
|
74
|
+
value: string;
|
|
75
|
+
domain: string;
|
|
76
|
+
path: string;
|
|
77
|
+
expires: number;
|
|
78
|
+
httpOnly: boolean;
|
|
79
|
+
secure: boolean;
|
|
80
|
+
sameSite: 'Lax';
|
|
81
|
+
}>;
|
|
82
|
+
origins: Array<{
|
|
83
|
+
origin: string;
|
|
84
|
+
localStorage: Array<{
|
|
85
|
+
name: string;
|
|
86
|
+
value: string;
|
|
87
|
+
}>;
|
|
88
|
+
}>;
|
|
89
|
+
}
|
|
90
|
+
/** Standard Playwright storageState for one actor, mirroring the hosted-verify seed exactly. */
|
|
91
|
+
export declare function buildStorageState(origin: string, host: string, issued: IssuedIdentity, times: {
|
|
92
|
+
accessExpiresAt: number;
|
|
93
|
+
sessionExpiresAt: number;
|
|
94
|
+
}): PlaywrightStorageState;
|
|
95
|
+
/** Validate one create-response entry; tokens are required for a usable state file. */
|
|
96
|
+
export declare function parseIssued(entry: unknown): IssuedIdentity;
|
|
97
|
+
/** Absolute expiry from the server's own token times; local clock only if the token has none. */
|
|
98
|
+
export declare function expiryOf(issued: IssuedIdentity, receivedAt: number): {
|
|
99
|
+
accessExpiresAt: number;
|
|
100
|
+
sessionExpiresAt: number;
|
|
101
|
+
source: 'token' | 'response';
|
|
102
|
+
};
|
|
103
|
+
export declare function createTestIdentities(client: ApiClient, projectId: string, role: TestRole, count: number, label: string): Promise<{
|
|
104
|
+
issued: IssuedIdentity[];
|
|
105
|
+
receivedAt: number;
|
|
106
|
+
}>;
|
|
107
|
+
/** Fresh, unused mailbox address on the project's test domain, for testing real signup. */
|
|
108
|
+
export declare function freshTestAddress(subdomain: string, prefix?: string): string;
|
|
109
|
+
export interface InboxMessage {
|
|
110
|
+
id: string;
|
|
111
|
+
to: string;
|
|
112
|
+
subject: string;
|
|
113
|
+
verification_code: string | null;
|
|
114
|
+
magic_link: string | null;
|
|
115
|
+
created_at: string;
|
|
116
|
+
}
|
|
117
|
+
/** Messages for exactly `address` created after `since`, newest first. The server's `since` only
|
|
118
|
+
* drives the long-poll; the list is filtered here so a stale code is never returned. */
|
|
119
|
+
export declare function messagesAfter(messages: unknown, address: string, since: number): InboxMessage[];
|
|
120
|
+
/** --since accepts epoch milliseconds or an ISO time. */
|
|
121
|
+
export declare function parseSince(value: string): number;
|
|
122
|
+
export declare function removeStateFiles(root: string, actors: ManifestActor[]): string[];
|
|
@@ -194,7 +194,7 @@ export async function createTestIdentities(client, projectId, role, count, label
|
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
if (problems.length || issued.length !== count) {
|
|
197
|
-
throw Object.assign(new Error(problems[0] ?? `The platform returned ${issued.length} of ${count} test identities.`), { issued, receivedAt, partial: true });
|
|
197
|
+
throw Object.assign(new Error(problems[0] ?? `The platform returned ${issued.length} of ${count} test identities.`), { issued, receivedAt, partial: true, createdIds: entries.flatMap(entry => { const user = entry?.user; return typeof user?.id === 'string' ? [user.id] : []; }) });
|
|
198
198
|
}
|
|
199
199
|
return { issued, receivedAt };
|
|
200
200
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-identities.js","sourceRoot":"","sources":["../../src/lib/test-identities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC5G,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,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,MAAM,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,YAAY,KAAK,6CAA6C,CAAC,CAAC;IAC9G,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAY,EAAE,MAAuB;IACpE,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,6FAA6F;QAC7F,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,UAAU,KAAK,GAAG,KAAK,CAAC,IAAI,aAAa;YAAE,SAAS;QACzF,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;QACpD,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YAAC,MAAM,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;YAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAAC,CAAC;IAC1F,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Reporter, FullResult, Suite, TestCase, TestResult } from '@playwright/test/reporter';
|
|
2
|
+
export default class TestReporter implements Reporter {
|
|
3
|
+
private total;
|
|
4
|
+
private errors;
|
|
5
|
+
private entries;
|
|
6
|
+
onBegin(_config: unknown, suite: Suite): void;
|
|
7
|
+
onTestEnd(test: TestCase, result: TestResult): void;
|
|
8
|
+
onError(): void;
|
|
9
|
+
onEnd(result: FullResult): Promise<{
|
|
10
|
+
status: 'failed' | 'passed';
|
|
11
|
+
}>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { writePrivateFile } from './test-identities.js';
|
|
2
|
+
import { scrub } from './test-diagnostics.js';
|
|
3
|
+
export default class TestReporter {
|
|
4
|
+
total = 0;
|
|
5
|
+
errors = 0;
|
|
6
|
+
entries = [];
|
|
7
|
+
onBegin(_config, suite) { this.total = suite.allTests().length; }
|
|
8
|
+
onTestEnd(test, result) {
|
|
9
|
+
const attachment = result.attachments.find(item => item.name === 'somewhere-diagnostics');
|
|
10
|
+
const details = attachment?.body ? JSON.parse(attachment.body.toString()) : { title: scrub(test.title), errors: ['Test failed before fixture setup'], timings: {} };
|
|
11
|
+
const entry = { ...details, status: result.status, errors: details.errors.map(message => message.split('\n').find(line => line.trim())?.slice(0, 300) ?? 'Test failed'), step: result.steps.find(step => step.error)?.category ?? 'test body' };
|
|
12
|
+
this.entries.push(entry);
|
|
13
|
+
if (process.env.SW_TEST_JSON !== 'true') {
|
|
14
|
+
console.log(`${result.status}: ${entry.title}`);
|
|
15
|
+
if (result.status !== 'passed' && result.status !== 'skipped')
|
|
16
|
+
console.log(` step: ${entry.step}; ${entry.errors.join('; ')}\n ${entry.request ? `${entry.request.method} ${entry.request.path} · HTTP ${entry.request.status} · ${entry.request.code}` : 'request: none'}\n screenshot: ${entry.screenshot ?? 'not captured (setup/auth page)'} `);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
onError() { this.errors++; }
|
|
20
|
+
async onEnd(result) {
|
|
21
|
+
const passed = this.entries.filter(entry => entry.status === 'passed').length;
|
|
22
|
+
const skipped = this.entries.filter(entry => entry.status === 'skipped').length;
|
|
23
|
+
const failed = this.entries.length - passed - skipped;
|
|
24
|
+
const report = { passed, failed, skipped, notRun: Math.max(0, this.total - this.entries.length), setupErrors: this.errors, target: process.env.SW_TEST_ORIGIN, release: process.env.SW_TEST_RELEASE ?? 'release unknown', browser: process.env.SW_TEST_BROWSER, duration: result.duration, browserProbeMs: Number(process.env.SW_TEST_BROWSER_LAUNCH_MS), subset: process.env.SW_TEST_SUBSET === 'true', tests: this.entries };
|
|
25
|
+
writePrivateFile(process.env.SW_TEST_RESULTS, JSON.stringify(report) + '\n');
|
|
26
|
+
console.log(process.env.SW_TEST_JSON === 'true' ? JSON.stringify(report) : `${report.subset ? 'SUBSET (not a full green; passed tests previously failed when using --failed): ' : 'FULL: '}${passed} passed, ${failed} failed, ${skipped} skipped, ${report.notRun} not run · ${report.target} · ${report.release} · ${report.browser} · ${(result.duration / 1000).toFixed(1)} s`);
|
|
27
|
+
return { status: result.status === 'passed' && failed === 0 && this.errors === 0 && passed > 0 ? 'passed' : 'failed' };
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=test-reporter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-reporter.js","sourceRoot":"","sources":["../../src/lib/test-reporter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,KAAK,EAAoB,MAAM,uBAAuB,CAAC;AAEhE,MAAM,CAAC,OAAO,OAAO,YAAY;IACvB,KAAK,GAAG,CAAC,CAAC;IACV,MAAM,GAAG,CAAC,CAAC;IACX,OAAO,GAAY,EAAE,CAAC;IAC9B,OAAO,CAAC,OAAgB,EAAE,KAAY,IAAU,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IACvF,SAAS,CAAC,IAAc,EAAE,MAAkB;QAC1C,MAAM,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,uBAAuB,CAAC,CAAC;QAC1F,MAAM,OAAO,GAAG,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAsD,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,kCAAkC,CAAC,EAAE,OAAO,EAAE,EAAE,EAA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MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,iFAAiF,CAAC,CAAC,CAAC,QAAQ,GAAG,MAAM,YAAY,MAAM,YAAY,OAAO,aAAa,MAAM,CAAC,MAAM,cAAc,MAAM,CAAC,MAAM,MAAM,MAAM,CAAC,OAAO,MAAM,MAAM,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACpX,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;IACzH,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TYPECHECK_TYPESCRIPT_VERSION = "5.9.3";
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { type ContractVerdict } from './platform-contract.js';
|
|
2
|
+
export interface TypeError {
|
|
3
|
+
file: string;
|
|
4
|
+
line: number;
|
|
5
|
+
column: number;
|
|
6
|
+
code: string;
|
|
7
|
+
message: string;
|
|
8
|
+
}
|
|
9
|
+
export interface TypecheckResult {
|
|
10
|
+
/** true = no type errors. */
|
|
11
|
+
ok: boolean;
|
|
12
|
+
errors: TypeError[];
|
|
13
|
+
/** How tsc was located, for a one-line "ran via …" note. */
|
|
14
|
+
via: 'project' | 'bundled' | 'npx';
|
|
15
|
+
/** Raw combined stdout+stderr — shown when we couldn't parse structured errors. */
|
|
16
|
+
raw: string;
|
|
17
|
+
/** Set when tsc itself couldn't be run at all. */
|
|
18
|
+
spawnError?: string;
|
|
19
|
+
/** This CLI's consumer contract against the platform's last announced one (tsk_0f3d05b9). */
|
|
20
|
+
contract?: ContractVerdict;
|
|
21
|
+
}
|
|
22
|
+
interface TscInvocation {
|
|
23
|
+
command: string;
|
|
24
|
+
args: string[];
|
|
25
|
+
via: TypecheckResult['via'];
|
|
26
|
+
}
|
|
27
|
+
export declare function npxTscInvocation(platform?: NodeJS.Platform): TscInvocation;
|
|
28
|
+
/**
|
|
29
|
+
* Load the pulled tree's project config explicitly. TypeScript 7 reports
|
|
30
|
+
* TS5112 when source files are passed because that would ignore tsconfig.json;
|
|
31
|
+
* this project-wide invocation needs neither source-file args nor
|
|
32
|
+
* --ignoreConfig.
|
|
33
|
+
*/
|
|
34
|
+
export declare function typecheckArgs(prefixArgs?: readonly string[]): string[];
|
|
35
|
+
/**
|
|
36
|
+
* A type package declared in package.json but absent from node_modules is not a
|
|
37
|
+
* mistake in the code — it is a tree that has not been installed yet. tsc has no
|
|
38
|
+
* way to tell those apart, so the first check on a fresh pull failed with
|
|
39
|
+
* TS2503 ("Cannot find namespace 'JSX'") and every agent lost a couple of
|
|
40
|
+
* minutes installing by hand before re-running. Resolving the DECLARED packages
|
|
41
|
+
* first makes the first check mean what it says.
|
|
42
|
+
*
|
|
43
|
+
* Deliberately narrow, so this can never mask a real bug:
|
|
44
|
+
* - only `@types/*` entries, only ones the project itself declares, only ones
|
|
45
|
+
* actually missing from node_modules. An UNDECLARED import still fails with
|
|
46
|
+
* its real diagnostic — that is the bug the gate exists to catch.
|
|
47
|
+
* - a warm tree plans nothing and spawns nothing.
|
|
48
|
+
* Mirrors the prerequisite the platform's deploy-check container already
|
|
49
|
+
* provides for the same tree.
|
|
50
|
+
*/
|
|
51
|
+
export interface DeclaredTypesPlan {
|
|
52
|
+
/** Install specs (`@types/react@^18.3.0`) for declared-but-missing packages. */
|
|
53
|
+
specs: string[];
|
|
54
|
+
/** Bare package names, for messaging. */
|
|
55
|
+
missing: string[];
|
|
56
|
+
}
|
|
57
|
+
export type TypePackageInstaller = (specs: string[], projectDir: string) => void;
|
|
58
|
+
export declare function planDeclaredTypePackages(projectDir: string): DeclaredTypesPlan;
|
|
59
|
+
/**
|
|
60
|
+
* Resolve declared-but-missing type packages with a caller-supplied installer.
|
|
61
|
+
* The CLI's own commands never install into a project (tsk_97979518,
|
|
62
|
+
* pfb_8f0f7cdd04a1): they refuse with missingTypePackagesMessage instead.
|
|
63
|
+
* Fail-open: an installer that throws never blocks the check.
|
|
64
|
+
*/
|
|
65
|
+
export declare function ensureDeclaredTypePackages(projectDir: string, install: TypePackageInstaller): DeclaredTypesPlan & {
|
|
66
|
+
installed: boolean;
|
|
67
|
+
};
|
|
68
|
+
/** Why a check did not run: declared type packages are not installed. The
|
|
69
|
+
* typecheck never installs them itself (it would change the project tree and
|
|
70
|
+
* run package scripts). */
|
|
71
|
+
export declare function missingTypePackagesMessage(missing: string[], projectDir: string): string;
|
|
72
|
+
/** Longest a typecheck child may run before it and its children are stopped.
|
|
73
|
+
* SOMEWHERE_TYPECHECK_TIMEOUT_MS overrides it. */
|
|
74
|
+
export declare function typecheckTimeoutMs(): number;
|
|
75
|
+
export interface BoundedResult {
|
|
76
|
+
code: number | null;
|
|
77
|
+
out: string;
|
|
78
|
+
stdout: string;
|
|
79
|
+
error?: Error;
|
|
80
|
+
timedOut: boolean;
|
|
81
|
+
/** Set when a stopped run's process group still had members after the
|
|
82
|
+
* final wait: some of its processes may still be running. */
|
|
83
|
+
stopIncomplete?: {
|
|
84
|
+
pid: number;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Run a typecheck child (tsc, or npx fetching it) with a deadline.
|
|
89
|
+
*
|
|
90
|
+
* POSIX: the child leads its own process group. A timeout, Ctrl-C or TERM
|
|
91
|
+
* sends TERM to that group, waits (bounded) for it to empty, sends KILL to
|
|
92
|
+
* what remains, and waits (bounded) again. This reaches descendants that stay
|
|
93
|
+
* in the group; one that moved to another group or session is not reached.
|
|
94
|
+
* If the group still has members after the final wait, the run reports that
|
|
95
|
+
* some processes may still be running instead of claiming they stopped.
|
|
96
|
+
* The group is signalled only after a membership check and no timer outlives
|
|
97
|
+
* the run, which narrows (does not eliminate) the chance of signalling a
|
|
98
|
+
* recycled group id. Windows: `taskkill /T /F` (not exercised by this CLI's
|
|
99
|
+
* tests). `onAbort` runs before the CLI exits on Ctrl-C/TERM, for the
|
|
100
|
+
* caller's temporary files.
|
|
101
|
+
*/
|
|
102
|
+
export declare function runBounded(command: string, args: string[], cwd: string, options?: {
|
|
103
|
+
timeoutMs?: number;
|
|
104
|
+
onAbort?: () => void;
|
|
105
|
+
}): Promise<BoundedResult>;
|
|
106
|
+
/** Said instead of "stopped" when processes may have survived the stop. */
|
|
107
|
+
export declare function stopIncompleteMessage(pid: number): string;
|
|
108
|
+
export declare function timedOutMessage(via: TscInvocation['via'], run?: Pick<BoundedResult, 'stopIncomplete'>): string;
|
|
109
|
+
/**
|
|
110
|
+
* Parse tsc's default (non-pretty) diagnostic lines:
|
|
111
|
+
* path/to/file.ts(12,5): error TS2304: Cannot find name 'sanitizeForSpeech'.
|
|
112
|
+
*/
|
|
113
|
+
export declare function parseTscOutput(output: string): TypeError[];
|
|
114
|
+
/** The typed data client allows `limit` 1 to 100. Outside that range tsc only
|
|
115
|
+
* says the call has no matching overload (TS2769) and shows `limit?: undefined`
|
|
116
|
+
* in the detail lines, which never names the rule, so the rule is appended. */
|
|
117
|
+
export declare const PAGE_LIMIT_EXPLANATION = "A data list call reads at most 100 rows: limit must be a number from 1 to 100. Read further pages with { after: page.next } while page.has_more is true.";
|
|
118
|
+
export declare function explainPageLimit(message: string, detailLine: string): string;
|
|
119
|
+
/**
|
|
120
|
+
* Run a typecheck against `projectDir`. Assumes a tsconfig.json is present
|
|
121
|
+
* (pull scaffolds one); without it, tsc errors loudly and we surface that.
|
|
122
|
+
*/
|
|
123
|
+
export declare function runTypecheck(projectDir: string, options?: {
|
|
124
|
+
installTypePackages?: TypePackageInstaller | false;
|
|
125
|
+
apiBase?: string;
|
|
126
|
+
}): Promise<TypecheckResult>;
|
|
127
|
+
/** Announce, on stderr so JSON on stdout is untouched, that TypeScript is
|
|
128
|
+
* about to be fetched with npx: a network step that also writes npm's cache.
|
|
129
|
+
* The project's own dependencies are never installed. */
|
|
130
|
+
export declare function announceNpxTypeScriptFetch(version: string): void;
|
|
131
|
+
/** How this project's typecheck will get its compiler: 'npx' means a
|
|
132
|
+
* network fetch of TypeScript, which commands announce before running. */
|
|
133
|
+
export declare function typecheckCompilerSource(projectDir: string): TscInvocation['via'];
|
|
134
|
+
/** Where this module lives — used by tests that need the CLI package root. */
|
|
135
|
+
export declare function cliPackageRoot(): string;
|
|
136
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const CLI_PACKAGE = "@somewhere-cloud/cli";
|
|
2
|
+
export declare const OFFICIAL_NPM_REGISTRY = "https://registry.npmjs.org";
|
|
3
|
+
export declare const OFFICIAL_REPOSITORY = "https://github.com/Somewhere-Cloud/somewhere-cli";
|
|
4
|
+
export interface OfficialRelease {
|
|
5
|
+
version: string;
|
|
6
|
+
integrity: string;
|
|
7
|
+
tarballUrl: string;
|
|
8
|
+
attestationUrl: string;
|
|
9
|
+
}
|
|
10
|
+
/** Validate the exact release coordinates from npm's pinned official
|
|
11
|
+
* packument before any artifact or attestation URL is followed. */
|
|
12
|
+
export declare function parseOfficialRelease(body: unknown): OfficialRelease;
|
|
13
|
+
/** Cryptographically verify the SLSA bundle against Sigstore's TUF trust root.
|
|
14
|
+
* This checks the Fulcio certificate chain and SCT, Rekor inclusion proof, DSSE
|
|
15
|
+
* signature, GitHub OIDC issuer, exact workflow identity, immutable repository
|
|
16
|
+
* and owner IDs, and public-repository claim. Any verifier/network/policy error
|
|
17
|
+
* is a hard refusal. */
|
|
18
|
+
export declare function assertUpdateVerificationRuntime(nodeVersion?: string): void;
|
|
19
|
+
export declare function verifyPublishedProvenance(body: unknown, release: OfficialRelease): Promise<void>;
|
|
20
|
+
export declare function verifyTarballIntegrity(bytes: Uint8Array, integrity: string): void;
|
|
21
|
+
/** Validate the publishable lock carried inside the authenticated tarball.
|
|
22
|
+
* Every reachable production package must be integrity-pinned and marked as
|
|
23
|
+
* bundled, so the final install never needs registry resolution. */
|
|
24
|
+
export declare function validateLockedClosure(manifestValue: unknown, lockValue: unknown, release: OfficialRelease): void;
|
|
25
|
+
export declare function verifyLockedArtifact(artifact: Buffer, extractionDir: string, release: OfficialRelease): Promise<void>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deploy-relative path policy.
|
|
3
|
+
*
|
|
4
|
+
* Deploy maps become object-store keys and are later returned by source export
|
|
5
|
+
* for local writes. Accept only already-normalized, project-relative paths so
|
|
6
|
+
* neither side has to guess whether `..`, a backslash, or a control character
|
|
7
|
+
* is data or navigation. Sensitive paths are rejected separately so secrets
|
|
8
|
+
* never enter the public deploy namespace in the first place.
|
|
9
|
+
*/
|
|
10
|
+
export type DeployPathIssueKind = 'unsafe' | 'sensitive';
|
|
11
|
+
export interface DeployPathIssue {
|
|
12
|
+
kind: DeployPathIssueKind;
|
|
13
|
+
reason: string;
|
|
14
|
+
}
|
|
15
|
+
/** High-confidence secret/dotfile detection after path safety is established. */
|
|
16
|
+
export declare function isSensitiveDeployPath(path: string): boolean;
|
|
17
|
+
export declare function inspectDeployPath(path: string, options?: {
|
|
18
|
+
allowSensitive?: boolean;
|
|
19
|
+
}): DeployPathIssue | null;
|
|
20
|
+
/** True only for a path safe to return from source export / local pull. */
|
|
21
|
+
export declare function isSafeDeployExportPath(path: string): boolean;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical repro-packet schema, validators and guidance map (`somewhere.repro/1`, tsk_da2dba3d).
|
|
3
|
+
*
|
|
4
|
+
* ONE source for both clients. The MCP server imports it directly; the CLI vendors it with a
|
|
5
|
+
* sha256 manifest and a `--check` (the same pattern as runtime/source-lint.cjs). Ported from the
|
|
6
|
+
* CLI's local module (somewhere-cli PR #67 @ 516b0fd1, Files e0e3e20d) without behaviour changes,
|
|
7
|
+
* except buildRecordFromFields, which takes already-typed fields so each client keeps its own
|
|
8
|
+
* capture while sharing every validator.
|
|
9
|
+
*
|
|
10
|
+
* A packet is built ONLY from typed, validated fields of a failure: never its message, hint, data,
|
|
11
|
+
* arguments, request or response. A field that fails its validator is omitted, not cleaned.
|
|
12
|
+
* OMITTED names the parts of a failure the builder never reads. It is NOT a claim about what the
|
|
13
|
+
* collected fields can contain: an id field keeps any value that passes its shape validator, and the
|
|
14
|
+
* secret-shape scrub below refuses only the shapes it lists. So a packet is reviewed before it is
|
|
15
|
+
* submitted, and nothing here promises that tokens, passwords or emails cannot appear (tsk_da2dba3d).
|
|
16
|
+
* Investigation steps are fixed argv arrays keyed by the validated code/operation; untrusted text
|
|
17
|
+
* is never interpolated into a command. Nothing here uploads anything.
|
|
18
|
+
*
|
|
19
|
+
* Dependency-free and platform-neutral: no imports, no runtime APIs.
|
|
20
|
+
*/
|
|
21
|
+
export declare const REPRO_SCHEMA = "somewhere.repro/1";
|
|
22
|
+
export declare const LAST_ERROR_FILE = "last-error.json";
|
|
23
|
+
export declare const OMITTED: readonly ["message", "hint_text", "stack", "console", "request_body", "response_body", "arguments", "route_data", "sql", "url_query", "headers", "cookies", "source", "env"];
|
|
24
|
+
export type Outcome = 'refused' | 'unknown' | 'failed';
|
|
25
|
+
/** The one structured detail a refusal may carry (agreed with Deploy f74, tsk_da2dba3d): where in the
|
|
26
|
+
* caller's own input the problem is, and the numeric limit. `path` is built by the platform from an
|
|
27
|
+
* index and a fixed key, never from flow text; anything that fails these shapes is dropped. */
|
|
28
|
+
export interface InvalidDetail {
|
|
29
|
+
path: string;
|
|
30
|
+
limit_ms?: number;
|
|
31
|
+
}
|
|
32
|
+
export declare function safeInvalid(value: unknown): InvalidDetail | undefined;
|
|
33
|
+
export declare function safeCode(value: unknown): string | undefined;
|
|
34
|
+
export declare function safeStatus(value: unknown): number | undefined;
|
|
35
|
+
export interface ReproRecord {
|
|
36
|
+
schema: typeof REPRO_SCHEMA;
|
|
37
|
+
/** Shared with the MCP builder (f74): `kind` names the client, `version` is its semver or 'unknown'. */
|
|
38
|
+
client: {
|
|
39
|
+
kind: 'cli' | 'mcp';
|
|
40
|
+
version: string;
|
|
41
|
+
};
|
|
42
|
+
captured_at: string;
|
|
43
|
+
command?: string;
|
|
44
|
+
code: string;
|
|
45
|
+
http_status?: number;
|
|
46
|
+
operation?: string;
|
|
47
|
+
request_id?: string;
|
|
48
|
+
trace_id?: string;
|
|
49
|
+
project_id?: string;
|
|
50
|
+
retry?: boolean;
|
|
51
|
+
retry_after_ms?: number;
|
|
52
|
+
outcome: Outcome;
|
|
53
|
+
duration_ms?: number;
|
|
54
|
+
invalid?: InvalidDetail;
|
|
55
|
+
}
|
|
56
|
+
/** `/projects/<uuid>/deploys/rel_x?q=secret` → `/projects/:id/deploys/:id`. */
|
|
57
|
+
export declare function routeTemplate(path: string): string | undefined;
|
|
58
|
+
export declare function operationLabel(method: string, path: string): string | undefined;
|
|
59
|
+
/** An operation is kept only if it is already a template: `METHOD <routeTemplate fixed point>` or `tool:<name>`. */
|
|
60
|
+
export declare function safeOperation(value: unknown): string | undefined;
|
|
61
|
+
export declare function toolOperation(name: unknown): string | undefined;
|
|
62
|
+
/** Command names only, e.g. ['browser', 'test'] → 'browser test'; anything else is dropped. */
|
|
63
|
+
export declare function commandPath(names: string[]): string | undefined;
|
|
64
|
+
/** The typed fields a client has for one failure. Every one is re-validated here. */
|
|
65
|
+
export interface FailureFields {
|
|
66
|
+
/** True only for a platform-originated failure (an API or tool error); false is a client-side error. */
|
|
67
|
+
platform: boolean;
|
|
68
|
+
code?: unknown;
|
|
69
|
+
status?: unknown;
|
|
70
|
+
operation?: unknown;
|
|
71
|
+
tool?: unknown;
|
|
72
|
+
requestId?: unknown;
|
|
73
|
+
traceId?: unknown;
|
|
74
|
+
projectId?: unknown;
|
|
75
|
+
retry?: unknown;
|
|
76
|
+
retryAfterMs?: unknown;
|
|
77
|
+
responseIncomplete?: unknown;
|
|
78
|
+
invalid?: unknown;
|
|
79
|
+
}
|
|
80
|
+
export interface RecordContext {
|
|
81
|
+
client: {
|
|
82
|
+
kind: 'cli' | 'mcp';
|
|
83
|
+
version: string;
|
|
84
|
+
};
|
|
85
|
+
command?: string;
|
|
86
|
+
startedAt?: number;
|
|
87
|
+
now?: number;
|
|
88
|
+
}
|
|
89
|
+
/** Shared record builder. The CLI maps a CliApiError/PlatformToolError into FailureFields; the MCP
|
|
90
|
+
* server maps an upstream tool-error envelope. Same validators, same outcome rule. */
|
|
91
|
+
export declare function buildRecordFromFields(fields: FailureFields, context: RecordContext): ReproRecord;
|
|
92
|
+
type Step = string[];
|
|
93
|
+
export interface ReproPacket {
|
|
94
|
+
schema: typeof REPRO_SCHEMA;
|
|
95
|
+
collected: ReproRecord;
|
|
96
|
+
omitted: readonly string[];
|
|
97
|
+
surface: string;
|
|
98
|
+
recipe: {
|
|
99
|
+
kind: 'synthetic';
|
|
100
|
+
rerun_original: boolean;
|
|
101
|
+
steps: string[];
|
|
102
|
+
investigate: Step[];
|
|
103
|
+
};
|
|
104
|
+
submit: {
|
|
105
|
+
destination: 'support_ticket';
|
|
106
|
+
automatic: false;
|
|
107
|
+
how: string;
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
export declare function buildPacket(record: ReproRecord): ReproPacket;
|
|
111
|
+
export {};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { ApiClient } from './client.js';
|
|
2
|
+
/** `somewhere verify --keep-actors`: what THIS project folder remembers between runs
|
|
3
|
+
* of one multi-user flow. Ids, emails and session names only; never a token, cookie
|
|
4
|
+
* or password (the browsers' sessions live on the platform, owned by this developer). */
|
|
5
|
+
export declare const KEEP_FILE = "verify-actors.json";
|
|
6
|
+
/** Test identities live 24 h; reuse them only well inside that. */
|
|
7
|
+
export declare const KEEP_IDENTITY_REUSE_MS: number;
|
|
8
|
+
/** A run's lock older than this is stale even if its process id was reused. */
|
|
9
|
+
export declare const KEEP_LOCK_STALE_MS: number;
|
|
10
|
+
export interface KeepEntry {
|
|
11
|
+
project_id: string;
|
|
12
|
+
created_at: string;
|
|
13
|
+
actors: string[];
|
|
14
|
+
sessions: Record<string, string>;
|
|
15
|
+
identities?: Record<string, {
|
|
16
|
+
user_id: string;
|
|
17
|
+
email: string;
|
|
18
|
+
}>;
|
|
19
|
+
/** The page path (pathname only, never a query) each kept actor was left on. */
|
|
20
|
+
pages?: Record<string, string>;
|
|
21
|
+
}
|
|
22
|
+
/** A random per-folder salt, so two folders linked to one project never share kept browsers. */
|
|
23
|
+
export declare function folderSalt(root: string): string;
|
|
24
|
+
/** Stable per folder, project, flow file and full cast (names, sign-in and seed values,
|
|
25
|
+
* hashed only), so a different flow, user or seed never reconnects to these browsers. */
|
|
26
|
+
export declare function keepKey(salt: string, projectId: string, flowPath: string, actors: Record<string, unknown>): string;
|
|
27
|
+
export declare function readKeep(root: string, key: string): KeepEntry | null;
|
|
28
|
+
export declare function listKeep(root: string, projectId: string): Array<[string, KeepEntry]>;
|
|
29
|
+
export declare function writeKeep(root: string, key: string, entry: KeepEntry): void;
|
|
30
|
+
export declare function dropKeep(root: string, key: string): void;
|
|
31
|
+
/** Identities a previous keeping run left, if still well inside their lifetime. */
|
|
32
|
+
export declare function reusableIdentities(entry: KeepEntry | null, now: number): KeepEntry['identities'] | undefined;
|
|
33
|
+
/** One run per kept flow at a time: an exclusive lock file for the whole run. A
|
|
34
|
+
* lock whose process is gone, or older than KEEP_LOCK_STALE_MS, is taken over. */
|
|
35
|
+
export declare function lockKeep(root: string, key: string, now?: number): () => void;
|
|
36
|
+
/** What the record should say after a run: keep (what this run kept), keep the old
|
|
37
|
+
* record (cleanup unconfirmed, so --close-actors can still find it), or drop it. */
|
|
38
|
+
export declare function recordAfterRun(previous: KeepEntry | null, report: {
|
|
39
|
+
keep_actors?: {
|
|
40
|
+
kept: string[];
|
|
41
|
+
reused_identities: boolean;
|
|
42
|
+
};
|
|
43
|
+
kept_sessions: Array<{
|
|
44
|
+
actor: string;
|
|
45
|
+
session_id: string;
|
|
46
|
+
}>;
|
|
47
|
+
cleanup: Array<{
|
|
48
|
+
status: string;
|
|
49
|
+
}>;
|
|
50
|
+
test_users?: {
|
|
51
|
+
identities: Array<{
|
|
52
|
+
actor: string;
|
|
53
|
+
user_id: string;
|
|
54
|
+
email: string;
|
|
55
|
+
}>;
|
|
56
|
+
cleanup: {
|
|
57
|
+
status: string;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
segments?: Array<{
|
|
61
|
+
as: string;
|
|
62
|
+
final_url?: string;
|
|
63
|
+
}>;
|
|
64
|
+
}, projectId: string, now: number): {
|
|
65
|
+
action: 'write';
|
|
66
|
+
entry: KeepEntry;
|
|
67
|
+
} | {
|
|
68
|
+
action: 'keep';
|
|
69
|
+
} | {
|
|
70
|
+
action: 'drop';
|
|
71
|
+
};
|
|
72
|
+
/** --close-actors: close each kept browser and delete the kept test identities. */
|
|
73
|
+
export declare function closeKept(client: Pick<ApiClient, 'call'>, entry: KeepEntry): Promise<{
|
|
74
|
+
browsers: Array<{
|
|
75
|
+
actor: string;
|
|
76
|
+
status: string;
|
|
77
|
+
}>;
|
|
78
|
+
identities: {
|
|
79
|
+
status: string;
|
|
80
|
+
deleted?: number;
|
|
81
|
+
};
|
|
82
|
+
}>;
|
|
83
|
+
/** The one line --keep-actors prints on stderr when this run cannot reconnect:
|
|
84
|
+
* nothing is kept for THIS flow file and cast in this folder (a new or renamed
|
|
85
|
+
* flow file, or a changed cast, starts fresh). Null when there is a record. */
|
|
86
|
+
export declare function keepStartNote(entry: KeepEntry | null, otherFlowsKept: number): string | null;
|
|
87
|
+
/** Each kept actor's last page path, from the run's segment reports (pathname
|
|
88
|
+
* only: a query or fragment is never stored). */
|
|
89
|
+
export declare function lastPages(segments: Array<{
|
|
90
|
+
as: string;
|
|
91
|
+
final_url?: string;
|
|
92
|
+
}>, actors: string[]): Record<string, string>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Bearer screenshot URLs belong in private CLI state, never deployable source. */
|
|
2
|
+
export declare function saveVerifyReport(report: unknown): string;
|
|
3
|
+
/** An explicit report destination never replaces an existing file. */
|
|
4
|
+
export declare function writeVerifyReportTo(path: string, report: unknown): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CLI_VERSION: string;
|