yaver-feedback-react-native 0.9.0 → 0.9.3
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/README.md +102 -1
- package/app.plugin.js +126 -9
- package/dist/AuthOverlay.d.ts +1 -14
- package/dist/AuthOverlay.js +9 -62
- package/dist/BlackBox.js +9 -1
- package/dist/DeployPanel.js +65 -0
- package/dist/Discovery.js +13 -8
- package/dist/DogfoodRuntime.d.ts +124 -0
- package/dist/DogfoodRuntime.js +273 -0
- package/dist/FeedbackModal.js +505 -65
- package/dist/LoginScreen.d.ts +1 -5
- package/dist/LoginScreen.js +2 -6
- package/dist/MachinePickerScreen.d.ts +1 -3
- package/dist/MachinePickerScreen.js +6 -18
- package/dist/P2PClient.d.ts +178 -2
- package/dist/P2PClient.js +493 -3
- package/dist/P2PDogfoodDriver.d.ts +12 -0
- package/dist/P2PDogfoodDriver.js +118 -0
- package/dist/PairDeviceModal.d.ts +2 -3
- package/dist/ShakeDetector.js +2 -0
- package/dist/VibeChatScreen.d.ts +11 -1
- package/dist/VibeChatScreen.js +200 -41
- package/dist/YaverFeedback.d.ts +132 -0
- package/dist/YaverFeedback.js +633 -65
- package/dist/YaverModeBadge.d.ts +22 -0
- package/dist/YaverModeBadge.js +219 -0
- package/dist/__tests__/AuthDevices.test.js +1 -48
- package/dist/__tests__/BlackBox.relayPassword.test.d.ts +1 -0
- package/dist/__tests__/BlackBox.relayPassword.test.js +105 -0
- package/dist/__tests__/BlackBoxAutoStart.test.d.ts +1 -0
- package/dist/__tests__/BlackBoxAutoStart.test.js +91 -0
- package/dist/__tests__/BlackBoxAutoStartColdStart.test.d.ts +1 -0
- package/dist/__tests__/BlackBoxAutoStartColdStart.test.js +156 -0
- package/dist/__tests__/BrowserLaneIcon.test.d.ts +3 -0
- package/dist/__tests__/BrowserLaneIcon.test.js +80 -0
- package/dist/__tests__/DogfoodRuntime.test.d.ts +1 -0
- package/dist/__tests__/DogfoodRuntime.test.js +116 -0
- package/dist/__tests__/P2PClient.test.js +2 -2
- package/dist/__tests__/P2PDogfoodDriver.test.d.ts +1 -0
- package/dist/__tests__/P2PDogfoodDriver.test.js +64 -0
- package/dist/__tests__/ReportIdentity.test.d.ts +25 -0
- package/dist/__tests__/ReportIdentity.test.js +180 -0
- package/dist/__tests__/SDKToken.test.js +1 -1
- package/dist/__tests__/ShakeToggle.test.d.ts +1 -0
- package/dist/__tests__/ShakeToggle.test.js +121 -0
- package/dist/__tests__/YaverFeedback.test.js +13 -3
- package/dist/__tests__/deviceDogfood.test.d.ts +1 -0
- package/dist/__tests__/deviceDogfood.test.js +86 -0
- package/dist/__tests__/dogfoodPolicy.test.d.ts +1 -0
- package/dist/__tests__/dogfoodPolicy.test.js +33 -0
- package/dist/__tests__/pickTargetDevice.test.d.ts +1 -0
- package/dist/__tests__/pickTargetDevice.test.js +89 -0
- package/dist/__tests__/reloadActions.test.d.ts +1 -0
- package/dist/__tests__/reloadActions.test.js +129 -0
- package/dist/__tests__/reloadActionsParity.test.d.ts +1 -0
- package/dist/__tests__/reloadActionsParity.test.js +42 -0
- package/dist/__tests__/types.test.js +5 -5
- package/dist/_core/ansi.d.ts +117 -0
- package/dist/_core/ansi.js +468 -0
- package/dist/_core/ansi.test.d.ts +1 -0
- package/dist/_core/ansi.test.js +225 -0
- package/dist/_core/buildFeedbackPrompt.d.ts +4 -9
- package/dist/_core/buildFeedbackPrompt.js +18 -72
- package/dist/_core/constants.d.ts +19 -6
- package/dist/_core/constants.js +20 -7
- package/dist/_core/device.d.ts +1 -5
- package/dist/_core/device.js +5 -14
- package/dist/_core/endpoints.d.ts +0 -7
- package/dist/_core/endpoints.js +0 -7
- package/dist/_core/index.d.ts +4 -0
- package/dist/_core/index.js +4 -0
- package/dist/_core/remoteless.d.ts +44 -0
- package/dist/_core/remoteless.js +75 -0
- package/dist/_core/trace.d.ts +47 -0
- package/dist/_core/trace.js +38 -0
- package/dist/_core/trace.test.d.ts +1 -0
- package/dist/_core/trace.test.js +60 -0
- package/dist/auth.d.ts +3 -60
- package/dist/auth.js +6 -88
- package/dist/deviceDogfood.d.ts +53 -0
- package/dist/deviceDogfood.js +137 -0
- package/dist/dogfoodPolicy.d.ts +25 -0
- package/dist/dogfoodPolicy.js +24 -0
- package/dist/index.d.ts +17 -4
- package/dist/index.js +33 -7
- package/dist/reloadActions.d.ts +88 -0
- package/dist/reloadActions.js +200 -0
- package/dist/storeShots.d.ts +67 -0
- package/dist/storeShots.js +137 -0
- package/dist/types.d.ts +208 -8
- package/package.json +13 -4
- package/src/AuthOverlay.tsx +20 -106
- package/src/BlackBox.ts +10 -1
- package/src/DeployPanel.tsx +74 -0
- package/src/Discovery.ts +13 -8
- package/src/DogfoodRuntime.ts +373 -0
- package/src/FeedbackModal.tsx +619 -79
- package/src/LoginScreen.tsx +2 -22
- package/src/MachinePickerScreen.tsx +6 -21
- package/src/P2PClient.ts +580 -4
- package/src/P2PDogfoodDriver.ts +132 -0
- package/src/PairDeviceModal.tsx +2 -3
- package/src/ShakeDetector.ts +1 -0
- package/src/VibeChatScreen.tsx +232 -42
- package/src/YaverFeedback.ts +631 -68
- package/src/YaverModeBadge.tsx +234 -0
- package/src/__tests__/AuthDevices.test.ts +1 -52
- package/src/__tests__/BlackBox.relayPassword.test.ts +129 -0
- package/src/__tests__/BlackBoxAutoStart.test.ts +111 -0
- package/src/__tests__/BlackBoxAutoStartColdStart.test.ts +191 -0
- package/src/__tests__/BrowserLaneIcon.test.ts +85 -0
- package/src/__tests__/DogfoodRuntime.test.ts +135 -0
- package/src/__tests__/P2PClient.test.ts +2 -2
- package/src/__tests__/P2PDogfoodDriver.test.ts +80 -0
- package/src/__tests__/ReportIdentity.test.ts +212 -0
- package/src/__tests__/SDKToken.test.ts +1 -1
- package/src/__tests__/ShakeToggle.test.ts +153 -0
- package/src/__tests__/YaverFeedback.test.ts +15 -3
- package/src/__tests__/deviceDogfood.test.ts +77 -0
- package/src/__tests__/dogfoodPolicy.test.ts +34 -0
- package/src/__tests__/pickTargetDevice.test.ts +101 -0
- package/src/__tests__/reloadActions.test.ts +171 -0
- package/src/__tests__/reloadActionsParity.test.ts +49 -0
- package/src/__tests__/types.test.ts +5 -5
- package/src/_core/ansi.test.ts +250 -0
- package/src/_core/ansi.ts +475 -0
- package/src/_core/buildFeedbackPrompt.ts +18 -95
- package/src/_core/constants.ts +20 -6
- package/src/_core/device.ts +5 -16
- package/src/_core/endpoints.ts +0 -7
- package/src/_core/index.ts +4 -0
- package/src/_core/remoteless.ts +110 -0
- package/src/_core/trace.test.ts +58 -0
- package/src/_core/trace.ts +75 -0
- package/src/auth.ts +7 -156
- package/src/deviceDogfood.ts +171 -0
- package/src/dogfoodPolicy.ts +40 -0
- package/src/index.ts +61 -11
- package/src/reloadActions.ts +273 -0
- package/src/storeShots.ts +189 -0
- package/src/types.ts +209 -8
- package/dist/GuestOnboardingScreen.d.ts +0 -8
- package/dist/GuestOnboardingScreen.js +0 -282
- package/src/GuestOnboardingScreen.tsx +0 -307
package/dist/LoginScreen.d.ts
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface YaverLoginScreenProps {
|
|
3
3
|
/** Invoked once a session token is issued and the user is loaded. */
|
|
4
|
-
onLoggedIn: (token: string
|
|
5
|
-
inviteCode?: string;
|
|
6
|
-
}) => void;
|
|
4
|
+
onLoggedIn: (token: string) => void;
|
|
7
5
|
/** Optional cancel button shown in header. */
|
|
8
6
|
onCancel?: () => void;
|
|
9
|
-
/** Optional prefilled guest invite code from config / deep link. */
|
|
10
|
-
initialInviteCode?: string;
|
|
11
7
|
}
|
|
12
8
|
/**
|
|
13
9
|
* Full-screen in-SDK login. Mirrors the Yaver mobile app login UX: native
|
package/dist/LoginScreen.js
CHANGED
|
@@ -91,7 +91,7 @@ const iconStyles = react_native_1.StyleSheet.create({
|
|
|
91
91
|
* Apple Sign-In on iOS, in-app browser OAuth for Google/GitHub/GitLab/
|
|
92
92
|
* Microsoft (no codes, no leaving the app), and inline email/password.
|
|
93
93
|
*/
|
|
94
|
-
const YaverLoginScreen = ({ onLoggedIn, onCancel,
|
|
94
|
+
const YaverLoginScreen = ({ onLoggedIn, onCancel, }) => {
|
|
95
95
|
const [busyProvider, setBusyProvider] = (0, react_1.useState)(null);
|
|
96
96
|
const [showEmailForm, setShowEmailForm] = (0, react_1.useState)(false);
|
|
97
97
|
const [isSignUp, setIsSignUp] = (0, react_1.useState)(false);
|
|
@@ -99,7 +99,6 @@ const YaverLoginScreen = ({ onLoggedIn, onCancel, initialInviteCode, }) => {
|
|
|
99
99
|
const [email, setEmail] = (0, react_1.useState)('');
|
|
100
100
|
const [password, setPassword] = (0, react_1.useState)('');
|
|
101
101
|
const [confirmPassword, setConfirmPassword] = (0, react_1.useState)('');
|
|
102
|
-
const [inviteCode, setInviteCode] = (0, react_1.useState)((initialInviteCode ?? '').toUpperCase());
|
|
103
102
|
const [emailBusy, setEmailBusy] = (0, react_1.useState)(false);
|
|
104
103
|
const [emailError, setEmailError] = (0, react_1.useState)('');
|
|
105
104
|
const finish = async (token) => {
|
|
@@ -107,8 +106,7 @@ const YaverLoginScreen = ({ onLoggedIn, onCancel, initialInviteCode, }) => {
|
|
|
107
106
|
await (0, auth_1.saveToken)(token);
|
|
108
107
|
if (user)
|
|
109
108
|
await (0, auth_1.saveUser)(user);
|
|
110
|
-
|
|
111
|
-
onLoggedIn(token, cleanedInviteCode ? { inviteCode: cleanedInviteCode } : undefined);
|
|
109
|
+
onLoggedIn(token);
|
|
112
110
|
};
|
|
113
111
|
const handleApple = async () => {
|
|
114
112
|
setBusyProvider('apple');
|
|
@@ -218,8 +216,6 @@ const YaverLoginScreen = ({ onLoggedIn, onCancel, initialInviteCode, }) => {
|
|
|
218
216
|
<react_native_1.TextInput style={styles.input} placeholder="Email" placeholderTextColor="#666" value={email} onChangeText={setEmail} keyboardType="email-address" autoCapitalize="none" autoCorrect={false}/>
|
|
219
217
|
<react_native_1.TextInput style={styles.input} placeholder="Password" placeholderTextColor="#666" value={password} onChangeText={setPassword} secureTextEntry autoCapitalize="none"/>
|
|
220
218
|
{isSignUp && (<react_native_1.TextInput style={styles.input} placeholder="Confirm Password" placeholderTextColor="#666" value={confirmPassword} onChangeText={setConfirmPassword} secureTextEntry/>)}
|
|
221
|
-
{isSignUp && (<react_native_1.TextInput style={styles.input} placeholder="Invite Code (optional)" placeholderTextColor="#666" value={inviteCode} onChangeText={(value) => setInviteCode(value.toUpperCase().replace(/[^A-Z0-9]/g, '').slice(0, 6))} autoCapitalize="characters" autoCorrect={false} maxLength={6}/>)}
|
|
222
|
-
|
|
223
219
|
{emailError ? (<react_native_1.Text style={styles.errorText}>{emailError}</react_native_1.Text>) : null}
|
|
224
220
|
|
|
225
221
|
<react_native_1.Pressable style={({ pressed }) => [
|
|
@@ -8,9 +8,7 @@ export interface YaverMachinePickerProps {
|
|
|
8
8
|
onCancel?: () => void;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
* List of remote dev machines the signed-in user
|
|
12
|
-
* - Owned machines (user is the host)
|
|
13
|
-
* - Shared machines (host invited them as a guest)
|
|
11
|
+
* List of remote dev machines owned by the signed-in user.
|
|
14
12
|
*
|
|
15
13
|
* Tapping a device persists it to AsyncStorage and invokes `onPick`. The
|
|
16
14
|
* SDK then uses that device's deviceId for agent discovery (LAN probe +
|
|
@@ -39,9 +39,7 @@ const react_native_1 = require("react-native");
|
|
|
39
39
|
const auth_1 = require("./auth");
|
|
40
40
|
const PairDeviceModal_1 = require("./PairDeviceModal");
|
|
41
41
|
/**
|
|
42
|
-
* List of remote dev machines the signed-in user
|
|
43
|
-
* - Owned machines (user is the host)
|
|
44
|
-
* - Shared machines (host invited them as a guest)
|
|
42
|
+
* List of remote dev machines owned by the signed-in user.
|
|
45
43
|
*
|
|
46
44
|
* Tapping a device persists it to AsyncStorage and invokes `onPick`. The
|
|
47
45
|
* SDK then uses that device's deviceId for agent discovery (LAN probe +
|
|
@@ -51,7 +49,7 @@ const YaverMachinePickerScreen = ({ token, currentDeviceId, onPick, onCancel, })
|
|
|
51
49
|
const [loading, setLoading] = (0, react_1.useState)(true);
|
|
52
50
|
const [refreshing, setRefreshing] = (0, react_1.useState)(false);
|
|
53
51
|
const [error, setError] = (0, react_1.useState)(null);
|
|
54
|
-
const [list, setList] = (0, react_1.useState)({ owned: []
|
|
52
|
+
const [list, setList] = (0, react_1.useState)({ owned: [] });
|
|
55
53
|
const [pairingDevice, setPairingDevice] = (0, react_1.useState)(null);
|
|
56
54
|
const [reachability, setReachability] = (0, react_1.useState)({});
|
|
57
55
|
const load = (0, react_1.useCallback)(async (silent = false) => {
|
|
@@ -63,7 +61,7 @@ const YaverMachinePickerScreen = ({ token, currentDeviceId, onPick, onCancel, })
|
|
|
63
61
|
setList(result);
|
|
64
62
|
setReachability({});
|
|
65
63
|
void (async () => {
|
|
66
|
-
const devices =
|
|
64
|
+
const devices = result.owned;
|
|
67
65
|
const settled = await Promise.allSettled(devices.map(async (device) => ({
|
|
68
66
|
deviceId: device.deviceId,
|
|
69
67
|
result: await (0, auth_1.probeDeviceReachability)(device),
|
|
@@ -78,8 +76,8 @@ const YaverMachinePickerScreen = ({ token, currentDeviceId, onPick, onCancel, })
|
|
|
78
76
|
return next;
|
|
79
77
|
});
|
|
80
78
|
})();
|
|
81
|
-
if (result.owned.length === 0
|
|
82
|
-
setError('No machines found yet.
|
|
79
|
+
if (result.owned.length === 0) {
|
|
80
|
+
setError('No machines found yet. Run `yaver auth` + `yaver serve` on your machine.');
|
|
83
81
|
}
|
|
84
82
|
}
|
|
85
83
|
catch (err) {
|
|
@@ -165,14 +163,8 @@ const YaverMachinePickerScreen = ({ token, currentDeviceId, onPick, onCancel, })
|
|
|
165
163
|
statusLine = 'Runner down — restart the coding agent on the Mac';
|
|
166
164
|
}
|
|
167
165
|
else {
|
|
168
|
-
// Happy-path subtitle
|
|
166
|
+
// Happy-path subtitle.
|
|
169
167
|
statusLine = device.platform;
|
|
170
|
-
if (device.isGuest && device.hostEmail) {
|
|
171
|
-
statusLine = `${statusLine} • ${device.hostEmail}`;
|
|
172
|
-
}
|
|
173
|
-
else if (device.accessScope === 'shared-scoped') {
|
|
174
|
-
statusLine = `${statusLine} • paylaşılan`;
|
|
175
|
-
}
|
|
176
168
|
}
|
|
177
169
|
return (<react_native_1.TouchableOpacity key={device.deviceId} style={[styles.deviceRow, selected && styles.deviceSelected]} onPress={() => handlePick(device)}>
|
|
178
170
|
<react_native_1.View style={[styles.health, { backgroundColor: healthColor }]}/>
|
|
@@ -200,10 +192,6 @@ const YaverMachinePickerScreen = ({ token, currentDeviceId, onPick, onCancel, })
|
|
|
200
192
|
<react_native_1.Text style={styles.sectionTitle}>Kendi makinelerim</react_native_1.Text>
|
|
201
193
|
{list.owned.map(renderDevice)}
|
|
202
194
|
</react_native_1.View>)}
|
|
203
|
-
{list.shared.length > 0 && (<react_native_1.View style={styles.section}>
|
|
204
|
-
<react_native_1.Text style={styles.sectionTitle}>Paylaşılan (guest)</react_native_1.Text>
|
|
205
|
-
{list.shared.map(renderDevice)}
|
|
206
|
-
</react_native_1.View>)}
|
|
207
195
|
{error && <react_native_1.Text style={styles.error}>{error}</react_native_1.Text>}
|
|
208
196
|
</>)}
|
|
209
197
|
</react_native_1.ScrollView>
|
package/dist/P2PClient.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { CapabilitySnapshot, FeedbackBundle, IncidentEvent, OpenCodeConfigSummary, OperationState, RunnerBrowserAuthSession, RunnerAuthStatusRow, TestSession, VoiceCapability } from './types';
|
|
1
|
+
import { AppInfo, CapabilitySnapshot, FeedbackBundle, FeedbackProjectRef, IncidentEvent, OpenCodeConfigSummary, OperationState, RunnerBrowserAuthSession, RunnerAuthStatusRow, TestSession, VoiceCapability } from './types';
|
|
2
|
+
import type { DevServerSnapshot, ReloadWireMode } from './reloadActions';
|
|
2
3
|
export interface FeedbackEvent {
|
|
3
4
|
type: string;
|
|
4
5
|
timestamp: string;
|
|
@@ -12,6 +13,54 @@ export interface ReloadAck {
|
|
|
12
13
|
nativeChangesDetected?: boolean;
|
|
13
14
|
changeClass?: string;
|
|
14
15
|
}
|
|
16
|
+
export interface DogfoodDevServerStatus {
|
|
17
|
+
running?: boolean;
|
|
18
|
+
serving?: boolean;
|
|
19
|
+
starting?: boolean;
|
|
20
|
+
building?: boolean;
|
|
21
|
+
framework?: string;
|
|
22
|
+
workDir?: string;
|
|
23
|
+
bundleUrl?: string;
|
|
24
|
+
previewUrl?: string;
|
|
25
|
+
error?: string;
|
|
26
|
+
capabilityGap?: unknown;
|
|
27
|
+
}
|
|
28
|
+
export interface DogfoodDevEvent {
|
|
29
|
+
type: string;
|
|
30
|
+
framework?: string;
|
|
31
|
+
logLine?: string;
|
|
32
|
+
message?: string;
|
|
33
|
+
phase?: string;
|
|
34
|
+
pct?: number;
|
|
35
|
+
currentFile?: string;
|
|
36
|
+
snapshot?: {
|
|
37
|
+
recentLogs?: string[];
|
|
38
|
+
[key: string]: unknown;
|
|
39
|
+
};
|
|
40
|
+
[key: string]: unknown;
|
|
41
|
+
}
|
|
42
|
+
export interface DogfoodRemoteRuntimeTarget {
|
|
43
|
+
id: string;
|
|
44
|
+
label: string;
|
|
45
|
+
enabled: boolean;
|
|
46
|
+
reason?: string;
|
|
47
|
+
platform?: string;
|
|
48
|
+
surface?: string;
|
|
49
|
+
displaySurface?: string;
|
|
50
|
+
}
|
|
51
|
+
export interface DogfoodRemoteRuntimeCapabilities {
|
|
52
|
+
remoteRuntimeEligible?: boolean;
|
|
53
|
+
targets: DogfoodRemoteRuntimeTarget[];
|
|
54
|
+
}
|
|
55
|
+
export interface DogfoodRemoteRuntimeSession {
|
|
56
|
+
id: string;
|
|
57
|
+
status: string;
|
|
58
|
+
targetId?: string;
|
|
59
|
+
targetLabel?: string;
|
|
60
|
+
transportMode?: string;
|
|
61
|
+
note?: string;
|
|
62
|
+
[key: string]: unknown;
|
|
63
|
+
}
|
|
15
64
|
/**
|
|
16
65
|
* Try to resolve `{projectName, bundleId}` for the running app so the
|
|
17
66
|
* agent can map the reload request to a MobileProject in its scan
|
|
@@ -28,6 +77,45 @@ export declare function resolveAppIdentity(opts?: {
|
|
|
28
77
|
bundleId?: string;
|
|
29
78
|
projectPath?: string;
|
|
30
79
|
};
|
|
80
|
+
/**
|
|
81
|
+
* Build the app-identity half of a feedback report's metadata.
|
|
82
|
+
*
|
|
83
|
+
* `resolveAppIdentity()` has always fed /vibing/execute and /dev/reload-app,
|
|
84
|
+
* so the agent could route a "vibe on THIS app" request to the right repo —
|
|
85
|
+
* but nothing fed /feedback. Reports arrived with no identity at all, so the
|
|
86
|
+
* agent's fix router fell through to its own working directory and edited
|
|
87
|
+
* whichever repo it happened to be sitting in. This closes that gap by
|
|
88
|
+
* reusing the same resolver for the feedback path.
|
|
89
|
+
*
|
|
90
|
+
* Precedence, most to least trustworthy:
|
|
91
|
+
* 1. What the host app declared (`FeedbackConfig.projectName`/`bundleId`).
|
|
92
|
+
* An app knows its own identity; nothing should override it.
|
|
93
|
+
* 2. The guest project Yaver's host shell pinned, when running as a Hermes
|
|
94
|
+
* guest. Ambient lookups describe Yaver there, not the guest.
|
|
95
|
+
* 3. Ambient expo-constants / native modules — correct for a standalone
|
|
96
|
+
* build, which is the common case.
|
|
97
|
+
*
|
|
98
|
+
* Every lookup is best-effort: a bare RN app with no expo-constants still
|
|
99
|
+
* produces a report, just one the agent resolves by its own means.
|
|
100
|
+
*/
|
|
101
|
+
export declare function resolveReportIdentity(opts?: {
|
|
102
|
+
projectName?: string;
|
|
103
|
+
bundleId?: string;
|
|
104
|
+
surface?: FeedbackProjectRef['surface'];
|
|
105
|
+
surfaces?: FeedbackProjectRef['surfaces'];
|
|
106
|
+
stack?: string;
|
|
107
|
+
stacks?: string[];
|
|
108
|
+
testSurfaces?: string[];
|
|
109
|
+
feedbackSdk?: string;
|
|
110
|
+
feedbackTransport?: string;
|
|
111
|
+
voiceCapabilities?: string[];
|
|
112
|
+
sttProvider?: string;
|
|
113
|
+
ttsProvider?: string;
|
|
114
|
+
}): {
|
|
115
|
+
appName?: string;
|
|
116
|
+
app: AppInfo;
|
|
117
|
+
project?: FeedbackProjectRef;
|
|
118
|
+
};
|
|
31
119
|
/**
|
|
32
120
|
* Lightweight P2P HTTP client for communicating with a Yaver agent.
|
|
33
121
|
*
|
|
@@ -80,6 +168,17 @@ export declare class P2PClient {
|
|
|
80
168
|
* RunnerAuthModal.tsx and the Swift YaverRunnerAuthFlowPane. */
|
|
81
169
|
submitRunnerBrowserAuthCode(sessionId: string, code: string): Promise<RunnerBrowserAuthSession>;
|
|
82
170
|
getRunnerAuthStatus(): Promise<RunnerAuthStatusRow[]>;
|
|
171
|
+
/** Canonical runner + model catalogue used by Vibing routing controls. */
|
|
172
|
+
getAvailableRunners(): Promise<RunnerAuthStatusRow[]>;
|
|
173
|
+
/** Discovered runnable projects on the selected owner machine. Paths stay
|
|
174
|
+
* on that machine/transport; they are never registered in Yaver's backend. */
|
|
175
|
+
listDogfoodProjects(): Promise<Array<{
|
|
176
|
+
name: string;
|
|
177
|
+
path: string;
|
|
178
|
+
framework?: string;
|
|
179
|
+
frameworks?: string[];
|
|
180
|
+
surfaces?: string[];
|
|
181
|
+
}>>;
|
|
83
182
|
getOpenCodeConfig(): Promise<OpenCodeConfigSummary | null>;
|
|
84
183
|
saveOpenCodeConfig(patch: {
|
|
85
184
|
defaultAgent?: string;
|
|
@@ -163,6 +262,58 @@ export declare class P2PClient {
|
|
|
163
262
|
* via the BlackBox command channel.
|
|
164
263
|
* @param mode - "dev" for hot reload, "bundle" for native bundle rebuild
|
|
165
264
|
*/
|
|
265
|
+
/**
|
|
266
|
+
* Read the dev server's state so the overlay can decide WHICH reload
|
|
267
|
+
* actions to offer, and disable the rest with a reason.
|
|
268
|
+
*
|
|
269
|
+
* Returns null when the machine cannot be reached at all — which the
|
|
270
|
+
* caller must render as "not connected", never as "no dev server".
|
|
271
|
+
* Those are two different problems with two different fixes.
|
|
272
|
+
*/
|
|
273
|
+
getDevServerStatus(): Promise<DevServerSnapshot | null>;
|
|
274
|
+
/**
|
|
275
|
+
* Start the ordinary Projects runtime for an embedded Dogfood host.
|
|
276
|
+
* Requires a full signed-in-user token because /dev/start can spawn tools;
|
|
277
|
+
* a narrow feedback SDK token intentionally cannot use it.
|
|
278
|
+
*/
|
|
279
|
+
startDogfoodDevServer(input: {
|
|
280
|
+
framework: string;
|
|
281
|
+
workDir: string;
|
|
282
|
+
lane: 'browser' | 'hermes';
|
|
283
|
+
}): Promise<DogfoodDevServerStatus>;
|
|
284
|
+
/** Full status for Dogfood startup; unlike the compact feedback snapshot,
|
|
285
|
+
* this retains render URLs and structured startup failures. */
|
|
286
|
+
getDogfoodDevServerStatus(): Promise<DogfoodDevServerStatus | null>;
|
|
287
|
+
getDogfoodRemoteRuntimeCapabilities(workDir: string, framework: string): Promise<DogfoodRemoteRuntimeCapabilities>;
|
|
288
|
+
startDogfoodRemoteRuntime(workDir: string, framework: string, targetId: string): Promise<DogfoodRemoteRuntimeSession>;
|
|
289
|
+
stopDogfoodRemoteRuntime(sessionId: string): Promise<void>;
|
|
290
|
+
/** Stop the runtime this SDK host started. Full user auth, same as start. */
|
|
291
|
+
stopDogfoodDevServer(): Promise<void>;
|
|
292
|
+
/** Resolve an agent-reported /dev/ or /dev-web/ route without putting auth in the URL. */
|
|
293
|
+
resolveDogfoodUrl(path: string): string;
|
|
294
|
+
/**
|
|
295
|
+
* React-Native-safe /dev/events stream. XHR is intentional: Hermes fetch
|
|
296
|
+
* exposes no streaming response body. Reconnects are bounded and every
|
|
297
|
+
* reconnect/loss is surfaced to the host console.
|
|
298
|
+
*/
|
|
299
|
+
subscribeDogfoodDevEvents(onEvent: (event: DogfoodDevEvent) => void, onHealth?: (health: {
|
|
300
|
+
kind: 'reattaching' | 'lost';
|
|
301
|
+
message: string;
|
|
302
|
+
} | null) => void): () => void;
|
|
303
|
+
/**
|
|
304
|
+
* Trigger a reload with an EXPLICIT fast/full mode — no bundle fallback.
|
|
305
|
+
*
|
|
306
|
+
* `reloadApp('dev')` silently falls through to a bundle rebuild when the
|
|
307
|
+
* dev server is down, which is right for a one-button UX and wrong the
|
|
308
|
+
* moment the user picks between two named actions: someone who pressed
|
|
309
|
+
* "Full Reload" must not get a 60-second bundle rebuild without being
|
|
310
|
+
* told. So this method reports the failure instead, with a named cause.
|
|
311
|
+
*
|
|
312
|
+
* Auth: the SAME bearer used for the feedback POST. `/dev/reload` is
|
|
313
|
+
* registered under `authSDK` in desktop/agent/httpserver.go and is already
|
|
314
|
+
* in the `reload` SDK-token scope list — nothing widens.
|
|
315
|
+
*/
|
|
316
|
+
reloadWithMode(mode: ReloadWireMode, snapshot?: DevServerSnapshot | null): Promise<ReloadAck>;
|
|
166
317
|
reloadApp(mode?: 'dev' | 'bundle', opts?: {
|
|
167
318
|
projectName?: string;
|
|
168
319
|
bundleId?: string;
|
|
@@ -174,7 +325,7 @@ export declare class P2PClient {
|
|
|
174
325
|
* the project context plus the user's prompt. Returns the task id the
|
|
175
326
|
* caller can poll via `/tasks/{id}` if needed.
|
|
176
327
|
*
|
|
177
|
-
* Requires an owner/CLI
|
|
328
|
+
* Requires an owner/CLI token — the `/vibing*` routes do not
|
|
178
329
|
* currently accept SDK-minted tokens. Power users typically drive
|
|
179
330
|
* vibing from Claude Code / the Yaver mobile app; this method is a
|
|
180
331
|
* convenience for the SDK's one-tap bug-report-to-vibing path.
|
|
@@ -183,6 +334,8 @@ export declare class P2PClient {
|
|
|
183
334
|
projectName?: string;
|
|
184
335
|
bundleId?: string;
|
|
185
336
|
projectPath?: string;
|
|
337
|
+
runner?: string;
|
|
338
|
+
model?: string;
|
|
186
339
|
}): Promise<{
|
|
187
340
|
taskId: string;
|
|
188
341
|
}>;
|
|
@@ -302,6 +455,29 @@ export declare class P2PClient {
|
|
|
302
455
|
taskId: string;
|
|
303
456
|
raw?: unknown;
|
|
304
457
|
}>;
|
|
458
|
+
/** Existing task history, filtered by the agent to Vibing/feedback topics. */
|
|
459
|
+
listVibeThreads(input?: {
|
|
460
|
+
projectName?: string;
|
|
461
|
+
projectPath?: string;
|
|
462
|
+
}): Promise<Array<{
|
|
463
|
+
id: string;
|
|
464
|
+
title: string;
|
|
465
|
+
status: string;
|
|
466
|
+
createdAt?: string;
|
|
467
|
+
projectName?: string;
|
|
468
|
+
turnCount?: number;
|
|
469
|
+
}>>;
|
|
470
|
+
getVibeThread(taskId: string): Promise<{
|
|
471
|
+
id: string;
|
|
472
|
+
title: string;
|
|
473
|
+
status: string;
|
|
474
|
+
turns?: Array<{
|
|
475
|
+
role: 'user' | 'assistant';
|
|
476
|
+
content: string;
|
|
477
|
+
timestamp?: string;
|
|
478
|
+
}>;
|
|
479
|
+
}>;
|
|
480
|
+
deleteVibeThread(taskId: string): Promise<void>;
|
|
305
481
|
/**
|
|
306
482
|
* Subscribe to a task's live stdout/stderr stream. Returns an abort
|
|
307
483
|
* function — call it to detach. The agent emits NDJSON lines on
|