mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-29 11:24:08 +01:00
Merge origin/main (v1.91.15.0, #3017) into garrytan/parallel-waves; release metadata v1.91.16.0
Conflicts resolved by hand in templates, tests, CLAUDE.md, TODOS.md, CHANGELOG.md and bin/gstack-config; generated SKILL.md/sections, the agents digest and test/fixtures/context-budget.json regenerated. The eval codemod re-applied to main's new gstack-paths/gstack-slug evals. Coverage-read rule: bare echo separators after unknown output extend the unknown span (main's pathspec CI shape). CLAUDE.md keeps the TREE_MUTATING, catalog-ceiling and detach-timeout facts main's instruction-facts test pins.
This commit is contained in:
commit
6fb8ea3d10
351 files changed
+7477
-8179
No files matched your search
+40
-7
@@ -91,6 +91,20 @@ CONFIG_HEADER='# gstack configuration — edit freely, changes take effect on ne
|
||||
# # Set to true once the privacy gate has asked the user.
|
||||
# # Flip back to false to be re-prompted.
|
||||
#
|
||||
# ─── Transcript ingest (gbrain memory) ───────────────────────────────
|
||||
# transcript_ingest_mode: off # recent | all | off — consent for /sync-gbrain
|
||||
# # to ingest Claude Code and Codex session
|
||||
# # transcripts (every project repo policy allows)
|
||||
# # into your brain (local or Supabase).
|
||||
# # recent — last 90 days
|
||||
# # all — all history
|
||||
# # off — never (other memory still syncs)
|
||||
# # Absent, legacy (A-E, incremental) or unknown
|
||||
# # values are not consent: transcripts are skipped
|
||||
# # and /sync-gbrain asks once. An invalid value is
|
||||
# # REJECTED and the stored value kept.
|
||||
# # Docs: setup-gbrain/memory.md#transcripts
|
||||
#
|
||||
# ─── Timeline Stop hook ──────────────────────────────────────────────
|
||||
# timeline_stop_hook: yes # Controls whether ./setup registers the timeline
|
||||
# # Stop hook (closes dangling session entries).
|
||||
@@ -197,7 +211,7 @@ lookup_default() {
|
||||
# the callers already assume in their own `|| echo "<default>"` fallback.
|
||||
question_tuning) echo "false" ;;
|
||||
team_mode) echo "false" ;;
|
||||
transcript_ingest_mode) echo "off" ;;
|
||||
transcript_ingest_mode) echo "off" ;; # recent | all | off — transcript consent; absent = not consented (use `has`)
|
||||
# repo_mode: EMPTY is load-bearing — gstack-repo-mode treats any non-empty
|
||||
# answer as a user override and skips its own classification entirely, so
|
||||
# a synthesized "unknown" default turns the classifier into dead code.
|
||||
@@ -392,11 +406,24 @@ case "${1:-}" in
|
||||
;;
|
||||
set)
|
||||
KEY="${2:?Usage: gstack-config set <key> <value>}"
|
||||
if [ "$KEY" = "disabled_skills" ] && [ "$#" -ge 3 ]; then
|
||||
VALUE="$3"
|
||||
else
|
||||
VALUE="${3:?Usage: gstack-config set <key> <value>}"
|
||||
if [ "$#" -lt 3 ]; then
|
||||
echo "Usage: gstack-config set <key> <value>" >&2
|
||||
exit 1
|
||||
fi
|
||||
VALUE="$3"
|
||||
# A config value is one non-empty line (disabled_skills may be empty: it
|
||||
# clears the list). Reject rather than truncate, so a bad value never
|
||||
# replaces the stored one.
|
||||
if [ -z "$VALUE" ] && [ "$KEY" != "disabled_skills" ]; then
|
||||
echo "Error: $KEY value is empty. Existing value left unchanged." >&2
|
||||
exit 1
|
||||
fi
|
||||
case "$VALUE" in
|
||||
*$'\n'*)
|
||||
echo "Error: $KEY value contains a newline. Existing value left unchanged." >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
# Validate key (alphanumeric + underscore + optional @<endpoint-id> suffix).
|
||||
# Accepts hex hashes and the literal "local" from endpoint_hash.
|
||||
if ! printf '%s' "$KEY" | LC_ALL=C grep -qE '^[a-zA-Z0-9_]+(@[a-zA-Z0-9]+)?$'; then
|
||||
@@ -473,6 +500,12 @@ case "${1:-}" in
|
||||
echo "Error: cross_project_learnings '$VALUE' not recognized. Valid values: true, false. Existing value left unchanged." >&2
|
||||
exit 1
|
||||
fi
|
||||
# transcript_ingest_mode is a CONSENT key: recent/all let /sync-gbrain
|
||||
# ingest coding-agent transcripts. Reject a typo; never coerce or store it.
|
||||
if [ "$KEY" = "transcript_ingest_mode" ] && [ "$VALUE" != "recent" ] && [ "$VALUE" != "all" ] && [ "$VALUE" != "off" ]; then
|
||||
echo "Error: transcript_ingest_mode '$VALUE' not recognized. Valid values: recent, all, off. Existing value left unchanged." >&2
|
||||
exit 1
|
||||
fi
|
||||
# memorable_recall is a CONSENT key: `on` lets a Claude Code hook hand every
|
||||
# prompt to a third-party binary. Reject like codex_reviews -- a typo must
|
||||
# never flip consent in either direction, so nothing is coerced or stored.
|
||||
@@ -544,8 +577,8 @@ case "${1:-}" in
|
||||
if [ ! -f "$CONFIG_FILE" ]; then
|
||||
printf '%s' "$CONFIG_HEADER" > "$CONFIG_FILE"
|
||||
fi
|
||||
# Drop embedded newlines, then escape sed replacement metacharacters.
|
||||
SAFE_VALUE="$(printf '%s' "$VALUE" | head -1)"
|
||||
# Escape sed replacement metacharacters (newlines were rejected above).
|
||||
SAFE_VALUE="$VALUE"
|
||||
ESC_VALUE="$(printf '%s' "$SAFE_VALUE" | sed 's/[&/\]/\\&/g')"
|
||||
if grep -qE "^${KEY}:" "$CONFIG_FILE" 2>/dev/null; then
|
||||
# Portable in-place edit (BSD sed uses -i '', GNU sed uses -i without arg)
|
||||
|
||||
Reference in new issue
Block a user