create-theokit 1.3.0 → 1.3.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-theokit",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "type": "module",
5
5
  "description": "Scaffold a new TheoKit project",
6
6
  "license": "Apache-2.0",
@@ -36,6 +36,14 @@ The agent lives in `agents/chat.ts` (edit its model / system prompt). Wire HITL
36
36
  `@HumanInTheLoop`-gated tool — the sidecar emits `tool-approval-request`, the webview shows Approve/Deny,
37
37
  and `useAgent(...).approve(id, { approved })` routes the decision through the transport's `settle`.
38
38
 
39
+ ## Security — CSP
40
+
41
+ `tauri.conf.json` ships `app.security.csp: null` (no Content-Security-Policy) so the Vite dev server's
42
+ inline react-refresh script isn't blocked (a strict `script-src 'self'` blanks the webview in dev). For a
43
+ **production** build, add a CSP: the bundled app serves from `tauri://` with no inline scripts, so a strict
44
+ policy like `"default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'"` works.
45
+ `app.withGlobalTauri: true` is required — the webview reads `window.__TAURI__.core` to reach the Rust shell.
46
+
39
47
  ## Packaging (distributable app + Windows)
40
48
 
41
49
  The dev launcher above is a POSIX shim that depends on the app's `node_modules` (tsx). For a **distributable**
@@ -10,6 +10,7 @@
10
10
  "beforeBuildCommand": "node scripts/build-sidecar.mjs && vite build frontend"
11
11
  },
12
12
  "app": {
13
+ "withGlobalTauri": true,
13
14
  "windows": [
14
15
  {
15
16
  "label": "main",
@@ -19,7 +20,7 @@
19
20
  }
20
21
  ],
21
22
  "security": {
22
- "csp": "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'"
23
+ "csp": null
23
24
  }
24
25
  },
25
26
  "bundle": {