siesa-agents 2.1.76-qa.1 → 2.1.77

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.
@@ -2,7 +2,7 @@
2
2
  "client_id": "TU_CLIENT_ID",
3
3
  "client_secret": "TU_CLIENT_SECRET",
4
4
  "redirect_uri": "http://localhost:3000/callback",
5
- "scopes": "read:jira-work write:jira-work read:jira-user offline_access",
5
+ "scopes": "read:jira-work read:jira-user offline_access",
6
6
  "cloud_id": "TU_CLOUD_ID",
7
7
  "jira_base_url": "https://api.atlassian.com/ex/jira/TU_CLOUD_ID/rest/api/3",
8
8
  "default_instance": null,
@@ -39,6 +39,16 @@
39
39
  "ask": []
40
40
  },
41
41
  "hooks": {
42
+ "SessionStart": [
43
+ {
44
+ "hooks": [
45
+ {
46
+ "type": "command",
47
+ "command": "node \"${CLAUDE_PROJECT_DIR}/siesa-agents/observability/scripts/sa-session.js\""
48
+ }
49
+ ]
50
+ }
51
+ ],
42
52
  "SessionEnd": [
43
53
  {
44
54
  "matcher": ".*",
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: clean-observability
3
+ description: Safely clean up stale state files in ~/.claude/observability/ left by abandoned BMAD workflows. Triggered by /clean-observability. Files belonging to live Claude Code sessions are never touched. Run this weekly or whenever the observability dir feels cluttered.
4
+ ---
5
+
6
+ # Clean Observability State
7
+
8
+ Manual cleanup for `~/.claude/observability/`. Removes only files whose owning `claude.exe` PID is no longer alive. Leaves files of currently-running sessions intact.
9
+
10
+ ## What to do when invoked
11
+
12
+ ### Step 1 — Preview (dry-run)
13
+
14
+ Run the cleanup script in dry-run mode and show its output verbatim to the user. The script lives in this project at `siesa-agents/observability/scripts/sa-clean.js`. The Bash tool's working directory is the project root, so a relative path is sufficient:
15
+
16
+ ```bash
17
+ node siesa-agents/observability/scripts/sa-clean.js --dry-run
18
+ ```
19
+
20
+ The script prints:
21
+ - The set of currently-live Claude Code PIDs.
22
+ - How many files will be kept.
23
+ - The exact list of files that would be deleted.
24
+
25
+ **Important:** do NOT use `${CLAUDE_PROJECT_DIR}` — that variable is not exported to the Bash tool's subshell and would resolve to empty, causing a "file not found" error. Always use the relative path above.
26
+
27
+ ### Step 2 — Ask the user
28
+
29
+ Show the preview and ask:
30
+
31
+ > ¿Procedo con el borrado de los N archivos listados? [s/N]
32
+
33
+ Wait for explicit confirmation. Do **not** auto-proceed.
34
+
35
+ ### Step 3 — Apply (only if user confirms)
36
+
37
+ If the user replies affirmatively (e.g., "sí", "s", "yes", "y"), run:
38
+
39
+ ```bash
40
+ node siesa-agents/observability/scripts/sa-clean.js --apply --rotate-buffer
41
+ ```
42
+
43
+ Report the script's output verbatim.
44
+
45
+ If the user declines, end the turn with: `Ok, no borré nada.`
46
+
47
+ ## Notes
48
+
49
+ - Never run `--apply` without explicit user confirmation in this turn.
50
+ - Do not edit or delete files manually — always use `sa-clean.js`.
51
+ - The `--rotate-buffer` flag rotates `buffer/events.jsonl` if it exceeds 5 MB. Safe for parallel sessions.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "siesa-agents",
3
- "version": "2.1.76-qa.1",
3
+ "version": "2.1.77",
4
4
  "description": "Paquete para instalar y configurar agentes SIESA en tu proyecto",
5
5
  "main": "index.js",
6
6
  "bin": {