Commit Graph
565 Commits
Author SHA1 Message Date
haelyra ba3042a85d Merge reviewed PR #2496 2026-11-05 23:13:00 -05:00
haelyra 758f73c617 Merge reviewed PR #3876
# Conflicts:
#	manifests/context-packs/skill-triggers@1.json
2026-11-05 23:11:36 -05:00
haelyra f6e68a186f Merge reviewed PR #3874
# Conflicts:
#	manifests/context-packs/skill-triggers@1.json
2026-11-05 23:11:12 -05:00
haelyra 1ea3af26ec Merge reviewed PR #3865 2026-11-05 23:11:09 -05:00
haelyra a222e0091b Merge reviewed PR #3849 2026-11-05 23:10:32 -05:00
haelyra 14221ef652 Merge reviewed PR #3881 2026-11-05 23:09:32 -05:00
Cheese 4385863e56 fix(scripts): reject inherited package manager names 2026-11-06 11:52:10 +08:00
Gaurav DubeyandClaude Opus 5.5 f0eee4b543 fix(hooks): redact JWTs joined to an underscore-prefixed label
The JWT chain scanner only accepted a header at the start of a segment or
after `-`, so `session_<JWT>` reached the audit and cost logs unredacted.
Treat `_` as a prefix boundary too and cover it in the tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 03:30:52 +00:00
montjeffrey 25c838253f test(clv2): keep the compatibility self-test passing on Python 3.8-3.11
Before 3.12 the parser rejects f"{d["k"]}" outright, so the shared sample
stopped at a parse error and the per-finding assertions failed on 3.11.
Samples that every supported Python parses now carry the per-finding
checks; the newer f-string forms run one per sample and accept either the
specific finding or the parse error.

Also flag unquoted X | Y annotations, which can fail at definition time
before 3.10, and check that a quoted union is not flagged.
2026-11-05 13:40:32 -05:00
Gaurav DubeyandClaude Opus 5.5 71084e0555 fix(hooks): redact JWTs joined to a hyphenated prefix
The lookbehind added to keep the JWT scan linear also skipped tokens right
after a `-`, so `--cookie "session=jwt-<JWT>"` reached the logs unredacted.
Scan each `[A-Za-z0-9_.-]` run once instead, checking every dot segment for
a header at its start or after a `-`, decoding at most once per segment so
long `ey-ey-...` runs stay linear.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 03:31:50 +00:00
wellkilo 3d8a6a1401 fix(skill-stocktake): compare quick scans with per-skill mtimes
A later batch save advances evaluated_at past edits to previously evaluated skills. Compare each saved evaluation mtime to the current inventory, including timestamps that move backward, and retain the legacy global timestamp fallback.
2026-11-04 18:32:37 -08:00
montjeffrey e56624d8f1 test(clv2): catch 3.8 and 3.12 f-string forms in the compat guard
ast.parse(feature_version=...) on current Pythons goes no lower than the
3.7 grammar, and it accepts f-string forms that older interpreters reject:
the self-documenting {x=} (3.8) and, from 3.12, reused quotes, backslashes
and comments inside a replacement field. ast does not record these, so
the guard now reads each f-string's own source text. The sample file
proves both kinds are flagged and that 3.6-valid fields ({n == 1},
{n!r:>4}, escaped {{n=}}) are not.
2026-11-04 11:45:32 -05:00
montjeffrey e41a4a0492 feat(clv2): tell instinct-cli users on an end-of-life Python to upgrade
instinct-cli keeps running on old interpreters, but people on one should
know they no longer get security fixes. On a Python older than 3.11 (3.10
reached end of life in October 2026) the CLI now prints one line to
stderr after parsing its arguments:

  [instinct-cli] Python 3.8 is past end of life. instinct-cli still runs
  on it; upgrade to Python 3.11 or newer for security fixes.

