From 524e870ea769e42176cb5ab8a6710d72308f546c Mon Sep 17 00:00:00 2001 From: Santosh Yadav Date: Thu, 12 Nov 2026 18:48:00 +0100 Subject: [PATCH 1/2] Enable Entire --- .entire/.gitignore | 5 +++ .entire/settings.json | 9 ++++++ .github/hooks/entire.json | 68 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 .entire/.gitignore create mode 100644 .entire/settings.json create mode 100644 .github/hooks/entire.json diff --git a/.entire/.gitignore b/.entire/.gitignore new file mode 100644 index 00000000..e66987d2 --- /dev/null +++ b/.entire/.gitignore @@ -0,0 +1,5 @@ +tmp/ +settings.local.json +metadata/ +logs/ +redactors/local/ diff --git a/.entire/settings.json b/.entire/settings.json new file mode 100644 index 00000000..3a866fd3 --- /dev/null +++ b/.entire/settings.json @@ -0,0 +1,9 @@ +{ + "enabled": true, + "telemetry": true, + "checkpoints": { + "primary": { + "type": "git-refs" + } + } +} diff --git a/.github/hooks/entire.json b/.github/hooks/entire.json new file mode 100644 index 00000000..23c168de --- /dev/null +++ b/.github/hooks/entire.json @@ -0,0 +1,68 @@ +{ + "hooks": { + "agentStop": [ + { + "type": "command", + "bash": "sh -c 'if ! command -v entire >/dev/null 2>&1; then exit 0; fi; exec entire hooks copilot-cli agent-stop'", + "comment": "Entire CLI" + } + ], + "errorOccurred": [ + { + "type": "command", + "bash": "sh -c 'if ! command -v entire >/dev/null 2>&1; then exit 0; fi; exec entire hooks copilot-cli error-occurred'", + "comment": "Entire CLI" + } + ], + "postToolUse": [ + { + "type": "command", + "bash": "sh -c 'if ! command -v entire >/dev/null 2>&1; then exit 0; fi; exec entire hooks copilot-cli post-tool-use'", + "comment": "Entire CLI" + } + ], + "preToolUse": [ + { + "type": "command", + "bash": "sh -c 'if ! command -v entire >/dev/null 2>&1; then exit 0; fi; exec entire hooks copilot-cli pre-tool-use'", + "comment": "Entire CLI" + } + ], + "sessionEnd": [ + { + "type": "command", + "bash": "sh -c 'if ! command -v entire >/dev/null 2>&1; then exit 0; fi; exec entire hooks copilot-cli session-end'", + "comment": "Entire CLI" + } + ], + "sessionStart": [ + { + "type": "command", + "bash": "sh -c 'if ! command -v entire >/dev/null 2>&1; then exit 0; fi; exec entire hooks copilot-cli session-start'", + "comment": "Entire CLI" + } + ], + "subagentStart": [ + { + "type": "command", + "bash": "sh -c 'if ! command -v entire >/dev/null 2>&1; then exit 0; fi; exec entire hooks copilot-cli subagent-start'", + "comment": "Entire CLI" + } + ], + "subagentStop": [ + { + "type": "command", + "bash": "sh -c 'if ! command -v entire >/dev/null 2>&1; then exit 0; fi; exec entire hooks copilot-cli subagent-stop'", + "comment": "Entire CLI" + } + ], + "userPromptSubmitted": [ + { + "type": "command", + "bash": "sh -c 'if ! command -v entire >/dev/null 2>&1; then exit 0; fi; exec entire hooks copilot-cli user-prompt-submitted'", + "comment": "Entire CLI" + } + ] + }, + "version": 1 +} From 3a732b7d895ee72cc248a5ca53cac53032cf403e Mon Sep 17 00:00:00 2001 From: Santosh Yadav Date: Thu, 12 Nov 2026 18:49:46 +0100 Subject: [PATCH 2/2] chore: add entire support --- .githooks/commit-msg | 18 ++++++++++++++++-- .githooks/commit-msg.pre-entire | 3 +++ .githooks/post-commit | 4 ++++ .githooks/post-rewrite | 4 ++++ .githooks/pre-push | 5 +++++ .githooks/prepare-commit-msg | 3 +++ 6 files changed, 35 insertions(+), 2 deletions(-) create mode 100755 .githooks/commit-msg.pre-entire create mode 100755 .githooks/post-commit create mode 100755 .githooks/post-rewrite create mode 100755 .githooks/pre-push create mode 100755 .githooks/prepare-commit-msg diff --git a/.githooks/commit-msg b/.githooks/commit-msg index 5434568b..f7049b15 100755 --- a/.githooks/commit-msg +++ b/.githooks/commit-msg @@ -1,3 +1,17 @@ #!/bin/sh -node "$(git rev-parse --show-toplevel)/scripts/commit-message.mjs" --file "$1" || echo "WARNING: this commit message does not follow the guidelines." -exit 0 +# Entire CLI hooks +# Commit-msg hook: strip trailer if no user content (allows aborting empty commits) +if command -v entire >/dev/null 2>&1; then entire hooks git commit-msg "$1" || true; else printf '%s\n' '[entire] Entire CLI is enabled but not installed or not on PATH. Skipping Entire Git hook; continuing. Installation guide: https://docs.entire.io/cli/installation#installation-methods' >&2 || :; fi +# Chain: run pre-existing hook +_entire_hook_dir="$(dirname "$0")" +if [ -z "${ENTIRE_CHAINING_COMMIT_MSG:-}" ]; then + ENTIRE_CHAINING_COMMIT_MSG=1 + export ENTIRE_CHAINING_COMMIT_MSG + if [ -n "${PRE_COMMIT_RUNNING_LEGACY:-}" ] && grep -q '^# File generated by pre-commit: https://pre-commit.com' "$_entire_hook_dir/commit-msg.pre-entire" 2>/dev/null; then + if [ -x "$_entire_hook_dir/commit-msg.legacy.pre-entire" ]; then + "$_entire_hook_dir/commit-msg.legacy.pre-entire" "$@" + fi + elif [ -x "$_entire_hook_dir/commit-msg.pre-entire" ]; then + "$_entire_hook_dir/commit-msg.pre-entire" "$@" + fi +fi diff --git a/.githooks/commit-msg.pre-entire b/.githooks/commit-msg.pre-entire new file mode 100755 index 00000000..5434568b --- /dev/null +++ b/.githooks/commit-msg.pre-entire @@ -0,0 +1,3 @@ +#!/bin/sh +node "$(git rev-parse --show-toplevel)/scripts/commit-message.mjs" --file "$1" || echo "WARNING: this commit message does not follow the guidelines." +exit 0 diff --git a/.githooks/post-commit b/.githooks/post-commit new file mode 100755 index 00000000..d5396a87 --- /dev/null +++ b/.githooks/post-commit @@ -0,0 +1,4 @@ +#!/bin/sh +# Entire CLI hooks +# Post-commit hook: condense session data if commit has Entire-Checkpoint trailer +if command -v entire >/dev/null 2>&1; then entire hooks git post-commit 2>/dev/null || true; else :; fi diff --git a/.githooks/post-rewrite b/.githooks/post-rewrite new file mode 100755 index 00000000..2c65d91c --- /dev/null +++ b/.githooks/post-rewrite @@ -0,0 +1,4 @@ +#!/bin/sh +# Entire CLI hooks +# Post-rewrite hook: remap session linkage after amend/rebase rewrites +if command -v entire >/dev/null 2>&1; then entire hooks git post-rewrite "$1" 2>/dev/null || true; else :; fi diff --git a/.githooks/pre-push b/.githooks/pre-push new file mode 100755 index 00000000..94ab042c --- /dev/null +++ b/.githooks/pre-push @@ -0,0 +1,5 @@ +#!/bin/sh +# Entire CLI hooks +# Pre-push hook: push session logs alongside user's push +# $1 is the remote name (e.g., "origin") +if command -v entire >/dev/null 2>&1; then if _entire_refs="$(mktemp "${TMPDIR:-/tmp}/entire-pre-push.XXXXXX" 2>/dev/null)"; then if cat > "$_entire_refs"; then ENTIRE_PRE_PUSH_STDIN_REFS=1 entire hooks git pre-push "$1" < "$_entire_refs" || { _entire_status=$?; rm -f "$_entire_refs"; exit "$_entire_status"; }; exec < "$_entire_refs"; rm -f "$_entire_refs"; else rm -f "$_entire_refs"; printf '%s\n' '[entire] could not save git'\''s pre-push ref list (is TMPDIR full?); stopping the push so the hooks after Entire don'\''t run without it' >&2; exit 1; fi; else ENTIRE_PRE_PUSH_STDIN_REFS=0 entire hooks git pre-push "$1" < /dev/null || exit $?; fi; fi diff --git a/.githooks/prepare-commit-msg b/.githooks/prepare-commit-msg new file mode 100755 index 00000000..7fa38423 --- /dev/null +++ b/.githooks/prepare-commit-msg @@ -0,0 +1,3 @@ +#!/bin/sh +# Entire CLI hooks +if command -v entire >/dev/null 2>&1; then entire hooks git prepare-commit-msg "$1" "$2" 2>/dev/null || true; else :; fi