@vostride/agent-qa-core 0.2.3 → 0.2.4
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/index.cjs +400 -700
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -423
- package/dist/index.d.ts +20 -423
- package/dist/index.js +362 -655
- package/dist/index.js.map +1 -1
- package/dist/run-text-output.cjs +86 -0
- package/dist/run-text-output.cjs.map +1 -0
- package/dist/run-text-output.d.cts +13 -0
- package/dist/run-text-output.d.ts +13 -0
- package/dist/run-text-output.js +55 -0
- package/dist/run-text-output.js.map +1 -0
- package/package.json +10 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { TestResult,
|
|
3
|
-
export { AUTH_STATE_HOOK_CONTAINER_STORAGE_STATE_PATH, AUTH_STATE_HOOK_JSON_ENV, AUTH_STATE_HOOK_STORAGE_STATE_FILENAME, AUTH_STATE_HOOK_STORAGE_STATE_PATH_ENV, AUTH_STATE_HOOK_WORKSPACE_DIR, HookDefinition, HookResult, HookRuntime, RUNTIME_IMAGE_MAP, buildAuthStateHookEnv, isReservedAuthStateHookEnvKey, parseEnvFile, serializeEnvFile, stripReservedAuthStateHookEnv } from '@vostride/agent-qa-runner';
|
|
2
|
+
import { TestResult, InterimNode, RefBinding, Action, DocumentScrollOffsets, Direction, SwipeSignal, SecretRedactor, PlatformAdapter, PlatformConfig, Planner, Verifier, ActionPlanCache, WorkingMemoryPort, StorageStatePort, ScreenshotCompressor, HookDefinition, SandboxRunnerOptions, AccessibilityViolation, RuntimeAuthStateConfig, SecretStore } from '@vostride/agent-qa-runner';
|
|
3
|
+
export { AUTH_STATE_HOOK_CONTAINER_STORAGE_STATE_PATH, AUTH_STATE_HOOK_JSON_ENV, AUTH_STATE_HOOK_STORAGE_STATE_FILENAME, AUTH_STATE_HOOK_STORAGE_STATE_PATH_ENV, AUTH_STATE_HOOK_WORKSPACE_DIR, HookDefinition, HookResult, HookRuntime, RUNTIME_IMAGE_MAP, buildAuthStateHookEnv, hookRunnerImage, isReservedAuthStateHookEnvKey, parseEnvFile, serializeEnvFile, stripReservedAuthStateHookEnv } from '@vostride/agent-qa-runner';
|
|
4
4
|
import { CST, Document } from 'yaml';
|
|
5
|
-
import { TestEditPatchSet
|
|
5
|
+
import { TestEditPatchSet } from '@vostride/agent-qa-schema';
|
|
6
|
+
import { RunTextEnv } from './run-text-output.js';
|
|
7
|
+
export { PrintRunTextOptions, guardJsonText, guardRunText, isGitHubActions, printRunText, reserveStdoutForData } from './run-text-output.js';
|
|
6
8
|
import { LanguageModel } from 'ai';
|
|
7
9
|
|
|
8
10
|
declare const CaptureConfigSchema: z.ZodObject<{
|
|
@@ -19,8 +21,6 @@ declare const CaptureConfigSchema: z.ZodObject<{
|
|
|
19
21
|
declare const TestStepSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
20
22
|
step: z.ZodString;
|
|
21
23
|
timeout: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
22
|
-
retries: z.ZodOptional<z.ZodNumber>;
|
|
23
|
-
screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
24
24
|
capture: z.ZodOptional<z.ZodObject<{
|
|
25
25
|
variable: z.ZodString;
|
|
26
26
|
method: z.ZodEnum<{
|
|
@@ -94,11 +94,9 @@ declare const TestDefinitionSchema: z.ZodObject<{
|
|
|
94
94
|
}, z.core.$strict>>;
|
|
95
95
|
setup: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
96
96
|
teardown: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
97
|
-
steps: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
97
|
+
steps: z.ZodArray<z.ZodPipe<z.ZodAny, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
98
98
|
step: z.ZodString;
|
|
99
99
|
timeout: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
100
|
-
retries: z.ZodOptional<z.ZodNumber>;
|
|
101
|
-
screenshot: z.ZodOptional<z.ZodBoolean>;
|
|
102
100
|
capture: z.ZodOptional<z.ZodObject<{
|
|
103
101
|
variable: z.ZodString;
|
|
104
102
|
method: z.ZodEnum<{
|
|
@@ -110,7 +108,7 @@ declare const TestDefinitionSchema: z.ZodObject<{
|
|
|
110
108
|
selector: z.ZodOptional<z.ZodString>;
|
|
111
109
|
description: z.ZodOptional<z.ZodString>;
|
|
112
110
|
}, z.core.$strict>>;
|
|
113
|
-
}, z.core.$strict>]
|
|
111
|
+
}, z.core.$strict>]>>>;
|
|
114
112
|
}, z.core.$strict>;
|
|
115
113
|
|
|
116
114
|
declare const MobileAppStateSchema: z.ZodEnum<{
|
|
@@ -250,30 +248,18 @@ declare const DashboardConfigSchema: z.ZodObject<{
|
|
|
250
248
|
host: z.ZodOptional<z.ZodString>;
|
|
251
249
|
}, z.core.$strict>;
|
|
252
250
|
/**
|
|
253
|
-
*
|
|
254
|
-
*
|
|
255
|
-
* Exported because two mechanisms now decide loopback membership and they must not be two
|
|
256
|
-
* spellings: `LoopbackHostSchema` below refuses a non-loopback MCP host at PARSE time, and
|
|
257
|
-
* `startServer`'s pre-listen bind guard refuses a non-loopback DASHBOARD host at RUNTIME, with no
|
|
258
|
-
* exemption. A second literal list would let the two drift, and the direction it would drift in is
|
|
259
|
-
* a host one mechanism calls loopback and the other does not.
|
|
251
|
+
* The one member set for "this host is loopback", used by the dashboard's pre-listen bind guard in
|
|
252
|
+
* `startServer`, which refuses a non-loopback dashboard host at runtime with no exemption.
|
|
260
253
|
*/
|
|
261
254
|
declare const LOOPBACK_HOSTS: readonly string[];
|
|
262
255
|
/** Whether a configured host names a loopback interface. The one predicate over the one set. */
|
|
263
256
|
declare function isLoopbackHost(host: string): boolean;
|
|
264
257
|
declare const McpConfigSchema: z.ZodObject<{
|
|
265
258
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
266
|
-
transport: z.ZodOptional<z.ZodEnum<{
|
|
267
|
-
http: "http";
|
|
268
|
-
stdio: "stdio";
|
|
269
|
-
}>>;
|
|
270
|
-
host: z.ZodOptional<z.ZodString>;
|
|
271
259
|
port: z.ZodOptional<z.ZodNumber>;
|
|
272
|
-
path: z.ZodOptional<z.ZodString>;
|
|
273
260
|
}, z.core.$strict>;
|
|
274
261
|
declare const CacheConfigSchema: z.ZodObject<{
|
|
275
262
|
dir: z.ZodString;
|
|
276
|
-
ttl: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
277
263
|
}, z.core.$strict>;
|
|
278
264
|
declare const AuthStateConfigSchema: z.ZodObject<{
|
|
279
265
|
dir: z.ZodString;
|
|
@@ -299,7 +285,6 @@ declare const AccessibilityConfigSchema: z.ZodObject<{
|
|
|
299
285
|
wcag2aaa: "wcag2aaa";
|
|
300
286
|
}>>;
|
|
301
287
|
runAfter: z.ZodOptional<z.ZodEnum<{
|
|
302
|
-
navigation: "navigation";
|
|
303
288
|
"every-step": "every-step";
|
|
304
289
|
"test-end": "test-end";
|
|
305
290
|
}>>;
|
|
@@ -318,17 +303,10 @@ declare const ServicesSchema: z.ZodObject<{
|
|
|
318
303
|
}, z.core.$strict>>;
|
|
319
304
|
mcp: z.ZodOptional<z.ZodObject<{
|
|
320
305
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
321
|
-
transport: z.ZodOptional<z.ZodEnum<{
|
|
322
|
-
http: "http";
|
|
323
|
-
stdio: "stdio";
|
|
324
|
-
}>>;
|
|
325
|
-
host: z.ZodOptional<z.ZodString>;
|
|
326
306
|
port: z.ZodOptional<z.ZodNumber>;
|
|
327
|
-
path: z.ZodOptional<z.ZodString>;
|
|
328
307
|
}, z.core.$strict>>;
|
|
329
308
|
cache: z.ZodOptional<z.ZodObject<{
|
|
330
309
|
dir: z.ZodString;
|
|
331
|
-
ttl: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
332
310
|
}, z.core.$strict>>;
|
|
333
311
|
authState: z.ZodOptional<z.ZodObject<{
|
|
334
312
|
dir: z.ZodString;
|
|
@@ -354,7 +332,6 @@ declare const ServicesSchema: z.ZodObject<{
|
|
|
354
332
|
wcag2aaa: "wcag2aaa";
|
|
355
333
|
}>>;
|
|
356
334
|
runAfter: z.ZodOptional<z.ZodEnum<{
|
|
357
|
-
navigation: "navigation";
|
|
358
335
|
"every-step": "every-step";
|
|
359
336
|
"test-end": "test-end";
|
|
360
337
|
}>>;
|
|
@@ -370,11 +347,6 @@ declare const ServicesSchema: z.ZodObject<{
|
|
|
370
347
|
|
|
371
348
|
declare const KnowledgeConfigSchema: z.ZodObject<{
|
|
372
349
|
dir: z.ZodDefault<z.ZodString>;
|
|
373
|
-
commitArtifacts: z.ZodDefault<z.ZodEnum<{
|
|
374
|
-
none: "none";
|
|
375
|
-
thumbnails: "thumbnails";
|
|
376
|
-
}>>;
|
|
377
|
-
contextBudgetTokens: z.ZodOptional<z.ZodNumber>;
|
|
378
350
|
}, z.core.$strict>;
|
|
379
351
|
|
|
380
352
|
declare const TargetSchema: z.ZodObject<{
|
|
@@ -389,7 +361,6 @@ declare const TargetSchema: z.ZodObject<{
|
|
|
389
361
|
appActivity: z.ZodOptional<z.ZodString>;
|
|
390
362
|
app: z.ZodOptional<z.ZodObject<{
|
|
391
363
|
path: z.ZodOptional<z.ZodString>;
|
|
392
|
-
browserstack: z.ZodOptional<z.ZodString>;
|
|
393
364
|
}, z.core.$strict>>;
|
|
394
365
|
url: z.ZodOptional<z.ZodString>;
|
|
395
366
|
environment: z.ZodOptional<z.ZodEnum<{
|
|
@@ -403,13 +374,8 @@ declare const DeviceProfileSchema: z.ZodObject<{
|
|
|
403
374
|
android: "android";
|
|
404
375
|
ios: "ios";
|
|
405
376
|
}>;
|
|
406
|
-
transport: z.ZodEnum<{
|
|
407
|
-
local: "local";
|
|
408
|
-
browserstack: "browserstack";
|
|
409
|
-
}>;
|
|
410
377
|
match: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
411
378
|
}, z.core.$strict>;
|
|
412
|
-
declare const ProviderConfigSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
413
379
|
declare const RegistrySchema: z.ZodObject<{
|
|
414
380
|
llms: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
415
381
|
provider: z.ZodString;
|
|
@@ -432,7 +398,6 @@ declare const RegistrySchema: z.ZodObject<{
|
|
|
432
398
|
appActivity: z.ZodOptional<z.ZodString>;
|
|
433
399
|
app: z.ZodOptional<z.ZodObject<{
|
|
434
400
|
path: z.ZodOptional<z.ZodString>;
|
|
435
|
-
browserstack: z.ZodOptional<z.ZodString>;
|
|
436
401
|
}, z.core.$strict>>;
|
|
437
402
|
url: z.ZodOptional<z.ZodString>;
|
|
438
403
|
environment: z.ZodOptional<z.ZodEnum<{
|
|
@@ -446,13 +411,8 @@ declare const RegistrySchema: z.ZodObject<{
|
|
|
446
411
|
android: "android";
|
|
447
412
|
ios: "ios";
|
|
448
413
|
}>;
|
|
449
|
-
transport: z.ZodEnum<{
|
|
450
|
-
local: "local";
|
|
451
|
-
browserstack: "browserstack";
|
|
452
|
-
}>;
|
|
453
414
|
match: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
454
415
|
}, z.core.$strict>>>;
|
|
455
|
-
providers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
456
416
|
}, z.core.$strict>;
|
|
457
417
|
|
|
458
418
|
declare const AnalyticsSchema: z.ZodObject<{
|
|
@@ -500,10 +460,6 @@ declare const BrowserConfigSchema: z.ZodObject<{
|
|
|
500
460
|
height: z.ZodNumber;
|
|
501
461
|
}, z.core.$strict>>;
|
|
502
462
|
}, z.core.$strict>;
|
|
503
|
-
declare const TransportSchema: z.ZodEnum<{
|
|
504
|
-
local: "local";
|
|
505
|
-
browserstack: "browserstack";
|
|
506
|
-
}>;
|
|
507
463
|
declare const PlannerConfigSchema: z.ZodObject<{
|
|
508
464
|
maxActions: z.ZodOptional<z.ZodNumber>;
|
|
509
465
|
maxPlanningTurns: z.ZodOptional<z.ZodNumber>;
|
|
@@ -556,17 +512,10 @@ declare const AgentQaConfigSchema: z.ZodPipe<z.ZodAny, z.ZodObject<{
|
|
|
556
512
|
}, z.core.$strict>>;
|
|
557
513
|
mcp: z.ZodOptional<z.ZodObject<{
|
|
558
514
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
559
|
-
transport: z.ZodOptional<z.ZodEnum<{
|
|
560
|
-
http: "http";
|
|
561
|
-
stdio: "stdio";
|
|
562
|
-
}>>;
|
|
563
|
-
host: z.ZodOptional<z.ZodString>;
|
|
564
515
|
port: z.ZodOptional<z.ZodNumber>;
|
|
565
|
-
path: z.ZodOptional<z.ZodString>;
|
|
566
516
|
}, z.core.$strict>>;
|
|
567
517
|
cache: z.ZodOptional<z.ZodObject<{
|
|
568
518
|
dir: z.ZodString;
|
|
569
|
-
ttl: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
570
519
|
}, z.core.$strict>>;
|
|
571
520
|
authState: z.ZodOptional<z.ZodObject<{
|
|
572
521
|
dir: z.ZodString;
|
|
@@ -592,7 +541,6 @@ declare const AgentQaConfigSchema: z.ZodPipe<z.ZodAny, z.ZodObject<{
|
|
|
592
541
|
wcag2aaa: "wcag2aaa";
|
|
593
542
|
}>>;
|
|
594
543
|
runAfter: z.ZodOptional<z.ZodEnum<{
|
|
595
|
-
navigation: "navigation";
|
|
596
544
|
"every-step": "every-step";
|
|
597
545
|
"test-end": "test-end";
|
|
598
546
|
}>>;
|
|
@@ -607,11 +555,6 @@ declare const AgentQaConfigSchema: z.ZodPipe<z.ZodAny, z.ZodObject<{
|
|
|
607
555
|
}, z.core.$strict>>>;
|
|
608
556
|
knowledge: z.ZodPrefault<z.ZodObject<{
|
|
609
557
|
dir: z.ZodDefault<z.ZodString>;
|
|
610
|
-
commitArtifacts: z.ZodDefault<z.ZodEnum<{
|
|
611
|
-
none: "none";
|
|
612
|
-
thumbnails: "thumbnails";
|
|
613
|
-
}>>;
|
|
614
|
-
contextBudgetTokens: z.ZodOptional<z.ZodNumber>;
|
|
615
558
|
}, z.core.$strict>>;
|
|
616
559
|
registry: z.ZodOptional<z.ZodObject<{
|
|
617
560
|
llms: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -635,7 +578,6 @@ declare const AgentQaConfigSchema: z.ZodPipe<z.ZodAny, z.ZodObject<{
|
|
|
635
578
|
appActivity: z.ZodOptional<z.ZodString>;
|
|
636
579
|
app: z.ZodOptional<z.ZodObject<{
|
|
637
580
|
path: z.ZodOptional<z.ZodString>;
|
|
638
|
-
browserstack: z.ZodOptional<z.ZodString>;
|
|
639
581
|
}, z.core.$strict>>;
|
|
640
582
|
url: z.ZodOptional<z.ZodString>;
|
|
641
583
|
environment: z.ZodOptional<z.ZodEnum<{
|
|
@@ -649,13 +591,8 @@ declare const AgentQaConfigSchema: z.ZodPipe<z.ZodAny, z.ZodObject<{
|
|
|
649
591
|
android: "android";
|
|
650
592
|
ios: "ios";
|
|
651
593
|
}>;
|
|
652
|
-
transport: z.ZodEnum<{
|
|
653
|
-
local: "local";
|
|
654
|
-
browserstack: "browserstack";
|
|
655
|
-
}>;
|
|
656
594
|
match: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
657
595
|
}, z.core.$strict>>>;
|
|
658
|
-
providers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
659
596
|
}, z.core.$strict>>;
|
|
660
597
|
use: z.ZodOptional<z.ZodObject<{
|
|
661
598
|
browser: z.ZodOptional<z.ZodObject<{
|
|
@@ -716,30 +653,6 @@ declare const AgentQaConfigSchema: z.ZodPipe<z.ZodAny, z.ZodObject<{
|
|
|
716
653
|
}, z.core.$strict>]>>>;
|
|
717
654
|
}, z.core.$strict>>;
|
|
718
655
|
}, z.core.$strict>>;
|
|
719
|
-
allowProduction: z.ZodOptional<z.ZodBoolean>;
|
|
720
|
-
eval: z.ZodOptional<z.ZodObject<{
|
|
721
|
-
judge: z.ZodOptional<z.ZodString>;
|
|
722
|
-
judges: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
723
|
-
judgeAllowSameFamily: z.ZodOptional<z.ZodBoolean>;
|
|
724
|
-
k: z.ZodOptional<z.ZodNumber>;
|
|
725
|
-
seed: z.ZodOptional<z.ZodNumber>;
|
|
726
|
-
gate1: z.ZodOptional<z.ZodObject<{
|
|
727
|
-
maxScreens: z.ZodOptional<z.ZodNumber>;
|
|
728
|
-
maxPerJob: z.ZodOptional<z.ZodNumber>;
|
|
729
|
-
}, z.core.$strict>>;
|
|
730
|
-
gate2: z.ZodOptional<z.ZodObject<{
|
|
731
|
-
maxAblations: z.ZodOptional<z.ZodNumber>;
|
|
732
|
-
canaryHorizonBuilds: z.ZodOptional<z.ZodNumber>;
|
|
733
|
-
maxLowerTrustPerScope: z.ZodOptional<z.ZodNumber>;
|
|
734
|
-
}, z.core.$strict>>;
|
|
735
|
-
adversarial: z.ZodOptional<z.ZodObject<{
|
|
736
|
-
maxSeedsPerRefresh: z.ZodOptional<z.ZodNumber>;
|
|
737
|
-
maxProbeCalls: z.ZodOptional<z.ZodNumber>;
|
|
738
|
-
}, z.core.$strict>>;
|
|
739
|
-
seeding: z.ZodOptional<z.ZodObject<{
|
|
740
|
-
silverPerTestCap: z.ZodOptional<z.ZodNumber>;
|
|
741
|
-
}, z.core.$strict>>;
|
|
742
|
-
}, z.core.$strict>>;
|
|
743
656
|
}, z.core.$strict>>;
|
|
744
657
|
|
|
745
658
|
type AgentQaConfig = z.infer<typeof AgentQaConfigSchema>;
|
|
@@ -748,23 +661,8 @@ type ServicesConfig = z.infer<typeof ServicesSchema>;
|
|
|
748
661
|
type RegistryConfig = z.infer<typeof RegistrySchema>;
|
|
749
662
|
type UseConfig = z.infer<typeof UseSchema>;
|
|
750
663
|
|
|
751
|
-
declare
|
|
752
|
-
reasoning: z.ZodString;
|
|
753
|
-
action: z.ZodObject<{
|
|
754
|
-
type: z.ZodString;
|
|
755
|
-
}, z.core.$loose>;
|
|
756
|
-
confidence: z.ZodNumber;
|
|
757
|
-
stepComplete: z.ZodDefault<z.ZodBoolean>;
|
|
758
|
-
stepFailed: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
759
|
-
}, z.core.$strip>;
|
|
760
|
-
type ActionPlan = z.infer<typeof ActionPlanSchema>;
|
|
664
|
+
declare function refuseRetiredLocalBindings(raw: unknown, filePath: string): void;
|
|
761
665
|
|
|
762
|
-
/**
|
|
763
|
-
* Resolve the repo-relative directory validated by KnowledgeConfigSchema. `configDir` is the
|
|
764
|
-
* directory containing agent-qa.config.yaml (the repository root by the committed-root
|
|
765
|
-
* convention). Composition roots call this helper; Phase 374 has no live producer, so the first
|
|
766
|
-
* runtime caller is Phase 378's Curator binding (D-01/D-14).
|
|
767
|
-
*/
|
|
768
666
|
declare function resolveKnowledgeRoot(knowledge: {
|
|
769
667
|
dir: string;
|
|
770
668
|
}, configDir: string): string;
|
|
@@ -882,11 +780,6 @@ interface ParseResult {
|
|
|
882
780
|
tests: TestDefinition[];
|
|
883
781
|
errors: ParseError[];
|
|
884
782
|
}
|
|
885
|
-
/**
|
|
886
|
-
* One parsed test paired with the exact source that produced it. ABRF-02 stable identity is
|
|
887
|
-
* `filePath + test.name`; the legacy flattened parse result cannot retain that association and
|
|
888
|
-
* caused multi-file direct runs to stamp every member with the first discovered file (CR-02).
|
|
889
|
-
*/
|
|
890
783
|
interface ParsedTestBinding {
|
|
891
784
|
test: TestDefinition;
|
|
892
785
|
filePath: string;
|
|
@@ -937,7 +830,7 @@ interface ParsedTestDocument {
|
|
|
937
830
|
readonly tokens: CST.Token[];
|
|
938
831
|
readonly doc: Document;
|
|
939
832
|
}
|
|
940
|
-
/** A pointer addressed a document root outside `EDITABLE_POINTER_ROOTS
|
|
833
|
+
/** A pointer addressed a document root outside `EDITABLE_POINTER_ROOTS`. */
|
|
941
834
|
declare class PatchPointerOutsideEditableRegionError extends Error {
|
|
942
835
|
readonly pointer: string;
|
|
943
836
|
constructor(pointer: string);
|
|
@@ -948,14 +841,6 @@ declare class PatchPointerUnresolvableError extends Error {
|
|
|
948
841
|
readonly detail: string;
|
|
949
842
|
constructor(pointer: string, detail: string);
|
|
950
843
|
}
|
|
951
|
-
/**
|
|
952
|
-
* The op cannot be applied to the node its pointer reached.
|
|
953
|
-
*
|
|
954
|
-
* `add` and `remove` operate on block-sequence items only. Adding or removing a top-level KEY
|
|
955
|
-
* changes the document's shape rather than its content, and D-02 already routes a shape change
|
|
956
|
-
* through whole-document emission with a full schema validation — so admitting it here would
|
|
957
|
-
* publish a second, weaker path to the same outcome.
|
|
958
|
-
*/
|
|
959
844
|
declare class PatchOpUnsupportedTargetError extends Error {
|
|
960
845
|
readonly pointer: string;
|
|
961
846
|
readonly detail: string;
|
|
@@ -1006,86 +891,6 @@ declare function applyPatchSetToTestDoc(parsed: ParsedTestDocument, patchSet: Te
|
|
|
1006
891
|
*/
|
|
1007
892
|
declare function renderPatchedTestDoc(parsed: ParsedTestDocument, filePath?: string): string;
|
|
1008
893
|
|
|
1009
|
-
interface PlannerConfig {
|
|
1010
|
-
maxActions: number;
|
|
1011
|
-
maxPlanningTurns: number;
|
|
1012
|
-
previousStepCount: number;
|
|
1013
|
-
}
|
|
1014
|
-
interface PlanResult {
|
|
1015
|
-
plan: ActionPlan;
|
|
1016
|
-
tokenUsage?: TokenUsage;
|
|
1017
|
-
}
|
|
1018
|
-
interface VerifyResult {
|
|
1019
|
-
verification: VerificationResult;
|
|
1020
|
-
tokenUsage?: TokenUsage;
|
|
1021
|
-
}
|
|
1022
|
-
interface StepContext {
|
|
1023
|
-
stepInstruction: string;
|
|
1024
|
-
testName: string;
|
|
1025
|
-
testContext?: string;
|
|
1026
|
-
suiteContext?: string;
|
|
1027
|
-
previousSteps: {
|
|
1028
|
-
instruction: string;
|
|
1029
|
-
outcome: string;
|
|
1030
|
-
reasoning?: string;
|
|
1031
|
-
plannedAction?: string;
|
|
1032
|
-
verifierResponse?: string;
|
|
1033
|
-
}[];
|
|
1034
|
-
contextWindow?: number;
|
|
1035
|
-
plannerModel: LanguageModel;
|
|
1036
|
-
verifierModel: LanguageModel;
|
|
1037
|
-
modelId?: string;
|
|
1038
|
-
variables?: Record<string, string>;
|
|
1039
|
-
memoryContext?: string;
|
|
1040
|
-
failureContext?: string;
|
|
1041
|
-
/** Sub-actions already attempted in this step (multi-action mode). */
|
|
1042
|
-
subActionHistory?: {
|
|
1043
|
-
action: string;
|
|
1044
|
-
reasoning?: string;
|
|
1045
|
-
result: 'success' | 'failure';
|
|
1046
|
-
error?: string;
|
|
1047
|
-
verifierRejection?: string;
|
|
1048
|
-
screenChanged?: boolean;
|
|
1049
|
-
data?: string;
|
|
1050
|
-
}[];
|
|
1051
|
-
plannerConfig?: PlannerConfig;
|
|
1052
|
-
screenshot?: Buffer;
|
|
1053
|
-
/**
|
|
1054
|
-
* Vision-gate prompt note for this run (D-11). Non-empty only for text-only
|
|
1055
|
-
* models; injected into the planner prompt when present. Threaded from the
|
|
1056
|
-
* loop's `visionGate.promptNote` — a structural value, not a model import.
|
|
1057
|
-
*/
|
|
1058
|
-
promptNote?: string;
|
|
1059
|
-
}
|
|
1060
|
-
interface Planner {
|
|
1061
|
-
plan(step: string, screenState: ScreenState, context: StepContext, abortSignal?: AbortSignal): Promise<PlanResult>;
|
|
1062
|
-
}
|
|
1063
|
-
interface Verifier {
|
|
1064
|
-
verify(step: string, before: ScreenState, after: ScreenState, action: Action, screenshot?: Buffer, abortSignal?: AbortSignal, promptNote?: string): Promise<VerifyResult>;
|
|
1065
|
-
}
|
|
1066
|
-
interface VerificationResult {
|
|
1067
|
-
success: boolean;
|
|
1068
|
-
reasoning: string;
|
|
1069
|
-
isAppError: boolean;
|
|
1070
|
-
}
|
|
1071
|
-
type ExtractionMethod = 'regex' | 'selector' | 'ai';
|
|
1072
|
-
interface ExtractorInput {
|
|
1073
|
-
method: ExtractionMethod;
|
|
1074
|
-
variableName: string;
|
|
1075
|
-
pattern?: string;
|
|
1076
|
-
selector?: string;
|
|
1077
|
-
description?: string;
|
|
1078
|
-
}
|
|
1079
|
-
interface CaptureResult {
|
|
1080
|
-
success: boolean;
|
|
1081
|
-
variableName: string;
|
|
1082
|
-
value?: string;
|
|
1083
|
-
reasoning: string;
|
|
1084
|
-
}
|
|
1085
|
-
interface VariableExtractor {
|
|
1086
|
-
extract(input: ExtractorInput, screenState: ScreenState): Promise<CaptureResult>;
|
|
1087
|
-
}
|
|
1088
|
-
|
|
1089
894
|
declare function estimateTokens(text: string): number;
|
|
1090
895
|
|
|
1091
896
|
interface MobileNode {
|
|
@@ -1102,13 +907,6 @@ interface MobileNode {
|
|
|
1102
907
|
enabled?: boolean;
|
|
1103
908
|
children: MobileNode[];
|
|
1104
909
|
}
|
|
1105
|
-
/**
|
|
1106
|
-
* Execute-time resolution record for a single builder-minted ref. Reconstructed by
|
|
1107
|
-
* `buildRefEntries` from the interim nodes + the builder's ref->node binding, this is
|
|
1108
|
-
* how the mobile adapters keep the v1 `lastRefs` locator pattern alive after the
|
|
1109
|
-
* shared builder took over ref minting (D-01/D-03). Every field here is one that
|
|
1110
|
-
* `element-resolver.ts`/`gestures.ts` actually read at execute time.
|
|
1111
|
-
*/
|
|
1112
910
|
interface RefEntry {
|
|
1113
911
|
role: string;
|
|
1114
912
|
name?: string;
|
|
@@ -1121,13 +919,11 @@ interface RefEntry {
|
|
|
1121
919
|
nativeType?: string;
|
|
1122
920
|
value?: string;
|
|
1123
921
|
editable?: boolean;
|
|
1124
|
-
/** Android's raw `input-type` bitmask from the observed node
|
|
922
|
+
/** Android's raw `input-type` bitmask from the observed node. */
|
|
1125
923
|
inputType?: number;
|
|
1126
924
|
}
|
|
1127
925
|
/** Execute-time ref -> resolution record map (adapter-private `lastRefs`). */
|
|
1128
926
|
type MobileRefMap = Record<string, RefEntry>;
|
|
1129
|
-
/** parseMobileSource result — a plain interim-node list; ref minting, tree rendering,
|
|
1130
|
-
* and the viewport-summary header all moved into the shared builder (Plan 352-01). */
|
|
1131
927
|
interface ParsedMobileSource {
|
|
1132
928
|
nodes: InterimNode[];
|
|
1133
929
|
}
|
|
@@ -1136,21 +932,7 @@ declare function parseMobileSource(xml: string, platform: 'android' | 'ios', vie
|
|
|
1136
932
|
width: number;
|
|
1137
933
|
height: number;
|
|
1138
934
|
}): ParsedMobileSource;
|
|
1139
|
-
/**
|
|
1140
|
-
* Reconstruct the execute-time `lastRefs` record from the interim nodes plus the shared
|
|
1141
|
-
* builder's ref->node binding (D-01/D-03). The mobile adapters store this privately so
|
|
1142
|
-
* planner-ref -> live-node resolution survives the builder taking over ref minting. No
|
|
1143
|
-
* position lives anywhere: not here, not on the binding, not on ElementInfo (438 D-13).
|
|
1144
|
-
*/
|
|
1145
935
|
declare function buildRefEntries(nodes: InterimNode[], binding: Record<string, RefBinding>): Record<string, RefEntry>;
|
|
1146
|
-
/**
|
|
1147
|
-
* Best-effort mobile scroll metadata (D-10). Unlike web — which reads the exact window
|
|
1148
|
-
* scroll offset and document content size — mobile page source exposes no true scroll
|
|
1149
|
-
* position, so this is a documented approximation, explicit and never silently precise:
|
|
1150
|
-
* contentWidth/contentHeight are the maximum element extent across all node bounds
|
|
1151
|
-
* (falling back to the viewport dimensions when no node carries bounds), and
|
|
1152
|
-
* offsetX/offsetY stay 0 (no reliable scroll-offset signal in the source).
|
|
1153
|
-
*/
|
|
1154
936
|
declare function deriveMobileScroll(nodes: InterimNode[], viewport: {
|
|
1155
937
|
width: number;
|
|
1156
938
|
height: number;
|
|
@@ -1228,7 +1010,6 @@ declare function computeSwipe(centerX: number, centerY: number, direction: 'up'
|
|
|
1228
1010
|
};
|
|
1229
1011
|
|
|
1230
1012
|
type MobilePlatform = 'android' | 'ios';
|
|
1231
|
-
type MobileTransport = 'local' | 'browserstack';
|
|
1232
1013
|
type MobileAppState = 'preserve' | 'reset';
|
|
1233
1014
|
type MobileSetupErrorCategory = 'device-resolution' | 'appium-startup' | 'device-readiness' | 'adapter-load' | 'app-install' | 'app-launch';
|
|
1234
1015
|
interface MobileSetupErrorOptions {
|
|
@@ -1254,13 +1035,10 @@ declare class MobileSetupError extends Error {
|
|
|
1254
1035
|
interface ResolvedMobileDevice {
|
|
1255
1036
|
name: string;
|
|
1256
1037
|
platform: MobilePlatform;
|
|
1257
|
-
transport: MobileTransport;
|
|
1258
1038
|
match: Record<string, unknown>;
|
|
1259
1039
|
}
|
|
1260
1040
|
interface ResolvedMobileAppInstall {
|
|
1261
1041
|
path?: string;
|
|
1262
|
-
browserstack?: string;
|
|
1263
|
-
browserstackBaseDir?: string;
|
|
1264
1042
|
sourceTrace: Record<string, string>;
|
|
1265
1043
|
}
|
|
1266
1044
|
interface ResolvedMobileApp {
|
|
@@ -1275,7 +1053,6 @@ interface ResolvedMobileRunConfig {
|
|
|
1275
1053
|
platform: MobilePlatform;
|
|
1276
1054
|
targetName: string;
|
|
1277
1055
|
deviceName: string;
|
|
1278
|
-
transport: MobileTransport;
|
|
1279
1056
|
device: ResolvedMobileDevice;
|
|
1280
1057
|
app: ResolvedMobileApp;
|
|
1281
1058
|
appState: MobileAppState;
|
|
@@ -1296,7 +1073,6 @@ interface ResolveMobileRunConfigInput {
|
|
|
1296
1073
|
devices?: Record<string, Record<string, unknown>>;
|
|
1297
1074
|
apps?: Record<string, {
|
|
1298
1075
|
path?: string;
|
|
1299
|
-
browserstack?: string;
|
|
1300
1076
|
}>;
|
|
1301
1077
|
filePath?: string;
|
|
1302
1078
|
} | null;
|
|
@@ -1628,7 +1404,6 @@ interface ScopedLogger {
|
|
|
1628
1404
|
error(msg: string, data?: Record<string, unknown>): void;
|
|
1629
1405
|
}
|
|
1630
1406
|
declare const AgentLogDataSchema: z.ZodObject<{
|
|
1631
|
-
extractDom: z.ZodOptional<z.ZodBoolean>;
|
|
1632
1407
|
hasScreenshot: z.ZodOptional<z.ZodBoolean>;
|
|
1633
1408
|
duration: z.ZodOptional<z.ZodNumber>;
|
|
1634
1409
|
elementCount: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1682,12 +1457,6 @@ declare const RunnerLogDataSchema: z.ZodObject<{
|
|
|
1682
1457
|
}, z.core.$strip>;
|
|
1683
1458
|
declare const LogSourceDataSchemas: Record<LogSource, z.ZodType>;
|
|
1684
1459
|
|
|
1685
|
-
/**
|
|
1686
|
-
* One member's run-id binding, held in async context rather than on the manager (WINDOWS #233).
|
|
1687
|
-
*
|
|
1688
|
-
* `pending` is that member's own not-yet-attributed entries — the lines it wrote before it minted
|
|
1689
|
-
* its run id. Only these are backfilled by its `setRunId`, so a sibling can never adopt them.
|
|
1690
|
-
*/
|
|
1691
1460
|
interface MemberLogScope {
|
|
1692
1461
|
runId: string;
|
|
1693
1462
|
readonly pending: LogEntry[];
|
|
@@ -1720,6 +1489,7 @@ declare class LogManager {
|
|
|
1720
1489
|
private readonly ndjson;
|
|
1721
1490
|
private redactor?;
|
|
1722
1491
|
private readonly memberScope?;
|
|
1492
|
+
private readonly env?;
|
|
1723
1493
|
constructor(opts: {
|
|
1724
1494
|
runId?: string;
|
|
1725
1495
|
displayLevel: LogLevel;
|
|
@@ -1727,19 +1497,9 @@ declare class LogManager {
|
|
|
1727
1497
|
ndjson?: boolean;
|
|
1728
1498
|
redactor?: SecretRedactor;
|
|
1729
1499
|
memberScope?: AsyncScopeStore<MemberLogScope>;
|
|
1500
|
+
env?: RunTextEnv;
|
|
1730
1501
|
});
|
|
1731
1502
|
setRedactor(redactor: SecretRedactor | undefined): void;
|
|
1732
|
-
/**
|
|
1733
|
-
* Run `fn` with its own run-id binding, so concurrent members cannot overwrite each other.
|
|
1734
|
-
*
|
|
1735
|
-
* ONE `LogManager` SERVES EVERY MEMBER of a run — `commands/run.ts` builds it once, outside the
|
|
1736
|
-
* per-member closure — and since 402-02/402-03 the direct path runs members concurrently. Without
|
|
1737
|
-
* a scope, `setRunId` is a single mutable field plus a whole-buffer backfill, so the LAST member
|
|
1738
|
-
* to mint an id claims every line in the buffer, its siblings' included (measured, not inferred).
|
|
1739
|
-
*
|
|
1740
|
-
* Outside a scope nothing changes: `setRunId` keeps its original whole-buffer behaviour, which is
|
|
1741
|
-
* what the sequential path and the run-level `onRunCreated` stamp rely on.
|
|
1742
|
-
*/
|
|
1743
1503
|
runInMemberScope<T>(fn: () => T): T;
|
|
1744
1504
|
log(level: Exclude<LogLevel, 'silent'>, source: LogSource, message: string, data?: Record<string, unknown>): void;
|
|
1745
1505
|
private shouldDisplay;
|
|
@@ -1763,122 +1523,19 @@ declare class LogManager {
|
|
|
1763
1523
|
|
|
1764
1524
|
declare function formatLogEntry(entry: LogEntry): string;
|
|
1765
1525
|
|
|
1766
|
-
interface FarmProvider {
|
|
1767
|
-
readonly name: string;
|
|
1768
|
-
readonly slug: string;
|
|
1769
|
-
resolveWebEndpoint(config: FarmWebConfig): Promise<{
|
|
1770
|
-
wsEndpoint: string;
|
|
1771
|
-
capabilities: Record<string, unknown>;
|
|
1772
|
-
}>;
|
|
1773
|
-
resolveMobileCapabilities(config: FarmMobileConfig): Promise<{
|
|
1774
|
-
hostname: string;
|
|
1775
|
-
port: number;
|
|
1776
|
-
path: string;
|
|
1777
|
-
capabilities: Record<string, unknown>;
|
|
1778
|
-
}>;
|
|
1779
|
-
resolveCredentials(providerConfig?: FarmProviderConfig): {
|
|
1780
|
-
username: string;
|
|
1781
|
-
accessKey: string;
|
|
1782
|
-
};
|
|
1783
|
-
validateDevice(deviceName: string, platform: 'android' | 'ios'): Promise<{
|
|
1784
|
-
valid: boolean;
|
|
1785
|
-
suggestions?: string[];
|
|
1786
|
-
}>;
|
|
1787
|
-
getSessionUrl(sessionId: string, type: 'web' | 'mobile'): string;
|
|
1788
|
-
}
|
|
1789
|
-
interface FarmWebConfig {
|
|
1790
|
-
browser: BrowserConfig;
|
|
1791
|
-
credentials: {
|
|
1792
|
-
username: string;
|
|
1793
|
-
accessKey: string;
|
|
1794
|
-
};
|
|
1795
|
-
testName?: string;
|
|
1796
|
-
playwrightVersion?: string;
|
|
1797
|
-
}
|
|
1798
|
-
interface FarmMobileConfig {
|
|
1799
|
-
match: Record<string, unknown>;
|
|
1800
|
-
platform: 'android' | 'ios';
|
|
1801
|
-
credentials: {
|
|
1802
|
-
username: string;
|
|
1803
|
-
accessKey: string;
|
|
1804
|
-
};
|
|
1805
|
-
testName?: string;
|
|
1806
|
-
testTimeout?: number;
|
|
1807
|
-
app?: string;
|
|
1808
|
-
appState?: 'preserve' | 'reset';
|
|
1809
|
-
appBaseDir?: string;
|
|
1810
|
-
appSourceTrace?: string[];
|
|
1811
|
-
}
|
|
1812
|
-
interface FarmProviderConfig {
|
|
1813
|
-
username?: string;
|
|
1814
|
-
accessKey?: string;
|
|
1815
|
-
}
|
|
1816
|
-
|
|
1817
|
-
declare function registerProvider(provider: FarmProvider): void;
|
|
1818
|
-
declare function getProvider(slug: string): FarmProvider | undefined;
|
|
1819
|
-
declare function listProviders(): FarmProvider[];
|
|
1820
|
-
declare function registerAllProviders(): void;
|
|
1821
|
-
|
|
1822
|
-
declare function resolveFarmCredentials(provider: string, providerConfig?: FarmProviderConfig): {
|
|
1823
|
-
username: string;
|
|
1824
|
-
accessKey: string;
|
|
1825
|
-
};
|
|
1826
|
-
|
|
1827
|
-
declare function detectPlaywrightVersion(): string;
|
|
1828
|
-
declare function mapWebCapabilities(browser: BrowserConfig, credentials: {
|
|
1829
|
-
username: string;
|
|
1830
|
-
accessKey: string;
|
|
1831
|
-
}, opts?: {
|
|
1832
|
-
testName?: string;
|
|
1833
|
-
playwrightVersion?: string;
|
|
1834
|
-
}): Record<string, unknown>;
|
|
1835
|
-
declare function mapMobileCapabilities(match: Record<string, unknown>, platform: 'android' | 'ios', credentials: {
|
|
1836
|
-
username: string;
|
|
1837
|
-
accessKey: string;
|
|
1838
|
-
}, opts?: {
|
|
1839
|
-
testName?: string;
|
|
1840
|
-
testTimeout?: number;
|
|
1841
|
-
}): Record<string, unknown>;
|
|
1842
|
-
|
|
1843
|
-
declare const browserstackProvider: FarmProvider;
|
|
1844
|
-
|
|
1845
|
-
/**
|
|
1846
|
-
* Suite run configuration — a types-only contract consumed by the CLI composition root.
|
|
1847
|
-
* The former `runSuite`/`executeSuiteMember` orchestration moved onto runner soil
|
|
1848
|
-
* (`runMemberTest`) in Phase 363; the CLI now composes per-member execution directly and
|
|
1849
|
-
* this interface only describes the shape it passes through. Field types that used to be
|
|
1850
|
-
* borrowed from the (deleted) `RunTestConfig` are inlined here so the module carries no
|
|
1851
|
-
* value dependency on the retired core run path.
|
|
1852
|
-
*/
|
|
1853
1526
|
interface RunSuiteConfig {
|
|
1854
1527
|
runId?: string;
|
|
1855
1528
|
adapter: PlatformAdapter;
|
|
1856
1529
|
platformConfig: PlatformConfig;
|
|
1857
|
-
planner: Planner
|
|
1858
|
-
verifier: Verifier
|
|
1530
|
+
planner: Planner;
|
|
1531
|
+
verifier: Verifier;
|
|
1859
1532
|
cache?: ActionPlanCache;
|
|
1860
|
-
/**
|
|
1861
|
-
* WM-01 run-scoped working-memory store (Phase 358). ONE store spans all suite member tests
|
|
1862
|
-
* (run-scoped, not test-scoped) and is threaded into each test's runner loop; the CLI flushes
|
|
1863
|
-
* it once at suite end.
|
|
1864
|
-
*/
|
|
1865
1533
|
workingMemory?: WorkingMemoryPort;
|
|
1866
|
-
/**
|
|
1867
|
-
* D-14 storage-state store (Phase 360). ONE run-scoped store spans all suite member tests and is
|
|
1868
|
-
* threaded into each test's runner loop; the CLI constructs it at the composition root.
|
|
1869
|
-
*/
|
|
1870
1534
|
storageState?: StorageStatePort;
|
|
1871
|
-
/**
|
|
1872
|
-
* D-08/Q10 screenshot compressor (Phase 363). ONE runner-local `SharpScreenshotCompressor`
|
|
1873
|
-
* constructed at the CLI composition root, threaded into each member's runner loop (sharp left
|
|
1874
|
-
* core). Absent ⇒ compressor-less loop.
|
|
1875
|
-
*/
|
|
1876
1535
|
compressor?: ScreenshotCompressor;
|
|
1877
1536
|
plannerModel: LanguageModel;
|
|
1878
1537
|
verifierModel: LanguageModel;
|
|
1879
|
-
reporters?: never[];
|
|
1880
1538
|
captureScreenshots?: boolean;
|
|
1881
|
-
screenshotMode?: 'failure' | 'every-step';
|
|
1882
1539
|
timeouts?: {
|
|
1883
1540
|
step?: number;
|
|
1884
1541
|
test?: number;
|
|
@@ -1899,7 +1556,7 @@ interface RunSuiteConfig {
|
|
|
1899
1556
|
accessibility?: {
|
|
1900
1557
|
enabled: boolean;
|
|
1901
1558
|
standard?: 'wcag2a' | 'wcag2aa' | 'wcag2aaa';
|
|
1902
|
-
runAfter?: 'every-step' | '
|
|
1559
|
+
runAfter?: 'every-step' | 'test-end';
|
|
1903
1560
|
failOnViolation?: boolean;
|
|
1904
1561
|
disableRules?: string[];
|
|
1905
1562
|
exclude?: string[];
|
|
@@ -1913,7 +1570,7 @@ interface RunSuiteConfig {
|
|
|
1913
1570
|
screenshotSize?: number;
|
|
1914
1571
|
effectiveResolution?: number;
|
|
1915
1572
|
};
|
|
1916
|
-
/** Vision gate resolved once per run at the composition root
|
|
1573
|
+
/** Vision gate resolved once per run at the composition root; passed through to each test. */
|
|
1917
1574
|
visionGate?: {
|
|
1918
1575
|
attachImage: boolean;
|
|
1919
1576
|
captureMode: 'full' | 'textOnly';
|
|
@@ -1931,12 +1588,6 @@ interface RunSuiteConfig {
|
|
|
1931
1588
|
secretRedactor?: SecretRedactor;
|
|
1932
1589
|
}
|
|
1933
1590
|
|
|
1934
|
-
/**
|
|
1935
|
-
* Merge the suite's target/use into a member test and strip its own `url` (the suite owns
|
|
1936
|
-
* startup navigation). The per-member execution body (formerly `executeSuiteMember`) moved onto
|
|
1937
|
-
* runner soil (`runMemberTest`) in Phase 363; the CLI composition root patches each member with
|
|
1938
|
-
* this helper before running it.
|
|
1939
|
-
*/
|
|
1940
1591
|
declare function patchTestForSuite(test: TestDefinition, suite: SuiteDefinition, _index: number): TestDefinition;
|
|
1941
1592
|
|
|
1942
1593
|
type WorkspaceFileKind = 'test' | 'suite';
|
|
@@ -1965,25 +1616,6 @@ interface ResolveWorkspacePathsInput {
|
|
|
1965
1616
|
configPath: string;
|
|
1966
1617
|
requireExistingFiles?: boolean;
|
|
1967
1618
|
}
|
|
1968
|
-
/**
|
|
1969
|
-
* The ONE spelling of the durable workspace-relative IDENTITY recipe (390-08 / CR-02, D-01).
|
|
1970
|
-
*
|
|
1971
|
-
* `configDir`-rooted, forward-slashed, `./`-trimmed, and escape-refusing — literally
|
|
1972
|
-
* {@link assertInsideWorkspace} with {@link resolveWorkspaceFileTarget}'s resolution step in front,
|
|
1973
|
-
* exported rather than re-derived so no second spelling of the rule can drift from this one.
|
|
1974
|
-
*
|
|
1975
|
-
* WHY IT EXISTS: the committed `quarantine.jsonl` keys entries on this string and compares it with
|
|
1976
|
-
* `===`. An absolute path is bytes only the machine that wrote them can produce, so a ledger
|
|
1977
|
-
* carrying absolute identities could never match on a fresh CI checkout — it would be committed for
|
|
1978
|
-
* an inheritance it structurally cannot deliver. These bytes are IDENTITY ONLY and are never used
|
|
1979
|
-
* for file access; readers keep the absolute path they already resolved.
|
|
1980
|
-
*
|
|
1981
|
-
* Accepting an already-relative input (resolved against `configDir`, as
|
|
1982
|
-
* {@link resolveWorkspaceFileTarget} does) makes the mint idempotent: handing an identity through a
|
|
1983
|
-
* second layer cannot silently re-anchor it on `process.cwd()`.
|
|
1984
|
-
*
|
|
1985
|
-
* @throws when the path resolves outside `configDir` — an escaping file cannot mint an identity.
|
|
1986
|
-
*/
|
|
1987
1619
|
declare function workspaceRelativeIdentityPath(configDir: string, filePath: string): string;
|
|
1988
1620
|
declare function resolveWorkspacePaths(input: ResolveWorkspacePathsInput): ResolvedWorkspacePaths;
|
|
1989
1621
|
declare function discoverWorkspaceFiles(input: {
|
|
@@ -2034,32 +1666,6 @@ declare function validateProject(options?: {
|
|
|
2034
1666
|
workspace?: ResolvedWorkspacePaths;
|
|
2035
1667
|
}): Promise<ValidationResult>;
|
|
2036
1668
|
|
|
2037
|
-
/**
|
|
2038
|
-
* A yaml parse failure as a POSITION, and as nothing else (395-10 · GAP 1 / CR-01 · 395-14 · F-01).
|
|
2039
|
-
*
|
|
2040
|
-
* THE ERROR IS NOT A MESSAGE SOURCE HERE. `yaml`'s `YAMLParseError` carries `linePos` — where the
|
|
2041
|
-
* parser gave up — beside a `message` that is pretty-printed with a verbatim excerpt of the
|
|
2042
|
-
* offending source line and a caret beneath the column. Every other property (`message`, `code`,
|
|
2043
|
-
* the object's own stringification) is derived from the person's file content and is therefore not
|
|
2044
|
-
* this product's to publish: the strings built from this one are persisted in blocked records,
|
|
2045
|
-
* printed by `proposals show`, thrown out of every config op, printed by `agent-qa validate`, and —
|
|
2046
|
-
* through `refusalMessage` — carried into a chat turn's answer and its session jsonl. So this
|
|
2047
|
-
* function reads two NUMBERS and composes a sentence of its own.
|
|
2048
|
-
*
|
|
2049
|
-
* THE FALLBACK IS VALUE-FREE TOO, and that is the point of having one. A throw with no `linePos` is
|
|
2050
|
-
* not a yaml parse error this product recognises, and the tempting repair — fall back to the error's
|
|
2051
|
-
* message when the position is missing — would reopen the whole channel for exactly the inputs
|
|
2052
|
-
* nobody anticipated.
|
|
2053
|
-
*
|
|
2054
|
-
* IT LIVES IN CORE AND HAS THREE CALLERS (395-14). It was a private copy in the cli composition
|
|
2055
|
-
* root; the loader guard and core's own `validateConfig` arm need the SAME sentence, and two
|
|
2056
|
-
* spellings of one sentence are two things that can drift apart. One primitive, three callers:
|
|
2057
|
-
* `cli/src/config.ts`, `core/src/validation/validate.ts`, and the cli validate port.
|
|
2058
|
-
*
|
|
2059
|
-
* THE ARGUMENT IS GUARDED BEFORE IT IS READ (395-14 · WR-08 / F-09). A `throw null` or a
|
|
2060
|
-
* `throw 'boom'` is a legal throw; the 395-10 copy reached for `.linePos` unguarded and answered a
|
|
2061
|
-
* TypeError for `null` — a crash inside the code whose whole job is to turn a fault into a sentence.
|
|
2062
|
-
*/
|
|
2063
1669
|
declare function yamlParseFailureMessage(error: unknown): string;
|
|
2064
1670
|
|
|
2065
1671
|
declare function formatDiagnostics(result: ValidationResult): string;
|
|
@@ -2081,14 +1687,6 @@ declare function parseHooksFile(filePath: string): Promise<{
|
|
|
2081
1687
|
declare function generateHookId(): string;
|
|
2082
1688
|
|
|
2083
1689
|
declare function generateRunId(): string;
|
|
2084
|
-
/**
|
|
2085
|
-
* Is this an id the run mint above would have produced? (2026-08-23, 401-20 · CR-04)
|
|
2086
|
-
*
|
|
2087
|
-
* THE MINT'S OWN INVERSE, re-exported one line under it and from the same package, so the two can
|
|
2088
|
-
* never answer about different id shapes. The invocation core takes this as a REQUIRED option
|
|
2089
|
-
* beside `mintRunId` for the reason the mint is one: `agent-local` may not name the ids package,
|
|
2090
|
-
* and a shape check invented there would be a second spelling of a run's identity.
|
|
2091
|
-
*/
|
|
2092
1690
|
declare function isCanonicalRunId(value: string): boolean;
|
|
2093
1691
|
|
|
2094
1692
|
type RunAttributes = Record<string, string>;
|
|
@@ -2097,7 +1695,7 @@ declare const ATTR_TRIGGER = "agent-qa.trigger";
|
|
|
2097
1695
|
declare const ATTR_RUNNER = "agent-qa.runner";
|
|
2098
1696
|
declare const ATTR_GATE_RUN = "agent-qa.gate-run";
|
|
2099
1697
|
type RunAttributeTrigger = 'cli' | 'dashboard' | 'api' | 'mcp';
|
|
2100
|
-
type RunAttributeRunner = 'local'
|
|
1698
|
+
type RunAttributeRunner = 'local';
|
|
2101
1699
|
declare const RUN_ATTRIBUTE_KEY_MAX_LENGTH = 256;
|
|
2102
1700
|
declare const RUN_ATTRIBUTE_VALUE_MAX_LENGTH = 4096;
|
|
2103
1701
|
interface ParsedRunAttrFlags {
|
|
@@ -2105,7 +1703,6 @@ interface ParsedRunAttrFlags {
|
|
|
2105
1703
|
duplicateKeys: string[];
|
|
2106
1704
|
}
|
|
2107
1705
|
declare function validateUserRunAttributes(input: unknown, sourceLabel?: string): RunAttributes;
|
|
2108
|
-
declare function validateTrustedRunAttributes(input: unknown, sourceLabel?: string): RunAttributes;
|
|
2109
1706
|
declare function parseRunAttrFlags(flags: string[] | undefined): ParsedRunAttrFlags;
|
|
2110
1707
|
declare function buildInternalRunAttributes(input: {
|
|
2111
1708
|
trigger: RunAttributeTrigger;
|
|
@@ -2155,4 +1752,4 @@ declare function locateRunsDbPath(configDir: string, configuredDbPath?: string):
|
|
|
2155
1752
|
|
|
2156
1753
|
declare function isPathInsideDir(childPath: string, parentDir: string): boolean;
|
|
2157
1754
|
|
|
2158
|
-
export { AGENT_QA_VERSION, ANDROID_ROLE_MAP, ATTR_GATE_RUN, ATTR_RUNNER, ATTR_TRIGGER, AUTH_STATE_SCHEMA_VERSION, AUTH_STATE_SLUG_PATTERN, AccessibilityConfigSchema,
|
|
1755
|
+
export { AGENT_QA_VERSION, ANDROID_ROLE_MAP, ATTR_GATE_RUN, ATTR_RUNNER, ATTR_TRIGGER, AUTH_STATE_SCHEMA_VERSION, AUTH_STATE_SLUG_PATTERN, AccessibilityConfigSchema, AdapterLogDataSchema, AgentLogDataSchema, type AgentQaConfig, AgentQaConfigSchema, type AgentQaUpdateStatus, AnalyticsSchema, type AppiumExecutableSource, type AsyncScopeStore, type AuthCredential, type AuthPluginBundle, type AuthPluginDeclaration, AuthPluginDeclarationSchema, type AuthProvider, AuthStateConfigSchema, type AuthStateMetadata, AuthStateMetadataSchema, AuthStateNameSchema, type AuthStateTargetPlatform, AuthStateUseSchema, type AuthStore, BrowserConfigSchema, CacheConfigSchema, CacheLogDataSchema, type CaptureConfig, CaptureConfigSchema, type CreateAuthFetchContext, type CreateAuthFetchOptions, DEFAULT_AGENT_QA_ARTIFACTS_DIR, DEFAULT_AGENT_QA_AUTH_STATES_DIR, DEFAULT_AGENT_QA_CACHE_DIR, DEFAULT_AGENT_QA_RUNS_DB_PATH, DEFAULT_AGENT_QA_RUNTIME_DIR, DEFAULT_AGENT_QA_SCREENSHOTS_DIR, DEFAULT_AGENT_QA_VIDEOS_DIR, type DashboardAuthMetadata, type DashboardAuthMode, DashboardConfigSchema, DeviceProfileSchema, DurationString, type ExchangeCodeContext, type FileAttachment, HookDefinitionSchema, HookLogDataSchema, type HooksFileConfig, HooksFileSchema, INTERNAL_ATTRIBUTE_PREFIX, IOS_EDITABLE_TYPES, IOS_ROLE_MAP, type IdentifiedScrollOffsets, KEY_MAP, KnowledgeConfigSchema, LEGACY_AGENT_QA_DASHBOARD_DB_PATH, type LLMAuthProviderPlugin, type LLMModelAdapter, type LLMProviderMode, LOG_LEVEL_PRIORITY, LOOPBACK_HOSTS, type ListAuthStateMetadataInput, type LoadLLMAuthPluginsOptions, LogCaptureConfigSchema, type LogEntry, type LogLevel, LogManager, type LogSource, LogSourceDataSchemas, type LogStorage, LoggingConfigSchema, McpConfigSchema, type MemberLogScope, MemberLogScopeUnavailableError, type MobileAppState, MobileAppStateSchema, MobileElementResolver, type MobileNode, type MobilePlatform, type MobileRefMap, MobileSetupError, type MobileSetupErrorCategory, type MobileSetupErrorOptions, MobileUseOverrideSchema, MobileUseSchema, ModelConfigSchema, NameSlugSchema, NamedLLMConfigSchema, type NormalizedAuthStateUse, type OAuthTokens, PUBLIC_PROVIDER_API_HOSTS, type ParseAllTestBindingsResult, type ParseError, type ParseResult, type ParsedMobileSource, type ParsedRunAttrFlags, type ParsedTestBinding, type ParsedTestDocument, PatchOpUnsupportedTargetError, PatchPointerOutsideEditableRegionError, PatchPointerUnresolvableError, PatchedDocumentInvalidError, PlannerConfigSchema, PlannerLogDataSchema, PluginsSchema, type ProviderPluginDeclaration, ProviderPluginDeclarationSchema, type ProviderPluginDescriptor, RUN_ATTRIBUTE_KEY_MAX_LENGTH, RUN_ATTRIBUTE_VALUE_MAX_LENGTH, RecordingConfigSchema, type RefEntry, type RegistryConfig, RegistrySchema, type RemoveAuthStateFilesInput, type RemoveAuthStateTargetInput, type ResolveAppiumExecutableOptions, type ResolveAuthStateForRunInput, type ResolveAuthStatePathsInput, type ResolveAuthStateRootInput, type ResolveMobileRunConfigInput, type ResolvedAppiumExecutable, type ResolvedAuthStateForRun, type ResolvedAuthStatePaths, type ResolvedLLMAuth, type ResolvedMobileApp, type ResolvedMobileAppInstall, type ResolvedMobileDevice, type ResolvedMobileRunConfig, type ResolvedWorkspaceFile, type ResolvedWorkspacePaths, type RunAttributeRunner, type RunAttributeTrigger, type RunAttributes, type RunSuiteConfig, RunTextEnv, RunnerLogDataSchema, type ScopedLogger, type ServicesConfig, ServicesSchema, SizeString, type StartAuthContext, type StartAuthResult, type SuiteDefinition, SuiteDefinitionSchema, type SuiteResult, SuiteTestEntrySchema, TargetNameSchema, TargetSchema, type TestConfig, type TestDefinition, TestDefinitionSchema, type TestMeta, TestMetaSchema, type TestStep, TestStepSchema, TimeoutConfigSchema, type TokenRefreshFn, type UseConfig, UseSchema, VALID_FILENAME_RE, VERSION_CHECK_CACHE_TTL_MS, VERSION_CHECK_TIMEOUT_MS, type ValidationDiagnostic, type ValidationResult, type VersionCheckOptions, WEBVIEW_SCROLLERS_SCRIPT, type WorkspaceConfig, type WorkspaceFileKind, type WorkspaceFileRecord, WorkspaceSchema, type WriteAuthStateFilesInput, applyPatchSetToTestDoc, buildInternalRunAttributes, buildRefEntries, clearLLMAuthProviderPlugins, clearLoadedLLMAuthPluginModules, clearLoadedProviderPluginModules, computeFingerPositions, computePinch, computeSwipe, createAuthFetch, deriveMobileScroll, detectGlobOverlap, discoverWorkspaceFiles, estimateTokens, formatAppiumInstallGuidance, formatDiagnostics, formatDiagnosticsPlain, formatLogEntry, formatParseError, formatRunAttributesBlock, generateHookId, generatePKCE, generateRunId, generateState, getAgentQaUpdateStatus, getAgentQaVersion, getAgentQaVersionCheckCachePath, getAuthPath, getCredential, getLLMAuthProviderPlugin, isCanonicalRunId, isLoopbackHost, isPathInsideDir, isWorkspacePathMatch, listAuthStateMetadata, listLLMAuthProviderPlugins, loadLLMAuthPlugins, loadProviderPlugins, localAppiumBinaryNames, locateRunsDbPath, mergeRunAttributes, normalizeAuthStateUse, normalizeRole, parseAllTestBindings, parseAllTests, parseHooksFile, parseMobileSource, parseRunAttrFlags, parseSuiteFile, parseTestFile, parseTestFileWithTokens, parseWebViewScrollers, patchTestForSuite, readAuth, readAuthStateMetadata, refuseRetiredLocalBindings, registerLLMAuthProviderPlugin, registerLLMAuthProviderPlugins, removeAuth, removeAuthStateFiles, removeAuthStateTarget, renderPatchedTestDoc, resolveAppiumExecutable, resolveAuthStateForRun, resolveAuthStatePaths, resolveAuthStateRoot, resolveFileReferences, resolveKnowledgeRoot, resolveLLMAuth, resolveMobileRunConfig, resolveWorkspaceFileTarget, resolveWorkspacePaths, sortRunAttributesForDisplay, validateConfig, validateFilename, validateFiles, validateProject, validateSuiteFile, validateTestFile, validateUserRunAttributes, warnIfOutOfBounds, webViewSwipeSignal, workspaceRelativeIdentityPath, writeAuth, writeAuthStateFiles, yamlParseFailureMessage };
|