@sentry/warden 0.6.0 → 0.7.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/README.md +1 -1
- package/dist/cli/commands/add.js +1 -1
- package/dist/cli/commands/add.js.map +1 -1
- package/dist/cli/commands/init.js +1 -1
- package/dist/cli/commands/setup-app/browser.d.ts +1 -0
- package/dist/cli/commands/setup-app/browser.d.ts.map +1 -1
- package/dist/cli/commands/setup-app/browser.js +10 -5
- package/dist/cli/commands/setup-app/browser.js.map +1 -1
- package/dist/cli/git.js +24 -24
- package/dist/cli/git.js.map +1 -1
- package/dist/cli/index.js +5 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +29 -27
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/output/ink-runner.d.ts.map +1 -1
- package/dist/cli/output/ink-runner.js +5 -7
- package/dist/cli/output/ink-runner.js.map +1 -1
- package/dist/cli/output/tasks.d.ts +1 -1
- package/dist/cli/output/tasks.d.ts.map +1 -1
- package/dist/cli/output/tasks.js +194 -161
- package/dist/cli/output/tasks.js.map +1 -1
- package/dist/config/loader.d.ts +4 -0
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +41 -34
- package/dist/config/loader.js.map +1 -1
- package/dist/config/schema.d.ts +14 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +12 -0
- package/dist/config/schema.js.map +1 -1
- package/dist/diff/context.d.ts.map +1 -1
- package/dist/diff/context.js +5 -1
- package/dist/diff/context.js.map +1 -1
- package/dist/index.d.ts +2 -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.d.ts +22 -0
- package/dist/output/dedup.d.ts.map +1 -1
- package/dist/output/dedup.js +180 -0
- package/dist/output/dedup.js.map +1 -1
- package/dist/output/github-checks.d.ts +3 -1
- package/dist/output/github-checks.d.ts.map +1 -1
- package/dist/output/github-checks.js +3 -3
- package/dist/output/github-checks.js.map +1 -1
- package/dist/output/github-issues.d.ts.map +1 -1
- package/dist/output/github-issues.js +8 -2
- package/dist/output/github-issues.js.map +1 -1
- package/dist/output/renderer.d.ts +3 -1
- package/dist/output/renderer.d.ts.map +1 -1
- package/dist/output/renderer.js +39 -9
- package/dist/output/renderer.js.map +1 -1
- package/dist/output/stale.d.ts +6 -2
- package/dist/output/stale.d.ts.map +1 -1
- package/dist/output/stale.js +4 -4
- package/dist/output/stale.js.map +1 -1
- package/dist/output/types.d.ts +2 -0
- package/dist/output/types.d.ts.map +1 -1
- package/dist/sdk/analyze.d.ts.map +1 -1
- package/dist/sdk/analyze.js +287 -205
- package/dist/sdk/analyze.js.map +1 -1
- package/dist/sentry.d.ts +17 -0
- package/dist/sentry.d.ts.map +1 -0
- package/dist/sentry.js +119 -0
- package/dist/sentry.js.map +1 -0
- package/dist/skills/index.d.ts +4 -4
- package/dist/skills/index.d.ts.map +1 -1
- package/dist/skills/index.js +2 -2
- package/dist/skills/index.js.map +1 -1
- package/dist/skills/loader.d.ts +48 -6
- package/dist/skills/loader.d.ts.map +1 -1
- package/dist/skills/loader.js +134 -57
- package/dist/skills/loader.js.map +1 -1
- package/dist/skills/remote.d.ts +12 -0
- package/dist/skills/remote.d.ts.map +1 -1
- package/dist/skills/remote.js +81 -32
- package/dist/skills/remote.js.map +1 -1
- package/dist/utils/async.d.ts +14 -1
- package/dist/utils/async.d.ts.map +1 -1
- package/dist/utils/async.js +29 -7
- package/dist/utils/async.js.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +3 -2
- package/plugins/warden/skills/warden/references/creating-skills.md +2 -3
package/dist/utils/async.d.ts
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Run async work items with a sliding-window concurrency pool.
|
|
3
|
+
* Spawns up to `concurrency` workers that each grab the next
|
|
4
|
+
* queued item as soon as they finish, keeping all slots busy.
|
|
5
|
+
*
|
|
6
|
+
* Results are returned in input order regardless of completion order.
|
|
7
|
+
* When `shouldAbort` is provided and returns true, workers stop
|
|
8
|
+
* picking up new items; already-started items run to completion.
|
|
9
|
+
* Only completed items appear in the returned array.
|
|
10
|
+
*/
|
|
11
|
+
export declare function runPool<T, R>(items: T[], concurrency: number, fn: (item: T, index: number) => Promise<R>, options?: {
|
|
12
|
+
shouldAbort?: () => boolean;
|
|
13
|
+
}): Promise<R[]>;
|
|
14
|
+
/**
|
|
15
|
+
* Process items with limited concurrency using a sliding-window pool.
|
|
3
16
|
*/
|
|
4
17
|
export declare function processInBatches<T, R>(items: T[], fn: (item: T) => Promise<R>, batchSize: number): Promise<R[]>;
|
|
5
18
|
//# sourceMappingURL=async.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../../src/utils/async.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,CAAC,EAAE,CAAC,EACzC,KAAK,EAAE,CAAC,EAAE,EACV,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,EAC3B,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,CAAC,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../../src/utils/async.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,wBAAsB,OAAO,CAAC,CAAC,EAAE,CAAC,EAChC,KAAK,EAAE,CAAC,EAAE,EACV,WAAW,EAAE,MAAM,EACnB,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,EAC1C,OAAO,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,OAAO,CAAA;CAAE,GACxC,OAAO,CAAC,CAAC,EAAE,CAAC,CAmBd;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,CAAC,EAAE,CAAC,EACzC,KAAK,EAAE,CAAC,EAAE,EACV,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,EAC3B,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,CAAC,EAAE,CAAC,CAEd"}
|
package/dist/utils/async.js
CHANGED
|
@@ -1,13 +1,35 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Run async work items with a sliding-window concurrency pool.
|
|
3
|
+
* Spawns up to `concurrency` workers that each grab the next
|
|
4
|
+
* queued item as soon as they finish, keeping all slots busy.
|
|
5
|
+
*
|
|
6
|
+
* Results are returned in input order regardless of completion order.
|
|
7
|
+
* When `shouldAbort` is provided and returns true, workers stop
|
|
8
|
+
* picking up new items; already-started items run to completion.
|
|
9
|
+
* Only completed items appear in the returned array.
|
|
3
10
|
*/
|
|
4
|
-
export async function
|
|
11
|
+
export async function runPool(items, concurrency, fn, options) {
|
|
5
12
|
const results = [];
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
13
|
+
let nextIndex = 0;
|
|
14
|
+
async function worker() {
|
|
15
|
+
while (nextIndex < items.length) {
|
|
16
|
+
if (options?.shouldAbort?.())
|
|
17
|
+
break;
|
|
18
|
+
const index = nextIndex++;
|
|
19
|
+
const item = items[index];
|
|
20
|
+
results.push({ index, value: await fn(item, index) });
|
|
21
|
+
}
|
|
10
22
|
}
|
|
11
|
-
|
|
23
|
+
const workerCount = Math.min(concurrency, items.length);
|
|
24
|
+
await Promise.all(Array.from({ length: workerCount }, () => worker()));
|
|
25
|
+
// Return results in input order
|
|
26
|
+
results.sort((a, b) => a.index - b.index);
|
|
27
|
+
return results.map((r) => r.value);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Process items with limited concurrency using a sliding-window pool.
|
|
31
|
+
*/
|
|
32
|
+
export async function processInBatches(items, fn, batchSize) {
|
|
33
|
+
return runPool(items, batchSize, fn);
|
|
12
34
|
}
|
|
13
35
|
//# sourceMappingURL=async.js.map
|
package/dist/utils/async.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async.js","sourceRoot":"","sources":["../../src/utils/async.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"async.js","sourceRoot":"","sources":["../../src/utils/async.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,OAAO,CAC3B,KAAU,EACV,WAAmB,EACnB,EAA0C,EAC1C,OAAyC;IAEzC,MAAM,OAAO,GAAkC,EAAE,CAAC;IAClD,IAAI,SAAS,GAAG,CAAC,CAAC;IAElB,KAAK,UAAU,MAAM;QACnB,OAAO,SAAS,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;YAChC,IAAI,OAAO,EAAE,WAAW,EAAE,EAAE;gBAAE,MAAM;YACpC,MAAM,KAAK,GAAG,SAAS,EAAE,CAAC;YAC1B,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAM,CAAC;YAC/B,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;QACxD,CAAC;IACH,CAAC;IAED,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxD,MAAM,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAEvE,gCAAgC;IAChC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;IAC1C,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AACrC,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,KAAU,EACV,EAA2B,EAC3B,SAAiB;IAEjB,OAAO,OAAO,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC;AACvC,CAAC"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { processInBatches } from './async.js';
|
|
1
|
+
export { processInBatches, runPool } from './async.js';
|
|
2
2
|
export { getVersion, getMajorVersion } from './version.js';
|
|
3
3
|
export { ExecError, execNonInteractive, execFileNonInteractive, execGitNonInteractive, GIT_NON_INTERACTIVE_ENV, } from './exec.js';
|
|
4
4
|
export type { ExecOptions } from './exec.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EACL,SAAS,EACT,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7C,+DAA+D;AAC/D,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAErC;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CA+B/C;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,GAAG,SAAS,CAEvD"}
|
package/dist/utils/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { processInBatches } from './async.js';
|
|
1
|
+
export { processInBatches, runPool } from './async.js';
|
|
2
2
|
export { getVersion, getMajorVersion } from './version.js';
|
|
3
3
|
export { ExecError, execNonInteractive, execFileNonInteractive, execGitNonInteractive, GIT_NON_INTERACTIVE_ENV, } from './exec.js';
|
|
4
4
|
/** Default concurrency for parallel trigger/skill execution */
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EACL,SAAS,EACT,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,WAAW,CAAC;AAGnB,+DAA+D;AAC/D,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAErC;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,+DAA+D;IAC/D,MAAM,UAAU,GAAa,EAAE,CAAC;IAEhC,wFAAwF;IACxF,qEAAqE;IACrE,IAAI,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,CAAC,KAAK,EAAE,EAAE;QACxD,MAAM,GAAG,GAAG,UAAU,CAAC,MAAM,CAAC;QAC9B,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACvB,OAAO,SAAS,GAAG,IAAI,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,8CAA8C;IAC9C,SAAS,GAAG,SAAS,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE;QAClD,MAAM,GAAG,GAAG,UAAU,CAAC,MAAM,CAAC;QAC9B,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACvB,OAAO,SAAS,GAAG,IAAI,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,uCAAuC;IACvC,SAAS,GAAG,SAAS;SAClB,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;SACtB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAEzB,+BAA+B;IAC/B,UAAU,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE;QAC9B,SAAS,GAAG,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;AACrF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/warden",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Event-driven agent that reacts to GitHub events and executes skills via Claude Code SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"@anthropic-ai/sdk": "^0.72.1",
|
|
40
40
|
"@inquirer/select": "^5.0.4",
|
|
41
41
|
"@octokit/rest": "^22.0.1",
|
|
42
|
+
"@sentry/node": "^10.38.0",
|
|
42
43
|
"chalk": "^5.6.2",
|
|
43
44
|
"dotenv": "^17.2.3",
|
|
44
45
|
"fast-glob": "^3.3.3",
|
|
@@ -71,7 +72,7 @@
|
|
|
71
72
|
"scripts": {
|
|
72
73
|
"cli": "tsx src/cli/index.ts",
|
|
73
74
|
"build": "tsc",
|
|
74
|
-
"build:action": "ncc build src/action/main.ts -o dist/action --source-map --license licenses.txt",
|
|
75
|
+
"build:action": "ncc build src/action/main.ts -o dist/action --no-source-map-register --license licenses.txt",
|
|
75
76
|
"dev": "tsc --watch",
|
|
76
77
|
"lint": "eslint src",
|
|
77
78
|
"lint:fix": "eslint src --fix",
|
|
@@ -7,9 +7,8 @@ Skills are markdown files that tell Warden what to look for. They follow the [ag
|
|
|
7
7
|
Warden searches these directories in order (first match wins):
|
|
8
8
|
|
|
9
9
|
```
|
|
10
|
-
.
|
|
11
|
-
.
|
|
12
|
-
.claude/skills/{name}/SKILL.md # Claude Code skills
|
|
10
|
+
.agents/skills/{name}/SKILL.md # Primary (recommended)
|
|
11
|
+
.claude/skills/{name}/SKILL.md # Backup (Claude Code convention)
|
|
13
12
|
```
|
|
14
13
|
|
|
15
14
|
## SKILL.md Format
|