Commit Graph
709 Commits
Author SHA1 Message Date
haelyra a032472448 Merge reviewed PR #2856
# Conflicts:
#	manifests/context-packs/skill-triggers@1.json
2026-11-05 23:28:21 -05:00
haelyra 001df488e5 fix: reconcile reviewed integration repairs and generated catalogs 2026-11-05 23:26:12 -05:00
haelyra ba3042a85d Merge reviewed PR #2496 2026-11-05 23:13:00 -05:00
haelyra c054b3053c Merge reviewed PR #3811 2026-11-05 23:12:33 -05:00
haelyra ee1ec55232 Merge reviewed PR #3820 2026-11-05 23:12:13 -05:00
haelyra 5e170cfa10 Merge reviewed PR #3813 2026-11-05 23:12:13 -05:00
haelyra 917ed1fd2c Merge reviewed PR #3873 2026-11-05 23:11:46 -05:00
haelyra c20ca2f20c Merge reviewed PR #3872 2026-11-05 23:11:46 -05:00
haelyra 01e4f8bd44 Merge reviewed PR #3864 2026-11-05 23:11:09 -05:00
haelyra fceb970215 Merge reviewed PR #3862 2026-11-05 23:11:09 -05:00
haelyra 912fc63c41 Merge reviewed PR #3671 2026-11-05 23:10:45 -05:00
haelyra ab10daba18 Merge reviewed PR #3870 2026-11-05 23:10:32 -05:00
Cheese 4385863e56 fix(scripts): reject inherited package manager names 2026-11-06 11:52:10 +08:00
Rahul Selvaraj feac4f52ba fix(hooks): match the full classifier notice, isolate test env
CLASSIFIER_NOTICE matched by prefix, so a pasted notice followed by a
user question was dropped from both summary paths. Anchor it to the
whole message so trailing user text is kept, and add a regression test.

Also pass ECC_SKIP_LLM_SUMMARY=1 in the withTranscript fixture helper so
an inherited ECC_LLM_SUMMARY_INTERVAL=1 cannot trigger claude -p.

Refs #3867

Assisted-by: Claude <noreply@anthropic.com>
2026-11-06 08:47:21 +08:00
L4XB 30eb570117 fix(hooks): read NUL-ended delimiters, Bash blanks before #, and long bodies
Bash ends a decoded $'...' string at its first NUL, so `cat <<$'EOF\0X'`
ends at the line EOF, but the splitter looked for EOF\0X and swallowed
the commands after the body. A carriage return or a no-break space is
not a blank to Bash, so `echo foo\r# && npm run dev` runs the dev
server, but the splitter read the # as a comment. And spreading a long
substitution's segments into push() threw RangeError, which the hook's
catch turned into an allow. Truncate the decoded part at the NUL, use
Bash's blanks for word starts, and append the segments one at a time.
2026-11-05 13:07:21 +01:00
Rahul Selvaraj 846a561a7b fix(hooks): drop classifier notices from LLM summary input
The safety-classifier notice filter only covered the mechanical summary.
When generateSessionSummary runs (low context or message interval),
extractConversationText read the raw transcript and passed the notice to
the LLM as a user turn, so it could still reach saved context.

Move the check into one shared isClassifierNotice() in
scripts/lib/llm-summary.js and use it in both userMessageText() and
extractConversationText(). Add LLM-path regression tests, and split the
session-end classifier-notice tests into small functions (<50 lines).

Refs #3867

