@solhun/feedback-kit-core 0.9.0 → 0.11.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.cts CHANGED
@@ -504,6 +504,37 @@ interface FeedbackStorage {
504
504
  remove(key: string): Promise<void>;
505
505
  }
506
506
  /** 제보를 수집 백엔드로 보내는 어댑터. 호스트(또는 SDK)가 구현. */
507
+ /**
508
+ * "이 화면의 제보가 어디로 가나" — 위젯 설정에 보여주는 읽기 전용 정보.
509
+ *
510
+ * 왜 필요한가: 코드에 박혀 있는 건 URL 과 KEY 뿐이라, 그 URL 이 **어느 프로젝트**인지·
511
+ * 거기서 Linear 로 **자동으로 나가는지**는 화면 어디에도 안 보인다. 개발자가 그걸 알려면
512
+ * 매번 서버 설정을 뒤져야 했다.
513
+ *
514
+ * 여기 담기는 건 전부 개발자가 이미 아는 값이다(프로젝트 이름·팀 이름). 제보 내용이나
515
+ * 남의 데이터는 담지 않는다 — 수집 키는 쓰기 전용이라는 성질을 여기서도 지킨다.
516
+ */
517
+ interface FeedbackConnection {
518
+ /** 수집처 종류. 지금은 라쏘런뿐이지만 어댑터가 늘면 여기서 갈린다. */
519
+ collector: string;
520
+ project: {
521
+ id: string | null;
522
+ name: string | null;
523
+ };
524
+ linear: {
525
+ connected: boolean;
526
+ teamName?: string | null;
527
+ projectName?: string | null;
528
+ /**
529
+ * 제보가 도착하는 즉시 Linear 이슈가 되나.
530
+ * **연결(`connected`)과 다르다** — 연결은 "보낼 수 있다"이고 이건 "자동으로 보낸다"다.
531
+ * 둘을 한 값으로 합치면 "연결했는데 왜 Linear 에 안 뜨지"를 매번 다시 조사하게 된다.
532
+ */
533
+ autoExport: boolean;
534
+ };
535
+ /** 이 프로젝트를 처리하는 Symphony 프로젝트 슬러그. 없으면 자동 처리 대상이 아니다. */
536
+ symphonySlug: string | null;
537
+ }
507
538
  interface FeedbackAdapter {
508
539
  submit(report: FeedbackReport): Promise<SubmitResult>;
509
540
  /**
@@ -512,6 +543,11 @@ interface FeedbackAdapter {
512
543
  * `submit`과 같은 절대 규칙: **던지지 않는다.** 실패는 `{kind:"fail"}`로 돌려준다.
513
544
  */
514
545
  fetchHints?(etag: string | null): Promise<HintFetchResult>;
546
+ /**
547
+ * 지금 어디에 연결돼 있는지(선택). 위젯 설정이 열릴 때만 부른다.
548
+ * `submit`과 같은 절대 규칙: **던지지 않는다.** 못 얻으면 `null` 을 돌려준다.
549
+ */
550
+ fetchConnection?(): Promise<FeedbackConnection | null>;
515
551
  /**
516
552
  * 힌트 캐시를 수집 소스별로 나누기 위한 식별자(선택). 없으면 위젯이 `"default"`를 쓴다.
517
553
  * 한 기기에서 여러 프로젝트(수집 소스)를 오갈 때 이 값이 없으면 캐시가 섞여 남의
@@ -1565,7 +1601,7 @@ interface LassoAdapterOpts {
1565
1601
  * 대상마다 받는 모양이 다르다는 게 어댑터를 두는 이유 자체다(DP-255 TC5).
1566
1602
  */
1567
1603
  /**
1568
- * 라쏘런 `dp-agentation-ingest` 실제로 요구하는 봉투.
1604
+ * 라쏘런 수집 Edge Function 이 실제로 요구하는 봉투.
1569
1605
  *
1570
1606
  * 이 모양은 **상상하지 않고 실호출로 확정했다.** 이전 버전은 필드명을 지어내서
1571
1607
  * (submissionKey/bodyMarkdown/severity …) 실 엔드포인트에 100% 400 으로 거절당했고,
@@ -1854,4 +1890,4 @@ declare function parseHintCatalog(raw: unknown): HintCatalog | null;
1854
1890
  */
1855
1891
  declare function rankHints(hints: readonly FeedbackHint[], input: HintRankInput, limit: number): FeedbackHint[];
1856
1892
 
1857
- export { type AdapterName, type AppInfo, BACKOFF_BASE_MS, BACKOFF_MAX_MS, type BuildContextOpts, type BuildReportOpts, COMMENT_MAX_CHARS, COMMENT_REQUIRED_MESSAGE, COMMENT_TOO_LONG_MESSAGE, type CaptureWithinLimitOpts, type ConfigWarning, type ConfigWarningCode, type ContextProviders, type ContextUser, DEFAULT_ADAPTER, DEFAULT_INTERNAL_ROLES, DEFAULT_POSITION, type DeviceInfo, type DiagLogEntry, type DiagNetworkEntry, type DiagRequestRef, DiagnosticsCollector, type DiagnosticsExcludeMatcher, type DiagnosticsInstallOpts, type DiagnosticsPayload, type DiagnosticsSource, type DisplayInfo, ENDPOINT_FROM_ADAPTER, type ElementInfo, type ElementLike, FLOATING_BUTTON_ID, type FeedbackAdapter, type FeedbackConfig, type FeedbackContext, type FeedbackHint, type FeedbackKind, type FeedbackPin, type FeedbackPriority, FeedbackQueue, type FeedbackQueueOpts, type FeedbackReport, type FeedbackScreenshot, type FeedbackStorage, type FeedbackUser, FocusRing, type GetCurrentScreenFn, type GetUserFn, HINT_DISPLAY_DEFAULT, HINT_DISPLAY_MAX, HINT_DISPLAY_MIN, HINT_DRAFT_MAX_CHARS, HINT_FAIL_COOLDOWN_MS, HINT_LABEL_MAX_CHARS, HINT_MAX_ITEMS, HINT_TIMEOUT_MS, HINT_TTL_MS, type HintCacheEntry, type HintCatalog, type HintElementRule, type HintFetchResult, type HintPlatform, HintProvider, type HintProviderOpts, type HintRankInput, type HintScope, type HintSource, KEEPALIVE_BODY_LIMIT_BYTES, LASSO_DEFAULT_ENDPOINT, LOG_BUFFER_LIMIT, type LassoAdapterOpts, type LassoEnvelope, type LassoFetch, type LassoReportContext, type LassoRequestInit, type LassoResponseLike, type LinearIssueInput, MAX_LOG_MESSAGE_CHARS, MAX_QUEUE_AGE_MS, MAX_QUEUE_ITEMS, MODAL_ACTION_ATTACH, MODAL_ACTION_CANCEL, MODAL_ACTION_HINT_TOGGLE, MODAL_ACTION_PICK, MODAL_ACTION_PIN, MODAL_ACTION_REMOVE_SCREENSHOT, MODAL_ACTION_RETRY, MODAL_ACTION_SEND, MODAL_FIELD_COMMENT, MODAL_FIELD_PRIORITY, type ModalQueueLike, type ModalSubmitStatus, NETWORK_BUFFER_LIMIT, type NativeContext, type NotionPageInput, PinController, type PixelPoint, type PixelSize, type QueueStatus, type QueueStatusListener, RATE_LIMIT_MIN_DELAY_MS, REDACTED, ROUTE_TRAIL_KEY, ROUTE_TRAIL_LIMIT, ReportModalController, type ReportModalListener, type ReportModalOpts, type ReportModalState, type ReportParts, type ResolvedConfig, RingBuffer, RouteTrail, type RouteTrailEntry, type RouteTrailOpts, type RouteTrailStore, type RouteWatcher, SCORE_ELEMENT, SCORE_PATH_EXACT, SCORE_PATH_PATTERN, SCREENSHOT_FAILED_MESSAGE, SCREENSHOT_MAX_BASE64_BYTES, SCREENSHOT_QUALITY_STEPS, SOURCE_ATTR, SUBMIT_DONE_MESSAGE, SUBMIT_FAILED_MESSAGE, SUBMIT_PENDING_MESSAGE, type ScreenshotCapture, type ScreenshotOutcome, type ScreenshotReencode, type ScreenshotStatus, type SourceLocation, type SourceMapping, type SubmitOutcome, type SubmitResult, TITLE_MAX_CHARS, type Visibility, type VisibilityEnv, type VisibilityFn, type WebContext, type WebContextInput, WidgetController, type WidgetControllerOpts, type WidgetCorner, type WidgetListener, type WidgetPlatform, type WidgetPosition, type WidgetScreen, type WidgetState, appPathFromNav, buildContext, buildLassoContext, buildLassoEnvelope, buildLinearIssue, buildNotionPage, buildReport, buildTitle, byteLengthOf, canUseKeepalive, captureWithinLimit, createLassoAdapter, defaultBackoff, denormalizePin, detectDevBuild, diagnosticsProviderFor, getOrCreateGuestId, guestUser, hintCharCount, isInternalUser, matchElement, matchPath, normalizePin, normalizeRoutePath, normalizeUser, parseHintCatalog, parseSourceAttr, rankHints, renderReportBody, resolveConfig, resolveContextUser, sanitizeUrl, screenshotBytes, sharedDiagnostics, shouldShowWidget, sourceFromElement, uuidv4 };
1893
+ export { type AdapterName, type AppInfo, BACKOFF_BASE_MS, BACKOFF_MAX_MS, type BuildContextOpts, type BuildReportOpts, COMMENT_MAX_CHARS, COMMENT_REQUIRED_MESSAGE, COMMENT_TOO_LONG_MESSAGE, type CaptureWithinLimitOpts, type ConfigWarning, type ConfigWarningCode, type ContextProviders, type ContextUser, DEFAULT_ADAPTER, DEFAULT_INTERNAL_ROLES, DEFAULT_POSITION, type DeviceInfo, type DiagLogEntry, type DiagNetworkEntry, type DiagRequestRef, DiagnosticsCollector, type DiagnosticsExcludeMatcher, type DiagnosticsInstallOpts, type DiagnosticsPayload, type DiagnosticsSource, type DisplayInfo, ENDPOINT_FROM_ADAPTER, type ElementInfo, type ElementLike, FLOATING_BUTTON_ID, type FeedbackAdapter, type FeedbackConfig, type FeedbackConnection, type FeedbackContext, type FeedbackHint, type FeedbackKind, type FeedbackPin, type FeedbackPriority, FeedbackQueue, type FeedbackQueueOpts, type FeedbackReport, type FeedbackScreenshot, type FeedbackStorage, type FeedbackUser, FocusRing, type GetCurrentScreenFn, type GetUserFn, HINT_DISPLAY_DEFAULT, HINT_DISPLAY_MAX, HINT_DISPLAY_MIN, HINT_DRAFT_MAX_CHARS, HINT_FAIL_COOLDOWN_MS, HINT_LABEL_MAX_CHARS, HINT_MAX_ITEMS, HINT_TIMEOUT_MS, HINT_TTL_MS, type HintCacheEntry, type HintCatalog, type HintElementRule, type HintFetchResult, type HintPlatform, HintProvider, type HintProviderOpts, type HintRankInput, type HintScope, type HintSource, KEEPALIVE_BODY_LIMIT_BYTES, LASSO_DEFAULT_ENDPOINT, LOG_BUFFER_LIMIT, type LassoAdapterOpts, type LassoEnvelope, type LassoFetch, type LassoReportContext, type LassoRequestInit, type LassoResponseLike, type LinearIssueInput, MAX_LOG_MESSAGE_CHARS, MAX_QUEUE_AGE_MS, MAX_QUEUE_ITEMS, MODAL_ACTION_ATTACH, MODAL_ACTION_CANCEL, MODAL_ACTION_HINT_TOGGLE, MODAL_ACTION_PICK, MODAL_ACTION_PIN, MODAL_ACTION_REMOVE_SCREENSHOT, MODAL_ACTION_RETRY, MODAL_ACTION_SEND, MODAL_FIELD_COMMENT, MODAL_FIELD_PRIORITY, type ModalQueueLike, type ModalSubmitStatus, NETWORK_BUFFER_LIMIT, type NativeContext, type NotionPageInput, PinController, type PixelPoint, type PixelSize, type QueueStatus, type QueueStatusListener, RATE_LIMIT_MIN_DELAY_MS, REDACTED, ROUTE_TRAIL_KEY, ROUTE_TRAIL_LIMIT, ReportModalController, type ReportModalListener, type ReportModalOpts, type ReportModalState, type ReportParts, type ResolvedConfig, RingBuffer, RouteTrail, type RouteTrailEntry, type RouteTrailOpts, type RouteTrailStore, type RouteWatcher, SCORE_ELEMENT, SCORE_PATH_EXACT, SCORE_PATH_PATTERN, SCREENSHOT_FAILED_MESSAGE, SCREENSHOT_MAX_BASE64_BYTES, SCREENSHOT_QUALITY_STEPS, SOURCE_ATTR, SUBMIT_DONE_MESSAGE, SUBMIT_FAILED_MESSAGE, SUBMIT_PENDING_MESSAGE, type ScreenshotCapture, type ScreenshotOutcome, type ScreenshotReencode, type ScreenshotStatus, type SourceLocation, type SourceMapping, type SubmitOutcome, type SubmitResult, TITLE_MAX_CHARS, type Visibility, type VisibilityEnv, type VisibilityFn, type WebContext, type WebContextInput, WidgetController, type WidgetControllerOpts, type WidgetCorner, type WidgetListener, type WidgetPlatform, type WidgetPosition, type WidgetScreen, type WidgetState, appPathFromNav, buildContext, buildLassoContext, buildLassoEnvelope, buildLinearIssue, buildNotionPage, buildReport, buildTitle, byteLengthOf, canUseKeepalive, captureWithinLimit, createLassoAdapter, defaultBackoff, denormalizePin, detectDevBuild, diagnosticsProviderFor, getOrCreateGuestId, guestUser, hintCharCount, isInternalUser, matchElement, matchPath, normalizePin, normalizeRoutePath, normalizeUser, parseHintCatalog, parseSourceAttr, rankHints, renderReportBody, resolveConfig, resolveContextUser, sanitizeUrl, screenshotBytes, sharedDiagnostics, shouldShowWidget, sourceFromElement, uuidv4 };
package/dist/index.d.ts CHANGED
@@ -504,6 +504,37 @@ interface FeedbackStorage {
504
504
  remove(key: string): Promise<void>;
505
505
  }
506
506
  /** 제보를 수집 백엔드로 보내는 어댑터. 호스트(또는 SDK)가 구현. */
507
+ /**
508
+ * "이 화면의 제보가 어디로 가나" — 위젯 설정에 보여주는 읽기 전용 정보.
509
+ *
510
+ * 왜 필요한가: 코드에 박혀 있는 건 URL 과 KEY 뿐이라, 그 URL 이 **어느 프로젝트**인지·
511
+ * 거기서 Linear 로 **자동으로 나가는지**는 화면 어디에도 안 보인다. 개발자가 그걸 알려면
512
+ * 매번 서버 설정을 뒤져야 했다.
513
+ *
514
+ * 여기 담기는 건 전부 개발자가 이미 아는 값이다(프로젝트 이름·팀 이름). 제보 내용이나
515
+ * 남의 데이터는 담지 않는다 — 수집 키는 쓰기 전용이라는 성질을 여기서도 지킨다.
516
+ */
517
+ interface FeedbackConnection {
518
+ /** 수집처 종류. 지금은 라쏘런뿐이지만 어댑터가 늘면 여기서 갈린다. */
519
+ collector: string;
520
+ project: {
521
+ id: string | null;
522
+ name: string | null;
523
+ };
524
+ linear: {
525
+ connected: boolean;
526
+ teamName?: string | null;
527
+ projectName?: string | null;
528
+ /**
529
+ * 제보가 도착하는 즉시 Linear 이슈가 되나.
530
+ * **연결(`connected`)과 다르다** — 연결은 "보낼 수 있다"이고 이건 "자동으로 보낸다"다.
531
+ * 둘을 한 값으로 합치면 "연결했는데 왜 Linear 에 안 뜨지"를 매번 다시 조사하게 된다.
532
+ */
533
+ autoExport: boolean;
534
+ };
535
+ /** 이 프로젝트를 처리하는 Symphony 프로젝트 슬러그. 없으면 자동 처리 대상이 아니다. */
536
+ symphonySlug: string | null;
537
+ }
507
538
  interface FeedbackAdapter {
508
539
  submit(report: FeedbackReport): Promise<SubmitResult>;
509
540
  /**
@@ -512,6 +543,11 @@ interface FeedbackAdapter {
512
543
  * `submit`과 같은 절대 규칙: **던지지 않는다.** 실패는 `{kind:"fail"}`로 돌려준다.
513
544
  */
514
545
  fetchHints?(etag: string | null): Promise<HintFetchResult>;
546
+ /**
547
+ * 지금 어디에 연결돼 있는지(선택). 위젯 설정이 열릴 때만 부른다.
548
+ * `submit`과 같은 절대 규칙: **던지지 않는다.** 못 얻으면 `null` 을 돌려준다.
549
+ */
550
+ fetchConnection?(): Promise<FeedbackConnection | null>;
515
551
  /**
516
552
  * 힌트 캐시를 수집 소스별로 나누기 위한 식별자(선택). 없으면 위젯이 `"default"`를 쓴다.
517
553
  * 한 기기에서 여러 프로젝트(수집 소스)를 오갈 때 이 값이 없으면 캐시가 섞여 남의
@@ -1565,7 +1601,7 @@ interface LassoAdapterOpts {
1565
1601
  * 대상마다 받는 모양이 다르다는 게 어댑터를 두는 이유 자체다(DP-255 TC5).
1566
1602
  */
1567
1603
  /**
1568
- * 라쏘런 `dp-agentation-ingest` 실제로 요구하는 봉투.
1604
+ * 라쏘런 수집 Edge Function 이 실제로 요구하는 봉투.
1569
1605
  *
1570
1606
  * 이 모양은 **상상하지 않고 실호출로 확정했다.** 이전 버전은 필드명을 지어내서
1571
1607
  * (submissionKey/bodyMarkdown/severity …) 실 엔드포인트에 100% 400 으로 거절당했고,
@@ -1854,4 +1890,4 @@ declare function parseHintCatalog(raw: unknown): HintCatalog | null;
1854
1890
  */
1855
1891
  declare function rankHints(hints: readonly FeedbackHint[], input: HintRankInput, limit: number): FeedbackHint[];
1856
1892
 
1857
- export { type AdapterName, type AppInfo, BACKOFF_BASE_MS, BACKOFF_MAX_MS, type BuildContextOpts, type BuildReportOpts, COMMENT_MAX_CHARS, COMMENT_REQUIRED_MESSAGE, COMMENT_TOO_LONG_MESSAGE, type CaptureWithinLimitOpts, type ConfigWarning, type ConfigWarningCode, type ContextProviders, type ContextUser, DEFAULT_ADAPTER, DEFAULT_INTERNAL_ROLES, DEFAULT_POSITION, type DeviceInfo, type DiagLogEntry, type DiagNetworkEntry, type DiagRequestRef, DiagnosticsCollector, type DiagnosticsExcludeMatcher, type DiagnosticsInstallOpts, type DiagnosticsPayload, type DiagnosticsSource, type DisplayInfo, ENDPOINT_FROM_ADAPTER, type ElementInfo, type ElementLike, FLOATING_BUTTON_ID, type FeedbackAdapter, type FeedbackConfig, type FeedbackContext, type FeedbackHint, type FeedbackKind, type FeedbackPin, type FeedbackPriority, FeedbackQueue, type FeedbackQueueOpts, type FeedbackReport, type FeedbackScreenshot, type FeedbackStorage, type FeedbackUser, FocusRing, type GetCurrentScreenFn, type GetUserFn, HINT_DISPLAY_DEFAULT, HINT_DISPLAY_MAX, HINT_DISPLAY_MIN, HINT_DRAFT_MAX_CHARS, HINT_FAIL_COOLDOWN_MS, HINT_LABEL_MAX_CHARS, HINT_MAX_ITEMS, HINT_TIMEOUT_MS, HINT_TTL_MS, type HintCacheEntry, type HintCatalog, type HintElementRule, type HintFetchResult, type HintPlatform, HintProvider, type HintProviderOpts, type HintRankInput, type HintScope, type HintSource, KEEPALIVE_BODY_LIMIT_BYTES, LASSO_DEFAULT_ENDPOINT, LOG_BUFFER_LIMIT, type LassoAdapterOpts, type LassoEnvelope, type LassoFetch, type LassoReportContext, type LassoRequestInit, type LassoResponseLike, type LinearIssueInput, MAX_LOG_MESSAGE_CHARS, MAX_QUEUE_AGE_MS, MAX_QUEUE_ITEMS, MODAL_ACTION_ATTACH, MODAL_ACTION_CANCEL, MODAL_ACTION_HINT_TOGGLE, MODAL_ACTION_PICK, MODAL_ACTION_PIN, MODAL_ACTION_REMOVE_SCREENSHOT, MODAL_ACTION_RETRY, MODAL_ACTION_SEND, MODAL_FIELD_COMMENT, MODAL_FIELD_PRIORITY, type ModalQueueLike, type ModalSubmitStatus, NETWORK_BUFFER_LIMIT, type NativeContext, type NotionPageInput, PinController, type PixelPoint, type PixelSize, type QueueStatus, type QueueStatusListener, RATE_LIMIT_MIN_DELAY_MS, REDACTED, ROUTE_TRAIL_KEY, ROUTE_TRAIL_LIMIT, ReportModalController, type ReportModalListener, type ReportModalOpts, type ReportModalState, type ReportParts, type ResolvedConfig, RingBuffer, RouteTrail, type RouteTrailEntry, type RouteTrailOpts, type RouteTrailStore, type RouteWatcher, SCORE_ELEMENT, SCORE_PATH_EXACT, SCORE_PATH_PATTERN, SCREENSHOT_FAILED_MESSAGE, SCREENSHOT_MAX_BASE64_BYTES, SCREENSHOT_QUALITY_STEPS, SOURCE_ATTR, SUBMIT_DONE_MESSAGE, SUBMIT_FAILED_MESSAGE, SUBMIT_PENDING_MESSAGE, type ScreenshotCapture, type ScreenshotOutcome, type ScreenshotReencode, type ScreenshotStatus, type SourceLocation, type SourceMapping, type SubmitOutcome, type SubmitResult, TITLE_MAX_CHARS, type Visibility, type VisibilityEnv, type VisibilityFn, type WebContext, type WebContextInput, WidgetController, type WidgetControllerOpts, type WidgetCorner, type WidgetListener, type WidgetPlatform, type WidgetPosition, type WidgetScreen, type WidgetState, appPathFromNav, buildContext, buildLassoContext, buildLassoEnvelope, buildLinearIssue, buildNotionPage, buildReport, buildTitle, byteLengthOf, canUseKeepalive, captureWithinLimit, createLassoAdapter, defaultBackoff, denormalizePin, detectDevBuild, diagnosticsProviderFor, getOrCreateGuestId, guestUser, hintCharCount, isInternalUser, matchElement, matchPath, normalizePin, normalizeRoutePath, normalizeUser, parseHintCatalog, parseSourceAttr, rankHints, renderReportBody, resolveConfig, resolveContextUser, sanitizeUrl, screenshotBytes, sharedDiagnostics, shouldShowWidget, sourceFromElement, uuidv4 };
1893
+ export { type AdapterName, type AppInfo, BACKOFF_BASE_MS, BACKOFF_MAX_MS, type BuildContextOpts, type BuildReportOpts, COMMENT_MAX_CHARS, COMMENT_REQUIRED_MESSAGE, COMMENT_TOO_LONG_MESSAGE, type CaptureWithinLimitOpts, type ConfigWarning, type ConfigWarningCode, type ContextProviders, type ContextUser, DEFAULT_ADAPTER, DEFAULT_INTERNAL_ROLES, DEFAULT_POSITION, type DeviceInfo, type DiagLogEntry, type DiagNetworkEntry, type DiagRequestRef, DiagnosticsCollector, type DiagnosticsExcludeMatcher, type DiagnosticsInstallOpts, type DiagnosticsPayload, type DiagnosticsSource, type DisplayInfo, ENDPOINT_FROM_ADAPTER, type ElementInfo, type ElementLike, FLOATING_BUTTON_ID, type FeedbackAdapter, type FeedbackConfig, type FeedbackConnection, type FeedbackContext, type FeedbackHint, type FeedbackKind, type FeedbackPin, type FeedbackPriority, FeedbackQueue, type FeedbackQueueOpts, type FeedbackReport, type FeedbackScreenshot, type FeedbackStorage, type FeedbackUser, FocusRing, type GetCurrentScreenFn, type GetUserFn, HINT_DISPLAY_DEFAULT, HINT_DISPLAY_MAX, HINT_DISPLAY_MIN, HINT_DRAFT_MAX_CHARS, HINT_FAIL_COOLDOWN_MS, HINT_LABEL_MAX_CHARS, HINT_MAX_ITEMS, HINT_TIMEOUT_MS, HINT_TTL_MS, type HintCacheEntry, type HintCatalog, type HintElementRule, type HintFetchResult, type HintPlatform, HintProvider, type HintProviderOpts, type HintRankInput, type HintScope, type HintSource, KEEPALIVE_BODY_LIMIT_BYTES, LASSO_DEFAULT_ENDPOINT, LOG_BUFFER_LIMIT, type LassoAdapterOpts, type LassoEnvelope, type LassoFetch, type LassoReportContext, type LassoRequestInit, type LassoResponseLike, type LinearIssueInput, MAX_LOG_MESSAGE_CHARS, MAX_QUEUE_AGE_MS, MAX_QUEUE_ITEMS, MODAL_ACTION_ATTACH, MODAL_ACTION_CANCEL, MODAL_ACTION_HINT_TOGGLE, MODAL_ACTION_PICK, MODAL_ACTION_PIN, MODAL_ACTION_REMOVE_SCREENSHOT, MODAL_ACTION_RETRY, MODAL_ACTION_SEND, MODAL_FIELD_COMMENT, MODAL_FIELD_PRIORITY, type ModalQueueLike, type ModalSubmitStatus, NETWORK_BUFFER_LIMIT, type NativeContext, type NotionPageInput, PinController, type PixelPoint, type PixelSize, type QueueStatus, type QueueStatusListener, RATE_LIMIT_MIN_DELAY_MS, REDACTED, ROUTE_TRAIL_KEY, ROUTE_TRAIL_LIMIT, ReportModalController, type ReportModalListener, type ReportModalOpts, type ReportModalState, type ReportParts, type ResolvedConfig, RingBuffer, RouteTrail, type RouteTrailEntry, type RouteTrailOpts, type RouteTrailStore, type RouteWatcher, SCORE_ELEMENT, SCORE_PATH_EXACT, SCORE_PATH_PATTERN, SCREENSHOT_FAILED_MESSAGE, SCREENSHOT_MAX_BASE64_BYTES, SCREENSHOT_QUALITY_STEPS, SOURCE_ATTR, SUBMIT_DONE_MESSAGE, SUBMIT_FAILED_MESSAGE, SUBMIT_PENDING_MESSAGE, type ScreenshotCapture, type ScreenshotOutcome, type ScreenshotReencode, type ScreenshotStatus, type SourceLocation, type SourceMapping, type SubmitOutcome, type SubmitResult, TITLE_MAX_CHARS, type Visibility, type VisibilityEnv, type VisibilityFn, type WebContext, type WebContextInput, WidgetController, type WidgetControllerOpts, type WidgetCorner, type WidgetListener, type WidgetPlatform, type WidgetPosition, type WidgetScreen, type WidgetState, appPathFromNav, buildContext, buildLassoContext, buildLassoEnvelope, buildLinearIssue, buildNotionPage, buildReport, buildTitle, byteLengthOf, canUseKeepalive, captureWithinLimit, createLassoAdapter, defaultBackoff, denormalizePin, detectDevBuild, diagnosticsProviderFor, getOrCreateGuestId, guestUser, hintCharCount, isInternalUser, matchElement, matchPath, normalizePin, normalizeRoutePath, normalizeUser, parseHintCatalog, parseSourceAttr, rankHints, renderReportBody, resolveConfig, resolveContextUser, sanitizeUrl, screenshotBytes, sharedDiagnostics, shouldShowWidget, sourceFromElement, uuidv4 };
package/dist/index.js CHANGED
@@ -2557,6 +2557,45 @@ function createLassoAdapter(opts = {}) {
2557
2557
  * `HintProvider`(hints/ 소유자) 몫이라, 어댑터가 매 실패마다 경고를 찍으면 그 판단과
2558
2558
  * 어긋난다.
2559
2559
  */
2560
+ /**
2561
+ * 지금 어디에 연결돼 있나. **던지지 않는다** — 못 얻으면 `null` 이고, 그러면 위젯이
2562
+ * "확인 못 했습니다"를 보여준다. 이건 표시용이라 실패가 제보를 막으면 안 된다.
2563
+ */
2564
+ async fetchConnection() {
2565
+ const url = absoluteEndpoint(`${endpoint.replace(/\/+$/, "")}/connection`);
2566
+ if (url === null) return null;
2567
+ const sender = resolveFetch(opts.fetch);
2568
+ if (sender === null) return null;
2569
+ const headers = {};
2570
+ if (token !== null) headers.Authorization = `Bearer ${token}`;
2571
+ let res;
2572
+ try {
2573
+ res = await sender(url, { method: "GET", headers });
2574
+ } catch {
2575
+ return null;
2576
+ }
2577
+ if (res.status < 200 || res.status >= 300) return null;
2578
+ let body;
2579
+ try {
2580
+ body = JSON.parse(await res.text());
2581
+ } catch {
2582
+ return null;
2583
+ }
2584
+ const raw = body;
2585
+ if (!raw || raw.ok !== true) return null;
2586
+ const str = (v) => typeof v === "string" && v !== "" ? v : null;
2587
+ return {
2588
+ collector: "lasso",
2589
+ project: { id: str(raw.project?.id), name: str(raw.project?.name) },
2590
+ linear: {
2591
+ connected: raw.linear?.connected === true,
2592
+ teamName: str(raw.linear?.teamName),
2593
+ projectName: str(raw.linear?.projectName),
2594
+ autoExport: raw.linear?.autoExport === true
2595
+ },
2596
+ symphonySlug: str(raw.symphony?.slug)
2597
+ };
2598
+ },
2560
2599
  async fetchHints(etag) {
2561
2600
  const url = absoluteEndpoint(`${endpoint.replace(/\/+$/, "")}/hints`);
2562
2601
  if (url === null) return { kind: "fail" };