@event4u/agent-config 2.2.2 → 2.4.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.
Files changed (68) hide show
  1. package/.agent-src/commands/onboard.md +14 -9
  2. package/.agent-src/rules/external-reference-deep-dive.md +69 -0
  3. package/.agent-src/skills/ai-council/SKILL.md +5 -3
  4. package/.agent-src/skills/using-git-worktrees/SKILL.md +1 -1
  5. package/.agent-src/templates/agents/agent-project-settings.example.yml +4 -3
  6. package/.agent-src/templates/copilot-instructions.md +7 -0
  7. package/.agent-src/templates/scripts/work_engine/_lib/agent_settings.py +29 -7
  8. package/.agent-src/templates/scripts/work_engine/_lib/user_global_paths.py +249 -0
  9. package/.agent-src/templates/scripts/work_engine/hooks/settings.py +8 -5
  10. package/.claude-plugin/marketplace.json +27 -1
  11. package/CHANGELOG.md +79 -0
  12. package/README.md +1 -8
  13. package/config/agent-settings.template.yml +5 -3
  14. package/docs/architecture.md +1 -1
  15. package/docs/catalog.md +5 -3
  16. package/docs/contracts/installed-tools-lockfile.md +142 -0
  17. package/docs/customization.md +23 -17
  18. package/docs/decisions/ADR-007-agent-discovery-scopes.md +6 -0
  19. package/docs/decisions/ADR-009-event4u-namespace.md +188 -0
  20. package/docs/decisions/INDEX.md +1 -0
  21. package/docs/development.md +37 -0
  22. package/docs/getting-started.md +1 -1
  23. package/docs/guidelines/agent-infra/installed-tools-manifest.md +1 -1
  24. package/docs/guidelines/agent-infra/layered-settings.md +6 -4
  25. package/docs/installation.md +17 -2
  26. package/docs/migration/v1-to-v2.md +45 -0
  27. package/docs/setup/per-ide/antigravity.md +63 -0
  28. package/docs/setup/per-ide/augment.md +77 -0
  29. package/docs/setup/per-ide/claude-desktop.md +107 -65
  30. package/docs/setup/per-ide/codebuddy.md +63 -0
  31. package/docs/setup/per-ide/continue.md +68 -0
  32. package/docs/setup/per-ide/droid.md +65 -0
  33. package/docs/setup/per-ide/jetbrains.md +76 -0
  34. package/docs/setup/per-ide/kilocode.md +66 -0
  35. package/docs/setup/per-ide/kiro.md +72 -0
  36. package/docs/setup/per-ide/opencode.md +62 -0
  37. package/docs/setup/per-ide/qoder.md +63 -0
  38. package/docs/setup/per-ide/roocode.md +68 -0
  39. package/docs/setup/per-ide/trae.md +63 -0
  40. package/docs/setup/per-ide/warp.md +63 -0
  41. package/docs/setup/per-ide/zed.md +73 -0
  42. package/package.json +1 -1
  43. package/scripts/_cli/cmd_doctor.py +351 -0
  44. package/scripts/_cli/cmd_prune.py +317 -0
  45. package/scripts/_cli/cmd_uninstall.py +465 -0
  46. package/scripts/_cli/cmd_update.py +30 -4
  47. package/scripts/_cli/cmd_versions.py +147 -0
  48. package/scripts/_lib/agent_settings.py +29 -7
  49. package/scripts/_lib/agents_overlay.py +15 -4
  50. package/scripts/_lib/claude_desktop_bundler.py +150 -0
  51. package/scripts/_lib/fs_atomic.py +116 -0
  52. package/scripts/_lib/installed_lock.py +37 -4
  53. package/scripts/_lib/installed_tools.py +189 -45
  54. package/scripts/_lib/json_pointers.py +260 -0
  55. package/scripts/_lib/update_check.py +29 -5
  56. package/scripts/_lib/user_global_paths.py +249 -0
  57. package/scripts/agent-config +69 -0
  58. package/scripts/ai_council/__init__.py +4 -3
  59. package/scripts/ai_council/budget_guard.py +34 -4
  60. package/scripts/ai_council/bundler.py +2 -0
  61. package/scripts/ai_council/clients.py +28 -7
  62. package/scripts/compress.py +78 -15
  63. package/scripts/install +8 -0
  64. package/scripts/install-hooks.sh +54 -1
  65. package/scripts/install.py +1149 -53
  66. package/scripts/install_anthropic_key.sh +5 -3
  67. package/scripts/install_openai_key.sh +5 -3
  68. package/scripts/skill_trigger_eval.py +13 -2
@@ -3,10 +3,12 @@
3
3
  #