Assisted-by: Claude <noreply@anthropic.com>
2026-11-05 18:06:51 +08:00
L4XB 04f32e06e7 Merge remote-tracking branch 'origin/main' into fix/shell-split-newlines 2026-11-05 10:27:19 +01:00
L4XB 80a26c2ceb fix(hooks): read $$ as the process ID before looking for $'...'
In `echo $$'\'; npm run dev`, Bash reads `$$` as the process-ID parameter
and the quote after it as an ordinary single quote, so it runs
`npm run dev`. The splitter took the second `$` as the start of ANSI-C
quoting, which hid the semicolon, and a here-document delimiter such as
`$$'EOF'` was read as `$EOF`, so the body never ended. Consume the `$$`
pair first in both places.
2026-11-05 10:27:19 +01:00
haelyra 7a0188db61 fix(hooks): honor Bash quote boundaries in dev guard
(cherry picked from commit f4bf43c550)
2026-11-05 10:23:23 +01:00
kevin 3d7034872e fix(memory): scan decoded fields for secrets, not serialized JSON 2026-11-05 06:27:55 +09:00
kevin cfe051de5f fix(memory): flag GitHub ghu_ tokens as suspected secrets 2026-11-05 06:19:48 +09:00
huangpz6andTRAE 01c2426b2c fix(gateguard): classify settings through real paths and .claude project roots (#3862)
A symlink alias to .claude/settings.json resolved past the lexical settings check, and a project whose root is .claude collapsed the class path to bare settings.json. Judge the resolved absolute path and the symlink-resolved path as well, with regressions for both.

Co-Authored-By: TRAE <noreply@trae.ai>
2026-11-04 21:52:33 +08:00
huangpz6andTRAE cdb8a93819 fix(hooks): share one recovery-hint parser and cover default denials (#3864)
Move ECC_SHOW_RECOVERY_HINTS parsing into scripts/lib/hooks/recovery-hints.js so every hook trims and accepts the same truthy values. Add default-off and opt-in assertions for the condensed GateGuard denial, config-protection (protected and truncated payloads) and the fail-closed truncation wrapper.

Co-Authored-By: TRAE <noreply@trae.ai>
2026-11-04 21:36:43 +08:00
huangpz6andTRAE dde2c8dbda fix(gateguard): treat .claude/settings files as restricted for subagents too (#3862)
Removing the exemption gated top-level edits, but subagent Edit/Write/MultiEdit still consult only sensitive or hard-linked targets, so an ordinary settings file bypassed the gate. Classify .claude/settings*.json as sensitive in the shared target class and cover all three subagent edit tools plus both settings file names.

Co-Authored-By: TRAE <noreply@trae.ai>
2026-11-04 21:24:45 +08:00
Misty-Star d12137e1b7 fix: adapt Grok hooks for Windows tool execution 2026-11-03 18:59:28 +08:00
YuhaoLin2005 95bf86c348 Add config-health monitor and install wiring
- Add the config-health skill: a read-only monitor for hook wiring, rule references, and rule staleness; every mode exits 0.
- Ship its own SessionStart hook asset so installing the module registers the monitor; keep PreToolUse opt-in.
- Keep one install-state record per hook source, so hooks-runtime and config-health can share settings.json and uninstall removes both.
- Split the monitor into a CLI entry plus constants, paths, and scan modules; split scan_command and the hook contract suite. All files are under 800 lines and no function body reaches 50 lines.
2026-11-02 22:53:30 +08:00
Misty-Star 34c20e751b Merge remote-tracking branch 'origin/main' into pr/2856
# Conflicts:
#	manifests/context-packs/skill-triggers@1.json
2026-11-02 16:00:47 +08:00
Misty-Star 06f6008165 merge: resolve PR 2856 conflicts with main 2026-11-02 15:35:10 +08:00
Yann Roberto f8b9a40436 fix(scripts): recognize npm-shrinkwrap.json 2026-10-30 21:34:21 +08:00
Yann Roberto 1a6cbb6716 fix(install): preserve Copilot user script scopes 2026-10-30 18:57:51 +08:00
Yann Roberto c68afd7c35 fix(install): isolate Copilot helpers from ESM projects 2026-10-30 18:31:48 +08:00
minteeqahmed-png 6441dd1370 fix(harness): use segment-aware root containment and explicit symlink skip 2026-10-30 14:49:03 +05:00
minteeqahmed-png 6f611d7a6a feat(harness): add Antigravity, Qwen, Copilot, and Hermes to compliance matrix 2026-10-30 14:32:18 +05:00
haelyra 35769d00d9 fix(context): validate budgets and remind before native compaction
Reject numeric prefixes, fractions and unsafe window integers consistently with summary scheduling while preserving resolver precedence. Cap only the default context reminder at eighty percent of a valid earlier native compaction budget; explicit thresholds, including zero, retain their intentional policy. Document the independent capacity, summary and advisory contracts.

RED controls reproduce malformed-budget summary triggers and the known-1M/native-200k missed reminder. Resolver65, helper47, actualStop18 and actualPreToolUse54 pass on Node18 and24. Parent and independent reviewer approved the exact diff before commit. Registry rebinding remains the integration coordinator responsibility after combining documentation repairs.
2026-10-29 19:42:27 -07:00
haelyra b37942d3c1 fix(summary): preserve work before the earlier compaction boundary
Separate confirmed model capacity from Stop-summary scheduling. Use the smaller confirmed capacity/native budget, or native-only budget for inferred capacity. Three unit and one actual hook RED cases now pass; helper43, actualStop15 and ten independent controls pass without changing the capacity resolver.
2026-10-29 17:37:52 -07:00
haelyra fc549b6372 fix: preserve Windows rule examples and conservative summary budgets
Address #3809 review regressions for CRLF code fences and inferred context capacity. Reproduced unit and actual Stop-hook failures; verified llm-summary38, Stop14, Copilot37 and independent code/security review. Keep confirmed model/ECC context authority, native budget scheduling and unknown capacity separate.
2026-10-29 17:27:56 -07:00
haelyra 2cdc157205 fix(hooks): integrate reviewed shell quoting and context precedence repairs 2026-10-29 17:03:51 -07:00
haelyra 0036875f86 feat(install): integrate namespaced Copilot rule instructions
Preserve contributor PR #3771 head 4114945775. Repair single-file language namespaces and preserve fenced Markdown examples. Verified 36 adapter/lifecycle and 5 support-surface tests; independent code and security review passed.
2026-10-29 17:02:31 -07:00
haelyra ee21d8da5c fix(hooks): preserve context-window evidence over compact trigger (#3760) 2026-10-29 17:01:04 -07:00
haelyra 5e062a3b3b fix(hooks): integrate reviewed shell quote extraction fix (#3801) 2026-10-29 17:00:10 -07:00
haelyra de8c290057 fix: keep Copilot detector explanation aligned with installed workflow 2026-10-29 13:09:04 -07:00
haelyra 6d7d4920c8 fix: close final integration security and portability gaps 2026-10-29 12:57:39 -07:00
haelyra 1eadb741a5 fix: scope Copilot detector projection to the canonical TDD workflow 2026-10-29 11:59:19 -07:00
leoca b0070af9d1 fix(hooks): return new quote state from toggleQuote instead of mutating it
AGENTS.md asks for new objects rather than mutation. toggleQuote now returns the updated quote state (or null when the character is not a quote it toggles), skipOuterSpan returns it alongside the skipped index, and each scanner reassigns its own local state.
2026-10-29 18:58:18 +00:00
haelyra 0d92059410 fix: close installed workflow and review publication gaps before integration 2026-10-29 11:58:01 -07:00
leoca eb9a5ca0c6 fix(hooks): keep $'...' open across an escaped apostrophe
Dropping the previous-character check in toggleQuote let the `'` of `\'` close an ANSI-C `$'...'` string, so `echo $'it\'s'; (rm -rf /tmp/x)` left a quote open and the group was never extracted. Track `$'...'` in the quote state and consume backslash escapes inside it, as bash does, and cover the inner scanners (`(...)`, `$(...)`, `{ ...; }` bodies) with quotes ending in a backslash.
2026-10-29 18:44:54 +00:00
haelyra 60053622fe maint: integrate reviewed contribution #3791 2026-10-29 11:34:19 -07:00
haelyra 7acdf21516 maint: integrate reviewed contribution #3804 2026-10-29 11:27:57 -07:00
haelyra 8fc06b13cb maint: integrate reviewed contribution #3562 2026-10-29 11:26:56 -07:00
haelyra 124887fd3b maint: integrate reviewed contribution #3748 2026-10-29 11:26:55 -07:00