@hybridlabor-api/aos 4.1.0 → 4.2.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 (33) hide show
  1. package/.agents/agents.md +77 -0
  2. package/.agents/graph.md +45 -0
  3. package/.agents/nodes.json +4 -2
  4. package/.agents/state.schema.json +6 -0
  5. package/.claude/workflows/startcycle-dispatch.mjs +139 -8
  6. package/.claude/workflows/teamwork-dispatch.mjs +287 -0
  7. package/CLAUDE.md +47 -0
  8. package/GEMINI.md +9 -1
  9. package/README.md +12 -6
  10. package/THIRD_PARTY_NOTICES.md +50 -0
  11. package/docs/skills_table.md +1 -0
  12. package/installer.js +15 -0
  13. package/package.json +1 -1
  14. package/skills/basic/bdbmediastorm/SKILL.md +7 -5
  15. package/skills/basic/startcycle/SKILL.md +21 -0
  16. package/skills/basic/startcycle-graph/SKILL.md +43 -7
  17. package/skills/basic/startcycle-graph-user/SKILL.md +67 -11
  18. package/skills/basic/teamwork-preview/SKILL.md +209 -0
  19. package/skills/bdbrainstorm/SKILL.md +4 -3
  20. package/skills/global_config/ask-tim/SKILL.md +73 -6
  21. package/skills/global_config/bdbresilience/SKILL.md +216 -0
  22. package/skills/global_config/bdbresilience/contracts/nodes-integration.md +225 -0
  23. package/skills/global_config/bdbresilience/references/cicd-triage.md +179 -0
  24. package/skills/global_config/bdbresilience/references/distributed-locking.md +235 -0
  25. package/skills/global_config/bdbresilience/references/error-recovery.md +210 -0
  26. package/skills/global_config/bdbresilience/references/two-phase-go-gate.md +151 -0
  27. package/skills/global_config/domain-modeling/ADR-FORMAT.md +47 -0
  28. package/skills/global_config/domain-modeling/CONTEXT-FORMAT.md +60 -0
  29. package/skills/global_config/domain-modeling/SKILL.md +77 -0
  30. package/skills/global_config/grill-me/SKILL.md +14 -0
  31. package/skills/global_config/grill-with-docs/SKILL.md +24 -0
  32. package/skills/global_config/grilling/SKILL.md +42 -0
  33. package/skills/global_config/openwiki-skill/scripts/install_daemon.sh +55 -12
@@ -39,14 +39,57 @@ if [ ! -f "$SCRIPT_PATH" ]; then
39
39
  fi
40
40
  SCRIPTS_DIR="$(dirname "$SCRIPT_PATH")"
41
41
 
42
- # 2. Install Python dependency
43
- echo "Installing google-genai SDK..."
44
- if command -v pip3 >/dev/null 2>&1; then
45
- pip3 install --quiet google-genai 2>/dev/null || {
46
- echo "Warning: pip3 install failed. You may need to install google-genai manually."
47
- }
42
+ # 2. Install Python dependency into a dedicated venv.
43
+ #
44
+ # Two bugs this replaces, both of which made the daemon unable to ever start:
45
+ # 1. `pip3 install google-genai` fails on any PEP 668 "externally managed"
46
+ # interpreter (Homebrew/Debian python3) with externally-managed-environment,
47
+ # and the old `2>/dev/null` swallowed that message, so the log said only
48
+ # "pip3 install failed" with no cause.
49
+ # 2. Even when it succeeded, it installed into whichever python3 was on PATH
50
+ # (e.g. Homebrew 3.14) while the macOS launcher ran the daemon under
51
+ # /usr/bin/python3 (Apple CommandLineTools 3.9) — a different interpreter
52
+ # that never saw the package.
53
+ # A venv fixes both: it is immune to PEP 668, and DAEMON_PYTHON below pins the
54
+ # launcher to the exact interpreter the package was installed into.
55
+ VENV_DIR="$DAEMON_LOG_DIR/venv"
56
+ DAEMON_PYTHON=""
57
+
58
+ echo "Installing google-genai SDK into $VENV_DIR ..."
59
+ mkdir -p "$DAEMON_LOG_DIR"
60
+
61
+ if command -v uv >/dev/null 2>&1; then
62
+ # uv pip install --python <venv> never needs pip inside the venv, which is
63
+ # the failure memB hit when `uv venv --seed` silently under-delivered pip.
64
+ uv venv "$VENV_DIR" >/dev/null 2>&1 || true
65
+ if [ -x "$VENV_DIR/bin/python" ] && uv pip install --python "$VENV_DIR/bin/python" --quiet google-genai; then
66
+ DAEMON_PYTHON="$VENV_DIR/bin/python"
67
+ fi
68
+ fi
69
+
70
+ if [ -z "$DAEMON_PYTHON" ] && command -v python3 >/dev/null 2>&1; then
71
+ python3 -m venv "$VENV_DIR" >/dev/null 2>&1 || true
72
+ if [ -x "$VENV_DIR/bin/python" ] && "$VENV_DIR/bin/python" -m pip install --quiet google-genai; then
73
+ DAEMON_PYTHON="$VENV_DIR/bin/python"
74
+ fi
75
+ fi
76
+
77
+ if [ -z "$DAEMON_PYTHON" ]; then
78
+ # Do not hide the reason this time — print what actually failed.
79
+ echo "Warning: could not install google-genai into $VENV_DIR."
80
+ echo " Reason (last attempt):"
81
+ if command -v python3 >/dev/null 2>&1; then
82
+ python3 -m venv "$VENV_DIR" 2>&1 | sed 's/^/ /' | head -5
83
+ "$VENV_DIR/bin/python" -m pip install google-genai 2>&1 | sed 's/^/ /' | head -8
84
+ else
85
+ echo " python3 not found on PATH."
86
+ fi
87
+ echo " The daemon will run in collect-only mode until this is resolved."
88
+ # Fall back to a bare interpreter so the launcher is still written; the
89
+ # daemon degrades to collect-only rather than not existing at all.
90
+ DAEMON_PYTHON="$(command -v python3 || echo /usr/bin/python3)"
48
91
  else
