@loupekit/sdk 0.11.1 → 0.12.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
@@ -94,14 +94,15 @@ init({
94
94
  A dockable control panel appears with a three-page sidebar — **Home** (stat tiles, scope chips with
95
95
  counts, the project manager, and the most recent feedback), **Comments** (with the
96
96
  **Inspect**, **Note**, **Region**, and **Record** tools + the comment list) and
97
- **Activity** (a live monitor fed by `trackActivity()`). The header carries a position menu
97
+ **Activity** (a live monitor fed by your backend's activity feed and by `trackActivity()`). The header carries a position menu
98
98
  (left / bottom / right / float), a theme toggle, a settings dropdown — five accent colours, switches
99
99
  for hover hints, markers and page paths, plus the running package version — and a minimize button
100
100
  that collapses the panel to a one-line context bar. A five-step guided tour runs once on first open
101
101
  (skippable, replayable from Settings), and each view shows a one-time hint card with a **Turn off
102
102
  hints** link.
103
- Pass `repo` and `branch` to `init()` to make
104
- threads branch-aware — the board can then be filtered by repository and branch.
103
+ When the backend serves `GET v1/org`, the Home project chip reads "Project · Organization" and
104
+ the project menu lists the organization's other projects and where this project's tickets go.
105
+ The Chat page is off by default. Pass `chat: true` to `init()` to turn it on; it is experimental.
105
106
  Use the header's dock controls to dock it left / right /
106
107
  bottom (which pushes your page over) or float it, toggle light/dark, or close it to the `◎`
107
108
  launcher. The launcher carries the comment count; one tap reopens the panel, and the chevron
@@ -123,8 +124,6 @@ import { init, connectTab } from "@loupekit/sdk";
123
124
  init({
124
125
  projectKey: "pk_live_…",
125
126
  user: { id: "u_1", name: "Ada" },
126
- repo: "acme/web",
127
- repos: ["acme/web", "acme/api"], // powers the panel's repo picker
128
127
  environments: ["https://staging.acme.test"],
129
128
  tabs: [
130
129
  connectTab(), // the Claude/MCP page, now opt-in
@@ -155,8 +154,10 @@ trackActivity({ kind: "Read", label: "Read src/app.ts", files: ["src/app.ts"] })
155
154
  trackActivity({ kind: "Bash", label: "pnpm test", detail: "exit 1", level: "error" });
156
155
  ```
157
156
 
158
- Loupe's own operations feed the same stream, so the view is never empty. With nothing connected it
159
- says *Monitor unavailable* and explains how to wire it up.
157
+ Loupe's own operations feed the same stream. When the backend serves `GET v1/activity` (the
158
+ Laravel package does), the panel reads it on start and polls it every 15 seconds while the view is
159
+ open, and shows "Live" or "Offline" beside the status dot. With no feed and nothing connected the
160
+ view says *Monitor unavailable* and explains how to wire it up.
160
161
 
161
162
  ### Reviewing a change
162
163
 
@@ -264,6 +265,7 @@ and reordered, yet the pin follows it:
264
265
  | `timeZone` | `string` | IANA time zone every timestamp is rendered in (e.g. `"Africa/Cairo"`). Defaults to the browser's. |
265
266
  | `locale` | `string` | BCP 47 locale for dates (e.g. `"en-GB"` for day-first). Defaults to the browser's. |
266
267
  | `packageVersion` | `string` | Version of the host package that served this bundle (`Loupe.version` is the bundle's own). Flagged in the widget when the two differ. |
268
+ | `chat` | `boolean` | Turn on the experimental Chat page. Off by default: the tab shows dimmed and does not open. |
267
269
 
268
270
  ## Redaction
269
271
 
@@ -291,6 +293,9 @@ interface StorageAdapter {
291
293
  save(comment: Comment): Promise<Comment>;
292
294
  update(id: string, patch: Partial<Comment>): Promise<void>;
293
295
  remove(id: string): Promise<void>;
296
+ // Optional. Return null when the backend has no such endpoint.
297
+ getOrg?(): Promise<OrgInfo | null>;
298
+ listActivity?(projectKey: string, since?: string): Promise<ActivityEvent[] | null>;
294
299
  }
295
300
  ```
296
301