@delorenj/pjangler 1.4.2 → 1.4.4
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 +528 -0
- package/contracts/fleet-contract.yaml +513 -0
- package/dist/index.js +9333 -1509
- package/dist/mcp-server.js +6634 -1096
- package/dist/prompt.js +2 -1
- package/package.json +10 -4
- package/templates/hermes-agent/copier.yml +16 -3
- package/templates/hermes-agent/template/.runtime-scaffold/memories/MEMORY.md +7 -4
- package/templates/hermes-agent/template/.scripts/10-hermes-profile.sh +88 -94
- package/templates/hermes-agent/template/.scripts/20-runtime-repo.sh +44 -21
- package/templates/hermes-agent/template/.scripts/30-telegram.sh +182 -171
- package/templates/hermes-agent/template/.scripts/31-slack.sh +260 -165
- package/templates/hermes-agent/template/.scripts/40-plane.sh +45 -36
- package/templates/hermes-agent/template/.scripts/42-ticket-provider.sh +210 -41
- package/templates/hermes-agent/template/.scripts/70-systemd.sh +129 -15
- package/templates/hermes-agent/template/.scripts/80-registry.sh +42 -6
- package/templates/hermes-agent/template/.scripts/99-summary.sh +69 -16
- package/templates/hermes-agent/template/.scripts/_lib.sh +773 -0
- package/templates/hermes-agent/template/.scripts/channel-transaction.py +2340 -0
- package/templates/hermes-agent/template/.scripts/config.example.toml +8 -2
- package/templates/hermes-agent/template/.scripts/credential-launch.sh +5 -1
- package/templates/hermes-agent/template/.scripts/heartbeat.sh +2 -3
- package/templates/hermes-agent/template/.scripts/lib/profile-config-lock.py +182 -0
- package/templates/hermes-agent/template/.scripts/lib/profile-config-seed.py +108 -0
- package/templates/hermes-agent/template/.scripts/lib/ticket-provider.sh +93 -4
- package/templates/hermes-agent/template/.scripts/lib/voice-config.py +546 -0
- package/templates/hermes-agent/template/.scripts/providers/linear.sh +138 -25
- package/templates/hermes-agent/template/.scripts/providers/plane.sh +408 -51
- package/templates/hermes-agent/template/.scripts/providers/trello.sh +54 -6
- package/templates/hermes-agent/template/.scripts/sentinel/bin/issue-autonomous-review.sh +257 -43
- package/templates/hermes-agent/template/.scripts/sentinel/bin/issue-close-gate.sh +142 -25
- package/templates/hermes-agent/template/.scripts/sentinel/docs/autonomous-delegated-review.md +13 -19
- package/templates/hermes-agent/template/.scripts/sentinel/docs/bloodbank-events.md +29 -36
- package/templates/hermes-agent/template/.scripts/sentinel/docs/continuous-ticket-orchestration.md +3 -1
- package/templates/hermes-agent/template/.scripts/sentinel.prompt.md.jinja +7 -8
- package/templates/hermes-agent/template/.scripts/store-onepassword-secret.py +260 -0
- package/templates/hermes-agent/template/SOUL.md.jinja +14 -16
- package/templates/hermes-agent/template/hermes.jinja +1 -1
- package/templates/hermes-agent/template/role.yaml.jinja +15 -4
|
@@ -1,32 +1,85 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Print
|
|
2
|
+
# Print a reconciliation summary derived from durable role/service state.
|
|
3
3
|
# shellcheck source=_lib.sh
|
|
4
4
|
source "$(dirname "$0")/_lib.sh"
|
|
5
5
|
load_role_env
|
|
6
6
|
|
|
7
7
|
GW_UNIT="hermes-${AGENT_ID}-gateway.service"
|
|
8
8
|
HB_TIMER="hermes-${AGENT_ID}-heartbeat.timer"
|
|
9
|
+
GW_STATE="$(yaml_get service_state.gateway)"
|
|
10
|
+
HB_STATE="$(yaml_get service_state.heartbeat)"
|
|
11
|
+
TELEGRAM_STATE="$(yaml_get telegram.provisioning_status)"
|
|
12
|
+
SLACK_STATE="$(yaml_get slack.provisioning_status)"
|
|
13
|
+
RECONCILE_STATE="$(yaml_get reconcile.enabled)"
|
|
14
|
+
RECONCILE_OPT_OUT="$(yaml_get reconcile.explicit_opt_out)"
|
|
15
|
+
BOARD_ID="$(yaml_get ticket_provider.board_id)"
|
|
16
|
+
|
|
17
|
+
# Reconcile durable claims with live unit truth at presentation time. A stale
|
|
18
|
+
# role.yaml must never turn an exited launcher or failed heartbeat into an
|
|
19
|
+
# operational summary.
|
|
20
|
+
if [[ "$HB_STATE" == "active" || "$GW_STATE" =~ ^(active|deferred)$ ]]; then
|
|
21
|
+
if systemd_user_available; then
|
|
22
|
+
if [[ "$HB_STATE" == "active" ]]; then
|
|
23
|
+
hb_live="$(systemd_timer_health_snapshot "$HB_TIMER" "hermes-${AGENT_ID}-heartbeat.service")"
|
|
24
|
+
[[ "$hb_live" == ok\|* ]] || HB_STATE="error (stale active claim)"
|
|
25
|
+
fi
|
|
26
|
+
if [[ "$GW_STATE" == "active" ]]; then
|
|
27
|
+
gw_live="$(systemd_service_health_snapshot "$GW_UNIT" running)"
|
|
28
|
+
[[ "$gw_live" == ok\|* ]] || GW_STATE="error (stale active claim)"
|
|
29
|
+
elif [[ "$GW_STATE" == "deferred" ]]; then
|
|
30
|
+
gw_live="$(systemd_gateway_deferred_snapshot "$GW_UNIT")"
|
|
31
|
+
[[ "$gw_live" == "ok|deferred" ]] || GW_STATE="error (stale deferred claim)"
|
|
32
|
+
fi
|
|
33
|
+
else
|
|
34
|
+
[[ "$HB_STATE" != "active" ]] || HB_STATE="unverified (user manager unavailable)"
|
|
35
|
+
[[ "$GW_STATE" != "active" && "$GW_STATE" != "deferred" ]] \
|
|
36
|
+
|| GW_STATE="unverified (user manager unavailable)"
|
|
37
|
+
fi
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
case "$HB_STATE:$GW_STATE" in
|
|
41
|
+
active:active) MODE="OPERATIONAL" ;;
|
|
42
|
+
active:deferred) MODE="OPERATIONAL_WITH_GATEWAY_DEFERRED" ;;
|
|
43
|
+
installed:installed|installed:deferred) MODE="INSTALLED_NOT_ACTIVE" ;;
|
|
44
|
+
*) MODE="INCOMPLETE" ;;
|
|
45
|
+
esac
|
|
9
46
|
|
|
10
47
|
cat >&2 <<EOF
|
|
11
48
|
|
|
12
|
-
╭─
|
|
49
|
+
╭─ Hermes deployment: $AGENT_ID ───────────────────────────────────────╮
|
|
13
50
|
│
|
|
14
|
-
│
|
|
15
|
-
│
|
|
16
|
-
│
|
|
17
|
-
│
|
|
18
|
-
│
|
|
19
|
-
│
|
|
51
|
+
│ Mode: $MODE
|
|
52
|
+
│ Gateway: $GW_STATE ($GW_UNIT)
|
|
53
|
+
│ Heartbeat: $HB_STATE ($HB_TIMER)
|
|
54
|
+
│ Reconciliation: $RECONCILE_STATE (explicit opt-out: ${RECONCILE_OPT_OUT:-false})
|
|
55
|
+
│ Telegram: $TELEGRAM_STATE
|
|
56
|
+
│ Slack: $SLACK_STATE
|
|
57
|
+
│ Board: ${BOARD_ID:-deferred}
|
|
58
|
+
│ Runtime: $ROLE_DIR/runtime (pure-local, ignored)
|
|
59
|
+
│ Hermes bin: $HERMES_BIN
|
|
60
|
+
│ Fleet env: $FLEET_ENV
|
|
20
61
|
│
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
│
|
|
25
|
-
|
|
26
|
-
|
|
62
|
+
EOF
|
|
63
|
+
|
|
64
|
+
if [[ "$TELEGRAM_STATE" == "verified" ]]; then
|
|
65
|
+
printf '│ Talk: @%s (Telegram DM)\n' "$BOT_HANDLE" >&2
|
|
66
|
+
fi
|
|
67
|
+
if [[ "$SLACK_STATE" == "verified" ]]; then
|
|
68
|
+
printf '│ Slack bot: %s\n' "$(yaml_get slack.bot_username)" >&2
|
|
69
|
+
fi
|
|
70
|
+
printf '│ Shell: %s/hermes chat "status"\n' "$ROLE_DIR" >&2
|
|
71
|
+
|
|
72
|
+
if [[ "$GW_STATE" == "deferred" ]]; then
|
|
73
|
+
cat >&2 <<EOF
|
|
27
74
|
│
|
|
28
|
-
│
|
|
29
|
-
│
|
|
75
|
+
│ Gateway activation is deferred. Store and verify a dedicated Telegram or
|
|
76
|
+
│ Slack credential through the provisioner; do not start $GW_UNIT manually.
|
|
77
|
+
EOF
|
|
78
|
+
elif [[ "$GW_STATE" == "active" ]]; then
|
|
79
|
+
printf '│ Gateway log: journalctl --user -fu %s\n' "$GW_UNIT" >&2
|
|
80
|
+
fi
|
|
81
|
+
|
|
82
|
+
cat >&2 <<'EOF'
|
|
30
83
|
│
|
|
31
84
|
╰────────────────────────────────────────────────────────────────────────╯
|
|
32
85
|
|