diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ed38043..a803a8da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,25 @@ All notable changes to the claude-plugins project will be documented in this fil The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Entries are listed newest-first; each plugin section is treated as released when merged to `main`. +### vibe v1.1.120 + +#### Added + +- ISS-15026: the worker-check loop sweeps finished worktrees on every configured machine and reports what it removed and kept, with reasons. It finds worktrees with `git worktree list` and ties each to a PR by branch; `e2e-lock.mjs cleanup-sweep record` records a worktree at creation. A merged or closed PR gets past a stale board state, and a tree behind its PR head is covered. The remote sweep uses PR verdicts this machine sends. A helper's `e2e-lock` run records its stack on the helper. +- ISS-15023: the setup check prints the session's max context and autocompact sizes, and recommends a 400k autocompact window to a Claude Code session that sets none. +- ISS-14998: review-class guards run every runtime `redact*` function over a credential corpus and flag wildcard Git trust; the adversarial reviewer checks unreadable inputs, a guard's added source and caller-written evidence. + +#### Changed + +- ISS-15021: a new ticket goes to the saved backlog project or the project the person names, asked each time, and an unstarted ticket can move to another project. +- The worktree cleanup tests are named by the behavior they check. + +#### Fixed + +- A URL password containing `@` and `/` is fully redacted, and the cloud trigger stream redacts URL credentials. +- A board row whose worktree is gone is retired and reported once, and a remote cleanup on another vibe version says so in one line. +- Across all plugin Markdown, including eval prompts and graders, the release is about 288 words longer than v1.1.119. The count covers the source files in `plugins/vibe` and excludes the generated ClosedLoop edition. + ### vibe v1.1.119 #### Fixed diff --git a/plugins/vibe-closedloop/.claude-plugin/plugin.json b/plugins/vibe-closedloop/.claude-plugin/plugin.json index be87bfd2..58750184 100644 --- a/plugins/vibe-closedloop/.claude-plugin/plugin.json +++ b/plugins/vibe-closedloop/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "vibe", "description": "Vibe sessions, handoff, seed refresh, and ClosedLoop ticket workflows", - "version": "1.1.119", + "version": "1.1.120", "dependencies": [ "closedloop-core", "vibe-core" diff --git a/plugins/vibe-closedloop/.codex-plugin/plugin.json b/plugins/vibe-closedloop/.codex-plugin/plugin.json index 434c4a81..dd47f4a4 100644 --- a/plugins/vibe-closedloop/.codex-plugin/plugin.json +++ b/plugins/vibe-closedloop/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "vibe", - "version": "1.1.119", + "version": "1.1.120", "description": "Vibe sessions, handoff, seed refresh, and ClosedLoop ticket workflows", "author": { "name": "ClosedLoop", diff --git a/plugins/vibe-closedloop/README.md b/plugins/vibe-closedloop/README.md index 6b7da1ab..7a5b6755 100644 --- a/plugins/vibe-closedloop/README.md +++ b/plugins/vibe-closedloop/README.md @@ -314,7 +314,7 @@ Run the matching Codex suite from the repository root with ### Runtime files -Version `1.1.119` contains 17 skills and 17 agents, and no hook manifest: the +Version `1.1.120` contains 17 skills and 17 agents, and no hook manifest: the `vibe-core` plugin, which vibe declares as a dependency, registers the hooks and runs `hooks/runtime.mjs` from the vibe a session uses. Skill commands forward to guards in `hooks/` and runtime modules in `lib/`. The package has no standalone commands, root shell scripts or production Python tools. Tests sit beside their owners; Python contract helpers and the generic scan live in `tools/python/`. diff --git a/plugins/vibe-closedloop/agents/vibe-adversarial-reviewer.md b/plugins/vibe-closedloop/agents/vibe-adversarial-reviewer.md index 64d758bc..d43c0cb2 100644 --- a/plugins/vibe-closedloop/agents/vibe-adversarial-reviewer.md +++ b/plugins/vibe-closedloop/agents/vibe-adversarial-reviewer.md @@ -12,8 +12,8 @@ and include its evidence in `data.findings[].premises`. ## Inputs -Inputs are the phase, requests, local-plan paths and Prep evidence. Run only at -handoff, never the "Lean build loop"; never ask a technical question. Read the +Inputs are the phase, requests, local-plan paths and Prep evidence. Never ask +a technical question. Read the actual table, its affected/interacting row IDs and test evidence. Use the named core decision-table and session decision table, never a copied checklist. @@ -21,7 +21,7 @@ core decision-table and session decision table, never a copied checklist. Review the merge-base diff plus `git -C ls-files --others --exclude-standard`. Read full changed files and callers, not only hunks. -Compare implementation with the actual table and row evidence. Separate source +Compare implementation with that table and row evidence. Separate source findings and executed tests from planned coverage; reject premature alignment. Inspect all required rows and missing tests. A reviewer proposal cannot invent or remove behavior without source or a ruling. @@ -42,8 +42,8 @@ closedloop-graph is required, per `../skills/vibe/references/closedloop-graph.md package (a shared app package or the design system), find every consumer (closedloop-graph `code_callers` and `code_importers`). A prop default, removed prop, or changed layout that breaks another screen is a finding. - When more than one app mounts the shared package (for example a web app - and a Desktop renderer), check the consumers in each. So are a consumer + When more than one app mounts the shared package, check the consumers in + each. So are a consumer class or cascade layer beating an attribute-styled contract, plumbing that changes render props, and a migrated control off the route's render path or a replaced one with no new home. @@ -143,6 +143,9 @@ closedloop-graph is required, per `../skills/vibe/references/closedloop-graph.md selection or gate predicate with no human source. For every changed guard, enumerate producers first: zero inputs cannot go green, a real defect makes it red, and typed wrappers/aliases cannot bypass it. + An unreadable, failed or missing read never counts as empty or passing; + a second source keeps the refusal of a missing value; caller-written + evidence binds to the run or head it describes. 11. Version skew: a server enum or status parsed for a whole response (one `z.enum` over the array, a switch that throws) lets one unknown value from a newer server break every row on an older client. Parse it per row with diff --git a/plugins/vibe-closedloop/hooks/context-guard.mjs b/plugins/vibe-closedloop/hooks/context-guard.mjs index 3e43b321..023c25ea 100644 --- a/plugins/vibe-closedloop/hooks/context-guard.mjs +++ b/plugins/vibe-closedloop/hooks/context-guard.mjs @@ -34,7 +34,8 @@ import os from "node:os"; import path from "node:path"; import { resolveWorkDir } from "../lib/codex-fleet-monitor/scripts/work-dir.mjs"; import { bindChat, programFor, unboundLine, validChat } from "../lib/fleet-orchestrator/scripts/chat-binding.mjs"; -import { COMPACT_WINDOW_RANGE, contextGuardConfig, defaultHome, FLEET_HOME_SCRIPT, PROGRAM_READING } from "../lib/fleet-orchestrator/scripts/fleet-home.mjs"; +import { contextGuardConfig, defaultHome, FLEET_HOME_SCRIPT, PROGRAM_READING } from "../lib/fleet-orchestrator/scripts/fleet-home.mjs"; +import { autoCompactWindowTokens } from "../skills/vibe/scripts/session-context.mjs"; import { vibeSkillOf } from "../shared/plugin-roots.mjs"; import { vibeScriptPath } from "../shared/vibe-install.mjs"; import { hookStatePath } from "./hook-session-scope.mjs"; @@ -43,8 +44,6 @@ const SCAN_CHUNK_BYTES = 8 * 1024 * 1024; const ORCHESTRATOR_BASE_LINE = /^Base directory for this skill: [^\n]*\/skills\/fleet-orchestrator$/; const USAGE_WINDOWS = [256 * 1024, 2 * 1024 * 1024, 8 * 1024 * 1024]; const WINDOW_VARIABLE = "CLAUDE_CODE_AUTO_COMPACT_WINDOW"; -// Claude Code's reading of the variable: tokens, or a k/M suffix; outside COMPACT_WINDOW_RANGE it clamps. -const WINDOW_VALUE = /^\s*(\d+(?:\.\d+)?)\s*([kKmM]?)\s*$/; /** The PostToolUse result for `event`: the window notice and the flush prompt when due, else null. Never throws. */ export function contextGuard(event, env = process.env) { @@ -83,7 +82,7 @@ function evaluate(event, env) { claimCurrent(chat.home, chat.chat, env); const { state, config, stateFile, size } = chat; const result = {}; - const window = windowTokens(env[WINDOW_VARIABLE]); + const window = autoCompactWindowTokens(env[WINDOW_VARIABLE]); if (window === null && state.windowNoticeShown !== true) { state.windowNoticeShown = true; result.systemMessage = `This fleet-orchestrator chat has no usable ${WINDOW_VARIABLE}, so it compacts where Claude Code's own settings put it. To compact at ${kilo(config.compactWindowTokens)} (set in ${config.file}), relaunch it with fleet-claude, which sets ${WINDOW_VARIABLE}=${config.compactWindowTokens} from that file: fleet-claude --resume ${event.session_id} (install fleet-claude once with: node ${vibeScriptPath(FLEET_HOME_SCRIPT)} launcher --install)`; @@ -142,16 +141,6 @@ function claimCurrent(home, chat, env) { } catch {} } -/** The window Claude Code compacts at for a CLAUDE_CODE_AUTO_COMPACT_WINDOW value, or null when unset or unusable. */ -function windowTokens(value) { - if (typeof value !== "string" || value.trim() === "") return null; - const match = WINDOW_VALUE.exec(value); - if (!match) return null; - const scale = { "": 1, k: 1_000, m: 1_000_000 }[match[2].toLowerCase()]; - const tokens = Number(match[1]) * scale; - return Number.isFinite(tokens) && tokens > 0 ? Math.min(Math.max(tokens, COMPACT_WINDOW_RANGE[0]), COMPACT_WINDOW_RANGE[1]) : null; -} - /** * `{ programDir, home }` for the program `chat` runs, `{ unbound }` (the bind instruction) when the home's * current program belongs to another chat, or null with no program (no state files to flush or reread). diff --git a/plugins/vibe-closedloop/hooks/ticket-project-guard.mjs b/plugins/vibe-closedloop/hooks/ticket-project-guard.mjs index 2a509af6..2146949b 100644 --- a/plugins/vibe-closedloop/hooks/ticket-project-guard.mjs +++ b/plugins/vibe-closedloop/hooks/ticket-project-guard.mjs @@ -52,7 +52,7 @@ export function observeTicketProject(event, home = os.homedir()) { return null; } -/** Enforce one saved backlog and a live work-start-only weekly move across Vibe's tracker writes. */ +/** Enforce tracker-confirmed projects for creates and moves, and the live work-start-only weekly In Progress move, across Vibe's tracker writes. */ export function ticketProjectGuard(event, home = os.homedir()) { const action = actionFor(event, home); const input = event.tool_input ?? {}; diff --git a/plugins/vibe-closedloop/lib/fleet-orchestrator/scripts/fleet-home.mjs b/plugins/vibe-closedloop/lib/fleet-orchestrator/scripts/fleet-home.mjs index 3c39033f..7bb6ef04 100644 --- a/plugins/vibe-closedloop/lib/fleet-orchestrator/scripts/fleet-home.mjs +++ b/plugins/vibe-closedloop/lib/fleet-orchestrator/scripts/fleet-home.mjs @@ -91,6 +91,7 @@ import { migrate } from "./fleet-migrate.mjs"; import { skillFreshnessProblem } from "./skill-freshness.mjs"; import { scheduleWorkerCheck, workerCheckHeartbeat } from "./worker-check-schedule.mjs"; import { vibeScriptPath } from "../../../shared/vibe-install.mjs"; +import { COMPACT_WINDOW_RANGE } from "../../../skills/vibe/scripts/session-context.mjs"; import { isEntryPoint } from "../../../shared/plugin-roots.mjs"; export const REUSABLE = ["config.env", "standing-rulings.md", "lessons.md", "handover.md", "context-guard.json", "current", "programs"]; @@ -396,8 +397,6 @@ function resumeProgram(home, slug, chat, env, takeover) { /** The compaction limits file, read by vibe's PostToolUse and PreCompact hooks on every call. */ const CONTEXT_GUARD_FILE = "context-guard.json"; const CONTEXT_GUARD_DEFAULTS = Object.freeze({ enabled: true, compactWindowTokens: 300_000, flushAtPercent: 85 }); -// Claude Code accepts an auto-compact window from 100k to 1M tokens. -export const COMPACT_WINDOW_RANGE = Object.freeze([100_000, 1_000_000]); /** The limits: the defaults overlaid by `/context-guard.json`; throws on a malformed file. */ export function contextGuardConfig(home) { diff --git a/plugins/vibe-closedloop/lib/vibe/scripts/cloud-trigger-stream.mjs b/plugins/vibe-closedloop/lib/vibe/scripts/cloud-trigger-stream.mjs index ed5ad8d0..c2c8c2fc 100644 --- a/plugins/vibe-closedloop/lib/vibe/scripts/cloud-trigger-stream.mjs +++ b/plugins/vibe-closedloop/lib/vibe/scripts/cloud-trigger-stream.mjs @@ -2,6 +2,7 @@ import { readdirSync, rmSync } from "node:fs"; import os from "node:os"; import path from "node:path"; import { capturedJson } from "./captured-json.mjs"; +import { redactUserinfo } from "./cloud-validation-host.mjs"; import { writeAtomic } from "./owned-state.mjs"; /** The newest saved create streams kept; older ones are deleted when a new one is saved. */ @@ -15,10 +16,10 @@ const SAVED_NAME = /^\d{8}T\d{6}\d{3}Z-[\w-]+\.json$/; */ export const TOOL_NOT_EXECUTED = "CLOUD_TOOL_NOT_EXECUTED"; -/** One line of reported text with credential strings removed, or "" for a non-string. */ +/** One line of reported text with credential strings (URL and proxy userinfo included) removed, or "" for a non-string. */ export function redactedLine(value, preserveFormatting = false) { if (typeof value !== "string") return ""; - const clean = value.replace(/\b(?:github_pat_|gh[pousr]_)[A-Za-z0-9_]+|\bBearer\s+[A-Za-z0-9._~+-]+/gi, "[redacted]"); + const clean = redactUserinfo(value).replace(/\b(?:github_pat_|gh[pousr]_)[A-Za-z0-9_]+|\bBearer\s+[A-Za-z0-9._~+-]+/gi, "[redacted]"); return preserveFormatting ? clean.replace(/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g, "") : clean.replace(/[\x00-\x20\x7f]+/g, " ").trim(); } diff --git a/plugins/vibe-closedloop/lib/vibe/scripts/cloud-validation-host.mjs b/plugins/vibe-closedloop/lib/vibe/scripts/cloud-validation-host.mjs index 2fa27165..938b9382 100644 --- a/plugins/vibe-closedloop/lib/vibe/scripts/cloud-validation-host.mjs +++ b/plugins/vibe-closedloop/lib/vibe/scripts/cloud-validation-host.mjs @@ -156,7 +156,7 @@ export function rootSetupEnvironment(env, current, checkout) { * or a slash, so a path with an `@` after a port may go too. */ export function redactUserinfo(text) { - return String(text).replace(/\S+/g, (word) => throughLastAt(word, /(:\/\/)(?:[^/]+|[^/:@]+:.*)@/gis)) + return String(text).replace(/\S+/g, (word) => throughLastAt(word, /(:\/\/)(?:[^/:@]+:.*|[^/]+)@/gis)) .replace(/[^\s"']+/g, (part) => throughLastAt(part, /(^|[=(<,;])[^/@=(<,;:]+:(?!\/\/).*@/s, /[/?#@]/)); } diff --git a/plugins/vibe-closedloop/lib/vibe/scripts/e2e-lock.mjs b/plugins/vibe-closedloop/lib/vibe/scripts/e2e-lock.mjs index dcd5e60c..fc32794c 100644 --- a/plugins/vibe-closedloop/lib/vibe/scripts/e2e-lock.mjs +++ b/plugins/vibe-closedloop/lib/vibe/scripts/e2e-lock.mjs @@ -7,7 +7,7 @@ // stack to be free, runs the command, and releases the lock when the command // ends. A lock left by a process that no longer exists is taken over. // -// Usage: e2e-lock.mjs run --head [--source-hash ] [--owner ] [--label