-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add skill and quite mode #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| package main | ||
|
|
||
| import ( | ||
| "testing" | ||
|
|
||
| "github.com/killme2008/devtap/internal/config" | ||
| ) | ||
|
|
||
| func TestOpenStoreStrictFileBackend(t *testing.T) { | ||
| dir := t.TempDir() | ||
| cfg := config.Default() | ||
|
|
||
| s, err := openStoreStrict(cfg, "file", dir, "claude-code") | ||
| if err != nil { | ||
| t.Fatalf("openStoreStrict(file): %v", err) | ||
| } | ||
| _ = s.Close() | ||
| } | ||
|
|
||
| func TestOpenStoreStrictEmptyBackend(t *testing.T) { | ||
| dir := t.TempDir() | ||
| cfg := config.Default() | ||
|
|
||
| s, err := openStoreStrict(cfg, "", dir, "claude-code") | ||
| if err != nil { | ||
| t.Fatalf("openStoreStrict(''): %v", err) | ||
| } | ||
| _ = s.Close() | ||
| } | ||
|
|
||
| func TestOpenStoreStrictUnknownBackend(t *testing.T) { | ||
| dir := t.TempDir() | ||
| cfg := config.Default() | ||
|
|
||
| _, err := openStoreStrict(cfg, "redis", dir, "claude-code") | ||
| if err == nil { | ||
| t.Fatal("expected error for unknown backend") | ||
| } | ||
| } | ||
|
|
||
| func TestOpenStoreStrictGreptimeDBNoFallback(t *testing.T) { | ||
| dir := t.TempDir() | ||
| cfg := config.Default() | ||
| // Point to an unreachable endpoint so New or Ping fails. | ||
| cfg.Store.GreptimeDB.Endpoint = "127.0.0.1:19999" | ||
| cfg.Store.GreptimeDB.MySQLEndpoint = "127.0.0.1:19998" | ||
|
|
||
| _, err := openStoreStrict(cfg, "greptimedb", dir, "claude-code") | ||
| if err == nil { | ||
| t.Fatal("expected error when greptimedb is unreachable, should not fall back to file store") | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| --- | ||
| name: devtap-get-build-errors | ||
| description: Fetch pending devtap build/dev output for the current turn using get_build_status and get_build_errors, then present the captured output verbatim. Use when the user asks to check build errors, latest build logs, or "/get_build_errors"-style actions. | ||
| metadata: | ||
| short-description: Fetch devtap output | ||
| --- | ||
|
|
||
| # devtap-get-build-errors | ||
|
|
||
| Use this skill when the user asks for build errors, latest build output, or an equivalent quick action. | ||
|
|
||
| ## Workflow | ||
|
|
||
| 1. Call `get_build_status` once. | ||
| 2. Call `get_build_errors` once when any of these is true: | ||
| - status reports pending output | ||
| - user explicitly asks to fetch/check logs now | ||
| - user says new build/test/dev output arrived | ||
| 3. Present `get_build_errors` content verbatim in a fenced code block. | ||
| 4. Keep source warnings verbatim (for example, unreachable source warnings). | ||
| 5. After the block, add one line: `Next action: <what you will do>`. | ||
|
|
||
| ## Rules | ||
|
|
||
| - Do not summarize or rewrite build output. | ||
| - Do not call `get_build_errors` repeatedly in the same turn unless new output is reported. | ||
| - MCP tool names map to CLI subcommands: `get_build_status` → `devtap status`, `get_build_errors` → `devtap drain`. | ||
| - If MCP tools are unavailable, use `scripts/get_build_errors.sh` as CLI fallback. |
14 changes: 14 additions & 0 deletions
14
skills/devtap-get-build-errors/scripts/get_build_errors.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| #!/usr/bin/env sh | ||
| set -eu | ||
|
|
||
| MAX_LINES="${1:-10000}" | ||
|
|
||
| if ! command -v devtap >/dev/null 2>&1; then | ||
| echo "devtap not found in PATH" >&2 | ||
| exit 127 | ||
| fi | ||
|
|
||
| pending_count=$(devtap status --quiet 2>/dev/null || echo 0) | ||
| if [ "$pending_count" -gt 0 ] 2>/dev/null; then | ||
| devtap drain --max-lines "$MAX_LINES" | ||
| fi |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.