jat-feedback 1.7.1 → 2.0.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 +263 -0
- package/dist/jat-feedback.js +527 -19
- package/dist/jat-feedback.mjs +10587 -3500
- package/package.json +4 -2
- package/supabase/migrations/1.8.0_add_agent_notes.sql +66 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jat-feedback",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Embeddable feedback widget for bug reports and feature requests. Captures screenshots, console logs, and user context as a web component.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/jat-feedback.js",
|
|
@@ -37,6 +37,8 @@
|
|
|
37
37
|
"vite": "^6.4.1"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"
|
|
40
|
+
"@page-agent/core": "^1.5.8",
|
|
41
|
+
"modern-screenshot": "^4.6.8",
|
|
42
|
+
"zod": "^3.25.76"
|
|
41
43
|
}
|
|
42
44
|
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
-- jat-feedback v1.8.0 — agent_notes table
|
|
2
|
+
--
|
|
3
|
+
-- Stores user-written markdown context that gets injected into page-agent
|
|
4
|
+
-- LLM calls. Two scopes: site-wide (route IS NULL) and per-route.
|
|
5
|
+
--
|
|
6
|
+
-- Apply as a new migration in your project:
|
|
7
|
+
-- cp node_modules/jat-feedback/supabase/migrations/1.8.0_add_agent_notes.sql \
|
|
8
|
+
-- supabase/migrations/$(date +%Y%m%d%H%M%S)_feedback_1_8_0.sql
|
|
9
|
+
-- supabase db push
|
|
10
|
+
|
|
11
|
+
CREATE TABLE IF NOT EXISTS agent_notes (
|
|
12
|
+
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
13
|
+
project TEXT NOT NULL,
|
|
14
|
+
route TEXT DEFAULT NULL,
|
|
15
|
+
title TEXT NOT NULL DEFAULT '',
|
|
16
|
+
content TEXT NOT NULL DEFAULT '',
|
|
17
|
+
created_at TIMESTAMPTZ DEFAULT now(),
|
|
18
|
+
updated_at TIMESTAMPTZ DEFAULT now()
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
-- One note per route per project (NULL route = site-wide).
|
|
22
|
+
-- COALESCE ensures the unique constraint works for NULL routes,
|
|
23
|
+
-- since standard UNIQUE treats NULLs as distinct.
|
|
24
|
+
CREATE UNIQUE INDEX idx_agent_notes_project_route
|
|
25
|
+
ON agent_notes(project, COALESCE(route, ''));
|
|
26
|
+
|
|
27
|
+
-- Listing notes by project
|
|
28
|
+
CREATE INDEX idx_agent_notes_project
|
|
29
|
+
ON agent_notes(project);
|
|
30
|
+
|
|
31
|
+
-- Auto-update updated_at on modification
|
|
32
|
+
CREATE OR REPLACE FUNCTION update_agent_notes_updated_at()
|
|
33
|
+
RETURNS TRIGGER AS $$
|
|
34
|
+
BEGIN
|
|
35
|
+
NEW.updated_at = now();
|
|
36
|
+
RETURN NEW;
|
|
37
|
+
END;
|
|
38
|
+
$$ LANGUAGE plpgsql;
|
|
39
|
+
|
|
40
|
+
CREATE TRIGGER agent_notes_updated_at
|
|
41
|
+
BEFORE UPDATE ON agent_notes
|
|
42
|
+
FOR EACH ROW
|
|
43
|
+
EXECUTE FUNCTION update_agent_notes_updated_at();
|
|
44
|
+
|
|
45
|
+
-- RLS policies (matches feedback_reports pattern)
|
|
46
|
+
ALTER TABLE agent_notes ENABLE ROW LEVEL SECURITY;
|
|
47
|
+
|
|
48
|
+
CREATE POLICY "Authenticated users can insert agent notes"
|
|
49
|
+
ON agent_notes FOR INSERT TO authenticated
|
|
50
|
+
WITH CHECK (true);
|
|
51
|
+
|
|
52
|
+
CREATE POLICY "Authenticated users can read agent notes"
|
|
53
|
+
ON agent_notes FOR SELECT TO authenticated
|
|
54
|
+
USING (true);
|
|
55
|
+
|
|
56
|
+
CREATE POLICY "Authenticated users can update agent notes"
|
|
57
|
+
ON agent_notes FOR UPDATE TO authenticated
|
|
58
|
+
USING (true) WITH CHECK (true);
|
|
59
|
+
|
|
60
|
+
CREATE POLICY "Authenticated users can delete agent notes"
|
|
61
|
+
ON agent_notes FOR DELETE TO authenticated
|
|
62
|
+
USING (true);
|
|
63
|
+
|
|
64
|
+
CREATE POLICY "Service role full access to agent notes"
|
|
65
|
+
ON agent_notes FOR ALL TO service_role
|
|
66
|
+
USING (true) WITH CHECK (true);
|