Commit Graph

1303 Commits

  • fix: use AppleScript-safe escaping and reduce spawnSync timeout
    - Replace JSON.stringify with curly quote substitution for AppleScript
      compatibility (AppleScript does not support \" backslash escapes)
    - Reduce spawnSync timeout from 5000ms to 3000ms to leave headroom
      within the 5s hook deadline
  • feat: add macOS desktop notification Stop hook
    Add a new Stop hook that sends a native macOS notification with the
    task summary (first line of last_assistant_message) when Claude finishes
    responding. Uses osascript via spawnSync for shell injection safety.
    Supports run-with-flags fast require() path. Only active on standard
    and strict profiles; silently skips on non-macOS platforms.
  • feat(ecc2): add token/cost meter widget (#775)
    - TokenMeter widget using ratatui Gauge with color gradient (green->yellow->red)
    - Budget fields (cost_budget_usd, token_budget) in Config
    - Aggregate cost display in status bar
    - Warning state at 80%+ budget consumption
    - Tests for gradient, config fallback, and meter rendering
  • chore(deps): bump git2 in /ecc2 in the cargo group across 1 directory
    Bumps the cargo group with 1 update in the /ecc2 directory: [git2](https://github.com/rust-lang/git2-rs).
    
    
    Updates `git2` from 0.19.0 to 0.20.4
    - [Changelog](https://github.com/rust-lang/git2-rs/blob/git2-0.20.4/CHANGELOG.md)
    - [Commits](https://github.com/rust-lang/git2-rs/compare/git2-0.19.0...git2-0.20.4)
    
    ---
    updated-dependencies:
    - dependency-name: git2
      dependency-version: 0.20.4
      dependency-type: direct:production
      dependency-group: cargo
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
  • Merge pull request #881 from affaan-m/feat/ecc2-session-lifecycle
    feat(ecc2): session create/destroy lifecycle
  • docs(ja-JP): translate plain text code blocks to Japanese
    Translate English prose inside plain text code blocks (```text, ```)
    across ja-JP documentation to Japanese, following the same approach
    as PR #753 (zh-CN translation).
    
    Translated content includes:
    - Output template labels and status messages
    - Folder tree inline comments
    - CLI workflow descriptions
    - Error/warning message examples
    - Commit message templates and PR title examples
    
    Technical identifiers, file paths, and actual code remain untranslated.
  • Apply suggestions from code review
    Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
  • Apply suggestions from code review
    Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
  • Update skills/agent-payment-x402/SKILL.md
    Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
  • fix: address all automated review feedback on code example
    Security model:
    - Remove set_policy from agent-callable tools table; document as
      orchestrator-only to prevent self-privilege escalation
    - Pin agentwallet-sdk@6.0.0 in MCP config with pre-install guidance
      (npx without -y hangs in non-interactive MCP startup)
    - Whitelist only required env vars (PATH, NODE_ENV, WALLET_PRIVATE_KEY)
      instead of forwarding entire process.env to subprocess
    
    Code example (complete rewrite):
    - Add StdioClientTransport import and client.connect() for runnable code
    - Wrap in async main() for CJS/ESM compatibility (top-level await)
    - Verify set_policy result via isError before delegating
    - Five distinct fail-closed error paths in preToolCheck:
      1. Invalid apiCost input (NaN/Infinity bypass prevention)
      2. Transport/connectivity failure
      3. Tool-level error (isError: true, e.g., auth failure)
      4. Unexpected response format (missing/non-finite remaining)
      5. Budget exceeded (clear amounts in message)
    - Use Number.isFinite() for both apiCost and remaining validation
    
    Documentation:
    - Rename headings per CONTRIBUTING.md format
    - Replace broken mcp-server-patterns cross-ref with security-review
    - Add 'Pin your dependencies' to Best Practices
    - Add security note about supply-chain risk
  • feat: add agent-payment-x402 skill for autonomous agent payments
    Adds a skill for x402 payment execution with MCP integration:
    - Per-task and per-session spending controls
    - Non-custodial wallet management (ERC-4337)
    - Pairs with mcp-server-patterns and cost-aware-llm-pipeline skills
    - Production reference: merged into NVIDIA NeMo Agent Toolkit (PR #17)
    - npm package: agentwallet-sdk
  • feat(ecc2): implement session create/destroy lifecycle (#764)
    - Process spawning via tokio::process::Command
    - Session state transitions with guards (Pending->Running->Completed/Failed/Stopped)
    - Stop with process kill and optional worktree cleanup
    - Latest alias resolver in get_status
    - SQLite store migrations for state tracking
  • Merge pull request #762 from affaan-m/feat/ecc2-tui-scaffold
    feat: ECC 2.0 — Rust TUI agentic IDE control plane
  • feat: scaffold ECC 2.0 Rust TUI — agentic IDE control plane
    Initial scaffold for ECC 2.0, a terminal-native agentic IDE built with
    Ratatui. Compiles to a 3.4MB single binary.
    
    Core modules:
    - Session manager with SQLite-backed state store
    - TUI dashboard with split-pane layout (sessions, output, metrics)
    - Worktree orchestration (auto-create per agent session)
    - Observability with tool call risk scoring
    - Inter-agent communication via SQLite mailbox
    - Background daemon with heartbeat monitoring
    - CLI with start/stop/sessions/status/daemon subcommands
    
    Tech stack: Rust + Ratatui + Crossterm + Tokio + rusqlite + git2 + clap
  • fix: move ajv to dependencies and auto-install deps in install scripts
    `ajv` is required at runtime by the installer (`scripts/lib/install/config.js`)
    but was listed under `devDependencies`. This caused `Error: Cannot find module
    'ajv'` when running `./install.sh` from a fresh git clone or via `npx`.
    
    - Move `ajv` from devDependencies to dependencies in package.json
    - Add auto `npm install` in install.sh when node_modules is missing
    - Add matching auto-install in install.ps1 for Windows parity
  • feat(skills): add openclaw-persona-forge skill
    Add complete openclaw-persona-forge skill with all supporting files:
    - SKILL.md with community origin
    - gacha.py and gacha.sh for random soul generation
    - Reference docs for avatar style, boundary rules, error handling,
      identity tension, naming system, and output template
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
  • feat: add 6 gap-closing skills — browser QA, design system, product lens, canary watch, benchmark, safety guard
    Closes competitive gaps with gstack:
    - browser-qa: automated visual testing via browser MCP
    - design-system: generate, audit, and detect AI slop in UI
    - product-lens: product diagnostic, founder review, feature prioritization
    - canary-watch: post-deploy monitoring with alert thresholds
    - benchmark: performance baseline and regression detection
    - safety-guard: prevent destructive operations in autonomous sessions
  • Update docs/zh-CN/commands/prune.md
    Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
  • Update docs/zh-CN/commands/prune.md
    Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
  • Update docs/zh-CN/commands/prune.md
    Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
  • Update docs/zh-CN/commands/prune.md
    Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
  • Update docs/zh-CN/commands/prune.md
    Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
  • Update docs/zh-CN/commands/prune.md
    Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
  • fix(commands): replace py_compile with compileall in build-fix (#804)
    py_compile requires explicit filenames and exits with status 2 when
    invoked without them. compileall -q . recursively validates Python
    syntax across the entire project, which is what the build-fix
    command actually needs.
    
    Fixes #759
  • fix: add antigravity to platform-configs targets
    Fixes #813. The platform-configs module was missing antigravity from its
    targets array, causing all 13+ dependent modules to be skipped when
    installing with --target antigravity --profile full.
  • feat(skills): add skill-comply — automated behavioral compliance measurement (#724)
    * feat(skills): add skill-comply — automated behavioral compliance measurement
    
    Automated compliance measurement for skills, rules, and agent definitions.
    Generates behavioral specs, runs scenarios at 3 strictness levels,
    classifies tool calls via LLM, and produces self-contained reports.
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    
    * fix(skill-comply): address bot review feedback
    
    - AGENTS.md: fix stale skill count (115 → 117) in project structure
    - run.py: replace remaining print() with logger, add zero-division guard,
      create parent dirs for --output path
    - runner.py: add returncode check for claude subprocess, clarify
      relative_to path traversal validation
    - parser.py: use is_file() instead of exists(), catch KeyError for
      missing trace fields, add file check in parse_spec
    - classifier.py: log warnings on malformed classification output,
      guard against non-dict JSON responses
    - grader.py: filter negative indices from LLM classification
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    
    ---------
    
    Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
  • docs: add ECC 2.0 reference architecture from competitor research
    Summarizes patterns from superset-sh/superset (Electron, 7.7K stars),
    standardagents/dmux (Ink TUI, 1.2K stars), and others. Defines the
    three-layer architecture (daemon + runtime + TUI) and patterns to adopt.
  • feat(skills): add santa-method - multi-agent adversarial verification (#760)
    * feat(skills): add santa-method
    
    Multi-agent adversarial verification with convergence loop. Two independent review agents evaluate output against a shared rubric. Both must pass before shipping. Includes architecture diagram, implementation patterns (subagent, inline, batch sampling), domain-specific rubric extensions, failure mode mitigations, and integration guidance with existing ECC skills.
    
    * Enhance SKILL.md with detailed Santa Method documentation
    
    Expanded the SKILL.md documentation for the Santa Method, detailing architecture, phases, implementation patterns, failure modes, integration with other skills, metrics, and cost analysis.
  • feat: pending instinct TTL pruning and /prune command (#725)
    * feat: add pending instinct TTL pruning and /prune command
    
    Pending instincts generated by the observer accumulate indefinitely
    with no cleanup mechanism. This adds lifecycle management:
    
    - `instinct-cli.py prune` — delete pending instincts older than 30 days
      (configurable via --max-age). Supports --dry-run and --quiet flags.
    - Enhanced `status` command — shows pending count, warns at 5+,
      highlights instincts expiring within 7 days.
    - `observer-loop.sh` — runs prune before each analysis cycle.
    - `/prune` slash command — user-facing command for manual pruning.
    
    Design rationale: council consensus (4/4) rejected auto-promote in
    favor of TTL-based garbage collection. Frequency of observation does
    not establish correctness. Unreviewed pending instincts auto-delete
    after 30 days; if the pattern is real, the observer will regenerate it.
    
    Generated with [Claude Code](https://claude.ai/code)
    via [Happy](https://happy.engineering)
    
    Co-Authored-By: Claude <noreply@anthropic.com>
    Co-Authored-By: Happy <yesreply@happy.engineering>
    
    * fix: remove duplicate functions, broaden extension filter, fix prune output
    
    - Remove duplicate _collect_pending_dirs and _parse_created_date defs
    - Use ALLOWED_INSTINCT_EXTENSIONS (.md/.yaml/.yml) instead of .md-only
    - Track actually-deleted items separately from expired for accurate output
    - Update README.md and AGENTS.md command counts: 59 → 60
    
    Generated with [Claude Code](https://claude.ai/code)
    via [Happy](https://happy.engineering)
    
    Co-Authored-By: Claude <noreply@anthropic.com>
    Co-Authored-By: Happy <yesreply@happy.engineering>
    
    * fix: address Copilot and CodeRabbit review findings
    
    - Use is_dir() instead of exists() for pending path checks
    - Change > to >= for --max-age boundary (--max-age 0 now prunes all)
    - Use CLV2_PYTHON_CMD env var in observer-loop.sh prune call
    - Remove unused source_dupes variable
    - Remove extraneous f-string prefix on static string
    
    Generated with [Claude Code](https://claude.ai/code)
    via [Happy](https://happy.engineering)
    
    Co-Authored-By: Claude <noreply@anthropic.com>
    Co-Authored-By: Happy <yesreply@happy.engineering>
    
    * fix: update AGENTS.md project structure command count 59 → 60
    
    Co-Authored-By: Claude <noreply@anthropic.com>
    
    * fix: address cubic and coderabbit review findings
    
    - Fix status early return skipping pending instinct warnings (cubic #1)
    - Exclude already-expired items from expiring-soon filter (cubic #2)
    - Warn on unparseable pending instinct age instead of silent skip (cubic #4)
    - Log prune failures to observer.log instead of silencing (cubic #5)
    
    Co-Authored-By: Claude <noreply@anthropic.com>
    
    * fix: YAML single-quote unescaping, f-string cleanup, add /prune to README
    
    - Fix single-quoted YAML unescaping: use '' doubling (YAML spec) not
      backslash escaping which only applies to double-quoted strings (greptile P1)
    - Remove extraneous f-string prefix on static string (coderabbit)
    - Add /prune to README command catalog and file tree (cubic)
    
    Co-Authored-By: Claude <noreply@anthropic.com>
    
    ---------
    
    Co-authored-by: Claude <noreply@anthropic.com>
    Co-authored-by: Happy <yesreply@happy.engineering>
  • feat: add click-path-audit skill — finds state interaction bugs (#729)
    New debugging skill that traces every button/touchpoint through its full
    state change sequence. Catches bugs where functions individually work but
    cancel each other out via shared state side effects.
    
    Covers 6 bug patterns:
    1. Sequential Undo — call B resets what call A just set
    2. Async Race — double-click bypasses state-based loading guards
    3. Stale Closure — useCallback captures old value
    4. Missing State Transition — handler doesn't do what label says
    5. Conditional Dead Path — condition always false, action unreachable
    6. useEffect Interference — effect undoes button action
    
    Battle-tested: found 48 bugs in a production React+Zustand app that
    systematic debugging (54 bugs found separately) completely missed.
  • feat(skills): add Kysely migration patterns to database-migrations (#731)
    * feat(skills): add Kysely migration patterns to database-migrations
    
    Add Kysely section covering kysely-ctl CLI workflow, migration file
    structure (up/down with Kysely<any>), and programmatic Migrator setup
    with FileMigrationProvider and allowUnorderedMigrations option.
    
    * fix(skills): address PR review feedback for Kysely migration patterns
    
    - Replace redundant email index with avatar_url index (unique already creates index)
    - Add ESM-compatible __dirname using import.meta.url
    - Comment out allowUnorderedMigrations with production safety warning
    - Add clarifying comment for db variable
    
    * fix(skills): fix migration filename mismatch and clarify ESM-only pattern
    
    - Rename migration file to create_user_profile to match actual content
    - Restructure ESM import pattern to be clearly ESM-only with CJS note
  • perf(hooks): move post-edit-format and post-edit-typecheck to strict-only (#757)
    * perf(hooks): move post-edit-format and post-edit-typecheck to strict-only
    
    These hooks fire synchronously on every Edit call with 15-30s timeouts
    each. During multi-file refactors this adds 5-10 minutes of overhead.
    
    Moving them from standard,strict to strict-only means they won't fire
    in the default profile but are still available for users who want the
    extra validation.
    
    Fixes #735
    
    * Also update OpenCode plugin to strict-only for format/typecheck
    
    The OpenCode plugin had the same standard,strict profile for
    post:edit:format and post:edit:typecheck, so OpenCode users on the
    default profile would still get the per-edit overhead.
  • feat(hooks): add config protection hook to block linter config manipulation (#758)
    * feat(hooks): add config protection hook to block linter config manipulation
    
    Agents frequently modify linter/formatter configs (.eslintrc, biome.json,
    .prettierrc, .ruff.toml, etc.) to make checks pass instead of fixing
    the actual code.
    
    This PreToolUse hook intercepts Write/Edit/MultiEdit calls targeting
    known config files and blocks them with a steering message that directs
    the agent to fix the source code instead.
    
    Covers: ESLint, Prettier, Biome, Ruff, ShellCheck, Stylelint, and
    Markdownlint configs.
    
    Fixes #733
    
    * Address review: fix dead code, add missing configs, export run()
    
    - Removed pyproject.toml from PROTECTED_FILES (was dead code since
      it was also in PARTIAL_CONFIG_FILES). Added comment explaining why
      it's intentionally excluded.
    - Removed PARTIAL_CONFIG_FILES entirely (no longer needed).
    - Added missing ESLint v9 TypeScript flat configs: eslint.config.ts,
      eslint.config.mts, eslint.config.cts
    - Added missing Prettier ESM config: prettier.config.mjs
    - Exported run() function for in-process execution via run-with-flags,
      avoiding the spawnSync overhead (~50-100ms per call).
    
    * Handle stdin truncation gracefully, log warning instead of fail-open
    
    If stdin exceeds 1MB, the JSON would be malformed and the catch
    block would silently pass through. Now we detect truncation and
    log a warning. The in-process run() path is not affected.