@ghl-ai/aw 0.1.42-beta.20 → 0.1.42-beta.22

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.
@@ -3,7 +3,6 @@ import { join } from 'node:path';
3
3
  import { getSupportedHarnessPhaseEntries } from '../hook-manifest.mjs';
4
4
  import {
5
5
  buildDelegatingPhaseScript,
6
- buildRegistryDelegatingPhaseScript,
7
6
  buildReservedPhaseScript,
8
7
  } from './shared-phase-scripts.mjs';
9
8
 
@@ -19,15 +18,39 @@ const CODEX_HOME_PHASE_BLUEPRINTS = {
19
18
  scriptName: 'aw-session-start.sh',
20
19
  scriptMarker: '# aw-managed: codex-global-session-start',
21
20
  buildScriptContent() {
22
- return buildRegistryDelegatingPhaseScript({
23
- marker: this.scriptMarker,
24
- phase: 'SessionStart',
25
- targetCandidates: [
26
- '$HOME/.aw_registry/platform/core/skills/using-aw-skills/hooks/session-start.sh',
27
- '$HOME/.aw/.aw_registry/platform/core/skills/using-aw-skills/hooks/session-start.sh',
28
- ],
29
- warningMessage: 'WARNING: AW using-aw-skills hook not found in ~/.aw_registry. Run aw init or aw pull platform.',
30
- });
21
+ return `#!/usr/bin/env bash
22
+ ${this.scriptMarker}
23
+ set -euo pipefail
24
+
25
+ # Capture stdin so we can feed it to both telemetry and the AW router delegate.
26
+ STDIN=$(cat)
27
+
28
+ # Fire session_start telemetry (non-blocking, all output suppressed).
29
+ TELEMETRY_HOOK="$HOME/.aw-ecc/scripts/hooks/aw-usage-session-start.js"
30
+ if [[ -f "$TELEMETRY_HOOK" ]] && command -v node >/dev/null 2>&1; then
31
+ printf '%s' "$STDIN" | AW_HARNESS=codex node "$TELEMETRY_HOOK" >/dev/null 2>&1 || true
32
+ fi
33
+
34
+ TARGETS=(
35
+ "$HOME/.aw_registry/platform/core/skills/using-aw-skills/hooks/session-start.sh"
36
+ "$HOME/.aw/.aw_registry/platform/core/skills/using-aw-skills/hooks/session-start.sh"
37
+ )
38
+
39
+ for target in "\${TARGETS[@]}"; do
40
+ if [[ -f "\$target" ]]; then
41
+ printf '%s' "$STDIN" | bash "\$target"
42
+ exit $?
43
+ fi
44
+ done
45
+
46
+ CONTEXT="# AW Session Context
47
+
48
+ WARNING: AW using-aw-skills hook not found in ~/.aw_registry. Run aw init or aw pull platform."
49
+
50
+ JSON_CONTEXT=$(printf '%s' "\$CONTEXT" | python3 -c 'import json, sys; print(json.dumps(sys.stdin.read()))')
51
+
52
+ echo "{\\"hookSpecificOutput\\":{\\"hookEventName\\":\\"SessionStart\\",\\"additionalContext\\":\${JSON_CONTEXT}}}"
53
+ `;
31
54
  },
32
55
  buildEntry(command) {
33
56
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ghl-ai/aw",
3
- "version": "0.1.42-beta.20",
3
+ "version": "0.1.42-beta.22",
4
4
  "description": "Agentic Workspace CLI — pull, push & manage agents, skills and commands from the registry",
5
5
  "type": "module",
6
6
  "bin": {