Repository navigation
Add entire support #505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add entire support #505
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| tmp/ | ||
| settings.local.json | ||
| metadata/ | ||
| logs/ | ||
| redactors/local/ |
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,9 @@ | ||||
| { | ||||
| "enabled": true, | ||||
| "telemetry": true, | ||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do not commit telemetry opt-in to the shared settings file. In Entire v0.10.6, a Remove the key from the shared file. Let each contributor choose telemetry in their own settings. 🛡️ Suggested fix
Confirm the Entire version this project uses before you rely on these semantics. Source: raw.githubusercontent.com Committable suggestion
|
||||
| "checkpoints": { | ||||
| "primary": { | ||||
| "type": "git-refs" | ||||
| } | ||||
| } | ||||
| } | ||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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'", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a Each entry defines only Add a Suggested fix
If
|
||
| "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 | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prevent unintended publication of session transcripts.
Entire is enabled for all contributors through the committed settings. The Copilot hooks record agent sessions. On each push,
.githooks/pre-pushrunsentire hooks git pre-push, which also pushes checkpoint refs. Those refs can contain full session transcripts, including file contents and tool output. Anyone who can read the remote can read them. If this repository is public, the transcripts become public. Redaction is best effort and does not guarantee that secrets are removed.Before merging, choose one of these options:
The documented commands are
entire configure --local --checkpoint-remote github:<owner>/<repo>andentire configure --local --skip-push-sessions. Both write local settings. Each contributor must run the command in their own clone, so the committed settings do not enforce either option.