agent-scenario-loop 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +119 -0
- package/app/profile-session.ts +812 -0
- package/core/config-template.json +41 -0
- package/dist/core/agent-summary.d.ts +15 -0
- package/dist/core/agent-summary.js +177 -0
- package/dist/core/artifact-contract.d.ts +151 -0
- package/dist/core/artifact-contract.js +897 -0
- package/dist/core/artifact-layout.d.ts +56 -0
- package/dist/core/artifact-layout.js +61 -0
- package/dist/core/artifact-writer.d.ts +44 -0
- package/dist/core/artifact-writer.js +55 -0
- package/dist/core/comparison.d.ts +133 -0
- package/dist/core/comparison.js +294 -0
- package/dist/core/evidence-interpreter.d.ts +28 -0
- package/dist/core/evidence-interpreter.js +69 -0
- package/dist/core/execution-plan.d.ts +44 -0
- package/dist/core/execution-plan.js +95 -0
- package/dist/core/planner.d.ts +132 -0
- package/dist/core/planner.js +812 -0
- package/dist/core/ports.d.ts +198 -0
- package/dist/core/ports.js +146 -0
- package/dist/core/run-index.d.ts +62 -0
- package/dist/core/run-index.js +143 -0
- package/dist/core/schema-validator.d.ts +86 -0
- package/dist/core/schema-validator.js +407 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +27 -0
- package/dist/runner/agent-device-driver.d.ts +126 -0
- package/dist/runner/agent-device-driver.js +168 -0
- package/dist/runner/agent-device.d.ts +295 -0
- package/dist/runner/agent-device.js +1271 -0
- package/dist/runner/android-adb-driver.d.ts +175 -0
- package/dist/runner/android-adb-driver.js +399 -0
- package/dist/runner/android-adb.d.ts +254 -0
- package/dist/runner/android-adb.js +1618 -0
- package/dist/runner/argent-driver.d.ts +183 -0
- package/dist/runner/argent-driver.js +297 -0
- package/dist/runner/argent.d.ts +349 -0
- package/dist/runner/argent.js +1211 -0
- package/dist/runner/check-plan.d.ts +45 -0
- package/dist/runner/check-plan.js +210 -0
- package/dist/runner/cli.d.ts +20 -0
- package/dist/runner/cli.js +23 -0
- package/dist/runner/compare-latest.d.ts +99 -0
- package/dist/runner/compare-latest.js +233 -0
- package/dist/runner/compare.d.ts +58 -0
- package/dist/runner/compare.js +157 -0
- package/dist/runner/demo-loop.d.ts +45 -0
- package/dist/runner/demo-loop.js +170 -0
- package/dist/runner/example-android-live.d.ts +137 -0
- package/dist/runner/example-android-live.js +454 -0
- package/dist/runner/example-ios-live.d.ts +137 -0
- package/dist/runner/example-ios-live.js +471 -0
- package/dist/runner/host-doctor.d.ts +131 -0
- package/dist/runner/host-doctor.js +628 -0
- package/dist/runner/init-project.d.ts +88 -0
- package/dist/runner/init-project.js +263 -0
- package/dist/runner/ios-simctl-driver.d.ts +69 -0
- package/dist/runner/ios-simctl-driver.js +97 -0
- package/dist/runner/ios-simctl.d.ts +254 -0
- package/dist/runner/ios-simctl.js +1415 -0
- package/dist/runner/live-android.d.ts +137 -0
- package/dist/runner/live-android.js +539 -0
- package/dist/runner/live-comparison.d.ts +67 -0
- package/dist/runner/live-comparison.js +147 -0
- package/dist/runner/live-ios.d.ts +137 -0
- package/dist/runner/live-ios.js +460 -0
- package/dist/runner/live-proof-summary.d.ts +263 -0
- package/dist/runner/live-proof-summary.js +465 -0
- package/dist/runner/live-proof.d.ts +467 -0
- package/dist/runner/live-proof.js +920 -0
- package/dist/runner/local-env.d.ts +64 -0
- package/dist/runner/local-env.js +155 -0
- package/dist/runner/profile-android.d.ts +82 -0
- package/dist/runner/profile-android.js +671 -0
- package/dist/runner/profile-ios.d.ts +108 -0
- package/dist/runner/profile-ios.js +532 -0
- package/dist/runner/profile-mobile.d.ts +254 -0
- package/dist/runner/profile-mobile.js +1307 -0
- package/dist/runner/validate-project.d.ts +273 -0
- package/dist/runner/validate-project.js +1501 -0
- package/docs/adapters.md +145 -0
- package/docs/api.md +94 -0
- package/docs/authoring.md +196 -0
- package/docs/concepts.md +136 -0
- package/docs/consumer-rehearsal.md +115 -0
- package/docs/contracts.md +267 -0
- package/docs/live-proofs.md +270 -0
- package/docs/principles.md +46 -0
- package/examples/event-logs/app-startup-baseline.log +4 -0
- package/examples/event-logs/app-startup-current.log +4 -0
- package/examples/minimal-app/README.md +70 -0
- package/examples/mobile-app/README.md +302 -0
- package/examples/mobile-app/app.json +22 -0
- package/examples/mobile-app/asl/package-scripts.json +32 -0
- package/examples/mobile-app/asl.config.json +37 -0
- package/examples/mobile-app/event-logs/android-app-startup.log +4 -0
- package/examples/mobile-app/event-logs/android-open-close-cycle.log +12 -0
- package/examples/mobile-app/event-logs/android-scroll-settle.log +12 -0
- package/examples/mobile-app/event-logs/app-startup.log +4 -0
- package/examples/mobile-app/event-logs/open-close-cycle.log +12 -0
- package/examples/mobile-app/event-logs/scroll-settle.log +12 -0
- package/examples/mobile-app/index.ts +20 -0
- package/examples/mobile-app/metro.config.js +20 -0
- package/examples/mobile-app/package.json +62 -0
- package/examples/mobile-app/patches/expo-modules-jsi@56.0.10.patch +19 -0
- package/examples/mobile-app/plugins/with-ios-build-compat.js +271 -0
- package/examples/mobile-app/pnpm-lock.yaml +4440 -0
- package/examples/mobile-app/runner-manifests/evidence-provider.json +79 -0
- package/examples/mobile-app/runner-manifests/primary-runner.json +19 -0
- package/examples/mobile-app/scenarios/android/app-startup-video.json +73 -0
- package/examples/mobile-app/scenarios/android/app-startup.json +44 -0
- package/examples/mobile-app/scenarios/android/open-close-cycle.json +54 -0
- package/examples/mobile-app/scenarios/android/scroll-settle.json +49 -0
- package/examples/mobile-app/scenarios/ios/app-startup.json +44 -0
- package/examples/mobile-app/scenarios/ios/open-close-cycle.json +54 -0
- package/examples/mobile-app/scenarios/ios/scroll-settle.json +49 -0
- package/examples/mobile-app/scenarios/mobile/app-startup.json +91 -0
- package/examples/mobile-app/scenarios/mobile/open-close-cycle.json +160 -0
- package/examples/mobile-app/scenarios/mobile/scroll-settle.json +148 -0
- package/examples/mobile-app/scripts/asl-capture-accessibility-provider.mjs +112 -0
- package/examples/mobile-app/scripts/asl-capture-profiler-provider.mjs +127 -0
- package/examples/mobile-app/src/devtools/profile-session.ts +7 -0
- package/examples/mobile-app/src/example-screen.tsx +322 -0
- package/examples/mobile-app/tsconfig.json +16 -0
- package/examples/mobile-app/tsconfig.typecheck.json +13 -0
- package/examples/runners/README.md +44 -0
- package/examples/runners/adb-android.json +25 -0
- package/examples/runners/agent-device-android.json +27 -0
- package/examples/runners/agent-device-ios.json +27 -0
- package/examples/runners/argent-android.json +32 -0
- package/examples/runners/argent-ios.json +32 -0
- package/examples/runners/argent-react-profiler-provider.json +15 -0
- package/examples/runners/axe-accessibility-provider.json +24 -0
- package/examples/runners/manual-log-ingest.json +9 -0
- package/examples/runners/rozenite-profiler-provider.json +9 -0
- package/examples/runners/script-accessibility-provider.json +24 -0
- package/examples/runners/script-memory-provider.json +24 -0
- package/examples/runners/script-network-provider.json +24 -0
- package/examples/runners/script-profiler-provider.json +30 -0
- package/examples/runners/xcodebuildmcp-ios.json +29 -0
- package/examples/scenarios/ios/app-startup.json +28 -0
- package/examples/scenarios/ios/open-close-cycle.json +35 -0
- package/examples/scenarios/mobile/app-startup.json +72 -0
- package/examples/scenarios/mobile/media-open-close.json +141 -0
- package/examples/scenarios/mobile/open-close-cycle.json +135 -0
- package/examples/scenarios/mobile/scroll-settle.json +106 -0
- package/package.json +240 -0
- package/schemas/budget-verdict.schema.json +115 -0
- package/schemas/causal-run.schema.json +279 -0
- package/schemas/comparison.schema.json +196 -0
- package/schemas/health.schema.json +108 -0
- package/schemas/live-proof-set.schema.json +195 -0
- package/schemas/live-proof.schema.json +413 -0
- package/schemas/manifest.schema.json +204 -0
- package/schemas/metrics.schema.json +137 -0
- package/schemas/project-validation.schema.json +343 -0
- package/schemas/runner-capabilities.schema.json +217 -0
- package/schemas/scenario.schema.json +400 -0
- package/schemas/verdict.schema.json +88 -0
- package/templates/evidence-provider.json +83 -0
- package/templates/gitignore-snippet +9 -0
- package/templates/integration-readme.md +125 -0
- package/templates/mobile-scenario.json +133 -0
- package/templates/package-scripts.json +32 -0
- package/templates/primary-runner.json +19 -0
- package/templates/project.config.json +37 -0
- package/templates/scripts/asl-capture-accessibility-provider.mjs +112 -0
- package/templates/scripts/asl-capture-profiler-provider.mjs +127 -0
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { Pressable, ScrollView, StyleSheet, Text, View } from 'react-native';
|
|
3
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
emitProfileEvent,
|
|
7
|
+
registerProfileCommandTargetHandler,
|
|
8
|
+
useProfileSession,
|
|
9
|
+
useProfileSessionBootstrap,
|
|
10
|
+
} from './devtools/profile-session';
|
|
11
|
+
|
|
12
|
+
const CARDS = [
|
|
13
|
+
'Profile session control',
|
|
14
|
+
'Portable scenario manifests',
|
|
15
|
+
'Stable evidence artifacts',
|
|
16
|
+
'Before and after comparisons',
|
|
17
|
+
'Agent-readable summaries',
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Emits one app-owned profile event for the active example scenario.
|
|
22
|
+
*
|
|
23
|
+
* @param {string} event
|
|
24
|
+
* @param {number} iteration
|
|
25
|
+
* @returns {void}
|
|
26
|
+
*/
|
|
27
|
+
function mark(event: string, iteration = 1): void {
|
|
28
|
+
emitProfileEvent(event, {
|
|
29
|
+
flowId: 'example-mobile-app',
|
|
30
|
+
iteration,
|
|
31
|
+
owner: 'example-mobile-app',
|
|
32
|
+
route: 'home',
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Neutral Expo screen used to dogfood Agent Scenario Loop contracts.
|
|
38
|
+
*
|
|
39
|
+
* @returns {React.ReactElement}
|
|
40
|
+
*/
|
|
41
|
+
export function ExampleScreen(): React.ReactElement {
|
|
42
|
+
useProfileSessionBootstrap();
|
|
43
|
+
|
|
44
|
+
const insets = useSafeAreaInsets();
|
|
45
|
+
const profileSession = useProfileSession();
|
|
46
|
+
const [selectedCard, setSelectedCard] = useState<string | null>(null);
|
|
47
|
+
const [scrollSettled, setScrollSettled] = useState(false);
|
|
48
|
+
const scrollViewRef = useRef<ScrollView | null>(null);
|
|
49
|
+
const commandIterationRef = useRef(1);
|
|
50
|
+
const ignoredMomentumEndsRef = useRef(0);
|
|
51
|
+
const selectedIterationRef = useRef(1);
|
|
52
|
+
const startupRunKeyRef = useRef<string | null>(null);
|
|
53
|
+
|
|
54
|
+
const openCard = useCallback((index: number, iterationOverride?: number) => {
|
|
55
|
+
const card = CARDS[index] ?? CARDS[0];
|
|
56
|
+
const iteration = iterationOverride ?? index + 1;
|
|
57
|
+
mark('card_open_requested', iteration);
|
|
58
|
+
selectedIterationRef.current = iteration;
|
|
59
|
+
setSelectedCard(card);
|
|
60
|
+
requestAnimationFrame(() => {
|
|
61
|
+
mark('card_opened', iteration);
|
|
62
|
+
});
|
|
63
|
+
}, []);
|
|
64
|
+
|
|
65
|
+
const closeCard = useCallback(() => {
|
|
66
|
+
const iteration = selectedIterationRef.current;
|
|
67
|
+
mark('card_close_requested', iteration);
|
|
68
|
+
setSelectedCard(null);
|
|
69
|
+
requestAnimationFrame(() => {
|
|
70
|
+
mark('card_dismissed', iteration);
|
|
71
|
+
});
|
|
72
|
+
}, []);
|
|
73
|
+
|
|
74
|
+
const runScrollSettle = useCallback((iteration = 1) => {
|
|
75
|
+
setScrollSettled(false);
|
|
76
|
+
mark('feed_scroll_started', iteration);
|
|
77
|
+
ignoredMomentumEndsRef.current += 1;
|
|
78
|
+
scrollViewRef.current?.scrollTo({ animated: true, y: 360 });
|
|
79
|
+
requestAnimationFrame(() => {
|
|
80
|
+
mark('feed_first_content_visible', iteration);
|
|
81
|
+
mark('feed_scroll_settle_requested', iteration);
|
|
82
|
+
mark('feed_scroll_settled', iteration);
|
|
83
|
+
setScrollSettled(true);
|
|
84
|
+
});
|
|
85
|
+
}, []);
|
|
86
|
+
|
|
87
|
+
useEffect(() => {
|
|
88
|
+
if (profileSession.runId && profileSession.startedAt) {
|
|
89
|
+
commandIterationRef.current = 1;
|
|
90
|
+
}
|
|
91
|
+
}, [profileSession.runId, profileSession.startedAt]);
|
|
92
|
+
|
|
93
|
+
useEffect(() => {
|
|
94
|
+
const startupRunKey = `${profileSession.runId ?? 'unknown'}:${profileSession.startedAt ?? 0}`;
|
|
95
|
+
if (
|
|
96
|
+
!profileSession.active ||
|
|
97
|
+
profileSession.scenario !== 'app-startup' ||
|
|
98
|
+
!profileSession.runId ||
|
|
99
|
+
!profileSession.startedAt ||
|
|
100
|
+
startupRunKeyRef.current === startupRunKey
|
|
101
|
+
) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
startupRunKeyRef.current = startupRunKey;
|
|
106
|
+
mark('app_launch_requested');
|
|
107
|
+
requestAnimationFrame(() => {
|
|
108
|
+
mark('home_ready');
|
|
109
|
+
mark('startup_idle_observed');
|
|
110
|
+
mark('startup_complete');
|
|
111
|
+
});
|
|
112
|
+
}, [
|
|
113
|
+
profileSession.active,
|
|
114
|
+
profileSession.runId,
|
|
115
|
+
profileSession.scenario,
|
|
116
|
+
profileSession.startedAt,
|
|
117
|
+
]);
|
|
118
|
+
|
|
119
|
+
useEffect(() => {
|
|
120
|
+
const unregisterOpen = registerProfileCommandTargetHandler('example-card-1', () => {
|
|
121
|
+
openCard(0, commandIterationRef.current);
|
|
122
|
+
});
|
|
123
|
+
const unregisterClose = registerProfileCommandTargetHandler('close-card', () => {
|
|
124
|
+
closeCard();
|
|
125
|
+
commandIterationRef.current += 1;
|
|
126
|
+
});
|
|
127
|
+
const unregisterScroll = registerProfileCommandTargetHandler('scroll-feed', () => {
|
|
128
|
+
runScrollSettle(commandIterationRef.current);
|
|
129
|
+
commandIterationRef.current += 1;
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
return () => {
|
|
133
|
+
unregisterOpen();
|
|
134
|
+
unregisterClose();
|
|
135
|
+
unregisterScroll();
|
|
136
|
+
};
|
|
137
|
+
}, [closeCard, openCard, runScrollSettle]);
|
|
138
|
+
|
|
139
|
+
return (
|
|
140
|
+
<View style={styles.root}>
|
|
141
|
+
<ScrollView
|
|
142
|
+
ref={scrollViewRef}
|
|
143
|
+
contentContainerStyle={[
|
|
144
|
+
styles.content,
|
|
145
|
+
{
|
|
146
|
+
paddingBottom: Math.max(insets.bottom + 120, 144),
|
|
147
|
+
paddingTop: insets.top + 18,
|
|
148
|
+
},
|
|
149
|
+
]}
|
|
150
|
+
contentInsetAdjustmentBehavior="automatic"
|
|
151
|
+
onScrollBeginDrag={() => {
|
|
152
|
+
setScrollSettled(false);
|
|
153
|
+
mark('feed_scroll_started');
|
|
154
|
+
}}
|
|
155
|
+
onMomentumScrollEnd={() => {
|
|
156
|
+
if (ignoredMomentumEndsRef.current > 0) {
|
|
157
|
+
ignoredMomentumEndsRef.current -= 1;
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
mark('feed_first_content_visible');
|
|
162
|
+
mark('feed_scroll_settle_requested');
|
|
163
|
+
mark('feed_scroll_settled');
|
|
164
|
+
setScrollSettled(true);
|
|
165
|
+
}}
|
|
166
|
+
scrollEventThrottle={16}
|
|
167
|
+
>
|
|
168
|
+
<View style={styles.header}>
|
|
169
|
+
<Text selectable style={styles.eyebrow}>
|
|
170
|
+
agent scenario loop
|
|
171
|
+
</Text>
|
|
172
|
+
<Text selectable style={styles.title} testID="asl-example-title">
|
|
173
|
+
Example Mobile App
|
|
174
|
+
</Text>
|
|
175
|
+
<Text selectable style={styles.subtitle}>
|
|
176
|
+
A neutral app surface for startup, open-close, and scroll-settle evidence.
|
|
177
|
+
</Text>
|
|
178
|
+
</View>
|
|
179
|
+
|
|
180
|
+
{CARDS.map((card, index) => (
|
|
181
|
+
<Pressable
|
|
182
|
+
accessibilityRole="button"
|
|
183
|
+
key={card}
|
|
184
|
+
onPress={() => {
|
|
185
|
+
openCard(index);
|
|
186
|
+
}}
|
|
187
|
+
style={styles.card}
|
|
188
|
+
>
|
|
189
|
+
<Text selectable style={styles.cardTitle}>
|
|
190
|
+
{card}
|
|
191
|
+
</Text>
|
|
192
|
+
<Text selectable style={styles.cardBody}>
|
|
193
|
+
Tap to emit an open milestone and show a dismissible detail surface.
|
|
194
|
+
</Text>
|
|
195
|
+
</Pressable>
|
|
196
|
+
))}
|
|
197
|
+
|
|
198
|
+
<Text selectable style={styles.scrollState}>
|
|
199
|
+
{scrollSettled ? 'scroll evidence settled' : 'ready for scroll evidence'}
|
|
200
|
+
</Text>
|
|
201
|
+
</ScrollView>
|
|
202
|
+
|
|
203
|
+
{selectedCard ? (
|
|
204
|
+
<View
|
|
205
|
+
style={[
|
|
206
|
+
styles.sheet,
|
|
207
|
+
{
|
|
208
|
+
bottom: Math.max(insets.bottom, 18),
|
|
209
|
+
},
|
|
210
|
+
]}
|
|
211
|
+
>
|
|
212
|
+
<Text selectable style={styles.sheetTitle}>
|
|
213
|
+
{selectedCard}
|
|
214
|
+
</Text>
|
|
215
|
+
<Text selectable style={styles.sheetBody}>
|
|
216
|
+
This surface is intentionally boring so repeated open-close evidence is stable.
|
|
217
|
+
</Text>
|
|
218
|
+
<Pressable
|
|
219
|
+
accessibilityRole="button"
|
|
220
|
+
onPress={() => {
|
|
221
|
+
closeCard();
|
|
222
|
+
}}
|
|
223
|
+
style={styles.closeButton}
|
|
224
|
+
>
|
|
225
|
+
<Text style={styles.closeButtonText}>Close</Text>
|
|
226
|
+
</Pressable>
|
|
227
|
+
</View>
|
|
228
|
+
) : null}
|
|
229
|
+
</View>
|
|
230
|
+
);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
const styles = StyleSheet.create({
|
|
234
|
+
root: {
|
|
235
|
+
backgroundColor: '#f7f8fa',
|
|
236
|
+
flex: 1,
|
|
237
|
+
},
|
|
238
|
+
content: {
|
|
239
|
+
gap: 12,
|
|
240
|
+
paddingHorizontal: 16,
|
|
241
|
+
},
|
|
242
|
+
header: {
|
|
243
|
+
borderBottomColor: '#d9dde5',
|
|
244
|
+
borderBottomWidth: StyleSheet.hairlineWidth,
|
|
245
|
+
gap: 8,
|
|
246
|
+
paddingBottom: 18,
|
|
247
|
+
},
|
|
248
|
+
eyebrow: {
|
|
249
|
+
color: '#4f6b9a',
|
|
250
|
+
fontSize: 12,
|
|
251
|
+
fontWeight: '700',
|
|
252
|
+
letterSpacing: 0,
|
|
253
|
+
textTransform: 'uppercase',
|
|
254
|
+
},
|
|
255
|
+
title: {
|
|
256
|
+
color: '#151922',
|
|
257
|
+
fontSize: 28,
|
|
258
|
+
fontWeight: '800',
|
|
259
|
+
},
|
|
260
|
+
subtitle: {
|
|
261
|
+
color: '#5b6472',
|
|
262
|
+
fontSize: 15,
|
|
263
|
+
lineHeight: 21,
|
|
264
|
+
},
|
|
265
|
+
card: {
|
|
266
|
+
backgroundColor: '#ffffff',
|
|
267
|
+
borderColor: '#d9dde5',
|
|
268
|
+
borderRadius: 8,
|
|
269
|
+
borderWidth: 1,
|
|
270
|
+
padding: 16,
|
|
271
|
+
},
|
|
272
|
+
cardTitle: {
|
|
273
|
+
color: '#151922',
|
|
274
|
+
fontSize: 17,
|
|
275
|
+
fontWeight: '700',
|
|
276
|
+
},
|
|
277
|
+
cardBody: {
|
|
278
|
+
color: '#5b6472',
|
|
279
|
+
fontSize: 14,
|
|
280
|
+
lineHeight: 20,
|
|
281
|
+
marginTop: 6,
|
|
282
|
+
},
|
|
283
|
+
scrollState: {
|
|
284
|
+
color: '#4f6b9a',
|
|
285
|
+
fontSize: 13,
|
|
286
|
+
fontVariant: ['tabular-nums'],
|
|
287
|
+
fontWeight: '700',
|
|
288
|
+
},
|
|
289
|
+
sheet: {
|
|
290
|
+
backgroundColor: '#ffffff',
|
|
291
|
+
borderColor: '#d9dde5',
|
|
292
|
+
borderRadius: 8,
|
|
293
|
+
borderWidth: 1,
|
|
294
|
+
left: 16,
|
|
295
|
+
padding: 16,
|
|
296
|
+
position: 'absolute',
|
|
297
|
+
right: 16,
|
|
298
|
+
},
|
|
299
|
+
sheetTitle: {
|
|
300
|
+
color: '#151922',
|
|
301
|
+
fontSize: 20,
|
|
302
|
+
fontWeight: '800',
|
|
303
|
+
},
|
|
304
|
+
sheetBody: {
|
|
305
|
+
color: '#5b6472',
|
|
306
|
+
fontSize: 14,
|
|
307
|
+
lineHeight: 20,
|
|
308
|
+
marginTop: 8,
|
|
309
|
+
},
|
|
310
|
+
closeButton: {
|
|
311
|
+
alignItems: 'center',
|
|
312
|
+
backgroundColor: '#151922',
|
|
313
|
+
borderRadius: 8,
|
|
314
|
+
marginTop: 14,
|
|
315
|
+
padding: 12,
|
|
316
|
+
},
|
|
317
|
+
closeButtonText: {
|
|
318
|
+
color: '#ffffff',
|
|
319
|
+
fontSize: 15,
|
|
320
|
+
fontWeight: '700',
|
|
321
|
+
},
|
|
322
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "expo/tsconfig.base",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"baseUrl": ".",
|
|
5
|
+
"ignoreDeprecations": "6.0",
|
|
6
|
+
"paths": {
|
|
7
|
+
"@react-native-async-storage/async-storage": [
|
|
8
|
+
"node_modules/@react-native-async-storage/async-storage"
|
|
9
|
+
],
|
|
10
|
+
"expo-linking": ["node_modules/expo-linking"],
|
|
11
|
+
"react-native": ["node_modules/react-native"]
|
|
12
|
+
},
|
|
13
|
+
"strict": true
|
|
14
|
+
},
|
|
15
|
+
"include": ["src", "*.ts", "*.tsx"]
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"paths": {
|
|
5
|
+
"@react-native-async-storage/async-storage": [
|
|
6
|
+
"node_modules/@react-native-async-storage/async-storage"
|
|
7
|
+
],
|
|
8
|
+
"expo-linking": ["node_modules/expo-linking"],
|
|
9
|
+
"react": ["node_modules/@types/react"],
|
|
10
|
+
"react-native": ["node_modules/react-native"]
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Runner And Provider Targets
|
|
2
|
+
|
|
3
|
+
These manifests are public contract fixtures. They are schema-checked, planner-tested, and shipped with the package so adapter authors can start from known capability shapes.
|
|
4
|
+
|
|
5
|
+
They do not mean the package bundles every named tool. A fixture describes what a tool-specific adapter can provide behind the Agent Scenario Loop ports.
|
|
6
|
+
|
|
7
|
+
## Primary Runner Targets
|
|
8
|
+
|
|
9
|
+
| Manifest | Platforms | Contract role | Notes |
|
|
10
|
+
| --- | --- | --- | --- |
|
|
11
|
+
| `adb-android.json` | Android | Built-in adb runner target | Matches the bundled adb driver and Android profile capture path. |
|
|
12
|
+
| `xcodebuildmcp-ios.json` | iOS | XcodeBuildMCP target | Models an iOS simulator driver with UI, screenshot, video, log, and accessibility evidence. |
|
|
13
|
+
| `agent-device-android.json` | Android | agent-device target | Matches the bundled agent-device driver adapter's portable interaction subset. |
|
|
14
|
+
| `agent-device-ios.json` | iOS | agent-device target | Same portable interaction contract on iOS. |
|
|
15
|
+
| `argent-android.json` | Android | Argent target | Models Argent as an interaction runner paired with wrapper-owned log capture. |
|
|
16
|
+
| `argent-ios.json` | iOS | Argent target | Models Argent as an interaction runner with native-devtools and restart-health expectations. |
|
|
17
|
+
| `manual-log-ingest.json` | iOS, Android | fixture-only log ingest | Intentionally insufficient for live lifecycle ownership; useful for proving planner failures. |
|
|
18
|
+
|
|
19
|
+
## Evidence Provider Targets
|
|
20
|
+
|
|
21
|
+
| Manifest | Platforms | Contract role | Notes |
|
|
22
|
+
| --- | --- | --- | --- |
|
|
23
|
+
| `argent-react-profiler-provider.json` | Android | Argent profiler provider | Models profiler evidence as a provider lane separate from primary interaction control. |
|
|
24
|
+
| `axe-accessibility-provider.json` | iOS, Android | axe accessibility provider | Demonstrates a command-backed accessibility provider output. |
|
|
25
|
+
| `rozenite-profiler-provider.json` | iOS, Android | Rozenite profiler provider | Describes profiler evidence without bundling the runtime tool. |
|
|
26
|
+
| `script-accessibility-provider.json` | iOS, Android | project-local script provider | Command wrapper pattern for accessibility evidence. |
|
|
27
|
+
| `script-memory-provider.json` | iOS, Android | project-local script provider | Command wrapper pattern for memory evidence and signal attachment. |
|
|
28
|
+
| `script-network-provider.json` | iOS, Android | project-local script provider | Command wrapper pattern for network capture evidence. |
|
|
29
|
+
| `script-profiler-provider.json` | iOS, Android | project-local script provider | Command wrapper pattern for profiler evidence and JS signal attachment. |
|
|
30
|
+
|
|
31
|
+
## Rules
|
|
32
|
+
|
|
33
|
+
- Keep `capabilities` about lifecycle or evidence ownership.
|
|
34
|
+
- Keep `driverActions` about concrete operations the adapter can perform.
|
|
35
|
+
- Do not add a capability or driver action until a runner or provider can produce the corresponding evidence.
|
|
36
|
+
- Keep `providerCommands` on evidence-provider manifests; primary runners should own lifecycle orchestration, not provider command wrappers.
|
|
37
|
+
- When a tool writes files independently, attach them through `--signal`, `--capture`, or a `providerCommands` manifest so the run keeps stable artifact paths.
|
|
38
|
+
- Treat these manifests as starting contracts; consuming apps can narrow them to match the exact adapter they install.
|
|
39
|
+
|
|
40
|
+
## Tool Surface Notes
|
|
41
|
+
|
|
42
|
+
The bundled `agent-device` driver adapter and `asl-agent-device` capture runner map the declared portable subset: app open/close, alert inspection, `tap`, `scroll`, `assertVisible`, `inspectTree`, `screenshot`, and `readLogs`. Planner compatibility validates the agent-device target metadata that must be known before runtime: `tap` needs a selector, `adapterOptions.agentDevice.ref`, or `adapterOptions.agentDevice.x/y`; `assertVisible` needs a portable selector; selector matching must be exact until the adapter maps richer match modes. The agent-device CLI may expose more commands than the fixture declares, including recording, performance, network, trace, batch, and React DevTools operations. Keep those out of the primary runner manifest until an adapter maps them into stable Agent Scenario Loop artifacts. For example, performance or React DevTools output should usually start as an evidence provider or signal attachment, while `record` should only be declared once video capture is wired into `captures.video`.
|
|
43
|
+
|
|
44
|
+
The Argent fixtures are external-tool contracts, not bundled package dependencies. `@swmansion/argent` exposes a local MCP/CLI surface for iOS Simulator and Android Emulator control, so Agent Scenario Loop should keep two lanes distinct when an app adopts it: a primary interaction adapter for launch, gestures, screenshot requests, and UI descriptions, and a provider lane for profiler output such as React commit or CPU summaries. Android can pair fast adb interaction with an Argent profiler provider so profiling startup cost does not slow every tap or scroll. iOS adapters should treat native-devtools disconnects, restart-required statuses, required screenshot failures, and root-only UI descriptions as failed scenario health, because timing budgets are not trustworthy when required UI evidence is unverifiable. Optional screenshot failures should stay visible as warnings. When Argent can prove launch and accessibility but its iOS screenshot backend is unavailable, ASL may attach simctl as a screenshot fallback provider while keeping the Argent warning in health. Argent output files should enter ASL through `raw/`, `captures/`, `signals/js`, or provider-command attachments with stable manifest inventory; do not create Argent-specific top-level artifact folders.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"runnerId": "adb-android",
|
|
4
|
+
"kind": "primary",
|
|
5
|
+
"platforms": ["android"],
|
|
6
|
+
"capabilities": [
|
|
7
|
+
"launch",
|
|
8
|
+
"sessionControl",
|
|
9
|
+
"command",
|
|
10
|
+
"logCapture",
|
|
11
|
+
"artifactWrite"
|
|
12
|
+
],
|
|
13
|
+
"driverActions": ["tap", "scroll", "assertVisible", "inspectTree", "screenshot", "record", "readLogs"],
|
|
14
|
+
"artifactOutputs": ["logs", "signals", "screenshot", "video", "uiTree"],
|
|
15
|
+
"lifecycle": [
|
|
16
|
+
"prepare",
|
|
17
|
+
"launch",
|
|
18
|
+
"startSession",
|
|
19
|
+
"executeStep",
|
|
20
|
+
"waitForTruthEvent",
|
|
21
|
+
"captureEvidence",
|
|
22
|
+
"stopSession",
|
|
23
|
+
"finalize"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"runnerId": "agent-device-android",
|
|
4
|
+
"kind": "primary",
|
|
5
|
+
"platforms": ["android"],
|
|
6
|
+
"capabilities": [
|
|
7
|
+
"launch",
|
|
8
|
+
"sessionControl",
|
|
9
|
+
"command",
|
|
10
|
+
"logCapture",
|
|
11
|
+
"artifactWrite",
|
|
12
|
+
"screenshot",
|
|
13
|
+
"uiTree"
|
|
14
|
+
],
|
|
15
|
+
"driverActions": ["tap", "scroll", "assertVisible", "inspectTree", "screenshot", "readLogs"],
|
|
16
|
+
"artifactOutputs": ["logs", "signals", "screenshot", "uiTree"],
|
|
17
|
+
"lifecycle": [
|
|
18
|
+
"prepare",
|
|
19
|
+
"launch",
|
|
20
|
+
"startSession",
|
|
21
|
+
"executeStep",
|
|
22
|
+
"waitForTruthEvent",
|
|
23
|
+
"captureEvidence",
|
|
24
|
+
"stopSession",
|
|
25
|
+
"finalize"
|
|
26
|
+
]
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"runnerId": "agent-device-ios",
|
|
4
|
+
"kind": "primary",
|
|
5
|
+
"platforms": ["ios"],
|
|
6
|
+
"capabilities": [
|
|
7
|
+
"launch",
|
|
8
|
+
"sessionControl",
|
|
9
|
+
"command",
|
|
10
|
+
"logCapture",
|
|
11
|
+
"artifactWrite",
|
|
12
|
+
"screenshot",
|
|
13
|
+
"uiTree"
|
|
14
|
+
],
|
|
15
|
+
"driverActions": ["tap", "scroll", "assertVisible", "inspectTree", "screenshot", "readLogs"],
|
|
16
|
+
"artifactOutputs": ["logs", "signals", "screenshot", "uiTree"],
|
|
17
|
+
"lifecycle": [
|
|
18
|
+
"prepare",
|
|
19
|
+
"launch",
|
|
20
|
+
"startSession",
|
|
21
|
+
"executeStep",
|
|
22
|
+
"waitForTruthEvent",
|
|
23
|
+
"captureEvidence",
|
|
24
|
+
"stopSession",
|
|
25
|
+
"finalize"
|
|
26
|
+
]
|
|
27
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"runnerId": "argent-android",
|
|
4
|
+
"kind": "primary",
|
|
5
|
+
"platforms": ["android"],
|
|
6
|
+
"capabilities": [
|
|
7
|
+
"launch",
|
|
8
|
+
"sessionControl",
|
|
9
|
+
"command",
|
|
10
|
+
"logCapture",
|
|
11
|
+
"artifactWrite",
|
|
12
|
+
"screenshot",
|
|
13
|
+
"uiTree"
|
|
14
|
+
],
|
|
15
|
+
"driverActions": ["tap", "scroll", "assertVisible", "inspectTree", "screenshot"],
|
|
16
|
+
"artifactOutputs": ["logs", "signals", "screenshot", "uiTree"],
|
|
17
|
+
"lifecycle": [
|
|
18
|
+
"prepare",
|
|
19
|
+
"launch",
|
|
20
|
+
"startSession",
|
|
21
|
+
"executeStep",
|
|
22
|
+
"waitForTruthEvent",
|
|
23
|
+
"captureEvidence",
|
|
24
|
+
"stopSession",
|
|
25
|
+
"finalize"
|
|
26
|
+
],
|
|
27
|
+
"adapterOptionsSchema": {
|
|
28
|
+
"fallbackUiTreeProvider": "adb-uiautomator",
|
|
29
|
+
"fallbackScreenshotProvider": "adb-screencap",
|
|
30
|
+
"failHealthOnRootOnlyTree": true
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"runnerId": "argent-ios",
|
|
4
|
+
"kind": "primary",
|
|
5
|
+
"platforms": ["ios"],
|
|
6
|
+
"capabilities": [
|
|
7
|
+
"launch",
|
|
8
|
+
"sessionControl",
|
|
9
|
+
"command",
|
|
10
|
+
"logCapture",
|
|
11
|
+
"artifactWrite",
|
|
12
|
+
"screenshot",
|
|
13
|
+
"uiTree"
|
|
14
|
+
],
|
|
15
|
+
"driverActions": ["tap", "scroll", "assertVisible", "inspectTree", "screenshot"],
|
|
16
|
+
"artifactOutputs": ["logs", "signals", "screenshot", "uiTree"],
|
|
17
|
+
"lifecycle": [
|
|
18
|
+
"prepare",
|
|
19
|
+
"launch",
|
|
20
|
+
"startSession",
|
|
21
|
+
"executeStep",
|
|
22
|
+
"waitForTruthEvent",
|
|
23
|
+
"captureEvidence",
|
|
24
|
+
"stopSession",
|
|
25
|
+
"finalize"
|
|
26
|
+
],
|
|
27
|
+
"adapterOptionsSchema": {
|
|
28
|
+
"nativeDevtoolsRequired": true,
|
|
29
|
+
"failHealthOnRestartRequired": true,
|
|
30
|
+
"failHealthOnRootOnlyTree": true
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"runnerId": "argent-react-profiler-provider",
|
|
4
|
+
"kind": "evidenceProvider",
|
|
5
|
+
"platforms": ["android"],
|
|
6
|
+
"capabilities": ["profiler"],
|
|
7
|
+
"driverActions": ["collectPerfSignals"],
|
|
8
|
+
"artifactOutputs": ["profiler", "signals"],
|
|
9
|
+
"lifecycle": ["prepare", "startWindow", "capture", "stopWindow", "finalize"],
|
|
10
|
+
"adapterOptionsSchema": {
|
|
11
|
+
"connection": "mcp",
|
|
12
|
+
"warmup": "oncePerRun",
|
|
13
|
+
"signalPath": "signals/js"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"runnerId": "axe-accessibility-provider",
|
|
4
|
+
"kind": "evidenceProvider",
|
|
5
|
+
"platforms": ["ios", "android"],
|
|
6
|
+
"capabilities": ["accessibility"],
|
|
7
|
+
"artifactOutputs": ["accessibility"],
|
|
8
|
+
"lifecycle": ["prepare", "startWindow", "capture", "stopWindow", "finalize"],
|
|
9
|
+
"providerCommands": [
|
|
10
|
+
{
|
|
11
|
+
"id": "capture-accessibility",
|
|
12
|
+
"phase": "capture",
|
|
13
|
+
"command": "axe",
|
|
14
|
+
"args": ["--output", "{providerDir}/accessibility.json"],
|
|
15
|
+
"outputs": [
|
|
16
|
+
{
|
|
17
|
+
"channel": "provider",
|
|
18
|
+
"kind": "accessibility",
|
|
19
|
+
"path": "{providerDir}/accessibility.json"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"runnerId": "manual-log-ingest",
|
|
4
|
+
"kind": "primary",
|
|
5
|
+
"platforms": ["ios", "android"],
|
|
6
|
+
"capabilities": ["logCapture", "artifactWrite"],
|
|
7
|
+
"artifactOutputs": ["logs", "signals"],
|
|
8
|
+
"lifecycle": ["prepare", "captureEvidence", "finalize"]
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"runnerId": "rozenite-profiler-provider",
|
|
4
|
+
"kind": "evidenceProvider",
|
|
5
|
+
"platforms": ["ios", "android"],
|
|
6
|
+
"capabilities": ["profiler"],
|
|
7
|
+
"artifactOutputs": ["profiler"],
|
|
8
|
+
"lifecycle": ["prepare", "startWindow", "capture", "stopWindow", "finalize"]
|
|
9
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"runnerId": "script-accessibility-provider",
|
|
4
|
+
"kind": "evidenceProvider",
|
|
5
|
+
"platforms": ["ios", "android"],
|
|
6
|
+
"capabilities": ["accessibility"],
|
|
7
|
+
"artifactOutputs": ["accessibility"],
|
|
8
|
+
"lifecycle": ["prepare", "startWindow", "capture", "stopWindow", "finalize"],
|
|
9
|
+
"providerCommands": [
|
|
10
|
+
{
|
|
11
|
+
"id": "capture-accessibility",
|
|
12
|
+
"phase": "capture",
|
|
13
|
+
"command": "capture-accessibility",
|
|
14
|
+
"args": ["--platform", "{platform}", "--out", "{providerDir}/accessibility.json"],
|
|
15
|
+
"outputs": [
|
|
16
|
+
{
|
|
17
|
+
"channel": "provider",
|
|
18
|
+
"kind": "accessibility",
|
|
19
|
+
"path": "{providerDir}/accessibility.json"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"runnerId": "script-memory-provider",
|
|
4
|
+
"kind": "evidenceProvider",
|
|
5
|
+
"platforms": ["ios", "android"],
|
|
6
|
+
"capabilities": ["memory"],
|
|
7
|
+
"artifactOutputs": ["memory", "signals"],
|
|
8
|
+
"lifecycle": ["prepare", "startWindow", "capture", "stopWindow", "finalize"],
|
|
9
|
+
"providerCommands": [
|
|
10
|
+
{
|
|
11
|
+
"id": "capture-memory",
|
|
12
|
+
"phase": "capture",
|
|
13
|
+
"command": "capture-memory",
|
|
14
|
+
"args": ["--platform", "{platform}", "--run-id", "{runId}", "--out", "{providerDir}/memory.json"],
|
|
15
|
+
"outputs": [
|
|
16
|
+
{
|
|
17
|
+
"channel": "signal",
|
|
18
|
+
"kind": "memory",
|
|
19
|
+
"path": "{providerDir}/memory.json"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|