@merittdev/horus-lens 0.0.3 → 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/README.md CHANGED
@@ -54,51 +54,14 @@ Lens('app', { release: 'v2.14.3', featureFlags: { newCheckout: true } });
54
54
  Lens('open'); // open the report panel programmatically
55
55
  ```
56
56
 
57
- ### Dashboard (your own admin, no hosted dashboard)
57
+ ### Reviewing reports
58
58
 
59
- One component, one config. On an access-controlled page (your admin auth is the
60
- gate), read the credentials server-side and hand them to the component:
61
-
62
- ```tsx
63
- // page.tsx — server component, env stays on the server
64
- import LensPageClient from './LensPageClient';
65
-
66
- export default function Page() {
67
- return <LensPageClient config={{ projects: JSON.parse(process.env.LENS_PROJECTS ?? '[]') }} />;
68
- }
69
-
70
- // LensPageClient.tsx — client component
71
- 'use client'
72
- import { LensProvider, LensAdmin, type LensAdminConfig } from '@merittdev/horus-lens/dashboard';
73
- import '@merittdev/horus-lens/dist/dashboard.css';
74
-
75
- export default function LensPageClient({ config }: { config: LensAdminConfig }) {
76
- return (
77
- <LensProvider config={config}>
78
- <LensAdmin />
79
- </LensProvider>
80
- );
81
- }
82
- ```
83
-
84
- ```bash
85
- LENS_PROJECTS=[{"name":"front","accessId":"lai_…","secretKey":"las_…"}]
86
- ```
87
-
88
- No projects yet? Pass `config={{ projects: [], adminToken: process.env.LENS_ADMIN_TOKEN }}`
89
- and the built-in wizard mints the first project and hands you that env line.
90
-
91
- You get the full surface: reports (search + pagination + shareable
92
- `?report=` deep links), replay player, integrations (OAuth to
93
- Linear/GitHub/Jira with provider-fed dropdowns), project switcher, onboarding.
94
- Light-first monochrome; dark mode via `theme="dark"`, `.dark`, or
95
- `[data-theme="dark"]`.
96
-
97
- Prefer keys to never reach the browser at all (shared machines, stricter
98
- compliance)? Use proxy mode instead: mount the package's server handlers and
99
- drop the `config` prop — see `@merittdev/horus-lens/server`
100
- (`createLensProxy` + `createLensProjectsRoute`). Piecemeal components
101
- (`ReportsTable`, `ReportDetail`, …) remain exported for custom layouts.
59
+ This package is the **capture SDK only** — there's no dashboard to install. Once
60
+ a report is submitted, review it in the **horus-cloud** workspace under its
61
+ "Lens" section: reports (search + pagination + shareable deep links), the replay
62
+ player, and issue-tracker integrations (OAuth to Linear/GitHub/Jira) all live
63
+ there. Your `las_…` secret stays server-side in horus-cloud and never reaches the
64
+ browser.
102
65
 
103
66
  ## When does the overlay appear?
104
67
 
@@ -111,9 +74,8 @@ import on the same check.
111
74
 
112
75
  - `lai_…` **access id** — public by design (like a GA measurement id). Enforced by a
113
76
  per-project origin allowlist and rate limits on the API.
114
- - `las_…` **secret key** — full project access. Read it server-side and hand it only
115
- to access-controlled surfaces (your admin page via `<LensProvider config>`), CI, or
116
- the management API — never a public page.
77
+ - `las_…` **secret key** — full project access. Held server-side by horus-cloud
78
+ (the "Lens" workspace section), CI, or the management API — never a public page.
117
79
 
118
80
  The SDK talks to the hosted Lens API out of the box — no endpoint configuration.
119
81
  Self-hosting? Pass `endpoint` (React/script `init` config) to point anywhere else.
package/dist/browser.cjs CHANGED
@@ -29000,93 +29000,11 @@ var ApiErrorSchema = external_exports.object({
29000
29000
  error: external_exports.string(),
29001
29001
  message: external_exports.string()
29002
29002
  });
29003
- var IntegrationProviderSchema = external_exports.enum(["github", "jira", "linear"]);
29004
- var IntegrationStatusSchema = external_exports.enum(["disconnected", "pending", "connected"]);
29005
- var IntegrationConfigSchema = external_exports.object({
29006
- /** github: "owner/repo" issues target. */
29007
- repo: external_exports.string().optional(),
29008
- /** linear: team key (e.g. "ENG"); defaults to the first team when unset. */
29009
- teamKey: external_exports.string().optional(),
29010
- /** jira: project key (e.g. "BUG"). Required before issues can be created. */
29011
- projectKey: external_exports.string().optional(),
29012
- /** jira: issue type name. Defaults to "Bug", falling back to "Task". */
29013
- issueType: external_exports.string().optional()
29014
- });
29015
- var IntegrationSchema = external_exports.object({
29016
- provider: IntegrationProviderSchema,
29017
- status: IntegrationStatusSchema,
29018
- account: external_exports.string().nullable().default(null),
29019
- active: external_exports.boolean().default(false),
29020
- config: IntegrationConfigSchema.default({})
29021
- });
29022
- var S3ConfigInputSchema = external_exports.object({
29023
- bucket: external_exports.string().min(1),
29024
- region: external_exports.string().min(1),
29025
- endpoint: external_exports.string().url().optional(),
29026
- accessKeyId: external_exports.string().min(1),
29027
- secretAccessKey: external_exports.string().min(1),
29028
- forcePathStyle: external_exports.boolean().optional()
29029
- });
29030
- var S3ConfigPublicSchema = external_exports.object({
29031
- bucket: external_exports.string(),
29032
- region: external_exports.string(),
29033
- endpoint: external_exports.string().optional(),
29034
- forcePathStyle: external_exports.boolean().optional(),
29035
- /** e.g. "AKIA…F3D2" */
29036
- accessKeyIdMasked: external_exports.string()
29037
- });
29038
- var ProjectSchema = external_exports.object({
29039
- id: external_exports.string(),
29040
- name: external_exports.string(),
29041
- accessId: external_exports.string(),
29042
- allowedOrigins: external_exports.array(external_exports.string()),
29043
- /** Active issue destination; null until onboarding picks one. */
29044
- destination: IntegrationProviderSchema.nullable(),
29045
- /**
29046
- * The customer dashboard page hosting the Lens components (e.g.
29047
- * "https://admin.acme.com/lens"). Auto-created issues deep-link reports as
29048
- * `<dashboardUrl>?report=<id>` when set.
29049
- */
29050
- dashboardUrl: external_exports.string().nullable().default(null),
29051
- s3: S3ConfigPublicSchema.nullable(),
29052
- onboardedAt: external_exports.string().nullable(),
29053
- createdAt: external_exports.string()
29054
- });
29055
- var CreateProjectRequestSchema = external_exports.object({
29056
- name: external_exports.string().min(1).max(120),
29057
- allowedOrigins: external_exports.array(external_exports.string()).default([])
29058
- });
29059
- var CreateProjectResponseSchema = external_exports.object({
29060
- project: ProjectSchema,
29061
- accessId: external_exports.string(),
29062
- accessSecret: external_exports.string()
29063
- });
29064
- var UpdateProjectRequestSchema = external_exports.object({
29065
- name: external_exports.string().min(1).max(120).optional(),
29066
- allowedOrigins: external_exports.array(external_exports.string()).optional(),
29067
- onboarded: external_exports.boolean().optional(),
29068
- dashboardUrl: external_exports.string().url().nullable().optional()
29069
- });
29070
- var ListIntegrationsResponseSchema = external_exports.object({
29071
- integrations: external_exports.array(IntegrationSchema)
29072
- });
29073
- var ConnectIntegrationRequestSchema = external_exports.object({
29074
- /**
29075
- * Where the provider's OAuth dance should land the user afterwards —
29076
- * the calling dashboard's own URL. Packed into the signed `state` so the
29077
- * fixed API callback can redirect back to any consumer dashboard.
29078
- */
29079
- returnUrl: external_exports.string().url().optional()
29080
- });
29081
- var ConnectIntegrationResponseSchema = external_exports.object({
29082
- authorizeUrl: external_exports.string(),
29083
- provider: IntegrationProviderSchema
29084
- });
29085
29003
 
29086
29004
  // ../core/dist/index.js
29087
29005
  var SDK_NAME = "@merittdev/horus-lens";
29088
29006
  var SDK_VERSION = "0.0.1";
29089
- var DEFAULT_ENDPOINT = "https://api-lens.meritt.app";
29007
+ var DEFAULT_ENDPOINT = "https://api.horus.sh";
29090
29008
  var DEFAULT_REPLAY_WINDOW_MS = 15e3;
29091
29009
  var DEFAULT_MAX_CONSOLE_ENTRIES = 200;
29092
29010
  var DEFAULT_MAX_NETWORK_ENTRIES = 100;