pixelize-design-library 2.2.200 → 2.2.201

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.
@@ -0,0 +1,71 @@
1
+ #!/usr/bin/env bash
2
+ # Block first message without / task skill; flag session for status-line warning. Zero tokens.
3
+ set -euo pipefail
4
+
5
+ STATE_FILE="${HOME}/.cursor/pixelize-skill-session-state.json"
6
+ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
7
+ # shellcheck disable=SC1091
8
+ source "$SCRIPT_DIR/task-hint.env"
9
+
10
+ INPUT=$(cat)
11
+ PROMPT=$(echo "$INPUT" | jq -r '.prompt // empty')
12
+ CONV_ID=$(echo "$INPUT" | jq -r '.conversation_id // empty')
13
+
14
+ if [[ -z "$CONV_ID" ]]; then
15
+ echo '{"continue":true}'
16
+ exit 0
17
+ fi
18
+
19
+ has_skill() {
20
+ echo "$PROMPT" | grep -qiE '^\s*/(task|crm-task|social-task|tickets-task|crm-mobile-task|design-task|hrms-task)\b'
21
+ }
22
+
23
+ ensure_state_file() {
24
+ mkdir -p "$(dirname "$STATE_FILE")"
25
+ [[ -f "$STATE_FILE" ]] || echo '{}' >"$STATE_FILE"
26
+ }
27
+
28
+ update_state() {
29
+ local first_nudge="$1"
30
+ local chatting="$2"
31
+ ensure_state_file
32
+ local tmp
33
+ tmp=$(mktemp)
34
+ jq --arg id "$CONV_ID" \
35
+ --argjson first "$first_nudge" \
36
+ --argjson chatting "$chatting" \
37
+ '.[$id] = {first_nudge_done: $first, chatting_without_skill: $chatting}' \
38
+ "$STATE_FILE" >"$tmp" && mv "$tmp" "$STATE_FILE"
39
+ }
40
+
41
+ if has_skill; then
42
+ if [[ -f "$STATE_FILE" ]] && jq -e --arg id "$CONV_ID" '.[$id]' "$STATE_FILE" >/dev/null 2>&1; then
43
+ update_state true false
44
+ fi
45
+ echo '{"continue":true}'
46
+ exit 0
47
+ fi
48
+
49
+ ensure_state_file
50
+ FIRST_DONE=$(jq -r --arg id "$CONV_ID" '.[$id].first_nudge_done // false' "$STATE_FILE")
51
+
52
+ if [[ "$FIRST_DONE" != "true" ]]; then
53
+ update_state true false
54
+ MSG="━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
55
+ NO TASK SKILL LOADED
56
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
57
+
58
+ You are chatting WITHOUT a pipeline skill.
59
+
60
+ For feature / bugfix work, use the / menu first:
61
+ ${REPO_HINT}
62
+
63
+ Then type your goal in the SAME input (do not type the skill name).
64
+
65
+ Send this message AGAIN to continue without a skill."
66
+ jq -n --arg msg "$MSG" '{continue: false, user_message: $msg}'
67
+ exit 0
68
+ fi
69
+
70
+ update_state true true
71
+ echo '{"continue":true}'
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bash
2
- # Blocks plain-text /task (skill not attached). Zero API tokens.
2
+ # Blocks plain-text task skill names (not / menu picks). Zero API tokens.
3
3
  set -euo pipefail
4
4
 
5
5
  SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
@@ -7,9 +7,11 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
7
7
  source "$SCRIPT_DIR/task-hint.env"
8
8
 
9
9
  INPUT=$(cat)
10
- PROMPT=$(echo "$INPUT" | jq -r ".prompt // empty")
10
+ PROMPT=$(echo "$INPUT" | jq -r '.prompt // empty')
11
11
 
12
- if echo "$PROMPT" | grep -qiE "^\s*[@/]?(task|crm-task|social-task|tickets-task|crm-mobile-task|design-task|hrms-task)\b"; then
12
+ # Menu picker embeds "/tickets-task ..." in prompt; attachments stay empty.
13
+ # Only block plain-text mistakes: skill name at start without a leading slash.
14
+ if echo "$PROMPT" | grep -qiE '^\s*@?(task|crm-task|social-task|tickets-task|crm-mobile-task|design-task|hrms-task)\b'; then
13
15
  MSG="⚠️ TASK PIPELINE NOT ACTIVE
14
16
 
15
17
  You typed a task command as plain text. The skill was NOT loaded.
@@ -21,9 +23,9 @@ To run the pipeline:
21
23
 
22
24
  For this repo use: ${REPO_HINT}
23
25
 
24
- Do not type /task in the message body."
25
- jq -n --arg msg "$MSG" "{continue: false, user_message: \$msg}"
26
+ Do not type task skill names in the message body — use the / menu picker."
27
+ jq -n --arg msg "$MSG" '{continue: false, user_message: $msg}'
26
28
  exit 0
27
29
  fi
28
30
 
29
- echo "{\"continue\":true}"
31
+ echo '{"continue":true}'
@@ -4,7 +4,10 @@
4
4
  "beforeSubmitPrompt": [
5
5
  {
6
6
  "command": ".cursor/hooks/task-slash-guard.sh"
7
+ },
8
+ {
9
+ "command": ".cursor/hooks/task-skill-nudge.sh"
7
10
  }
8
11
  ]
9
12
  }
10
- }
13
+ }
@@ -2,10 +2,20 @@
2
2
  # Local status line only — never sent to the model. See .cursor/TASK-SETUP.md
3
3
  set -euo pipefail
4
4
 
5
+ STATE_FILE="${HOME}/.cursor/pixelize-skill-session-state.json"
6
+
5
7
  payload=$(cat)
6
8
  dir=$(echo "$payload" | jq -r ".cwd // .workspace.current_dir // empty")
9
+ session_id=$(echo "$payload" | jq -r ".session_id // empty")
7
10
  base=$(basename "$dir")
8
11
 
12
+ show_no_skill_warning=false
13
+ if [[ -n "$session_id" && -f "$STATE_FILE" ]]; then
14
+ if jq -e --arg id "$session_id" '.[$id].chatting_without_skill == true' "$STATE_FILE" >/dev/null 2>&1; then
15
+ show_no_skill_warning=true
16
+ fi
17
+ fi
18
+
9
19
  case "$base" in
10
20
  account-frontend|account-service)
11
21
  line1="/ → task (Account FE + BE)"
@@ -41,6 +51,11 @@ case "$base" in
41
51
  ;;
42
52
  esac
43
53
 
54
+ if [[ "$show_no_skill_warning" == "true" ]]; then
55
+ echo -e "\033[1;33m\033[7m ⚠ CHATTING WITHOUT TASK SKILL — use / menu ⚠ \033[0m"
56
+ echo -e "\033[1;33m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\033[0m"
57
+ fi
58
+
44
59
  echo -e "\033[1;33m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\033[0m"
45
60
  echo -e "\033[1;33m FEATURE WORK → $line1\033[0m"
46
61
  if [ -n "$line2" ]; then
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixelize-design-library",
3
- "version": "2.2.200",
3
+ "version": "2.2.201",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",