diff --git a/package-lock.json b/package-lock.json index 70b99eed..16d0bbd7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "dreb", - "version": "2.55.0", + "version": "2.55.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dreb", - "version": "2.55.0", + "version": "2.55.1", "workspaces": [ "packages/*", "packages/coding-agent/examples/extensions/with-deps", @@ -10955,7 +10955,7 @@ }, "packages/agent": { "name": "@dreb/agent-core", - "version": "2.55.0", + "version": "2.55.1", "license": "MIT", "dependencies": { "@dreb/ai": "*" @@ -10984,7 +10984,7 @@ }, "packages/ai": { "name": "@dreb/ai", - "version": "2.55.0", + "version": "2.55.1", "license": "MIT", "dependencies": { "@anthropic-ai/sdk": "^0.73.0", @@ -11040,7 +11040,7 @@ }, "packages/coding-agent": { "name": "@dreb/coding-agent", - "version": "2.55.0", + "version": "2.55.1", "license": "MIT", "dependencies": { "@dreb/agent-core": "*", @@ -11169,7 +11169,7 @@ }, "packages/dashboard": { "name": "@dreb/dashboard", - "version": "2.55.0", + "version": "2.55.1", "license": "MIT", "dependencies": { "@dreb/coding-agent": "*", @@ -11401,7 +11401,7 @@ }, "packages/semantic-search": { "name": "@dreb/semantic-search", - "version": "2.55.0", + "version": "2.55.1", "license": "MIT", "dependencies": { "@huggingface/transformers": "^4.0.1", @@ -11450,7 +11450,7 @@ }, "packages/telegram": { "name": "@dreb/telegram", - "version": "2.55.0", + "version": "2.55.1", "license": "MIT", "dependencies": { "@dreb/coding-agent": "*", @@ -11483,7 +11483,7 @@ }, "packages/tui": { "name": "@dreb/tui", - "version": "2.55.0", + "version": "2.55.1", "license": "MIT", "dependencies": { "@types/mime-types": "^2.1.4", diff --git a/package.json b/package.json index fbe06169..e87cd7f0 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "node": "22.x" }, "packageManager": "npm@11.5.1", - "version": "2.55.0", + "version": "2.55.1", "dependencies": { "@dreb/coding-agent": "*", "@mariozechner/jiti": "^2.6.5", diff --git a/packages/agent/package.json b/packages/agent/package.json index bd409623..881069a1 100644 --- a/packages/agent/package.json +++ b/packages/agent/package.json @@ -1,6 +1,6 @@ { "name": "@dreb/agent-core", - "version": "2.55.0", + "version": "2.55.1", "description": "General-purpose agent with transport abstraction, state management, and attachment support", "type": "module", "main": "./dist/index.js", diff --git a/packages/ai/package.json b/packages/ai/package.json index a8d456ba..b8bd28e4 100644 --- a/packages/ai/package.json +++ b/packages/ai/package.json @@ -1,6 +1,6 @@ { "name": "@dreb/ai", - "version": "2.55.0", + "version": "2.55.1", "description": "Unified LLM API with automatic model discovery and provider configuration", "type": "module", "main": "./dist/index.js", diff --git a/packages/ai/test/context-overflow.test.ts b/packages/ai/test/context-overflow.test.ts index fe025d57..f2639fa7 100644 --- a/packages/ai/test/context-overflow.test.ts +++ b/packages/ai/test/context-overflow.test.ts @@ -202,8 +202,8 @@ describe("Context overflow error handling", () => { // ============================================================================= describe.skipIf(process.env.DREB_SKIP_LIVE_API === "1" || !process.env.GEMINI_API_KEY)("Google", () => { - it("gemini-2.0-flash - should detect overflow via isContextOverflow", async () => { - const model = getModel("google", "gemini-2.0-flash"); + it("gemini-2.5-flash - should detect overflow via isContextOverflow", async () => { + const model = getModel("google", "gemini-2.5-flash"); const result = await testContextOverflow(model, process.env.GEMINI_API_KEY!); logResult(result); diff --git a/packages/ai/test/total-tokens.test.ts b/packages/ai/test/total-tokens.test.ts index c041cfe4..d96f8121 100644 --- a/packages/ai/test/total-tokens.test.ts +++ b/packages/ai/test/total-tokens.test.ts @@ -203,10 +203,10 @@ describe("totalTokens field", () => { describe.skipIf(process.env.DREB_SKIP_LIVE_API === "1" || !process.env.GEMINI_API_KEY)("Google", () => { it( - "gemini-2.0-flash - should return totalTokens equal to sum of components", + "gemini-2.5-flash - should return totalTokens equal to sum of components", { retry: 3, timeout: 60000 }, async () => { - const llm = getModel("google", "gemini-2.0-flash"); + const llm = getModel("google", "gemini-2.5-flash"); console.log(`\nGoogle / ${llm.id}:`); const { first, second } = await testTotalTokensWithCache(llm); diff --git a/packages/coding-agent/package.json b/packages/coding-agent/package.json index d53f534d..ac944418 100644 --- a/packages/coding-agent/package.json +++ b/packages/coding-agent/package.json @@ -1,6 +1,6 @@ { "name": "@dreb/coding-agent", - "version": "2.55.0", + "version": "2.55.1", "description": "Coding agent CLI with read, bash, edit, write tools and session management", "type": "module", "drebConfig": { diff --git a/packages/coding-agent/skills/mach6-issue/SKILL.md b/packages/coding-agent/skills/mach6-issue/SKILL.md index b554de8e..36730f57 100644 --- a/packages/coding-agent/skills/mach6-issue/SKILL.md +++ b/packages/coding-agent/skills/mach6-issue/SKILL.md @@ -111,10 +111,13 @@ If templates exist, read them and select the most appropriate one. If codebase context is needed, use Explore subagents only for bounded evidence such as locating named behavior, files, tests, call sites, or exact snippets. The primary agent must interpret that evidence and own the issue's requirements, proposed behavior, scope, and technical conclusions. -### Step 2: Draft the issue +### Step 2: Draft and approve the issue + +An initial request to "create," "post," or "open" an issue is a request to draft it, **not approval to post it**. Never create an issue in the same turn as that initial request, regardless of how imperative or complete it is. Create a structured issue with: - **Title**: Clear, concise, action-oriented (under 80 chars, imperative form) +- **Original Request**: A clearly identified block quote containing the user's original request/input verbatim; do not paraphrase, correct, or omit any part of it - **Summary**: 2-3 sentences describing the problem or feature - **Current Behavior** (for bugs/improvements): What happens now - **Proposed Behavior**: What should happen @@ -123,16 +126,35 @@ Create a structured issue with: - **Technical Notes**: Implementation hints, relevant files, architectural considerations - **Labels**: Suggest appropriate labels based on the issue type -Present the draft to the user for approval. +Keep the issue limited to what the user explicitly requested. Before adding any acceptance criterion that the user did not explicitly ask for, present the proposed criterion separately with `ask_user` and obtain explicit confirmation that it is valid scope. Do not include an unrequested criterion without that confirmation, and do not treat approval of the completed issue draft as retroactive scope confirmation. + +Determine the candidate target repository as an exact `owner/repo`; do not rely on ambient `gh` context when posting. Use `ask_user` to present one Markdown-formatted approval question containing all of the following without summarizing or truncating them: +- The exact target `owner/repo` +- The complete issue title +- The complete Markdown issue body, including the verbatim **Original Request** block quote +- The complete proposed label list, or an explicit statement that no labels are proposed + +The question must offer exactly these three options and allow free-text discussion: +- **Approve** +- **Deny/Discuss** +- **Detailed Explanation with minimal jargon of each acceptance criteria** + +Only an explicit selection of **Approve** authorizes posting. Free text, a skipped or unanswered question, cancellation, **Deny/Discuss**, or the explanation option are not approval and must never fall through to issue creation. + +If the user selects **Deny/Discuss**, discuss or revise the draft without posting. If the user requests the detailed explanation, explain every acceptance criterion with minimal jargon without posting. After either path, present the complete draft, target, and proposed labels through this approval gate again before posting. Any change to the title, body, target repository, or proposed labels invalidates prior approval and requires a fresh approval. + +Stop and wait for the distinct `ask_user` response before continuing to Step 3. The non-interactive `gh` rule applies only to CLI execution; it does not replace this human approval gate. ### Step 3: Create the issue +Proceed only after the approval gate in Step 2 returned **Approve** for the exact title, body, target, and proposed labels used below. + ```bash GH_BODY="$(mktemp /tmp/gh-body.$$.XXXXXXXX)" cat > "$GH_BODY" << 'MACH6_EOF'
MACH6_EOF -gh issue create --title "