@ghl-ai/aw 0.1.79-beta.0 → 0.1.79-beta.3
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/ecc.mjs +1 -1
- package/hooks/codex-home.mjs +17 -12
- package/package.json +1 -1
- package/startup.mjs +10 -3
package/ecc.mjs
CHANGED
|
@@ -12,7 +12,7 @@ import { applyStoredStartupPreferences } from "./startup.mjs";
|
|
|
12
12
|
|
|
13
13
|
const AW_ECC_REPO_SSH = "git@github.com:shreyansh-ghl/aw-ecc.git";
|
|
14
14
|
const AW_ECC_REPO_HTTPS = "https://github.com/shreyansh-ghl/aw-ecc.git";
|
|
15
|
-
export const AW_ECC_TAG = "v1.4.
|
|
15
|
+
export const AW_ECC_TAG = "v1.4.69";
|
|
16
16
|
const REQUIRED_ECC_FILES = [
|
|
17
17
|
"package.json",
|
|
18
18
|
"scripts/install-apply.js",
|
package/hooks/codex-home.mjs
CHANGED
|
@@ -57,19 +57,18 @@ const CODEX_HOME_PHASE_BLUEPRINTS = {
|
|
|
57
57
|
${this.scriptMarker}
|
|
58
58
|
set -euo pipefail
|
|
59
59
|
|
|
60
|
-
# Capture stdin so we can feed it to both the
|
|
60
|
+
# Capture stdin so we can feed it to both telemetry and the reminder delegate.
|
|
61
61
|
STDIN=$(cat)
|
|
62
62
|
|
|
63
|
-
# Fire telemetry in background (non-blocking).
|
|
64
63
|
TELEMETRY_HOOK="$HOME/.aw-ecc/scripts/hooks/aw-usage-prompt-submit.js"
|
|
65
|
-
if [[ -f "$TELEMETRY_HOOK" ]]; then
|
|
66
|
-
|
|
64
|
+
if [[ -f "$TELEMETRY_HOOK" ]] && command -v node >/dev/null 2>&1; then
|
|
65
|
+
printf '%s' "$STDIN" | AW_HARNESS=codex node "$TELEMETRY_HOOK" >/dev/null 2>&1 || true
|
|
67
66
|
fi
|
|
68
67
|
|
|
69
|
-
# Delegate to existing rules-context hook.
|
|
70
68
|
TARGET="$HOME/.aw-ecc/scripts/hooks/session-start-rules-context.sh"
|
|
71
69
|
if [[ -f "$TARGET" ]]; then
|
|
72
|
-
|
|
70
|
+
printf '%s' "$STDIN" | bash "$TARGET"
|
|
71
|
+
exit $?
|
|
73
72
|
fi
|
|
74
73
|
|
|
75
74
|
exit 0
|
|
@@ -146,14 +145,20 @@ echo '{}'
|
|
|
146
145
|
${this.scriptMarker}
|
|
147
146
|
set -euo pipefail
|
|
148
147
|
|
|
149
|
-
#
|
|
150
|
-
|
|
151
|
-
|
|
148
|
+
# Capture stdin before invoking non-blocking sidecars.
|
|
149
|
+
STDIN=$(cat)
|
|
150
|
+
|
|
152
151
|
TELEMETRY_HOOK="$HOME/.aw-ecc/scripts/hooks/aw-usage-stop.js"
|
|
153
|
-
if [[ -f "$TELEMETRY_HOOK" ]]; then
|
|
154
|
-
|
|
152
|
+
if [[ -f "$TELEMETRY_HOOK" ]] && command -v node >/dev/null 2>&1; then
|
|
153
|
+
printf '%s' "$STDIN" | AW_HARNESS=codex node "$TELEMETRY_HOOK" >/dev/null 2>&1 || true
|
|
155
154
|
fi
|
|
156
|
-
|
|
155
|
+
|
|
156
|
+
MEMORY_SYNC_HOOK="$HOME/.aw-ecc/scripts/hooks/aw-memory-sync.js"
|
|
157
|
+
if [[ -f "$MEMORY_SYNC_HOOK" ]] && command -v node >/dev/null 2>&1; then
|
|
158
|
+
printf '%s' "$STDIN" | AW_HARNESS=codex node "$MEMORY_SYNC_HOOK" >/dev/null 2>&1 || true
|
|
159
|
+
fi
|
|
160
|
+
|
|
161
|
+
exit 0
|
|
157
162
|
`;
|
|
158
163
|
},
|
|
159
164
|
buildEntry(command) {
|
package/package.json
CHANGED
package/startup.mjs
CHANGED
|
@@ -24,10 +24,11 @@ const CLAUDE_DISABLE_DESCRIPTION = 'AW-managed override: disable automatic AW se
|
|
|
24
24
|
// existing on-disk router script across both registry roots and namespaces.
|
|
25
25
|
const CLAUDE_ROUTER_DESCRIPTION = 'AW-managed: using-aw-skills session router';
|
|
26
26
|
const CLAUDE_REMINDER_DESCRIPTION = 'AW-managed: using-aw-skills per-prompt reminder';
|
|
27
|
+
const CLAUDE_LEGACY_REMINDER_SNIPPET = 'using-aw-skills is active. Select the smallest correct AW route';
|
|
27
28
|
const CLAUDE_ROUTER_COMMAND =
|
|
28
29
|
'for f in "$HOME/.aw/.aw_registry/aw/skills/using-aw-skills/hooks/session-start.sh" "$HOME/.aw_registry/aw/skills/using-aw-skills/hooks/session-start.sh" "$HOME/.aw/.aw_registry/platform/core/skills/using-aw-skills/hooks/session-start.sh" "$HOME/.aw_registry/platform/core/skills/using-aw-skills/hooks/session-start.sh"; do [ -f "$f" ] && exec bash "$f"; done; exit 0';
|
|
29
30
|
const CLAUDE_REMINDER_COMMAND =
|
|
30
|
-
'
|
|
31
|
+
'bash -lc \'exec bash "${CLAUDE_PLUGIN_ROOT:-$HOME/.claude}/scripts/hooks/session-start-rules-context.sh"\'';
|
|
31
32
|
const CLAUDE_TELEMETRY_DESCRIPTION = 'AW usage telemetry';
|
|
32
33
|
const CLAUDE_TELEMETRY_HOOKS = [
|
|
33
34
|
{
|
|
@@ -43,7 +44,7 @@ const CLAUDE_TELEMETRY_HOOKS = [
|
|
|
43
44
|
{
|
|
44
45
|
phase: 'Stop',
|
|
45
46
|
matcher: undefined,
|
|
46
|
-
command: 'test -f "$HOME/.aw-ecc/scripts/hooks/aw-usage-stop.js" && node "$HOME/.aw-ecc/scripts/hooks/aw-usage-stop.js" || true',
|
|
47
|
+
command: 'STDIN="$(cat)"; test -f "$HOME/.aw-ecc/scripts/hooks/aw-usage-stop.js" && printf \'%s\' "$STDIN" | node "$HOME/.aw-ecc/scripts/hooks/aw-usage-stop.js" || true; test -f "$HOME/.aw-ecc/scripts/hooks/aw-memory-sync.js" && printf \'%s\' "$STDIN" | node "$HOME/.aw-ecc/scripts/hooks/aw-memory-sync.js" || true',
|
|
47
48
|
},
|
|
48
49
|
{
|
|
49
50
|
phase: 'PostToolUseFailure',
|
|
@@ -210,7 +211,13 @@ function isManagedClaudeRouterEntry(entry) {
|
|
|
210
211
|
}
|
|
211
212
|
|
|
212
213
|
function isManagedClaudeReminderEntry(entry) {
|
|
213
|
-
|
|
214
|
+
if (entry?.description === CLAUDE_REMINDER_DESCRIPTION) return true;
|
|
215
|
+
return Array.isArray(entry?.hooks)
|
|
216
|
+
&& entry.hooks.some(hook =>
|
|
217
|
+
hook?.type === 'command'
|
|
218
|
+
&& typeof hook?.command === 'string'
|
|
219
|
+
&& hook.command.includes(CLAUDE_LEGACY_REMINDER_SNIPPET)
|
|
220
|
+
);
|
|
214
221
|
}
|
|
215
222
|
|
|
216
223
|
// Orphaned `{ matcher: '*', hooks: [] }` stubs with no description accumulated in some
|