4
4
  # Reads the key with `read -s` so it never echoes to the terminal and
5
5
  # never lands in shell history or scrollback. Writes atomically to
6
- # ~/.config/agent-config/anthropic.key with mode 0600.
6
+ # ~/.event4u/agent-config/anthropic.key with mode 0600. The legacy
7
+ # ~/.config/agent-config/anthropic.key is read as a fallback by the
8
+ # loaders so pre-2.4 installs keep working until the namespace shim runs.
7
9
  #
8
10
  # Contract — companion to scripts/skill_trigger_eval.py:
9
- # - File path: $HOME/.config/agent-config/anthropic.key
11
+ # - File path: $HOME/.event4u/agent-config/anthropic.key
10
12
  # - File mode: 0600 (owner read/write only)
11
13
  # - Key format: must start with `sk-ant-`
12
14
  # - No --force, no --yes, no env-var bypass. Piped stdin is rejected.
@@ -16,7 +18,7 @@
16
18
 
17
19
  set -euo pipefail
18
20
 
19
- TARGET_DIR="${HOME}/.config/agent-config"
21
+ TARGET_DIR="${HOME}/.event4u/agent-config"
20
22
  TARGET_FILE="${TARGET_DIR}/anthropic.key"
21
23
 
22
24
  # ── controlling-terminal requirement ─────────────────────────────────────
@@ -3,10 +3,12 @@
3
3
  #
4
4
  # Reads the key with `read -s` so it never echoes to the terminal and
5
5
  # never lands in shell history or scrollback. Writes atomically to
6
- # ~/.config/agent-config/openai.key with mode 0600.
6
+ # ~/.event4u/agent-config/openai.key with mode 0600. The legacy
7
+ # ~/.config/agent-config/openai.key is read as a fallback by the loaders
8
+ # so pre-2.4 installs keep working until the namespace shim runs.
7
9
  #
8
10
  # Contract — companion to scripts/ai_council/clients.py:
9
- # - File path: $HOME/.config/agent-config/openai.key
11
+ # - File path: $HOME/.event4u/agent-config/openai.key
10
12
  # - File mode: 0600 (owner read/write only)
11
13
  # - Key format: must start with `sk-`
12
14
  # - No --force, no --yes, no env-var bypass. Piped stdin is rejected.
@@ -16,7 +18,7 @@
16
18
 
17
19
  set -euo pipefail
18
20
 
19
- TARGET_DIR="${HOME}/.config/agent-config"
21
+ TARGET_DIR="${HOME}/.event4u/agent-config"
20
22
  TARGET_FILE="${TARGET_DIR}/openai.key"
21
23
 
22
24
  # ── controlling-terminal requirement ─────────────────────────────────────
@@ -46,7 +46,16 @@ PRICE_PER_MTOK_OUT = {"claude-sonnet-4-5": 15.0, "claude-opus-4": 75.0}
46
46
 
47
47
  # On-disk key file. Companion: scripts/install_anthropic_key.sh writes it
48
48
  # with mode 0600; load_anthropic_key() refuses to read anything else.
49
- ANTHROPIC_KEY_PATH = Path.home() / ".config" / "agent-config" / "anthropic.key"
49
+ # Resolution prefers the new namespace (``~/.event4u/agent-config/``) and
50
+ # falls back to the legacy ``~/.config/agent-config/`` so pre-2.4 keys
51
+ # stay usable until the user runs the migration shim.
52
+ from scripts._lib import user_global_paths # noqa: E402
53
+
54
+ ANTHROPIC_KEY_FILENAME = "anthropic.key"
55
+ ANTHROPIC_KEY_PATH = (
56
+ user_global_paths.resolve_with_fallback(ANTHROPIC_KEY_FILENAME)
57
+ or user_global_paths.write_target(ANTHROPIC_KEY_FILENAME)
58
+ )
50
59
  # Token heuristics used for the *pre-run* cost preview. Real billing
51
60
  # comes from the API response once the user has confirmed.
52
61
  TOKENS_PER_CHAR = 0.25 # ~4 chars per token, industry rule of thumb.
@@ -569,7 +578,9 @@ def build_arg_parser() -> argparse.ArgumentParser:
569
578
  default=ANTHROPIC_KEY_PATH,
570
579
  help=(
571
580
  "Override the key file location. Default: "
572
- "~/.config/agent-config/anthropic.key. Mode 0600 required."
581
+ "~/.event4u/agent-config/anthropic.key (legacy "
582
+ "~/.config/agent-config/anthropic.key read as fallback). "
583
+ "Mode 0600 required."
573
584
  ),
574
585
  )
575
586
  return parser