yaver-feedback-react-native 0.6.0 → 0.7.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/dist/index.d.ts CHANGED
@@ -1,24 +1,29 @@
1
1
  /**
2
- * @yaver/feedback-react-native — Visual feedback SDK for Yaver.
2
+ * yaver-feedback-react-native — Visual feedback SDK for Yaver.
3
3
  *
4
- * Shake-to-report, screenshots, voice annotations, P2P connection,
5
- * device discovery, and live/narrated/batch feedback modes for vibe coding.
4
+ * Shake-to-report surface with five one-tap actions:
5
+ * 1. Hot Reload — instant JS reload
6
+ * 2. Screenshot & Fix — capture the screen under the modal and
7
+ * kick a fix task on the agent
8
+ * 3. Vibing — open a vibing session on the agent
9
+ * 4. Start / Stop Recording — screen recording toggle
10
+ * 5. Send Video — submit the last recording
6
11
  *
7
12
  * @example
8
13
  * ```tsx
9
- * import { YaverFeedback, FeedbackProvider } from '@yaver/feedback-react-native';
14
+ * import { YaverFeedback, FeedbackModal } from 'yaver-feedback-react-native';
10
15
  *
11
16
  * YaverFeedback.init({
12
17
  * agentUrl: 'http://192.168.1.10:18080',
13
18
  * authToken: 'your-token',
14
19
  * trigger: 'shake',
15
- * feedbackMode: 'live',
20
+ * strictNativeAuth: true,
16
21
  * });
17
22
  *
18
- * // Wrap your app root:
19
- * <FeedbackProvider>
23
+ * <>
20
24
  * <App />
21
- * </FeedbackProvider>
25
+ * <FeedbackModal />
26
+ * </>
22
27
  * ```
23
28
  */
24
29
  export { YaverFeedback } from './YaverFeedback';
@@ -40,9 +45,9 @@ export { FeedbackModal } from './FeedbackModal';
40
45
  export { FixReport } from './FixReport';
41
46
  export { configureAuthEndpoints, getConvexSiteUrl, getWebBaseUrl, getToken, saveToken, clearToken, getUser, saveUser, getSelectedDeviceId, saveSelectedDeviceId, clearSelectedDeviceId, validateToken, signInWithApple, signInWithOAuth, signupWithEmail, loginWithEmail, listReachableDevices, DEFAULT_CONVEX_SITE_URL, DEFAULT_WEB_BASE_URL, DEFAULT_OAUTH_REDIRECT, } from './auth';
42
47
  export type { OAuthProvider, User, RemoteDevice, DeviceList, } from './auth';
43
- export { captureScreenshot, startAudioRecording, stopAudioRecording } from './capture';
48
+ export { captureScreenshot, startVideoRecording, stopVideoRecording, isVideoRecording, } from './capture';
44
49
  export { uploadFeedback } from './upload';
45
- export type { FeedbackConfig, FeedbackBundle, FeedbackMetadata, DeviceInfo, AppInfo, TimelineEvent, FeedbackReport, AgentCommentary, FeedbackStreamEvent, VoiceCapability, CapturedError, TestFix, TestSession, } from './types';
50
+ export type { FeedbackConfig, FeedbackBundle, FeedbackMetadata, DeviceInfo, AppInfo, TimelineEvent, FeedbackReport, FeedbackStreamEvent, VoiceCapability, CapturedError, TestFix, TestSession, } from './types';
46
51
  export type { BlackBoxEvent, BlackBoxConfig, BlackBoxCommand, CommandHandler } from './BlackBox';
47
52
  export type { DiscoveryResult } from './Discovery';
48
53
  export type { FeedbackEvent } from './P2PClient';
package/dist/index.js CHANGED
@@ -1,29 +1,34 @@
1
1
  "use strict";
