@sentry/warden 0.28.0 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +241 -0
- package/README.md +1 -1
- package/TELEMETRY.md +4 -6
- package/dist/cli/args.d.ts +4 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +32 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/build.js +17 -2
- package/dist/cli/commands/build.js.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +5 -4
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +2 -1
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/main.d.ts +9 -0
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +105 -43
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/output/jsonl.d.ts +1 -0
- package/dist/cli/output/jsonl.d.ts.map +1 -1
- package/dist/cli/output/tasks.d.ts.map +1 -1
- package/dist/cli/output/tasks.js +10 -2
- package/dist/cli/output/tasks.js.map +1 -1
- package/dist/config/loader.js +1 -1
- package/dist/config/loader.js.map +1 -1
- package/dist/config/schema.d.ts +2 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +4 -4
- package/dist/config/schema.js.map +1 -1
- package/dist/evals/judge.js +3 -3
- package/dist/evals/runner.js +1 -1
- package/dist/evals/runner.js.map +1 -1
- package/dist/evals/types.d.ts +2 -2
- package/dist/evals/types.d.ts.map +1 -1
- package/dist/evals/types.js +16 -2
- package/dist/evals/types.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/output/dedup.js +7 -7
- package/dist/output/dedup.js.map +1 -1
- package/dist/sdk/analyze.d.ts.map +1 -1
- package/dist/sdk/analyze.js +11 -3
- package/dist/sdk/analyze.js.map +1 -1
- package/dist/sdk/auth.d.ts +1 -1
- package/dist/sdk/auth.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/extract.d.ts +3 -1
- package/dist/sdk/extract.d.ts.map +1 -1
- package/dist/sdk/extract.js +11 -5
- package/dist/sdk/extract.js.map +1 -1
- package/dist/sdk/fix-quality.d.ts.map +1 -1
- package/dist/sdk/fix-quality.js +3 -2
- package/dist/sdk/fix-quality.js.map +1 -1
- package/dist/sdk/haiku.d.ts.map +1 -1
- package/dist/sdk/haiku.js +27 -9
- package/dist/sdk/haiku.js.map +1 -1
- package/dist/sdk/json-output.d.ts.map +1 -1
- package/dist/sdk/json-output.js +3 -2
- package/dist/sdk/json-output.js.map +1 -1
- package/dist/sdk/otel.d.ts +20 -0
- package/dist/sdk/otel.d.ts.map +1 -0
- package/dist/sdk/otel.js +87 -0
- package/dist/sdk/otel.js.map +1 -0
- package/dist/sdk/post-process.d.ts.map +1 -1
- package/dist/sdk/post-process.js +1 -0
- package/dist/sdk/post-process.js.map +1 -1
- package/dist/sdk/pricing.d.ts.map +1 -1
- package/dist/sdk/pricing.js +1 -0
- package/dist/sdk/pricing.js.map +1 -1
- package/dist/sdk/runner.d.ts +1 -1
- package/dist/sdk/runner.d.ts.map +1 -1
- package/dist/sdk/runner.js +1 -1
- package/dist/sdk/runner.js.map +1 -1
- package/dist/sdk/runtimes/claude.d.ts.map +1 -1
- package/dist/sdk/runtimes/claude.js +44 -27
- package/dist/sdk/runtimes/claude.js.map +1 -1
- package/dist/sdk/runtimes/index.d.ts +2 -0
- package/dist/sdk/runtimes/index.d.ts.map +1 -1
- package/dist/sdk/runtimes/index.js +5 -1
- package/dist/sdk/runtimes/index.js.map +1 -1
- package/dist/sdk/runtimes/model-selectors.d.ts +5 -0
- package/dist/sdk/runtimes/model-selectors.d.ts.map +1 -0
- package/dist/sdk/runtimes/model-selectors.js +10 -0
- package/dist/sdk/runtimes/model-selectors.js.map +1 -0
- package/dist/sdk/runtimes/pi.d.ts +3 -0
- package/dist/sdk/runtimes/pi.d.ts.map +1 -0
- package/dist/sdk/runtimes/pi.js +504 -0
- package/dist/sdk/runtimes/pi.js.map +1 -0
- package/dist/sdk/runtimes/types.d.ts +5 -2
- package/dist/sdk/runtimes/types.d.ts.map +1 -1
- package/dist/sdk/runtimes/types.js +3 -3
- package/dist/sdk/runtimes/types.js.map +1 -1
- package/dist/sdk/types.d.ts +3 -3
- package/dist/sdk/types.d.ts.map +1 -1
- package/dist/sdk/verify.d.ts +1 -0
- package/dist/sdk/verify.d.ts.map +1 -1
- package/dist/sdk/verify.js +2 -1
- package/dist/sdk/verify.js.map +1 -1
- package/dist/sentry.d.ts.map +1 -1
- package/dist/sentry.js +7 -3
- package/dist/sentry.js.map +1 -1
- package/dist/skill-builder/agentic.d.ts +1 -0
- package/dist/skill-builder/agentic.d.ts.map +1 -1
- package/dist/skill-builder/agentic.js +3 -0
- package/dist/skill-builder/agentic.js.map +1 -1
- package/dist/skill-builder/outline.d.ts.map +1 -1
- package/dist/skill-builder/outline.js +2 -1
- package/dist/skill-builder/outline.js.map +1 -1
- package/dist/skill-builder/skill.d.ts.map +1 -1
- package/dist/skill-builder/skill.js +4 -0
- package/dist/skill-builder/skill.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +4 -1
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +14 -0
- package/dist/utils/index.js.map +1 -1
- package/package.json +5 -3
- package/skills/warden/SKILL.md +1 -1
- package/skills/warden/references/config-schema.md +8 -6
- package/skills/warden/references/configuration.md +4 -3
- package/src/builtin-skills/code-review/SKILL.md +4 -2
- package/src/builtin-skills/code-review/SOURCES.md +5 -1
- package/src/builtin-skills/code-review/SPEC.md +2 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/warden",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Event-driven agent that reacts to GitHub events and executes skills
|
|
3
|
+
"version": "0.29.0",
|
|
4
|
+
"description": "Event-driven agent that reacts to GitHub events and executes code-review skills",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -37,6 +37,8 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@anthropic-ai/claude-agent-sdk": "^0.2.22",
|
|
39
39
|
"@anthropic-ai/sdk": "^0.72.1",
|
|
40
|
+
"@earendil-works/pi-ai": "^0.74.0",
|
|
41
|
+
"@earendil-works/pi-coding-agent": "^0.74.0",
|
|
40
42
|
"@inquirer/select": "^5.0.4",
|
|
41
43
|
"@octokit/rest": "^22.0.1",
|
|
42
44
|
"@sentry/dotagents-lib": "^1.16.1",
|
|
@@ -73,7 +75,7 @@
|
|
|
73
75
|
"cli": "tsx src/cli/index.ts",
|
|
74
76
|
"clean:dist": "rm -rf dist",
|
|
75
77
|
"build": "pnpm run clean:dist && tsc -p tsconfig.build.json",
|
|
76
|
-
"build:action": "ncc build src/action/main.ts -o dist/action --no-source-map-register --license licenses.txt",
|
|
78
|
+
"build:action": "rm -rf dist/action && ncc build src/action/main.ts -o dist/action --no-source-map-register --license licenses.txt",
|
|
77
79
|
"dev": "tsc --watch",
|
|
78
80
|
"lint": "oxlint src",
|
|
79
81
|
"lint:fix": "oxlint --fix src",
|
package/skills/warden/SKILL.md
CHANGED
|
@@ -25,7 +25,8 @@ version = 1 # Required, must be 1
|
|
|
25
25
|
|
|
26
26
|
```toml
|
|
27
27
|
[defaults]
|
|
28
|
-
|
|
28
|
+
runtime = "pi" # Default runtime
|
|
29
|
+
model = "openai/gpt-5.5" # Legacy default analysis model
|
|
29
30
|
maxTurns = 50 # Legacy default analysis turns
|
|
30
31
|
defaultBranch = "main" # Base branch for comparisons
|
|
31
32
|
failOn = "high" # Exit 1 if findings >= this severity
|
|
@@ -35,15 +36,15 @@ reportOnSuccess = false # Post report even with no findings
|
|
|
35
36
|
ignorePaths = ["*.test.ts"] # Exclude matching files
|
|
36
37
|
|
|
37
38
|
[defaults.agent]
|
|
38
|
-
model = "
|
|
39
|
+
model = "openai/gpt-5.5" # Default repo-aware analysis model
|
|
39
40
|
maxTurns = 50 # Max agentic turns per hunk
|
|
40
41
|
|
|
41
42
|
[defaults.auxiliary]
|
|
42
|
-
model = "claude-haiku-4-5"
|
|
43
|
+
model = "anthropic/claude-haiku-4-5" # Helper model for extraction and fix gates
|
|
43
44
|
maxRetries = 5 # Retries for auxiliary structured calls
|
|
44
45
|
|
|
45
46
|
[defaults.synthesis]
|
|
46
|
-
model = "claude-opus-4-5"
|
|
47
|
+
model = "anthropic/claude-opus-4-5" # Consolidation and generated-skill build model
|
|
47
48
|
|
|
48
49
|
[defaults.chunking]
|
|
49
50
|
enabled = true # Enable hunk-based chunking
|
|
@@ -70,7 +71,7 @@ paths = ["src/**"] # Include only matching files
|
|
|
70
71
|
ignorePaths = ["**/*.test.ts"] # Exclude matching files
|
|
71
72
|
|
|
72
73
|
# Optional overrides (inherit from defaults if not set)
|
|
73
|
-
model = "claude-opus-4-5"
|
|
74
|
+
model = "anthropic/claude-opus-4-5"
|
|
74
75
|
maxTurns = 100
|
|
75
76
|
failOn = "high"
|
|
76
77
|
reportOn = "medium"
|
|
@@ -121,8 +122,9 @@ Always skipped (cannot be overridden):
|
|
|
121
122
|
|
|
122
123
|
| Variable | Purpose |
|
|
123
124
|
|----------|---------|
|
|
124
|
-
| `WARDEN_ANTHROPIC_API_KEY` | Claude API key (required) |
|
|
125
125
|
| `WARDEN_MODEL` | Default model (lowest priority) |
|
|
126
|
+
| `WARDEN_OPENAI_API_KEY` | OpenAI API key for OpenAI Pi models |
|
|
127
|
+
| `WARDEN_ANTHROPIC_API_KEY` | Anthropic API key for Anthropic Pi models or Claude runtime |
|
|
126
128
|
| `WARDEN_STATE_DIR` | Override cache location (default: `~/.local/warden`) |
|
|
127
129
|
| `WARDEN_SKILL_CACHE_TTL` | Cache TTL in seconds for unpinned remotes (default: 86400) |
|
|
128
130
|
|
|
@@ -20,7 +20,7 @@ The `name` field references a skill you've created (via `warden add`) or defined
|
|
|
20
20
|
version = 1
|
|
21
21
|
|
|
22
22
|
[defaults.agent]
|
|
23
|
-
model = "
|
|
23
|
+
model = "openai/gpt-5.5"
|
|
24
24
|
|
|
25
25
|
[[skills]]
|
|
26
26
|
name = "my-skill" # matches .agents/skills/my-skill/SKILL.md
|
|
@@ -58,7 +58,7 @@ actions = ["opened", "synchronize"]
|
|
|
58
58
|
```toml
|
|
59
59
|
[[skills]]
|
|
60
60
|
name = "my-skill"
|
|
61
|
-
model = "claude-opus-4-5"
|
|
61
|
+
model = "anthropic/claude-opus-4-5"
|
|
62
62
|
maxTurns = 100
|
|
63
63
|
paths = ["src/auth/**", "src/payments/**"]
|
|
64
64
|
failOn = "high"
|
|
@@ -108,8 +108,9 @@ From highest to lowest priority:
|
|
|
108
108
|
|
|
109
109
|
| Variable | Purpose |
|
|
110
110
|
|----------|---------|
|
|
111
|
-
| `WARDEN_ANTHROPIC_API_KEY` | Claude API key (required unless using Claude Code subscription) |
|
|
112
111
|
| `WARDEN_MODEL` | Default model (lowest priority) |
|
|
112
|
+
| `WARDEN_OPENAI_API_KEY` | OpenAI API key for OpenAI Pi models |
|
|
113
|
+
| `WARDEN_ANTHROPIC_API_KEY` | Anthropic API key for Anthropic Pi models or Claude runtime |
|
|
113
114
|
| `WARDEN_STATE_DIR` | Override cache location (default: `~/.local/warden`) |
|
|
114
115
|
| `WARDEN_SKILL_CACHE_TTL` | Cache TTL in seconds for unpinned remotes (default: 86400) |
|
|
115
116
|
|
|
@@ -51,6 +51,7 @@ No proof, no finding. Suspicion is not a result.
|
|
|
51
51
|
| Boundaries and edge cases | Empty, first, last, duplicate, pagination, sorting, timezone, locale, precision, overflow, migration, or compatibility cases produce wrong behavior. |
|
|
52
52
|
| Persistence and migrations | Writes are non-atomic, migrations lose data, backfills skip rows, query filters update the wrong records, or rollback paths leave inconsistent state. |
|
|
53
53
|
| API and dependency behavior | Published interfaces, CLI flags, config options, webhooks, service calls, or third-party dependency changes break documented or existing caller behavior. |
|
|
54
|
+
| Public metadata and routing config | Robots rules, sitemaps, manifests, redirects, cache headers, or route config make documented public entry points unreachable, stale, or undiscoverable. |
|
|
54
55
|
| UI correctness | The UI displays stale, wrong, duplicate, missing, or unsaved data because of the changed code, not because of style or preference. |
|
|
55
56
|
| Build, test, and workflow breakage | Changed code, packaging, imports, exports, generated artifacts, CI, or release workflows fail deterministically or report false success. |
|
|
56
57
|
|
|
@@ -58,11 +59,12 @@ No proof, no finding. Suspicion is not a result.
|
|
|
58
59
|
|
|
59
60
|
| Level | Use For |
|
|
60
61
|
|-------|---------|
|
|
61
|
-
| high | Data loss or corruption, critical-path crashes, broken production deploy or release, incorrect billing or permissions state, published interface breakage for normal callers, deadlock or hang in core flow, or false success after a failed destructive operation. |
|
|
62
|
+
| high | Data loss or corruption, critical-path crashes, broken production deploy or release, incorrect billing or permissions state, published interface breakage for normal callers, public metadata/config that blocks normal discovery or reachability of shipped endpoints, deadlock or hang in core flow, or false success after a failed destructive operation. |
|
|
62
63
|
| medium | Reproducible wrong results, recoverable crashes, duplicate or missed side effects, broken non-critical workflow, meaningful edge case in a shipped path, or compatibility break with a clear affected caller. |
|
|
63
|
-
| low | Narrow but real bug with limited blast radius, confusing state that can cause user-visible mistakes, or a test/tooling bug that masks
|
|
64
|
+
| low | Narrow but real bug with limited blast radius, confusing state that can cause user-visible mistakes, or a test/tooling bug that masks only a narrow non-shipped behavior. |
|
|
64
65
|
|
|
65
66
|
- Use the lower severity when impact depends on unproven preconditions.
|
|
67
|
+
- Score test and golden-file findings by the shipped behavior they authorize or hide, not by the file type. A test that locks in a high-impact production breakage is high severity.
|
|
66
68
|
- Do not inflate severity for cleverness. The bug earns its level through impact.
|
|
67
69
|
|
|
68
70
|
## What Not To Report
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
| Local `architecture-review` and `code-simplifier` skills | Local prior art | Medium | Use boundaries to avoid overlap with style and architecture feedback. | Make exclusions explicit so code review reports only bugs. |
|
|
9
9
|
| Common production correctness review failure modes | Engineering practice | Medium | Keep examples generic, transformed, and evidence-gated. | Cover logic, state, async, error handling, contracts, persistence, UI, build, and workflow bugs. |
|
|
10
10
|
| Warden package skill loader and packaging tests | Repository behavior | High | Use for validation scope only. | Add tests that the new built-in skill resolves and is included in the npm package. |
|
|
11
|
+
| GitHub issue #317 severity feedback | Maintainer issue feedback | High | Use only the generalized severity lesson; do not encode repo-specific private context. | Score tests, golden files, and config bugs by production blast radius when they hide or authorize shipped breakage. |
|
|
11
12
|
|
|
12
13
|
## Coverage Matrix
|
|
13
14
|
|
|
@@ -16,7 +17,7 @@
|
|
|
16
17
|
| Bug class definitions and prerequisites | Complete | `SKILL.md` defines reportable categories and requires a concrete trigger, violated contract, and impact. |
|
|
17
18
|
| Reachability and reproducibility evidence | Complete | Findings must prove the changed path is reachable and the failure is triggered by a specific input, state, ordering, or configuration. |
|
|
18
19
|
| False-positive controls | Complete | Exclusions block style, architecture, maintainability, security, performance-only, test-coverage-only, and pattern-only findings. |
|
|
19
|
-
| Severity and confidence calibration | Complete | Severity is tied to user-visible or operational impact, with lower severity for unproven preconditions. |
|
|
20
|
+
| Severity and confidence calibration | Complete | Severity is tied to user-visible or operational impact, including high-impact public discovery/config breakage, with lower severity for unproven preconditions. |
|
|
20
21
|
| Remediation expectations | Complete | Findings may include `suggestedFix` only when the fix is complete for the analyzed path. |
|
|
21
22
|
| Language and workflow caveats | Complete for initial scope | References cover JS/TS, Python, and GitHub Actions workflow correctness. Other languages use the core contract until repeated examples justify references. |
|
|
22
23
|
|
|
@@ -34,6 +35,9 @@
|
|
|
34
35
|
4. Build and workflow breakage are correctness bugs.
|
|
35
36
|
- Reason: Warden reviews code changes that can break published packages, CI, and releases.
|
|
36
37
|
- Decision: include deterministic build, packaging, test, and workflow failures when the changed code proves the failure.
|
|
38
|
+
5. Tests and golden files inherit severity from the shipped behavior they protect.
|
|
39
|
+
- Reason: a changed test can lock in broken output for a public route or config surface while looking like a low-impact test-only edit.
|
|
40
|
+
- Decision: do not automatically classify test/tooling findings as low when they mask or authorize high-impact production breakage.
|
|
37
41
|
|
|
38
42
|
## Open Gaps
|
|
39
43
|
|
|
@@ -10,7 +10,7 @@ It should catch real regressions and production defects while preferring no find
|
|
|
10
10
|
|
|
11
11
|
In scope:
|
|
12
12
|
|
|
13
|
-
- Logic, state, async, data contract, persistence, edge-case, API, UI, build, test, and workflow correctness bugs.
|
|
13
|
+
- Logic, state, async, data contract, persistence, edge-case, API, public metadata/config, UI, build, test, and workflow correctness bugs.
|
|
14
14
|
- Changed production code, user entry points, public APIs, shipped workflows, and tests that can mask shipped regressions.
|
|
15
15
|
- General bug-finding guidance that applies across application code.
|
|
16
16
|
- Focused notes for JavaScript/TypeScript, Python, and GitHub Actions workflow correctness.
|
|
@@ -89,6 +89,7 @@ Data that must not be stored:
|
|
|
89
89
|
- Holdout examples:
|
|
90
90
|
- A style-only diff with no behavior change should produce no finding.
|
|
91
91
|
- A security-only diff should be routed to `security-review`, not reported by `code-review`.
|
|
92
|
+
- A test or golden fixture that locks in broken shipped behavior should be scored by the shipped behavior's blast radius, not by the file type.
|
|
92
93
|
- A type-safe or schema-validated path should not be reported as a runtime bug.
|
|
93
94
|
- Acceptance gates:
|
|
94
95
|
- Findings require trigger, expected behavior, actual behavior, and impact.
|