@kraftapps-ai/kai 1.5.0 → 1.5.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.
Files changed (2) hide show
  1. package/kai +17 -10
  2. package/package.json +1 -1
package/kai CHANGED
@@ -15,20 +15,20 @@ if [ "${1:-}" = "--version" ] || [ "${1:-}" = "-v" ]; then
15
15
  exit 0
16
16
  fi
17
17
 
18
- # ── Handle --new flag ─────────────────────────────────
19
-
20
- USE_CONTINUE=true
21
- if [ "${1:-}" = "--new" ]; then
22
- USE_CONTINUE=false
23
- shift
24
- fi
25
-
26
18
  PRD_FILE=".kai/stories.json"
27
19
  PROGRESS_FILE=".kai/progress.txt"
28
20
  PROMPT_FILE=".kai/PROMPT.md"
29
21
  MEMORY_FILE=".kai/memory.md"
22
+ SESSION_FILE=".kai/session_id"
30
23
  LOOP_SCRIPT=".kai/loop.sh"
31
24
 
25
+ # ── Handle --new flag ─────────────────────────────────
26
+
27
+ if [ "${1:-}" = "--new" ]; then
28
+ rm -f "$SESSION_FILE"
29
+ shift
30
+ fi
31
+
32
32
  # ── Auto-init if needed ───────────────────────────────
33
33
 
34
34
  # Migrate old file locations (pre-1.5.0)
@@ -376,9 +376,16 @@ The developer's name is: ${dev_name}"
376
376
  # ── Build Claude args ─────────────────────────────────
377
377
 
378
378
  CLAUDE_ARGS="--dangerously-skip-permissions"
379
- if [ "$USE_CONTINUE" = true ]; then
380
- CLAUDE_ARGS="$CLAUDE_ARGS --continue"
379
+
380
+ # Session persistence: reuse the same session ID per repo
381
+ if [ -f "$SESSION_FILE" ]; then
382
+ KAI_SESSION=$(cat "$SESSION_FILE")
383
+ else
384
+ 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)
385
+ mkdir -p .kai
386
+ echo "$KAI_SESSION" > "$SESSION_FILE"
381
387
  fi
388
+ CLAUDE_ARGS="$CLAUDE_ARGS --session-id $KAI_SESSION --name kai"
382
389
 
383
390
  # ── Launch the PM ─────────────────────────────────────
384
391
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kraftapps-ai/kai",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "Autonomous AI developer loop for Claude Code",
5
5
  "bin": {
6
6
  "kai": "kai"