2
2
  /**
3
- * @yaver/feedback-react-native — Visual feedback SDK for Yaver.
3
+ * yaver-feedback-react-native — Visual feedback SDK for Yaver.
4
4
  *
5
- * Shake-to-report, screenshots, voice annotations, P2P connection,
6
- * device discovery, and live/narrated/batch feedback modes for vibe coding.
5
+ * Shake-to-report surface with five one-tap actions:
6
+ * 1. Hot Reload — instant JS reload
7
+ * 2. Screenshot & Fix — capture the screen under the modal and
8
+ * kick a fix task on the agent
9
+ * 3. Vibing — open a vibing session on the agent
10
+ * 4. Start / Stop Recording — screen recording toggle
11
+ * 5. Send Video — submit the last recording
7
12
  *
8
13
  * @example
9
14
  * ```tsx
10
- * import { YaverFeedback, FeedbackProvider } from '@yaver/feedback-react-native';
15
+ * import { YaverFeedback, FeedbackModal } from 'yaver-feedback-react-native';
11
16
  *
12
17
  * YaverFeedback.init({
13
18
  * agentUrl: 'http://192.168.1.10:18080',
14
19
  * authToken: 'your-token',
15
20
  * trigger: 'shake',
16
- * feedbackMode: 'live',
21
+ * strictNativeAuth: true,
17
22
  * });
18
23
  *
19
- * // Wrap your app root:
20
- * <FeedbackProvider>
24
+ * <>
21
25
  * <App />
22
- * </FeedbackProvider>
26
+ * <FeedbackModal />
27
+ * </>
23
28
  * ```
24
29
  */
25
30
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.uploadFeedback = exports.stopAudioRecording = exports.startAudioRecording = exports.captureScreenshot = exports.DEFAULT_OAUTH_REDIRECT = exports.DEFAULT_WEB_BASE_URL = exports.DEFAULT_CONVEX_SITE_URL = exports.listReachableDevices = exports.loginWithEmail = exports.signupWithEmail = exports.signInWithOAuth = exports.signInWithApple = exports.validateToken = exports.clearSelectedDeviceId = exports.saveSelectedDeviceId = exports.getSelectedDeviceId = exports.saveUser = exports.getUser = exports.clearToken = exports.saveToken = exports.getToken = exports.getWebBaseUrl = exports.getConvexSiteUrl = exports.configureAuthEndpoints = exports.FixReport = exports.FeedbackModal = exports.FloatingButton = exports.ShakeDetector = exports.AuthOverlay = exports.YaverMachinePickerScreen = exports.YaverLoginScreen = exports.YaverConnectionScreen = exports.P2PClient = exports.YaverDiscovery = exports.initExpo = exports.YaverUpdates = exports.BlackBox = exports.YaverFeedback = void 0;
31
+ exports.uploadFeedback = exports.isVideoRecording = exports.stopVideoRecording = exports.startVideoRecording = exports.captureScreenshot = exports.DEFAULT_OAUTH_REDIRECT = exports.DEFAULT_WEB_BASE_URL = exports.DEFAULT_CONVEX_SITE_URL = exports.listReachableDevices = exports.loginWithEmail = exports.signupWithEmail = exports.signInWithOAuth = exports.signInWithApple = exports.validateToken = exports.clearSelectedDeviceId = exports.saveSelectedDeviceId = exports.getSelectedDeviceId = exports.saveUser = exports.getUser = exports.clearToken = exports.saveToken = exports.getToken = exports.getWebBaseUrl = exports.getConvexSiteUrl = exports.configureAuthEndpoints = exports.FixReport = exports.FeedbackModal = exports.FloatingButton = exports.ShakeDetector = exports.AuthOverlay = exports.YaverMachinePickerScreen = exports.YaverLoginScreen = exports.YaverConnectionScreen = exports.P2PClient = exports.YaverDiscovery = exports.initExpo = exports.YaverUpdates = exports.BlackBox = exports.YaverFeedback = void 0;
27
32
  var YaverFeedback_1 = require("./YaverFeedback");
28
33
  Object.defineProperty(exports, "YaverFeedback", { enumerable: true, get: function () { return YaverFeedback_1.YaverFeedback; } });
29
34
  var BlackBox_1 = require("./BlackBox");