The command itself runs as before. The notice stays out of automated
output: `prune --quiet`, which observer-loop.sh runs, skips it, and
CLV2_SKIP_PYTHON_EOL_NOTICE=1 turns it off for anyone who keeps an old
Python on purpose. The threshold is one constant, _SUPPORTED_PYTHON, to
raise as versions age out. Importing the module prints nothing.
2026-11-04 11:30:07 -05:00
montjeffrey 6053e1a11b fix(clv2): keep instinct-cli running on Python 3.6 and newer
The hooks fall back to any Python 3 that runs, so users on an older
interpreter (RHEL 8's 3.6, for one) still reach instinct-cli. It failed
there at import: builtin generics such as list[dict] in signatures are
evaluated when the function is defined, which raises TypeError before
3.9, and str.removeprefix is 3.9+.

- Quote the builtin-generic annotations. Type checkers read them the
  same way, and they stay valid under 3.14's deferred annotations.
- Strip the byte-order mark with startswith and a slice.
- Open the registry lock file with an explicit UTF-8 encoding.
- Say in the module docstring that 3.6 is the floor and what keeps it.

The new test parses the script with the oldest grammar ast offers and
rejects what a grammar check cannot see: unquoted builtin generics in evaluated
annotations, `from __future__ import annotations`, and 3.7+ methods and
keywords (capture_output, text, removeprefix and similar). A sample file
proves it catches each of those. It also runs import, status, export,
evolve, projects and prune under -X dev -X warn_default_encoding
-W error, so any deprecation or default-encoding warning on the current
Python fails the build. CI runs only current Pythons; this is a static
guard, not a run on a real 3.6.
2026-11-04 11:28:28 -05:00
montjeffrey 3f56735bc3 fix(clv2): decode instinct-cli git output as UTF-8
git prints repository paths and remote URLs as UTF-8 on every platform,
but instinct-cli read them in text mode without an encoding, so Python
decoded them with the locale encoding. On Windows that is the ANSI code
page (usually cp1252): a non-ASCII repo path came back garbled ("café"
became "café"), a byte cp1252 cannot map crashed detect_project with
UnicodeDecodeError, and a non-ASCII remote URL hashed to a different
project id than the URL itself does.

The three git calls now decode as UTF-8 with errors="replace". They are
spelled with stdout/stderr=PIPE instead of capture_output/text, which
are Python 3.7+.

The new test forces a cp1252 locale encoding, so it reproduces off
Windows too. All three cases fail without the fix and pass with it.
2026-11-04 11:16:13 -05:00
huangpz6andTRAE 0c2a542d20 fix(skills-health): make the one-off checkout fallback explicit (#3865)
commands-core copies scripts/lib into the Claude config root, so it does not repair a marketplace plugin installation. Lead with a direct dashboard run from a full checkout and keep commands-core as the non-marketplace reinstall path.

Co-Authored-By: TRAE <noreply@trae.ai>
2026-11-04 21:54:03 +08:00
huangpz6andTRAE a496ab1686 fix(skills-health): name the missing module and give an executable remedy (#3865)
The diagnostic always blamed scripts/lib/skill-evolution, hiding a nested failure such as a missing lib/utils.js, and the printed installer command selected no module. Include the module from the resolution error and point at a full-checkout install with --modules commands-core.

Co-Authored-By: TRAE <noreply@trae.ai>
2026-11-04 21:37:57 +08:00
Gaurav DubeyandClaude Opus 5.5 4d3e66e0ab fix(hooks): redact joined-fragment secret values and make JWT scan linear
- Replace the secret=/api_key= value regex with a single-pass, quote-aware
  scanner so the whole Bash word is redacted when quoted and unquoted
  fragments are joined (e.g. --secret='prefix-'suffix), while a value inside
  an enclosing quoted string stops at that string's closing quote.
- Searching for the keyword itself (grep -n "secret =" file,
  rg 'api_key:' dir) no longer redacts the rest of the command.
- Use a lookbehind instead of \b before the JWT header so long dot-free
  ey-ey-... runs are scanned in linear time instead of quadratic.
- Add regression tests for joined fragments, keyword searches, and the
  ey- performance case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 03:41:05 +00:00
huangpz6andTRAE f5b1867268 fix(skills-health): explain a missing scripts/lib instead of a module stack (#3259)
A managed plugin install can lack scripts/lib/skill-evolution, which made skills-health fail on the first require with Cannot find module. Catch that specific resolution failure and print the install-apply remedy; other errors still propagate.

Co-Authored-By: TRAE <noreply@trae.ai>
2026-11-04 11:21:21 +08:00
Gaurav Dubey 0b57406e57 fix(hooks): redact spaced-header JWTs and escaped or $'...' secret values
Match JWT headers that start with ey or ew (whitespace after the opening
brace) and keep non-eyJ matches only when the header does not decode to
an object with an alg field. Parse secret= / api_key= values with escaped
double quotes, $'...' quoting and backslash escapes, and redact an
unterminated quoted value to the end of the command.

Refs #3846
2026-11-03 04:19:37 +00:00
Gaurav Dubey 08fb3c8a1c fix(hooks): redact bare API keys, JWTs and PEM blocks in bash command logs
sanitizeCommand only redacted keyword- or flag-shaped secrets, so a bare
Anthropic/OpenAI sk- key, a JWT, a PEM private key block, or a secret= /
api_key= / x-api-key: value was written verbatim to bash-commands.log and
cost-tracker.log. Add value-shape patterns for these and keep the key name
and separator for assignments so the log stays readable.

Refs #3846
2026-11-03 04:12:32 +00: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
Joel PodolskyandClaude Opus 5.5 8aab80221d fix(openclaw-persona-forge): print gacha output as UTF-8 on non-UTF-8 stdout
On Windows, piped stdout defaults to cp1252, so `python3 gacha.py` crashed
on its first banner line with UnicodeEncodeError. That covers agent shell
tools and gacha.sh. Reconfigure stdout to UTF-8 before main(), the same
approach instinct-cli.py took for #1855.

The existing tests set PYTHONUTF8=1, which hid the crash. The new case
forces PYTHONIOENCODING=cp1252 without PYTHONUTF8, so it reproduces on any
OS: it fails on the previous gacha.py and passes with this change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 03:30:22 -04:00
haelyra 60053622fe maint: integrate reviewed contribution #3791 2026-10-29 11:34:19 -07:00
haelyra a98821fff9 maint: integrate reviewed contribution #3779 2026-10-29 11:34:15 -07:00
haelyra 2ecb5fcc04 maint: integrate reviewed contribution #3752 2026-10-29 11:30:40 -07:00
haelyra 6fa858fbdf maint: integrate reviewed contribution #3803 2026-10-29 11:27:56 -07:00
haelyra 023acf21d0 maint: integrate reviewed contribution #3794 2026-10-29 11:27:56 -07:00
haelyra 6a3c45ac7f maint: integrate reviewed contribution #3601 2026-10-29 11:25:27 -07:00
haelyra ff147d751f maint: integrate reviewed contribution #3593 2026-10-29 11:25:25 -07:00
haelyra f77db133ac maint: integrate reviewed contribution #3614 2026-10-29 11:25:23 -07:00
haelyra a60c58ab42 maint: integrate reviewed contribution #3780 2026-10-29 11:25:19 -07:00
haelyra d2c71fd0e9 maint: integrate reviewed contribution #3588 2026-10-29 11:25:18 -07:00
haelyra 09e0eb7d7f maint: integrate reviewed contribution #3591 2026-10-29 11:23:24 -07:00
minteeqahmed-png ef82fcb130 fix(scripts): strip unquoted YAML comments and preserve mixed body line endings 2026-10-29 21:49:53 +05:00
minteeqahmed-png fb4683317f fix(scripts): harden gemini-adapt-agents for CRLF, unknown flags, and block tool lists 2026-10-29 20:56:00 +05:00
longankang 8e4a6c03bf fix: validate Codex hook references in plugin cache
Collect string-valued manifest.hooks as a file reference so missing files, directories, and paths outside the cache fail validation. Add regression coverage for valid and invalid hook references while preserving non-string and absent-hook behavior.

Closes #3786
2026-10-29 15:30:33 +08:00
Harry Chen 24bed7165e test(work-items): admit older ready tasks past newest 100 entries 2026-10-29 12:37:02 +08:00
Harry Chen 69a46925ee test(work-items): cover automatic ready-only pickup 2026-10-29 12:22:28 +08:00
Harry Chen 2948adf3af test(work-items): cover legacy in-progress claim compatibility 2026-10-29 12:14:57 +08:00
Harry Chen 49f3329222 test(work-items): cover explicit ready claim admission 2026-10-29 12:01:02 +08:00
Shubham Padkonde 1d77da5be7 fix(work-items): leave imported issues available for native claims 2026-10-29 09:22:33 +05:30
Ali Arslan 4ebe4c8bc3 fix(tests): skip the inert OpenCode stub when loading plugin factories 2026-10-28 22:50:14 +05:00
Ali Arslan 6b11ffeb7d fix(tests): assert the inert OpenCode stub as a V2 definition object 2026-10-28 22:48:50 +05:00
Yann Roberto f1f542044c fix(install): accept all supported component families in config 2026-10-28 16:58:35 +08:00
Shubham Padkonde a75cdc322b test(work-items): verify claim preservation and report suite totals 2026-10-28 13:10:12 +05:30
Shubham Padkonde b805cdfae8 fix(work-items): preserve native ownership during GitHub sync 2026-10-28 12:52:50 +05:30
Muhammad Zubair 0618bdc7a8 test(claw): keep the askClaude tests from spawning a real claude CLI 2026-10-27 23:58:20 +05:00
Dante 49f8893dd3 fix(codex): bind cache rerun guidance to active plugin 2026-10-27 12:27:44 +08:00
Dante dd6f58d3d4 fix(codex): recommend native cache recovery in checker 2026-10-27 08:34:42 +08:00