49
- echo "Warning: pip3 not found. Install google-genai manually."
92
+ echo " -> google-genai installed; daemon will run under $DAEMON_PYTHON"
50
93
  fi
51
94
 
52
95
  # 3. Resolve API key
@@ -60,7 +103,7 @@ fi
60
103
  if [ -n "$GEMINI_KEY" ]; then
61
104
  export GEMINI_API_KEY="$GEMINI_KEY"
62
105
  echo "Verifying API key..."
63
- VERIFY_OUTPUT=$(python3 "$SCRIPTS_DIR/verify_api_key.py" 2>&1)
106
+ VERIFY_OUTPUT=$("$DAEMON_PYTHON" "$SCRIPTS_DIR/verify_api_key.py" 2>&1)
64
107
  VERIFY_CODE=$?
65
108
  if [ $VERIFY_CODE -eq 0 ] && echo "$VERIFY_OUTPUT" | grep -q "VERIFIED_OK"; then
66
109
  echo " -> API key verified successfully."
@@ -170,7 +213,7 @@ if [ "$OS" = "macos" ]; then
170
213
  fi
171
214
 
172
215
  MACOS_PATH="/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
173
- write_launcher "/usr/bin/python3" "$MACOS_PATH"
216
+ write_launcher "$DAEMON_PYTHON" "$MACOS_PATH"
174
217
  echo " -> Launcher written to $LAUNCHER_PATH (mode 700; holds the API key, if any)."
175
218
 
176
219
  cat <<EOF > "$PLIST_PATH"
@@ -220,7 +263,7 @@ elif [ "$OS" = "linux" ]; then
220
263
  echo "Linux detected, but no usable systemd user session was found."
221
264
  echo "Skipping automatic daemon installation (no false success)."
222
265
  echo "Run it manually instead, e.g. via cron (every 2 hours):"
223
- echo " 0 */2 * * * python3 \"$SCRIPT_PATH\" --one-shot"
266
+ echo " 0 */2 * * * $DAEMON_PYTHON \"$SCRIPT_PATH\" --one-shot"
224
267
  echo ""
225
268
  exit 1
226
269
  fi
@@ -228,7 +271,7 @@ elif [ "$OS" = "linux" ]; then
228
271
  mkdir -p "$SYSTEMD_DIR"
229
272
 
230
273
  LINUX_PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
231
- write_launcher "python3" "$LINUX_PATH"
274
+ write_launcher "$DAEMON_PYTHON" "$LINUX_PATH"
232
275
  echo " -> Launcher written to $LAUNCHER_PATH (mode 700; holds the API key, if any)."
233
276
 
234
277
  cat > "$SYSTEMD_SERVICE" <<EOF
@@ -279,7 +322,7 @@ else
279
322
  echo "Unsupported OS: $OS"
280
323
  echo "Skipping automatic daemon installation (no false success)."
281
324
  echo "Run it manually via cron / task scheduler:"
282
- echo " python3 \"$SCRIPT_PATH\" --one-shot"
325
+ echo " $DAEMON_PYTHON \"$SCRIPT_PATH\" --one-shot"
283
326
  exit 1
284
327
  fi
285
328