@@ -75,7 +80,8 @@ Object.defineProperty(exports, "DEFAULT_WEB_BASE_URL", { enumerable: true, get:
75
80
  Object.defineProperty(exports, "DEFAULT_OAUTH_REDIRECT", { enumerable: true, get: function () { return auth_1.DEFAULT_OAUTH_REDIRECT; } });
76
81
  var capture_1 = require("./capture");
77
82
  Object.defineProperty(exports, "captureScreenshot", { enumerable: true, get: function () { return capture_1.captureScreenshot; } });
78
- Object.defineProperty(exports, "startAudioRecording", { enumerable: true, get: function () { return capture_1.startAudioRecording; } });
79
- Object.defineProperty(exports, "stopAudioRecording", { enumerable: true, get: function () { return capture_1.stopAudioRecording; } });
83
+ Object.defineProperty(exports, "startVideoRecording", { enumerable: true, get: function () { return capture_1.startVideoRecording; } });
84
+ Object.defineProperty(exports, "stopVideoRecording", { enumerable: true, get: function () { return capture_1.stopVideoRecording; } });
85
+ Object.defineProperty(exports, "isVideoRecording", { enumerable: true, get: function () { return capture_1.isVideoRecording; } });
80
86
  var upload_1 = require("./upload");
81
87
  Object.defineProperty(exports, "uploadFeedback", { enumerable: true, get: function () { return upload_1.uploadFeedback; } });
package/dist/types.d.ts CHANGED
@@ -65,27 +65,6 @@ export interface FeedbackConfig {
65
65
  reportingOnly?: boolean;
66
66
  /** Max screen recording duration in seconds. Default: 120 */
67
67
  maxRecordingDuration?: number;
68
- /**
69
- * Feedback mode:
70
- * - 'live': stream events to the agent as they happen
71
- * - 'narrated': record everything, send on stop
72
- * - 'batch': dump everything at end (default)
73
- */
74
- feedbackMode?: 'live' | 'narrated' | 'batch';
75
- /**
76
- * Agent commentary level (0-10).
77
- * 0 = silent, 10 = agent comments on everything it sees.
78
- * Only relevant in live mode. Default: 0.
79
- */
80
- agentCommentaryLevel?: number;
81
- /**
82
- * Enable voice input for feedback annotations. Always true by default.
83
- * Audio is recorded on the device and sent to the agent for transcription.
84
- * Works regardless of whether a speech-to-speech provider is configured —
85
- * if STT is available on the agent, audio is auto-transcribed; otherwise
86
- * raw audio is attached to the feedback report.
87
- */
88
- voiceEnabled?: boolean;
89
68
  /**
90
69
  * Maximum number of captured errors to keep in memory (ring buffer).
91
70
  * Oldest errors are evicted when the buffer is full.
@@ -157,16 +136,32 @@ export interface FeedbackConfig {
157
136
  * Default: false (HTTPS preferred when fingerprint available, HTTP fallback).
158
137
  */
159
138
  requireTLS?: boolean;
139
+ /**
140
+ * Compile-time lockdown of the auth flow. When true the SDK refuses to
141
+ * ever open the user's external browser (Safari / Chrome) or show a
142
+ * 6-char device code. Auth happens only via native Apple Sign-In
143
+ * (`expo-apple-authentication`), in-app OAuth (`expo-web-browser`'s
144
+ * `ASWebAuthenticationSession` with `preferEphemeralSession: true`), or
145
+ * the built-in email/password form. If a required peer dep is missing,
146
+ * `signInWithOAuth`/`signInWithApple` throw instead of silently falling
147
+ * back to a web redirect.
148
+ *
149
+ * Recommended for apps that already embed OAuth on the native side and
150
+ * never want their users to see a `yaver.io` landing page. This is the
151
+ * belt-and-suspenders version of what the SDK has done since 0.6; set
152
+ * it to guarantee future regressions can't quietly reintroduce a
153
+ * browser-hop fallback.
154
+ *
155
+ * Default: false (preserve historical behavior).
156
+ */
157
+ strictNativeAuth?: boolean;
160
158
  }
161
159
  export interface FeedbackBundle {
162
160
  metadata: FeedbackMetadata;
161
+ /** Screen-recording file path, when produced by the "Start Recording" action. */
163
162
  video?: string;
164
- /** Voice annotation audio file path (WAV). Always available when voiceEnabled. */
165
- audio?: string;
166
- /** Transcribed text from voice annotation (if STT/S2S provider is available on agent). */
167
- audioTranscript?: string;
168
163
  screenshots: string[];
169
- /** Captured errors with stack traces, attached automatically when captureErrors is enabled. */
164
+ /** Captured errors with stack traces, attached via attachError / wrapErrorHandler. */
170
165
  errors?: CapturedError[];
171
166
  }
172
167
  /** An error captured by the SDK's global error handler. */
@@ -212,12 +207,6 @@ export interface FeedbackReport {
212
207
  status: 'pending' | 'uploading' | 'uploaded' | 'failed';
213
208
  error?: string;
214
209
  }
215
- export interface AgentCommentary {
216
- id: string;
217
- timestamp: string;
218
- message: string;
219
- type: 'observation' | 'suggestion' | 'question' | 'action';
220
- }
221
210
  export interface FeedbackStreamEvent {
222
211
  type: string;
223
212
  timestamp: string;
package/dist/upload.d.ts CHANGED
@@ -5,9 +5,14 @@ import { FeedbackBundle } from './types';
5
5
  * The agent receives the bundle at POST /feedback with:
6
6
  * - `metadata` (JSON string)
7
7
  * - `screenshot_0`, `screenshot_1`, ... (image files)
8
- * - `audio` (audio file, if present)
9
8
  * - `video` (video file, if present)
10
9
  *
11
- * @returns The feedback report ID from the agent response.
10
+ * Returns the parsed agent response typically `{ ok, id, reportId }`.
11
+ * Callers can inspect `.id` / `.reportId` to drive a follow-up
12
+ * `/feedback/{id}/fix` kick.
12
13
  */
13
- export declare function uploadFeedback(agentUrl: string, authToken: string, bundle: FeedbackBundle): Promise<string>;
14
+ export declare function uploadFeedback(agentUrl: string, authToken: string, bundle: FeedbackBundle): Promise<{
15
+ id?: string;
16
+ reportId?: string;
17
+ [k: string]: unknown;
18
+ }>;
package/dist/upload.js CHANGED
@@ -8,10 +8,11 @@ const react_native_1 = require("react-native");
8
8
  * The agent receives the bundle at POST /feedback with:
9
9
  * - `metadata` (JSON string)
10
10
  * - `screenshot_0`, `screenshot_1`, ... (image files)
11
- * - `audio` (audio file, if present)
12
11
  * - `video` (video file, if present)
13
12
  *
14
- * @returns The feedback report ID from the agent response.
13
+ * Returns the parsed agent response typically `{ ok, id, reportId }`.
14
+ * Callers can inspect `.id` / `.reportId` to drive a follow-up
15
+ * `/feedback/{id}/fix` kick.
15
16
  */
16
17
  async function uploadFeedback(agentUrl, authToken, bundle) {
17
18
  const formData = new FormData();
@@ -26,14 +27,6 @@ async function uploadFeedback(agentUrl, authToken, bundle) {
26
27
  name: `screenshot_${i}.png`,
27
28
  });
28
29
  }
29
- // Attach audio
30
- if (bundle.audio) {
31
- formData.append('audio', {
32
- uri: react_native_1.Platform.OS === 'android' ? `file://${bundle.audio}` : bundle.audio,
33
- type: 'audio/m4a',
34
- name: 'voice_note.m4a',
35
- });
36
- }
37
30
  // Attach video
38
31
  if (bundle.video) {
39
32
  formData.append('video', {
@@ -54,6 +47,6 @@ async function uploadFeedback(agentUrl, authToken, bundle) {
54
47
  const text = await response.text().catch(() => '');
55
48
  throw new Error(`[YaverFeedback] Upload failed (${response.status}): ${text}`);
56
49
  }
57
- const result = await response.json();
58
- return result.id ?? result.reportId ?? 'unknown';
50
+ const result = await response.json().catch(() => ({}));
51
+ return result;
59
52
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yaver-feedback-react-native",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Visual feedback SDK for Yaver — bug reports, screen recording, voice annotations, and local-first developer workflows",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",