@kraftapps-ai/kai 1.3.3 → 1.3.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.
Files changed (2) hide show
  1. package/kai +32 -12
  2. package/package.json +1 -1
package/kai CHANGED
@@ -6,6 +6,15 @@
6
6
 
7
7
  set -e
8
8
 
9
+ # ── Version ───────────────────────────────────────────
10
+
11
+ KAI_VERSION=$(node -p "require('$(dirname "$(readlink -f "$(which kai)" 2>/dev/null || echo "$0")")/package.json').version" 2>/dev/null || echo "unknown")
12
+
13
+ if [ "${1:-}" = "--version" ] || [ "${1:-}" = "-v" ]; then
14
+ echo "kai v${KAI_VERSION}"
15
+ exit 0
16
+ fi
17
+
9
18
  PRD_FILE="kai.json"
10
19
  PROGRESS_FILE="kai-progress.txt"
11
20
  PROMPT_FILE=".kai/PROMPT.md"
@@ -31,10 +40,10 @@ EOF
31
40
  Add your project-specific context here. The more you provide, the better Kai performs.
32
41
 
33
42
  ## Shopify Store
34
- <!-- Required for browser testing and Storefront MCP -->
43
+ <!-- Kai auto-detects store info from shopify.app.toml and .env -->
44
+ <!-- Only fill this in if auto-detection doesn't work for your setup -->
35
45
  <!-- Store domain: your-store.myshopify.com -->
36
- <!-- App handle: your-app-handle (from the app URL in Shopify Admin) -->
37
- <!-- App URL: https://admin.shopify.com/store/YOUR_STORE/apps/YOUR_APP -->
46
+ <!-- App handle: your-app-handle -->
38
47
 
39
48
  ## Tech stack
40
49
  <!-- e.g., Remix + TypeScript, Next.js, Ruby on Rails -->
@@ -387,15 +396,26 @@ When the developer asks you to test or QA the app, proactively navigate to every
387
396
 
388
397
  ### Navigating to the Shopify app
389
398
 
390
- **NEVER guess the app URL.** Before navigating, read \`.kai/PROMPT.md\` for the store domain and app handle.
391
-
392
- Shopify apps are **embedded inside Shopify Admin**. Pages are NOT directly accessible at localhost. You must:
393
- 1. Build the full Admin URL: \`https://admin.shopify.com/store/STORE_NAME/apps/APP_HANDLE/PAGE\`
394
- 2. Use the **store domain and app handle** from \`.kai/PROMPT.md\`
395
- 3. When the developer says \"check /designs\", translate that to \`https://admin.shopify.com/store/STORE/apps/APP/designs\`
396
- 4. For theme previews, use the store's preview URL, not localhost
397
-
398
- If no store info is configured in \`.kai/PROMPT.md\`, ask the developer for it before navigating.
399
+ **NEVER guess the app URL. Auto-detect it from the repo.**
400
+
401
+ Shopify apps are **embedded inside Shopify Admin**. Pages are NOT directly accessible at localhost. Before navigating, you MUST read the repo config files to build the correct URL:
402
+
403
+ 1. **Read \`shopify.app.toml\`** (or \`shopify.app.*.toml\`) to get:
404
+ - \`handle\` the app's URL slug (used in \`/apps/{handle}\`)
405
+ - \`[build] dev_store_url\` the dev store domain (e.g., \`my-store.myshopify.com\`)
406
+ - \`application_url\` — the app's hosted URL
407
+ - \`name\`, \`client_id\` app identity
408
+ 2. **If not in TOML, check \`.env\`** for:
409
+ - \`SHOP\` — store domain
410
+ - \`SHOPIFY_API_KEY\` — app API key
411
+ - \`HOST\` — app host URL
412
+ 3. **Build the Admin URL**: \`https://admin.shopify.com/store/{STORE_NAME}/apps/{HANDLE}/{PAGE}\`
413
+ - Extract STORE_NAME from \`dev_store_url\` (strip \`.myshopify.com\`)
414
+ - Use \`handle\` from the TOML
415
+ 4. When the developer says \"check /designs\", translate that to \`https://admin.shopify.com/store/STORE/apps/APP/designs\`
416
+ 5. For theme previews, use the store's preview URL, not localhost
417
+
418
+ **Do NOT ask the developer for store info if it can be found in these files. Only ask as a last resort if none of the config files exist.**
399
419
 
400
420
  ## Rules for good stories
401
421
  - Each story: independently committable, 5-15 min of work
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kraftapps-ai/kai",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "description": "Autonomous AI developer loop for Claude Code",
5
5
  "bin": {
6
6
  "kai": "kai"