@kraftapps-ai/kai 1.6.2 → 1.6.5

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 +6 -37
  2. package/package.json +1 -1
package/kai CHANGED
@@ -18,15 +18,8 @@ fi
18
18
  PRD_FILE=".kai/stories.json"
19
19
  PROGRESS_FILE=".kai/progress.txt"
20
20
  MEMORY_FILE=".kai/memory.md"
21
- SESSION_FILE=".kai/session_id"
22
21
  LOOP_SCRIPT=".kai/loop.sh"
23
22
 
24
- # ── Handle --new flag ─────────────────────────────────
25
-
26
- if [ "${1:-}" = "--new" ]; then
27
- rm -f "$SESSION_FILE"
28
- shift
29
- fi
30
23
 
31
24
  # ── Ensure .kai/ is git-ignored ───────────────────────
32
25
 
@@ -137,8 +130,8 @@ if [ "$needs_mcp_update" = true ]; then
137
130
 
138
131
  if [ "$mantle_available" = false ] && ! echo "$mcp_config" | grep -q "mantle"; then
139
132
  echo "Setting up Mantle MCP (billing, subscriptions, analytics)..."
140
- mcp_config=$(echo "$mcp_config" | jq '.mcpServers["mantle-foundations"] = {"url": "https://mcp.heymantle.com/foundations"}')
141
- mcp_config=$(echo "$mcp_config" | jq '.mcpServers["mantle-core"] = {"url": "https://mcp.heymantle.com/core"}')
133
+ mcp_config=$(echo "$mcp_config" | jq '.mcpServers["mantle-foundations"] = {"type": "http", "url": "https://mcp.heymantle.com/foundations"}')
134
+ mcp_config=$(echo "$mcp_config" | jq '.mcpServers["mantle-core"] = {"type": "http", "url": "https://mcp.heymantle.com/core"}')
142
135
  fi
143
136
 
144
137
  echo "$mcp_config" > .mcp.json
@@ -160,9 +153,11 @@ if [ "$needs_mcp_update" = true ]; then
160
153
  "args": ["-y", "@shopify/dev-mcp@latest"]
161
154
  },
162
155
  "mantle-foundations": {
156
+ "type": "http",
163
157
  "url": "https://mcp.heymantle.com/foundations"
164
158
  },
165
159
  "mantle-core": {
160
+ "type": "http",
166
161
  "url": "https://mcp.heymantle.com/core"
167
162
  }
168
163
  }
@@ -367,17 +362,7 @@ The developer's name is: ${dev_name}"
367
362
 
368
363
  # ── Build Claude args ─────────────────────────────────
369
364
 
370
- CLAUDE_ARGS="--dangerously-skip-permissions"
371
-
372
- # Session persistence: reuse the same session ID per repo
373
- if [ -f "$SESSION_FILE" ]; then
374
- KAI_SESSION=$(cat "$SESSION_FILE")
375
- else
376
- KAI_SESSION=$(uuidgen 2>/dev/null || python3 -c "import uuid; print(uuid.uuid4())" 2>/dev/null || cat /proc/sys/kernel/random/uuid 2>/dev/null)
377
- mkdir -p .kai
378
- echo "$KAI_SESSION" > "$SESSION_FILE"
379
- fi
380
- CLAUDE_ARGS="$CLAUDE_ARGS --name kai"
365
+ CLAUDE_ARGS="--dangerously-skip-permissions --name kai"
381
366
 
382
367
  # ── Launch the PM ─────────────────────────────────────
383
368
 
@@ -533,20 +518,4 @@ When the developer says \"check /designs\", translate that to the full URL using
533
518
  - **On startup without memory (fresh start):** Explore the repo first to understand the project. Read \`package.json\`, \`shopify.app.toml\` (or \`shopify.app.*.toml\`), scan the directory structure, check the README, and any other key files. Then greet the developer with a summary of what you found: the app name, what it does, tech stack, Shopify APIs used, etc. Save this to \`.kai/memory.md\` so you remember next time. Then ask what they want to plan or build. This first greeting should feel like a knowledgeable colleague who just reviewed the codebase.
534
519
  ${status}${progress}${memory}${dev_greeting}"
535
520
 
536
- err_file=$(mktemp)
537
- set +e
538
- claude --session-id "$KAI_SESSION" $CLAUDE_ARGS --system-prompt "$SYSTEM_PROMPT" "${@:-Hey Kai}" 2>"$err_file"
539
- exit_code=$?
540
- set -e
541
-
542
- if [ $exit_code -ne 0 ] && grep -qi "already in use" "$err_file" 2>/dev/null; then
543
- rm -f "$err_file"
544
- echo ""
545
- echo "Kai is already running in another terminal."
546
- echo ""
547
- echo " 1) Start a new session here: kai --new"
548
- echo " 2) Continue in the other terminal where Kai is running"
549
- echo ""
550
- exit 1
551
- fi
552
- rm -f "$err_file"
521
+ exec claude $CLAUDE_ARGS --system-prompt "$SYSTEM_PROMPT" "${@:-Hey Kai}"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kraftapps-ai/kai",
3
- "version": "1.6.2",
3
+ "version": "1.6.5",
4
4
  "description": "Autonomous AI developer loop for Claude Code",
5
5
  "bin": {
6
6
  "kai": "kai"