@montytools/cli 0.5.3 → 0.5.4
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/bin/monty.mjs +1 -1
- package/package.json +1 -1
- package/skills/monty-build/SKILL.md +4 -1
- package/template/AGENTS.md +13 -0
- package/template/package.json +1 -1
package/bin/monty.mjs
CHANGED
|
@@ -991,7 +991,7 @@ async function freePort(start) {
|
|
|
991
991
|
// Apps pin @montytools/sdk at scaffold time and go stale — the CLI knows the
|
|
992
992
|
// minimum SDK its workflows need (e.g. tunnel-host allowlisting lives in the
|
|
993
993
|
// SDK's vite plugin) and upgrades the app automatically before dev/deploy.
|
|
994
|
-
const MIN_SDK = "0.2.
|
|
994
|
+
const MIN_SDK = "0.2.4";
|
|
995
995
|
const SDK_VITE_CACHE_STAMP = "sdk-vite-cache-version";
|
|
996
996
|
|
|
997
997
|
function installedSdkVersion(appDir) {
|
package/package.json
CHANGED
|
@@ -60,7 +60,10 @@ channel switch. "dev"/"prod" mean platform environments, never app states.
|
|
|
60
60
|
4. **One import surface:** `@montytools/sdk` (`defineApp`, zod) and
|
|
61
61
|
`@montytools/sdk/react` (hooks: `useList`, `useInsert`, …). Never import
|
|
62
62
|
Clerk or Convex directly; never fetch external APIs from app code — the
|
|
63
|
-
platform CSP blocks them.
|
|
63
|
+
platform CSP blocks them. Open external HTTPS pages with
|
|
64
|
+
`openExternal(url)` from `@montytools/sdk`, called synchronously from the
|
|
65
|
+
click or key handler; `window.open` and `target="_blank"` are blocked by
|
|
66
|
+
the app iframe.
|
|
64
67
|
5. **The data schema lives in the WORKSPACE, not in code.** Read it with
|
|
65
68
|
`monty schema` (JSON on stdout); change it by editing that JSON and
|
|
66
69
|
running `monty schema set <file>` — validated server-side, additive by
|
package/template/AGENTS.md
CHANGED
|
@@ -106,6 +106,19 @@ await update(row._id, { receipt }); // store descriptor, not
|
|
|
106
106
|
const { url } = useFileUrl(app, row.receipt); // authenticated blob: URL for previews/downloads
|
|
107
107
|
```
|
|
108
108
|
|
|
109
|
+
Open an external HTTPS page with the SDK. Do not use `target="_blank"` or
|
|
110
|
+
`window.open`; the app iframe blocks popups by design. Call `openExternal`
|
|
111
|
+
synchronously from the click or key handler so the host can verify current
|
|
112
|
+
user activation:
|
|
113
|
+
|
|
114
|
+
```tsx
|
|
115
|
+
import { openExternal } from "@montytools/sdk";
|
|
116
|
+
|
|
117
|
+
<Button onClick={() => openExternal(profile.linkedinUrl)}>
|
|
118
|
+
Open LinkedIn
|
|
119
|
+
</Button>
|
|
120
|
+
```
|
|
121
|
+
|
|
109
122
|
## Derived fields, metrics, pages (V2 — the platform renders these)
|
|
110
123
|
|
|
111
124
|
Your config can carry a whole database app the platform shell renders for
|
package/template/package.json
CHANGED