@amsterdamdatalabs/adl-agent-control-linux-x64 0.1.6 → 0.1.8
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/bin/adl +2 -2
- package/bin/lean-ctx-observe-strip +76 -3
- package/bin/reconcile +460 -240
- package/bin/validate-manifest +36 -16
- package/package.json +1 -1
- package/packages/agent-hooks/src/deploy/deploy.ts +98 -18
- package/packages/agent-hooks/src/deploy/doctor.ts +61 -11
- package/packages/agent-hooks/src/deploy/json-merge.ts +430 -18
- package/packages/agent-hooks/src/deploy/lock.ts +36 -2
- package/packages/agent-hooks/src/lean-ctx/env.ts +17 -0
- package/packages/agent-hooks/src/lean-ctx/mcp.ts +4 -2
- package/packages/agent-settings/assets/lean-ctx/config.toml +3 -0
- package/packages/agent-settings/assets/lean-ctx/gitignore +4 -0
- package/packages/agent-settings/assets/lean-ctx/layout.toml +2 -0
- package/packages/agent-settings/src/deploy/agents-deploy.ts +10 -5
- package/packages/agent-settings/src/deploy/doctor.ts +39 -3
- package/packages/agent-settings/src/deploy/lean-ctx-deploy.ts +104 -12
- package/packages/agent-settings/src/deploy/lean-ctx-merge.ts +580 -0
- package/packages/agent-settings/src/deploy/lock.ts +4 -1
- package/packages/agent-settings/src/deploy/mcp-deploy.ts +9 -6
- package/packages/agent-settings/src/deploy/settings.ts +6 -3
- package/packages/agent-skills/dist/deploy.d.ts +2 -0
- package/packages/agent-skills/dist/deploy.d.ts.map +1 -1
- package/packages/agent-skills/dist/deploy.js +15 -8
- package/packages/agent-skills/dist/deploy.js.map +1 -1
- package/packages/agent-skills/dist/manifest.d.ts +1 -0
- package/packages/agent-skills/dist/manifest.d.ts.map +1 -1
- package/packages/agent-skills/dist/manifest.js +6 -2
- package/packages/agent-skills/dist/manifest.js.map +1 -1
- package/packages/agent-skills/src/deploy.ts +15 -8
- package/packages/agent-skills/src/manifest.ts +5 -2
- package/packages/azdo/src/azdo-repo-doctor.ts +401 -91
- package/packages/azdo/src/lib/graph-identity.ts +190 -3
- package/packages/fleet/jobs/git-maintain/src/main.ts +305 -45
- package/packages/fleet/manifest.json +6 -4
- package/packages/fleet/manifest.schema.json +15 -5
- package/packages/repo-controls/README.md +13 -6
- package/packages/repo-controls/assets/adl-config.default.toml +1 -0
- package/packages/repo-controls/src/cli.ts +6 -1
- package/packages/repo-controls/src/gitignore-block.ts +17 -0
- package/packages/repo-controls/src/install.ts +88 -6
package/bin/adl
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/bin/adl
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 82920928 bytes
|
|
4
|
+
sha256: ecd5111c7bc2c06d56361450a0d97b8280f6d300f879714a0bd23d2c534ec61b
|
|
@@ -10,7 +10,7 @@ export PATH="/usr/local/bin:/opt/homebrew/bin:/home/linuxbrew/.linuxbrew/bin:/us
|
|
|
10
10
|
# the per-repo carrier (`adl hook lean-ctx pre-tool-use|post-tool-use`,
|
|
11
11
|
# written by `adl hooks deploy`) already provides rewrite/redirect/
|
|
12
12
|
# read-dedup with the repo's own config, and `observe` has no per-repo
|
|
13
|
-
# carrier at all and is dropped outright.
|
|
13
|
+
# carrier at all and is dropped outright. Six carriers, all written by
|
|
14
14
|
# `lean-ctx setup`, are covered ("fix all the lean-ctx issues" -- Tarun,
|
|
15
15
|
# 2026-09-29 -- widened this from an initial two-of-five scope):
|
|
16
16
|
# 1. Raw, unwrapped `lean-ctx hook <subcommand>` entries -- observe,
|
|
@@ -33,6 +33,20 @@ export PATH="/usr/local/bin:/opt/homebrew/bin:/home/linuxbrew/.linuxbrew/bin:/us
|
|
|
33
33
|
# at $HOME/.claude/skills/lean-ctx, .codex/skills/lean-ctx,
|
|
34
34
|
# .cursor/skills/lean-ctx, .config/opencode/skills/lean-ctx,
|
|
35
35
|
# .agents/skills/lean-ctx.
|
|
36
|
+
# 6. Global lean-ctx hook SCRIPTS: every entry named `lean-ctx-*` directly
|
|
37
|
+
# under $HOME/.claude/hooks (lean-ctx-rewrite.sh, lean-ctx-redirect.sh,
|
|
38
|
+
# their -native counterparts, and any .bak copies). Added 2026-09-30
|
|
39
|
+
# because of lean-ctx's own startup refresh gate (proven from v3.10.5
|
|
40
|
+
# source, rust/src/hooks/mod.rs): refresh_installed_hooks() re-writes
|
|
41
|
+
# the global Claude hooks whenever hooks_installed_for("claude", home)
|
|
42
|
+
# is true, i.e. <claude_dir>/hooks/lean-ctx-rewrite.sh EXISTS or
|
|
43
|
+
# <claude_dir>/settings.json contains the substring `lean-ctx`.
|
|
44
|
+
# Stripping settings.json (shape 1) alone leaves the scripts behind and
|
|
45
|
+
# the gate armed, so the carrier rewrites the global hooks on its next
|
|
46
|
+
# start. Only names starting with `lean-ctx-` are touched; every other
|
|
47
|
+
# file there (enact-*, code-simplifier.mjs, lib/, symlinks to other
|
|
48
|
+
# repos) is left alone. Scope is $HOME/.claude only -- CLAUDE_CONFIG_DIR
|
|
49
|
+
# is deliberately not consulted (the tool takes --home explicitly).
|
|
36
50
|
# `adl hook lean-ctx ...` (the per-repo carrier) and Orca's own hooks are
|
|
37
51
|
# never touched -- see bin/lib/lean-ctx-observe-hooks.sh's own header for
|
|
38
52
|
# exactly why the match can never catch either, and for the full "which
|
|
@@ -42,7 +56,7 @@ export PATH="/usr/local/bin:/opt/homebrew/bin:/home/linuxbrew/.linuxbrew/bin:/us
|
|
|
42
56
|
# that same header, not stripped. Run by bin/reconcile on every
|
|
43
57
|
# reconciliation (plan AND apply, exactly like bin/kimi-hooks /
|
|
44
58
|
# bin/opencode-hooks) so a hand-edited or Orca-reinstalled per-user config
|
|
45
|
-
# never lets any of the
|
|
59
|
+
# never lets any of the six carriers creep back in unnoticed.
|
|
46
60
|
#
|
|
47
61
|
# Usage: lean-ctx-observe-strip --home ABSOLUTE_PATH --mode plan|apply
|
|
48
62
|
#
|
|
@@ -66,7 +80,11 @@ export PATH="/usr/local/bin:/opt/homebrew/bin:/home/linuxbrew/.linuxbrew/bin:/us
|
|
|
66
80
|
# not exist, is reported and left alone. A skill directory is
|
|
67
81
|
# moved (never deleted) only when its SKILL.md frontmatter says
|
|
68
82
|
# `name: lean-ctx`; any other content there is left alone and
|
|
69
|
-
# reported.
|
|
83
|
+
# reported. The `lean-ctx-*` hook scripts under ~/.claude/hooks are
|
|
84
|
+
# moved (never deleted) into a sibling
|
|
85
|
+
# `hooks.pre-lean-ctx-observe-strip-<UTC ts>/` directory OUTSIDE
|
|
86
|
+
# the scanned hooks/ directory, exactly like a skill directory's
|
|
87
|
+
# backup, and reported one line per file. Refuses outright (before touching anything) when run
|
|
70
88
|
# as literal root (EUID 0) against a --home it does not own --
|
|
71
89
|
# bin/reconcile's apply path never does this itself; see
|
|
72
90
|
# lean_ctx_observe_strip_guard_euid in the shared lib.
|
|
@@ -348,6 +366,60 @@ strip_skill_dir_one() {
|
|
|
348
366
|
return 0
|
|
349
367
|
}
|
|
350
368
|
|
|
369
|
+
# strip_hook_scripts_one <hooks-dir> -- shape 6 (see the header): moves every
|
|
370
|
+
# entry named `lean-ctx-*` directly under <hooks-dir> into a sibling
|
|
371
|
+
# `<hooks-dir>.pre-lean-ctx-observe-strip-<UTC ts>/` directory (OUTSIDE the
|
|
372
|
+
# scanned hooks/ directory, same reasoning as strip_skill_dir_one), so
|
|
373
|
+
# lean-ctx's refresh gate (`hooks/lean-ctx-rewrite.sh` exists) is disarmed.
|
|
374
|
+
# Matches by name prefix only, never by content; a symlink named
|
|
375
|
+
# `lean-ctx-*` is moved as the link itself (mv never follows it). Nothing
|
|
376
|
+
# else in <hooks-dir> is read or touched. Each file is reported as
|
|
377
|
+
# "backed up previous hook script <original> to <backup>" (two explicit
|
|
378
|
+
# paths, like the skill-directory note -- the backup path does not end in
|
|
379
|
+
# `.pre-<label>-<timestamp>`, so bin/reconcile cannot recover the original
|
|
380
|
+
# by suffix-stripping).
|
|
381
|
+
strip_hook_scripts_one() {
|
|
382
|
+
local hooks_dir="$1" entry
|
|
383
|
+
local found=()
|
|
384
|
+
if [[ -d "$hooks_dir" ]]; then
|
|
385
|
+
for entry in "$hooks_dir"/lean-ctx-*; do
|
|
386
|
+
if [[ -e "$entry" || -L "$entry" ]]; then
|
|
387
|
+
found+=("$entry")
|
|
388
|
+
fi
|
|
389
|
+
done
|
|
390
|
+
fi
|
|
391
|
+
if [[ "${#found[@]}" -eq 0 ]]; then
|
|
392
|
+
echo "lean-ctx-observe-strip: $hooks_dir/lean-ctx-*: not present -- nothing to strip"
|
|
393
|
+
return 0
|
|
394
|
+
fi
|
|
395
|
+
for entry in "${found[@]}"; do
|
|
396
|
+
echo "lean-ctx-observe-strip: $entry: found lean-ctx hook script"
|
|
397
|
+
if [[ "$mode" != apply ]]; then
|
|
398
|
+
echo "lean-ctx-observe-strip: would move $entry to a timestamped backup location outside $hooks_dir"
|
|
399
|
+
fi
|
|
400
|
+
done
|
|
401
|
+
[[ "$mode" == apply ]] || return 0
|
|
402
|
+
|
|
403
|
+
local backup_root
|
|
404
|
+
backup_root="${hooks_dir}.pre-lean-ctx-observe-strip-$(date -u +%Y%m%dT%H%M%SZ)"
|
|
405
|
+
if ! mkdir "$backup_root" 2>/dev/null; then
|
|
406
|
+
echo "lean-ctx-observe-strip: $hooks_dir: FAILED to create backup location $backup_root -- not modified" >&2
|
|
407
|
+
return 1
|
|
408
|
+
fi
|
|
409
|
+
local backup rc=0
|
|
410
|
+
for entry in "${found[@]}"; do
|
|
411
|
+
backup="$backup_root/$(basename "$entry")"
|
|
412
|
+
if ! mv "$entry" "$backup"; then
|
|
413
|
+
echo "lean-ctx-observe-strip: $entry: FAILED to move to $backup -- not modified" >&2
|
|
414
|
+
rc=1
|
|
415
|
+
continue
|
|
416
|
+
fi
|
|
417
|
+
echo "lean-ctx-observe-strip: backed up previous hook script $entry to $backup"
|
|
418
|
+
echo "lean-ctx-observe-strip: moved lean-ctx hook script $entry to $backup"
|
|
419
|
+
done
|
|
420
|
+
return "$rc"
|
|
421
|
+
}
|
|
422
|
+
|
|
351
423
|
status=0
|
|
352
424
|
for target in "${targets[@]}"; do
|
|
353
425
|
strip_one "$target" || status=1
|
|
@@ -358,4 +430,5 @@ done
|
|
|
358
430
|
for target in "${skill_dir_targets[@]}"; do
|
|
359
431
|
strip_skill_dir_one "$target" || status=1
|
|
360
432
|
done
|
|
433
|
+
strip_hook_scripts_one "$home/.claude/hooks" || status=1
|
|
361
434
|
exit "$status"
|