@jhizzard/termdeck-stack 0.4.10 → 0.4.11
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/assets/hooks/README.md
CHANGED
|
@@ -18,7 +18,7 @@ The hook:
|
|
|
18
18
|
|
|
19
19
|
1. Skips transcripts smaller than 5 KB (no signal in tiny sessions —
|
|
20
20
|
override via `TERMDECK_HOOK_MIN_BYTES`).
|
|
21
|
-
2. Validates env vars (`SUPABASE_URL`, `
|
|
21
|
+
2. Validates env vars (`SUPABASE_URL`, `SUPABASE_SERVICE_ROLE_KEY`,
|
|
22
22
|
`OPENAI_API_KEY`); if any are missing, logs the missing list and
|
|
23
23
|
exits cleanly without blocking the session close.
|
|
24
24
|
3. Detects the project from `cwd` against a built-in regex table; falls
|
|
@@ -44,7 +44,7 @@ The hook needs three env vars at run time:
|
|
|
44
44
|
| Var | What | How to set |
|
|
45
45
|
|---|---|---|
|
|
46
46
|
| `SUPABASE_URL` | Your Supabase project URL (e.g. `https://abc.supabase.co`) | `~/.termdeck/secrets.env` (Tier 2) |
|
|
47
|
-
| `
|
|
47
|
+
| `SUPABASE_SERVICE_ROLE_KEY` | Service-role key with INSERT on `memory_items`. **Not the anon key.** | `~/.termdeck/secrets.env` |
|
|
48
48
|
| `OPENAI_API_KEY` | OpenAI key for embedding inference | `~/.termdeck/secrets.env` or your shell |
|
|
49
49
|
|
|
50
50
|
Claude Code propagates the parent shell's environment into hook
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
*
|
|
23
23
|
* Required env vars (validated at entry):
|
|
24
24
|
* - SUPABASE_URL e.g. https://<project-ref>.supabase.co
|
|
25
|
-
* -
|
|
25
|
+
* - SUPABASE_SERVICE_ROLE_KEY service-role key (NOT the anon key — needs INSERT on memory_items)
|
|
26
26
|
* - OPENAI_API_KEY sk-... for text-embedding-3-small
|
|
27
27
|
*
|
|
28
28
|
* Optional:
|
|
@@ -73,7 +73,7 @@ function detectProject(cwd) {
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
function readEnv() {
|
|
76
|
-
const required = ['SUPABASE_URL', '
|
|
76
|
+
const required = ['SUPABASE_URL', 'SUPABASE_SERVICE_ROLE_KEY', 'OPENAI_API_KEY'];
|
|
77
77
|
const missing = required.filter((k) => !process.env[k]);
|
|
78
78
|
if (missing.length) {
|
|
79
79
|
log(`env-var-missing: ${missing.join(', ')} — set these in ~/.termdeck/secrets.env or your shell to enable Mnestra ingestion. Skipping.`);
|
|
@@ -81,7 +81,7 @@ function readEnv() {
|
|
|
81
81
|
}
|
|
82
82
|
return {
|
|
83
83
|
supabaseUrl: process.env.SUPABASE_URL.replace(/\/$/, ''),
|
|
84
|
-
supabaseKey: process.env.
|
|
84
|
+
supabaseKey: process.env.SUPABASE_SERVICE_ROLE_KEY,
|
|
85
85
|
openaiKey: process.env.OPENAI_API_KEY,
|
|
86
86
|
};
|
|
87
87
|
}
|
package/package.json
CHANGED