sticky-note-cli 2.9.2 → 3.1.0
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/README.md +94 -10
- package/bin/cli.js +1153 -174
- package/bin/mcp-server.js +218 -36
- package/package.json +1 -1
- package/templates/CLAUDE.md +23 -0
- package/templates/gitignore-additions.txt +3 -0
- package/templates/hooks/data-branch.js +256 -0
- package/templates/hooks/inject-context.js +26 -12
- package/templates/hooks/on-error.js +22 -9
- package/templates/hooks/on-stop.js +12 -7
- package/templates/hooks/pre-tool-use.js +49 -52
- package/templates/hooks/session-end.js +190 -21
- package/templates/hooks/session-start.js +81 -9
- package/templates/hooks/sticky-codex.ps1 +20 -4
- package/templates/hooks/sticky-codex.sh +14 -5
- package/templates/hooks/sticky-utils.js +335 -29
- package/templates/hooks/track-work.js +27 -13
- package/templates/hooks.json +47 -47
- package/templates/settings.json +81 -81
- package/templates/sticky-note-config.json +2 -0
- package/templates/sticky-note-install.yml +80 -0
- package/templates/sticky-note.json +5 -5
package/templates/settings.json
CHANGED
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
{
|
|
2
|
-
"hooks": {
|
|
3
|
-
"SessionStart": [
|
|
4
|
-
{
|
|
5
|
-
"matcher": "",
|
|
6
|
-
"hooks": [
|
|
7
|
-
{
|
|
8
|
-
"type": "command",
|
|
9
|
-
"command": "node \".claude/hooks/session-start.js\""
|
|
10
|
-
}
|
|
11
|
-
]
|
|
12
|
-
}
|
|
13
|
-
],
|
|
14
|
-
"SessionEnd": [
|
|
15
|
-
{
|
|
16
|
-
"matcher": "",
|
|
17
|
-
"hooks": [
|
|
18
|
-
{
|
|
19
|
-
"type": "command",
|
|
20
|
-
"command": "node \".claude/hooks/session-end.js\""
|
|
21
|
-
}
|
|
22
|
-
]
|
|
23
|
-
}
|
|
24
|
-
],
|
|
25
|
-
"UserPromptSubmit": [
|
|
26
|
-
{
|
|
27
|
-
"matcher": "",
|
|
28
|
-
"hooks": [
|
|
29
|
-
{
|
|
30
|
-
"type": "command",
|
|
31
|
-
"command": "node \".claude/hooks/inject-context.js\""
|
|
32
|
-
}
|
|
33
|
-
]
|
|
34
|
-
}
|
|
35
|
-
],
|
|
36
|
-
"PreToolUse": [
|
|
37
|
-
{
|
|
38
|
-
"matcher": "",
|
|
39
|
-
"hooks": [
|
|
40
|
-
{
|
|
41
|
-
"type": "command",
|
|
42
|
-
"command": "node \".claude/hooks/pre-tool-use.js\""
|
|
43
|
-
}
|
|
44
|
-
]
|
|
45
|
-
}
|
|
46
|
-
],
|
|
47
|
-
"PostToolUse": [
|
|
48
|
-
{
|
|
49
|
-
"matcher": "",
|
|
50
|
-
"hooks": [
|
|
51
|
-
{
|
|
52
|
-
"type": "command",
|
|
53
|
-
"command": "node \".claude/hooks/track-work.js\""
|
|
54
|
-
}
|
|
55
|
-
]
|
|
56
|
-
}
|
|
57
|
-
],
|
|
58
|
-
"Stop": [
|
|
59
|
-
{
|
|
60
|
-
"matcher": "",
|
|
61
|
-
"hooks": [
|
|
62
|
-
{
|
|
63
|
-
"type": "command",
|
|
64
|
-
"command": "node \".claude/hooks/on-stop.js\""
|
|
65
|
-
}
|
|
66
|
-
]
|
|
67
|
-
}
|
|
68
|
-
],
|
|
69
|
-
"PostToolUseFailure": [
|
|
70
|
-
{
|
|
71
|
-
"matcher": "",
|
|
72
|
-
"hooks": [
|
|
73
|
-
{
|
|
74
|
-
"type": "command",
|
|
75
|
-
"command": "node \".claude/hooks/on-error.js\""
|
|
76
|
-
}
|
|
77
|
-
]
|
|
78
|
-
}
|
|
79
|
-
]
|
|
80
|
-
}
|
|
81
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"SessionStart": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "node \".claude/hooks/session-start.js\""
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"SessionEnd": [
|
|
15
|
+
{
|
|
16
|
+
"matcher": "",
|
|
17
|
+
"hooks": [
|
|
18
|
+
{
|
|
19
|
+
"type": "command",
|
|
20
|
+
"command": "node \".claude/hooks/session-end.js\""
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"UserPromptSubmit": [
|
|
26
|
+
{
|
|
27
|
+
"matcher": "",
|
|
28
|
+
"hooks": [
|
|
29
|
+
{
|
|
30
|
+
"type": "command",
|
|
31
|
+
"command": "node \".claude/hooks/inject-context.js\""
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"PreToolUse": [
|
|
37
|
+
{
|
|
38
|
+
"matcher": "",
|
|
39
|
+
"hooks": [
|
|
40
|
+
{
|
|
41
|
+
"type": "command",
|
|
42
|
+
"command": "node \".claude/hooks/pre-tool-use.js\""
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"PostToolUse": [
|
|
48
|
+
{
|
|
49
|
+
"matcher": "",
|
|
50
|
+
"hooks": [
|
|
51
|
+
{
|
|
52
|
+
"type": "command",
|
|
53
|
+
"command": "node \".claude/hooks/track-work.js\""
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"Stop": [
|
|
59
|
+
{
|
|
60
|
+
"matcher": "",
|
|
61
|
+
"hooks": [
|
|
62
|
+
{
|
|
63
|
+
"type": "command",
|
|
64
|
+
"command": "node \".claude/hooks/on-stop.js\""
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"PostToolUseFailure": [
|
|
70
|
+
{
|
|
71
|
+
"matcher": "",
|
|
72
|
+
"hooks": [
|
|
73
|
+
{
|
|
74
|
+
"type": "command",
|
|
75
|
+
"command": "node \".claude/hooks/on-error.js\""
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Sticky Note — Auto-Install GitHub Action
|
|
2
|
+
#
|
|
3
|
+
# Installs or updates Sticky Note hooks on every repo in your org.
|
|
4
|
+
# Add this workflow to your org's .github repository, or to individual repos.
|
|
5
|
+
#
|
|
6
|
+
# Required org secrets:
|
|
7
|
+
# STICKY_URL — Cloud backend URL (e.g., https://sticky.acme.workers.dev)
|
|
8
|
+
# STICKY_API_KEY — API key for cloud backend
|
|
9
|
+
#
|
|
10
|
+
# Optional org variables:
|
|
11
|
+
# STICKY_STALE_DAYS — Thread expiry days (default: 14)
|
|
12
|
+
# STICKY_CONVENTIONS — Comma-separated team conventions
|
|
13
|
+
# STICKY_MCP_SERVERS — JSON array of MCP server configs
|
|
14
|
+
|
|
15
|
+
name: Sticky Note Install
|
|
16
|
+
|
|
17
|
+
on:
|
|
18
|
+
push:
|
|
19
|
+
branches: [main]
|
|
20
|
+
workflow_dispatch:
|
|
21
|
+
|
|
22
|
+
permissions:
|
|
23
|
+
contents: write
|
|
24
|
+
|
|
25
|
+
jobs:
|
|
26
|
+
install:
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
steps:
|
|
29
|
+
- uses: actions/checkout@v4
|
|
30
|
+
|
|
31
|
+
- uses: actions/setup-node@v4
|
|
32
|
+
with:
|
|
33
|
+
node-version: '20'
|
|
34
|
+
|
|
35
|
+
- name: Check if Sticky Note is installed
|
|
36
|
+
id: check
|
|
37
|
+
run: |
|
|
38
|
+
if [ -f ".claude/hooks/session-start.js" ]; then
|
|
39
|
+
echo "installed=true" >> $GITHUB_OUTPUT
|
|
40
|
+
else
|
|
41
|
+
echo "installed=false" >> $GITHUB_OUTPUT
|
|
42
|
+
fi
|
|
43
|
+
|
|
44
|
+
- name: Install Sticky Note
|
|
45
|
+
if: steps.check.outputs.installed == 'false'
|
|
46
|
+
run: npx sticky-note-cli@latest init --ci --no-prompts
|
|
47
|
+
env:
|
|
48
|
+
STICKY_URL: ${{ secrets.STICKY_URL }}
|
|
49
|
+
STICKY_API_KEY: ${{ secrets.STICKY_API_KEY }}
|
|
50
|
+
STICKY_STALE_DAYS: ${{ vars.STICKY_STALE_DAYS }}
|
|
51
|
+
STICKY_CONVENTIONS: ${{ vars.STICKY_CONVENTIONS }}
|
|
52
|
+
STICKY_MCP_SERVERS: ${{ vars.STICKY_MCP_SERVERS }}
|
|
53
|
+
|
|
54
|
+
- name: Update Sticky Note
|
|
55
|
+
if: steps.check.outputs.installed == 'true'
|
|
56
|
+
run: npx sticky-note-cli@latest update --ci
|
|
57
|
+
env:
|
|
58
|
+
STICKY_URL: ${{ secrets.STICKY_URL }}
|
|
59
|
+
STICKY_API_KEY: ${{ secrets.STICKY_API_KEY }}
|
|
60
|
+
|
|
61
|
+
- name: Write .env.sticky
|
|
62
|
+
if: env.STICKY_URL != ''
|
|
63
|
+
run: |
|
|
64
|
+
echo "STICKY_URL=$STICKY_URL" > .env.sticky
|
|
65
|
+
echo "STICKY_API_KEY=$STICKY_API_KEY" >> .env.sticky
|
|
66
|
+
env:
|
|
67
|
+
STICKY_URL: ${{ secrets.STICKY_URL }}
|
|
68
|
+
STICKY_API_KEY: ${{ secrets.STICKY_API_KEY }}
|
|
69
|
+
|
|
70
|
+
- name: Commit changes
|
|
71
|
+
run: |
|
|
72
|
+
git config user.name "sticky-note[bot]"
|
|
73
|
+
git config user.email "sticky-note[bot]@users.noreply.github.com"
|
|
74
|
+
git add -A
|
|
75
|
+
if git diff --cached --quiet; then
|
|
76
|
+
echo "No changes to commit"
|
|
77
|
+
else
|
|
78
|
+
git commit -m "chore: install sticky note [sticky-note] [skip ci]"
|
|
79
|
+
git push
|
|
80
|
+
fi
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "2",
|
|
3
|
-
"project": "",
|
|
4
|
-
"threads": []
|
|
5
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"version": "2",
|
|
3
|
+
"project": "",
|
|
4
|
+
"threads": []
|
|
5
|
+
}
|