@jaguilar87/gaia 5.0.8 → 5.0.10

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 (108) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +13 -0
  4. package/bin/README.md +10 -3
  5. package/bin/cli/_install_helpers.py +0 -3
  6. package/bin/cli/approvals.py +341 -238
  7. package/bin/cli/brief.py +45 -4
  8. package/bin/cli/cleanup.py +304 -4
  9. package/bin/cli/doctor.py +1 -5
  10. package/bin/cli/uninstall.py +20 -0
  11. package/dist/gaia-ops/.claude-plugin/plugin.json +1 -1
  12. package/dist/gaia-ops/hooks/adapters/claude_code.py +19 -85
  13. package/dist/gaia-ops/hooks/modules/context/context_injector.py +23 -7
  14. package/dist/gaia-ops/hooks/modules/core/plugin_setup.py +0 -5
  15. package/dist/gaia-ops/hooks/modules/events/event_writer.py +63 -96
  16. package/dist/gaia-ops/hooks/modules/security/__init__.py +0 -2
  17. package/dist/gaia-ops/hooks/modules/security/approval_cleanup.py +238 -69
  18. package/dist/gaia-ops/hooks/modules/security/approval_grants.py +506 -1103
  19. package/dist/gaia-ops/hooks/modules/security/capability_classes.py +83 -6
  20. package/dist/gaia-ops/hooks/modules/security/inline_ast_analyzer.py +237 -0
  21. package/dist/gaia-ops/hooks/modules/security/mutative_verbs.py +434 -1
  22. package/dist/gaia-ops/hooks/modules/session/pending_scanner.py +150 -90
  23. package/dist/gaia-ops/hooks/modules/session/session_manifest.py +257 -28
  24. package/dist/gaia-ops/hooks/modules/tools/bash_validator.py +177 -20
  25. package/dist/gaia-ops/hooks/post_compact.py +1 -0
  26. package/dist/gaia-ops/hooks/pre_compact.py +1 -0
  27. package/dist/gaia-ops/hooks/user_prompt_submit.py +20 -0
  28. package/dist/gaia-ops/skills/agent-approval-protocol/SKILL.md +27 -7
  29. package/dist/gaia-ops/skills/agent-approval-protocol/reference.md +11 -6
  30. package/dist/gaia-ops/skills/gaia-patterns/reference.md +2 -2
  31. package/dist/gaia-ops/skills/orchestrator-present-approval/SKILL.md +69 -28
  32. package/dist/gaia-ops/skills/orchestrator-present-approval/reference.md +16 -3
  33. package/dist/gaia-ops/skills/orchestrator-present-approval/template.md +10 -5
  34. package/dist/gaia-ops/skills/pending-approvals/SKILL.md +16 -11
  35. package/dist/gaia-ops/skills/security-tiers/SKILL.md +1 -1
  36. package/dist/gaia-ops/skills/subagent-request-approval/SKILL.md +20 -6
  37. package/dist/gaia-ops/skills/subagent-request-approval/reference.md +23 -15
  38. package/dist/gaia-ops/tools/migration/README.md +10 -12
  39. package/dist/gaia-ops/tools/scan/orchestrator.py +194 -10
  40. package/dist/gaia-ops/tools/scan/tests/test_integration.py +1 -2
  41. package/dist/gaia-security/.claude-plugin/plugin.json +1 -1
  42. package/dist/gaia-security/hooks/adapters/claude_code.py +19 -85
  43. package/dist/gaia-security/hooks/modules/context/context_injector.py +23 -7
  44. package/dist/gaia-security/hooks/modules/core/plugin_setup.py +0 -5
  45. package/dist/gaia-security/hooks/modules/events/event_writer.py +63 -96
  46. package/dist/gaia-security/hooks/modules/security/__init__.py +0 -2
  47. package/dist/gaia-security/hooks/modules/security/approval_cleanup.py +238 -69
  48. package/dist/gaia-security/hooks/modules/security/approval_grants.py +506 -1103
  49. package/dist/gaia-security/hooks/modules/security/capability_classes.py +83 -6
  50. package/dist/gaia-security/hooks/modules/security/inline_ast_analyzer.py +237 -0
  51. package/dist/gaia-security/hooks/modules/security/mutative_verbs.py +434 -1
  52. package/dist/gaia-security/hooks/modules/session/pending_scanner.py +150 -90
  53. package/dist/gaia-security/hooks/modules/session/session_manifest.py +257 -28
  54. package/dist/gaia-security/hooks/modules/tools/bash_validator.py +177 -20
  55. package/dist/gaia-security/hooks/user_prompt_submit.py +20 -0
  56. package/gaia/approvals/store.py +87 -9
  57. package/gaia/briefs/__init__.py +4 -0
  58. package/gaia/briefs/store.py +91 -0
  59. package/gaia/store/schema.sql +38 -1
  60. package/gaia/store/writer.py +400 -0
  61. package/hooks/adapters/claude_code.py +19 -85
  62. package/hooks/elicitation_result.py +20 -75
  63. package/hooks/modules/context/context_injector.py +23 -7
  64. package/hooks/modules/core/plugin_setup.py +0 -5
  65. package/hooks/modules/events/event_writer.py +63 -96
  66. package/hooks/modules/security/__init__.py +0 -2
  67. package/hooks/modules/security/approval_cleanup.py +238 -69
  68. package/hooks/modules/security/approval_grants.py +506 -1103
  69. package/hooks/modules/security/capability_classes.py +83 -6
  70. package/hooks/modules/security/inline_ast_analyzer.py +237 -0
  71. package/hooks/modules/security/mutative_verbs.py +434 -1
  72. package/hooks/modules/session/pending_scanner.py +150 -90
  73. package/hooks/modules/session/session_manifest.py +257 -28
  74. package/hooks/modules/tools/bash_validator.py +177 -20
  75. package/hooks/post_compact.py +1 -0
  76. package/hooks/pre_compact.py +1 -0
  77. package/hooks/user_prompt_submit.py +20 -0
  78. package/package.json +1 -1
  79. package/pyproject.toml +20 -1
  80. package/scripts/bootstrap_database.sh +66 -17
  81. package/scripts/migrations/README.md +26 -14
  82. package/scripts/migrations/schema.checksum +2 -2
  83. package/scripts/migrations/v18_to_v19.sql +36 -0
  84. package/scripts/migrations/v19_to_v20.sql +20 -0
  85. package/skills/agent-approval-protocol/SKILL.md +27 -7
  86. package/skills/agent-approval-protocol/reference.md +11 -6
  87. package/skills/gaia-patterns/reference.md +2 -2
  88. package/skills/orchestrator-present-approval/SKILL.md +69 -28
  89. package/skills/orchestrator-present-approval/reference.md +16 -3
  90. package/skills/orchestrator-present-approval/template.md +10 -5
  91. package/skills/pending-approvals/SKILL.md +16 -11
  92. package/skills/security-tiers/SKILL.md +1 -1
  93. package/skills/subagent-request-approval/SKILL.md +20 -6
  94. package/skills/subagent-request-approval/reference.md +23 -15
  95. package/tools/migration/README.md +10 -12
  96. package/tools/scan/orchestrator.py +194 -10
  97. package/tools/scan/tests/test_integration.py +1 -2
  98. package/bin/cli/plans.py +0 -517
  99. package/dist/gaia-ops/tools/context/deep_merge.py +0 -159
  100. package/dist/gaia-ops/tools/migration/migrate_04_harness_events.py +0 -132
  101. package/dist/gaia-ops/tools/migration/migrate_04_harness_events.sh +0 -23
  102. package/dist/gaia-ops/tools/scan/merge.py +0 -213
  103. package/dist/gaia-ops/tools/scan/tests/test_merge.py +0 -269
  104. package/tools/context/deep_merge.py +0 -159
  105. package/tools/migration/migrate_04_harness_events.py +0 -132
  106. package/tools/migration/migrate_04_harness_events.sh +0 -23
  107. package/tools/scan/merge.py +0 -213
  108. package/tools/scan/tests/test_merge.py +0 -269
@@ -8,7 +8,7 @@
8
8
  {
9
9
  "name": "gaia-ops",
10
10
  "description": "Full DevOps orchestration for Claude Code. Eight specialized agents handle the complete development lifecycle — analysis, planning, execution, and deployment. Gaia-Ops scans your codebase to understand it and injects the right context into each sub-agent. Every command is classified by risk: read-only runs freely, state changes pause for your approval, and irreversible operations are permanently blocked.",
11
- "version": "5.0.8",
11
+ "version": "5.0.10",
12
12
  "category": "devops",
13
13
  "author": {
14
14
  "name": "jaguilar87",
@@ -20,7 +20,7 @@
20
20
  {
21
21
  "name": "gaia-security",
22
22
  "description": "Keeps you in the loop only when it matters. Gaia Security analyzes every command and classifies it into risk tiers: read-only queries run freely, simulations and validations pass through, and state-changing operations (create, delete, apply, push) pause for your explicit approval before executing. Irreversible commands like dropping databases or deleting cloud infrastructure are permanently blocked.",
23
- "version": "5.0.8",
23
+ "version": "5.0.10",
24
24
  "category": "security",
25
25
  "author": {
26
26
  "name": "jaguilar87",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gaia-ops",
3
- "version": "5.0.8",
3
+ "version": "5.0.10",
4
4
  "description": "Security-first orchestrator with specialized agents, hooks, and governance for AI coding",
5
5
  "author": {
6
6
  "name": "jaguilar87",
package/CHANGELOG.md CHANGED
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [5.0.10] - 2026-06-29
11
+
12
+ ## [5.0.9] - 2026-06-25
13
+
14
+ ### Changed
15
+
16
+ - Harness events now persist exclusively to the `harness_events` table in `~/.gaia/gaia.db`. `event_writer.py` writes through `gaia/store/writer.py::write_harness_event`; the legacy `events.jsonl` append path is retired. The SessionStart "Recent Events" block in `context_injector.py` reads from `harness_events` via `cross_surface_query` and is remapped to the reader's row shape (`surface, timestamp, type, agent, summary, raw`).
17
+
18
+ ### Removed
19
+
20
+ - Legacy `gaia plans` CLI subcommand (`bin/cli/plans.py`) — superseded by the plan tables and `gaia plan`.
21
+ - One-shot migration tooling `tools/migration/migrate_04_harness_events.py` and `.sh` — the harness-events cutover is complete and the migration is no longer needed.
22
+
10
23
  ## [5.0.8] - 2026-06-24
11
24
 
12
25
  ## [5.0.7] - 2026-06-12
package/bin/README.md CHANGED
@@ -33,7 +33,9 @@ npm uninstall @jaguilar87/gaia
33
33
  |
34
34
  preuninstall script -> python3 bin/gaia uninstall --preuninstall
35
35
  |
36
- Cleans temporary caches, old logs, __pycache__, preserves .claude/ symlinks
36
+ Removes Gaia-owned symlinks (agents, hooks, skills, …), cleans caches /
37
+ logs / __pycache__, and surgically removes only Gaia's contributions from
38
+ settings.local.json and plugin-registry.json
37
39
  ```
38
40
 
39
41
  No Claude Code session is involved in either case. The subcommands run in a normal Python process and interact with the filesystem directly.
@@ -50,17 +52,22 @@ bin/
50
52
  └── cli/ # Subcommand modules (one file per subcommand)
51
53
  ├── __init__.py # Discovery: imports every sibling that defines register()
52
54
  ├── _install_helpers.py # Shared helpers for install/update (private, leading _)
55
+ ├── ac.py # gaia ac — acceptance criteria for briefs (DB-canonical)
53
56
  ├── approvals.py # gaia approvals — list/show/reject/clean/stats T3 grants
54
57
  ├── brief.py # gaia brief — feature briefs / specs lifecycle
55
58
  ├── cleanup.py # gaia cleanup — preuninstall: caches, logs, __pycache__
56
59
  ├── context.py # gaia context — show / scan / get / query / wipe project context from gaia.db
57
60
  ├── doctor.py # gaia doctor — system health check (the model to learn)
61
+ ├── evidence.py # gaia evidence — per-AC evidence (three-tier storage)
58
62
  ├── history.py # gaia history — recent agent sessions
59
63
  ├── install.py # gaia install — postinstall: bootstrap DB, settings, symlinks
60
64
  ├── memory.py # gaia memory — episodic memory: stats, search, show
61
65
  ├── metrics.py # gaia metrics — usage analytics (tier, agent, anomalies)
66
+ ├── milestone.py # gaia milestone — milestone management for briefs (DB-canonical)
62
67
  ├── paths.py # Shared path resolution helpers
63
- ├── plans.py # gaia plans list/show feature plans
68
+ ├── plan.py # gaia plan manage plans (one per brief, DB-canonical)
69
+ ├── query.py # gaia query — cross-surface read-only query (memory, episodes, harness_events)
70
+ ├── task.py # gaia task — manage tasks within plans (DB-canonical)
64
71
  ├── workspace.py # gaia workspace — workspace identity / consolidate operations
65
72
  ├── scan.py # gaia scan — project scanner; writes scan results to gaia.db (DB-canonical)
66
73
  ├── status.py # gaia status — quick installation snapshot
@@ -92,7 +99,7 @@ Modules whose name starts with `_` (e.g. `_install_helpers.py`) are private help
92
99
 
93
100
  **Exit codes:** `0` on success, `1` on warnings, `2` on errors. The release pipeline's sandbox harness relies on these -- do not print a success line and exit non-zero, or vice versa.
94
101
 
95
- **Preserved on cleanup:** `.claude/` symlinks are never touched by `gaia cleanup`. Project context is canonical in `~/.gaia/gaia.db` and persists across reinstalls independently of the filesystem. The preservation list for legacy filesystem artifacts lives in `cli/cleanup.py`.
102
+ **Cleanup footprint:** Full cleanup (the default, used by `gaia uninstall`) removes everything `gaia install` wrote: `CLAUDE.md`, `.claude/settings.json`, all Gaia-owned symlinks (`.claude/agents`, `.claude/hooks`, `.claude/skills`, and siblings), and the `.claude/.plugin-initialized` marker. Two files are handled surgically because they are shared with Claude Code: `settings.local.json` has only Gaia-injected keys removed (agent identity, two env vars, Gaia's permission entries; user content is preserved); `plugin-registry.json` has only Gaia's `installed[]` entry removed and is deleted only if it contained nothing else. The user DB at `~/.gaia/gaia.db` is never touched; pass `--purge` to `gaia uninstall` to remove it. The canonical source for what gets removed is `cli/cleanup.py` (`SYMLINKS_TO_REMOVE`, `_clean_settings_local_json`, `_remove_plugin_registry_entry`).
96
103
 
97
104
  **`package.json` `bin` field:**
98
105
 
@@ -175,9 +175,6 @@ def merge_local_permissions(
175
175
 
176
176
  # env vars (smart merge -- preserve user values)
177
177
  env = existing.setdefault("env", {})
178
- if "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS" not in env:
179
- env["CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS"] = "1"
180
- changed_fields.append("env.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS")
181
178
  if "CLAUDE_CODE_DISABLE_AUTO_MEMORY" not in env:
182
179
  env["CLAUDE_CODE_DISABLE_AUTO_MEMORY"] = "1"
183
180
  changed_fields.append("env.CLAUDE_CODE_DISABLE_AUTO_MEMORY")